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

     1  package servers
     2  
     3  import "github.com/huaweicloud/golangsdk"
     4  
     5  func createURL(client *golangsdk.ServiceClient) string {
     6  	return client.ServiceURL("servers")
     7  }
     8  
     9  func listURL(client *golangsdk.ServiceClient) string {
    10  	return createURL(client)
    11  }
    12  
    13  func listDetailURL(client *golangsdk.ServiceClient) string {
    14  	return client.ServiceURL("servers", "detail")
    15  }
    16  
    17  func deleteURL(client *golangsdk.ServiceClient, id string) string {
    18  	return client.ServiceURL("servers", id)
    19  }
    20  
    21  func getURL(client *golangsdk.ServiceClient, id string) string {
    22  	return deleteURL(client, id)
    23  }
    24  
    25  func updateURL(client *golangsdk.ServiceClient, id string) string {
    26  	return deleteURL(client, id)
    27  }
    28  
    29  func actionURL(client *golangsdk.ServiceClient, id string) string {
    30  	return client.ServiceURL("servers", id, "action")
    31  }
    32  
    33  func metadatumURL(client *golangsdk.ServiceClient, id, key string) string {
    34  	return client.ServiceURL("servers", id, "metadata", key)
    35  }
    36  
    37  func metadataURL(client *golangsdk.ServiceClient, id string) string {
    38  	return client.ServiceURL("servers", id, "metadata")
    39  }
    40  
    41  func listAddressesURL(client *golangsdk.ServiceClient, id string) string {
    42  	return client.ServiceURL("servers", id, "ips")
    43  }
    44  
    45  func listAddressesByNetworkURL(client *golangsdk.ServiceClient, id, network string) string {
    46  	return client.ServiceURL("servers", id, "ips", network)
    47  }
    48  
    49  func passwordURL(client *golangsdk.ServiceClient, id string) string {
    50  	return client.ServiceURL("servers", id, "os-server-password")
    51  }