github.com/huaweicloud/golangsdk@v0.0.0-20210831081626-d823fe11ceba/openstack/compute/v2/extensions/floatingips/urls.go (about)

     1  package floatingips
     2  
     3  import "github.com/huaweicloud/golangsdk"
     4  
     5  const resourcePath = "os-floating-ips"
     6  
     7  func resourceURL(c *golangsdk.ServiceClient) string {
     8  	return c.ServiceURL(resourcePath)
     9  }
    10  
    11  func listURL(c *golangsdk.ServiceClient) string {
    12  	return resourceURL(c)
    13  }
    14  
    15  func createURL(c *golangsdk.ServiceClient) string {
    16  	return resourceURL(c)
    17  }
    18  
    19  func getURL(c *golangsdk.ServiceClient, id string) string {
    20  	return c.ServiceURL(resourcePath, id)
    21  }
    22  
    23  func deleteURL(c *golangsdk.ServiceClient, id string) string {
    24  	return getURL(c, id)
    25  }
    26  
    27  func serverURL(c *golangsdk.ServiceClient, serverID string) string {
    28  	return c.ServiceURL("servers/" + serverID + "/action")
    29  }
    30  
    31  func associateURL(c *golangsdk.ServiceClient, serverID string) string {
    32  	return serverURL(c, serverID)
    33  }
    34  
    35  func disassociateURL(c *golangsdk.ServiceClient, serverID string) string {
    36  	return serverURL(c, serverID)
    37  }