blob: a7b03d98750f0302ad588d97ae2f1b7d33b58ddc [file] [log] [blame]
Jamie Hannaford89f9af22014-09-17 12:21:48 +02001package subnets
Jamie Hannaford0708c002014-09-17 16:08:49 +02002
Krzysztof Szukiełojć3f41d082017-05-07 14:43:06 +02003import "gerrit.mcp.mirantis.net/debian/gophercloud.git"
Jamie Hannaford0708c002014-09-17 16:08:49 +02004
Jamie Hannaford686c4962014-09-23 10:46:20 +02005func resourceURL(c *gophercloud.ServiceClient, id string) string {
Ash Wilsonb4c8c6f2014-10-06 17:35:02 -04006 return c.ServiceURL("subnets", id)
Jamie Hannaford0708c002014-09-17 16:08:49 +02007}
8
Jamie Hannaford686c4962014-09-23 10:46:20 +02009func rootURL(c *gophercloud.ServiceClient) string {
Ash Wilsonb4c8c6f2014-10-06 17:35:02 -040010 return c.ServiceURL("subnets")
Jamie Hannaford0708c002014-09-17 16:08:49 +020011}
12
Jamie Hannaford686c4962014-09-23 10:46:20 +020013func listURL(c *gophercloud.ServiceClient) string {
14 return rootURL(c)
Jamie Hannaford0708c002014-09-17 16:08:49 +020015}
16
Jamie Hannaford686c4962014-09-23 10:46:20 +020017func getURL(c *gophercloud.ServiceClient, id string) string {
18 return resourceURL(c, id)
Jamie Hannaford0708c002014-09-17 16:08:49 +020019}
Jamie Hannaford63631432014-09-18 11:40:09 +020020
Jamie Hannaford686c4962014-09-23 10:46:20 +020021func createURL(c *gophercloud.ServiceClient) string {
22 return rootURL(c)
Jamie Hannaford63631432014-09-18 11:40:09 +020023}
Jamie Hannafordd11e20c2014-09-18 12:03:01 +020024
Jamie Hannaford686c4962014-09-23 10:46:20 +020025func updateURL(c *gophercloud.ServiceClient, id string) string {
26 return resourceURL(c, id)
Jamie Hannafordd11e20c2014-09-18 12:03:01 +020027}
28
Jamie Hannaford686c4962014-09-23 10:46:20 +020029func deleteURL(c *gophercloud.ServiceClient, id string) string {
30 return resourceURL(c, id)
Jamie Hannafordd11e20c2014-09-18 12:03:01 +020031}