github.com/huaweicloud/golangsdk@v0.0.0-20210831081626-d823fe11ceba/openstack/compute/v2/extensions/volumeattach/urls.go (about) 1 package volumeattach 2 3 import "github.com/huaweicloud/golangsdk" 4 5 const resourcePath = "os-volume_attachments" 6 7 func resourceURL(c *golangsdk.ServiceClient, serverID string) string { 8 return c.ServiceURL("servers", serverID, resourcePath) 9 } 10 11 func listURL(c *golangsdk.ServiceClient, serverID string) string { 12 return resourceURL(c, serverID) 13 } 14 15 func createURL(c *golangsdk.ServiceClient, serverID string) string { 16 return resourceURL(c, serverID) 17 } 18 19 func getURL(c *golangsdk.ServiceClient, serverID, aID string) string { 20 return c.ServiceURL("servers", serverID, resourcePath, aID) 21 } 22 23 func deleteURL(c *golangsdk.ServiceClient, serverID, aID string) string { 24 return getURL(c, serverID, aID) 25 }