blob: 6f3960e2adaab01a9f264ed16816526e3afc8c13 [file] [log] [blame]
Jamie Hannaford548d3402014-09-18 15:50:08 +02001package ports
2
Krzysztof Szukiełojć3f41d082017-05-07 14:43:06 +02003import "gerrit.mcp.mirantis.net/debian/gophercloud.git"
Jamie Hannaford548d3402014-09-18 15:50:08 +02004
Jamie Hannaford965ae702014-09-22 14:58:19 +02005func resourceURL(c *gophercloud.ServiceClient, id string) string {
Ash Wilsonb4c8c6f2014-10-06 17:35:02 -04006 return c.ServiceURL("ports", id)
Jamie Hannaford548d3402014-09-18 15:50:08 +02007}
8
Jamie Hannaford965ae702014-09-22 14:58:19 +02009func rootURL(c *gophercloud.ServiceClient) string {
Ash Wilsonb4c8c6f2014-10-06 17:35:02 -040010 return c.ServiceURL("ports")
Jamie Hannaford548d3402014-09-18 15:50:08 +020011}
12
Jamie Hannaford965ae702014-09-22 14:58:19 +020013func listURL(c *gophercloud.ServiceClient) string {
14 return rootURL(c)
Jamie Hannaford548d3402014-09-18 15:50:08 +020015}
16
Jamie Hannaford965ae702014-09-22 14:58:19 +020017func getURL(c *gophercloud.ServiceClient, id string) string {
18 return resourceURL(c, id)
Jamie Hannaford548d3402014-09-18 15:50:08 +020019}
20
Jamie Hannaford965ae702014-09-22 14:58:19 +020021func createURL(c *gophercloud.ServiceClient) string {
22 return rootURL(c)
Jamie Hannaford548d3402014-09-18 15:50:08 +020023}
24
Jamie Hannaford965ae702014-09-22 14:58:19 +020025func updateURL(c *gophercloud.ServiceClient, id string) string {
26 return resourceURL(c, id)
Jamie Hannaford548d3402014-09-18 15:50:08 +020027}
28
Jamie Hannaford965ae702014-09-22 14:58:19 +020029func deleteURL(c *gophercloud.ServiceClient, id string) string {
30 return resourceURL(c, id)
Jamie Hannaford548d3402014-09-18 15:50:08 +020031}