github.com/chnsz/golangsdk@v0.0.0-20240506093406-85a3fbfa605b/openstack/ecs/v1/block_devices/urls.go (about)

     1  package block_devices
     2  
     3  import "github.com/chnsz/golangsdk"
     4  
     5  func getURL(c *golangsdk.ServiceClient, server_id string, volume_id string) string {
     6  	return c.ServiceURL("cloudservers", server_id, "block_device", volume_id)
     7  }
     8  
     9  func rootURL(c *golangsdk.ServiceClient, serverId string) string {
    10  	return c.ServiceURL("cloudservers", serverId, "block_device")
    11  }
    12  
    13  func resourceURL(c *golangsdk.ServiceClient, serverId, volumeId string) string {
    14  	return c.ServiceURL("cloudservers", serverId, "block_device", volumeId)
    15  }
    16  
    17  func attachURL(c *golangsdk.ServiceClient, serverId string) string {
    18  	return c.ServiceURL("cloudservers", serverId, "attachvolume")
    19  }
    20  
    21  func detachURL(c *golangsdk.ServiceClient, serverId, volumeId string) string {
    22  	return c.ServiceURL("cloudservers", serverId, "detachvolume", volumeId)
    23  }