github.com/gophercloud/gophercloud@v1.11.0/openstack/networking/v2/extensions/trunks/urls.go (about) 1 package trunks 2 3 import "github.com/gophercloud/gophercloud" 4 5 const resourcePath = "trunks" 6 7 func rootURL(c *gophercloud.ServiceClient) string { 8 return c.ServiceURL(resourcePath) 9 } 10 11 func resourceURL(c *gophercloud.ServiceClient, id string) string { 12 return c.ServiceURL(resourcePath, id) 13 } 14 15 func createURL(c *gophercloud.ServiceClient) string { 16 return rootURL(c) 17 } 18 19 func deleteURL(c *gophercloud.ServiceClient, id string) string { 20 return resourceURL(c, id) 21 } 22 23 func listURL(c *gophercloud.ServiceClient) string { 24 return rootURL(c) 25 } 26 27 func getURL(c *gophercloud.ServiceClient, id string) string { 28 return resourceURL(c, id) 29 } 30 31 func updateURL(c *gophercloud.ServiceClient, id string) string { 32 return resourceURL(c, id) 33 } 34 35 func getSubportsURL(c *gophercloud.ServiceClient, id string) string { 36 return c.ServiceURL(resourcePath, id, "get_subports") 37 } 38 39 func addSubportsURL(c *gophercloud.ServiceClient, id string) string { 40 return c.ServiceURL(resourcePath, id, "add_subports") 41 } 42 43 func removeSubportsURL(c *gophercloud.ServiceClient, id string) string { 44 return c.ServiceURL(resourcePath, id, "remove_subports") 45 }