github.com/gophercloud/gophercloud@v1.14.1/openstack/networking/v2/extensions/bgpvpns/urls.go (about)

     1  package bgpvpns
     2  
     3  import "github.com/gophercloud/gophercloud"
     4  
     5  const urlBase = "bgpvpn/bgpvpns"
     6  
     7  // return /v2.0/bgpvpn/bgpvpns/{bgpvpn-id}
     8  func resourceURL(c *gophercloud.ServiceClient, id string) string {
     9  	return c.ServiceURL(urlBase, id)
    10  }
    11  
    12  // return /v2.0/bgpvpn/bgpvpns
    13  func rootURL(c *gophercloud.ServiceClient) string {
    14  	return c.ServiceURL(urlBase)
    15  }
    16  
    17  // return /v2.0/bgpvpn/bgpvpns/{bgpvpn-id}
    18  func getURL(c *gophercloud.ServiceClient, id string) string {
    19  	return resourceURL(c, id)
    20  }
    21  
    22  // return /v2.0/bgpvpn/bgpvpns
    23  func listURL(c *gophercloud.ServiceClient) string {
    24  	return rootURL(c)
    25  }
    26  
    27  // return /v2.0/bgpvpn/bgpvpns
    28  func createURL(c *gophercloud.ServiceClient) string {
    29  	return rootURL(c)
    30  }
    31  
    32  // return /v2.0/bgpvpn/bgpvpns/{bgpvpn-id}
    33  func deleteURL(c *gophercloud.ServiceClient, id string) string {
    34  	return resourceURL(c, id)
    35  }
    36  
    37  // return /v2.0/bgpvpn/bgpvpns/{bgpvpn-id}
    38  func updateURL(c *gophercloud.ServiceClient, id string) string {
    39  	return resourceURL(c, id)
    40  }
    41  
    42  // return /v2.0/bgpvpn/bgpvpns/{bgpvpn-id}/network_associations
    43  func networkAssociationsURL(c *gophercloud.ServiceClient, bgpVpnID string) string {
    44  	return c.ServiceURL(urlBase, bgpVpnID, "network_associations")
    45  }
    46  
    47  // return /v2.0/bgpvpn/bgpvpns/{bgpvpn-id}/network_associations/{network-association-id}
    48  func networkAssociationResourceURL(c *gophercloud.ServiceClient, bgpVpnID string, id string) string {
    49  	return c.ServiceURL(urlBase, bgpVpnID, "network_associations", id)
    50  }
    51  
    52  // return /v2.0/bgpvpn/bgpvpns/{bgpvpn-id}/network_associations
    53  func listNetworkAssociationsURL(c *gophercloud.ServiceClient, bgpVpnID string) string {
    54  	return networkAssociationsURL(c, bgpVpnID)
    55  }
    56  
    57  // return /v2.0/bgpvpn/bgpvpns/{bgpvpn-id}/network_associations
    58  func createNetworkAssociationURL(c *gophercloud.ServiceClient, bgpVpnID string) string {
    59  	return networkAssociationsURL(c, bgpVpnID)
    60  }
    61  
    62  // return /v2.0/bgpvpn/bgpvpns/{bgpvpn-id}/network_associations/{network-association-id}
    63  func getNetworkAssociationURL(c *gophercloud.ServiceClient, bgpVpnID string, id string) string {
    64  	return networkAssociationResourceURL(c, bgpVpnID, id)
    65  }
    66  
    67  // return /v2.0/bgpvpn/bgpvpns/{bgpvpn-id}/network_associations/{network-association-id}
    68  func deleteNetworkAssociationURL(c *gophercloud.ServiceClient, bgpVpnID string, id string) string {
    69  	return networkAssociationResourceURL(c, bgpVpnID, id)
    70  }
    71  
    72  // return /v2.0/bgpvpn/bgpvpns/{bgpvpn-id}/router_associations
    73  func routerAssociationsURL(c *gophercloud.ServiceClient, bgpVpnID string) string {
    74  	return c.ServiceURL(urlBase, bgpVpnID, "router_associations")
    75  }
    76  
    77  // return /v2.0/bgpvpn/bgpvpns/{bgpvpn-id}/router_associations/{router-association-id}
    78  func routerAssociationResourceURL(c *gophercloud.ServiceClient, bgpVpnID string, id string) string {
    79  	return c.ServiceURL(urlBase, bgpVpnID, "router_associations", id)
    80  }
    81  
    82  // return /v2.0/bgpvpn/bgpvpns/{bgpvpn-id}/router_associations
    83  func listRouterAssociationsURL(c *gophercloud.ServiceClient, bgpVpnID string) string {
    84  	return routerAssociationsURL(c, bgpVpnID)
    85  }
    86  
    87  // return /v2.0/bgpvpn/bgpvpns/{bgpvpn-id}/router_associations
    88  func createRouterAssociationURL(c *gophercloud.ServiceClient, bgpVpnID string) string {
    89  	return routerAssociationsURL(c, bgpVpnID)
    90  }
    91  
    92  // return /v2.0/bgpvpn/bgpvpns/{bgpvpn-id}/router_associations/{router-association-id}
    93  func getRouterAssociationURL(c *gophercloud.ServiceClient, bgpVpnID string, id string) string {
    94  	return routerAssociationResourceURL(c, bgpVpnID, id)
    95  }
    96  
    97  // return /v2.0/bgpvpn/bgpvpns/{bgpvpn-id}/router_associations/{router-association-id}
    98  func updateRouterAssociationURL(c *gophercloud.ServiceClient, bgpVpnID string, id string) string {
    99  	return routerAssociationResourceURL(c, bgpVpnID, id)
   100  }
   101  
   102  // return /v2.0/bgpvpn/bgpvpns/{bgpvpn-id}/router_associations/{router-association-id}
   103  func deleteRouterAssociationURL(c *gophercloud.ServiceClient, bgpVpnID string, id string) string {
   104  	return routerAssociationResourceURL(c, bgpVpnID, id)
   105  }
   106  
   107  // return /v2.0/bgpvpn/bgpvpns/{bgpvpn-id}/port_associations
   108  func portAssociationsURL(c *gophercloud.ServiceClient, bgpVpnID string) string {
   109  	return c.ServiceURL(urlBase, bgpVpnID, "port_associations")
   110  }
   111  
   112  // return /v2.0/bgpvpn/bgpvpns/{bgpvpn-id}/port_associations/{port-association-id}
   113  func portAssociationResourceURL(c *gophercloud.ServiceClient, bgpVpnID string, id string) string {
   114  	return c.ServiceURL(urlBase, bgpVpnID, "port_associations", id)
   115  }
   116  
   117  // return /v2.0/bgpvpn/bgpvpns/{bgpvpn-id}/port_associations
   118  func listPortAssociationsURL(c *gophercloud.ServiceClient, bgpVpnID string) string {
   119  	return portAssociationsURL(c, bgpVpnID)
   120  }
   121  
   122  // return /v2.0/bgpvpn/bgpvpns/{bgpvpn-id}/port_associations
   123  func createPortAssociationURL(c *gophercloud.ServiceClient, bgpVpnID string) string {
   124  	return portAssociationsURL(c, bgpVpnID)
   125  }
   126  
   127  // return /v2.0/bgpvpn/bgpvpns/{bgpvpn-id}/port_associations/{port-association-id}
   128  func getPortAssociationURL(c *gophercloud.ServiceClient, bgpVpnID string, id string) string {
   129  	return portAssociationResourceURL(c, bgpVpnID, id)
   130  }
   131  
   132  // return /v2.0/bgpvpn/bgpvpns/{bgpvpn-id}/port_associations/{port-association-id}
   133  func updatePortAssociationURL(c *gophercloud.ServiceClient, bgpVpnID string, id string) string {
   134  	return portAssociationResourceURL(c, bgpVpnID, id)
   135  }
   136  
   137  // return /v2.0/bgpvpn/bgpvpns/{bgpvpn-id}/port_associations/{port-association-id}
   138  func deletePortAssociationURL(c *gophercloud.ServiceClient, bgpVpnID string, id string) string {
   139  	return portAssociationResourceURL(c, bgpVpnID, id)
   140  }