@@ -5,17 +5,17 @@ import "github.com/rackspace/gophercloud"
5
5
// `listURL` is a pure function. `listURL(c)` is a URL for which a GET
6
6
// request will respond with a list of images in the service `c`.
7
7
func listURL (c * gophercloud.ServiceClient ) string {
8
- return c .Endpoint
8
+ return c .ServiceURL ( "images" )
9
9
}
10
10
11
11
func createURL (c * gophercloud.ServiceClient ) string {
12
- return c .Endpoint
12
+ return c .ServiceURL ( "images" )
13
13
}
14
14
15
15
// `imageURL(c,i)` is the URL for the image identified by ID `i` in
16
16
// the service `c`.
17
17
func imageURL (c * gophercloud.ServiceClient , imageID string ) string {
18
- return c .ServiceURL (imageID )
18
+ return c .ServiceURL ("images" , imageID )
19
19
}
20
20
21
21
// `getURL(c,i)` is a URL for which a GET request will respond with
@@ -30,31 +30,31 @@ var deleteURL = imageURL
30
30
// `imageDataURL(c,i)` is the URL for the binary image data for the
31
31
// image identified by ID `i` in the service `c`.
32
32
func imageDataURL (c * gophercloud.ServiceClient , imageID string ) string {
33
- return c .ServiceURL (imageID , "file" )
33
+ return c .ServiceURL ("images" , imageID , "file" )
34
34
}
35
35
36
36
var getDataURL = imageDataURL
37
37
38
38
var updateDataURL = imageDataURL
39
39
40
40
func imageTagURL (c * gophercloud.ServiceClient , imageID string , tag string ) string {
41
- return c .ServiceURL (imageID , "tags" , tag )
41
+ return c .ServiceURL ("images" , imageID , "tags" , tag )
42
42
}
43
43
44
44
var createTagURL = imageTagURL
45
45
46
46
var deleteTagURL = imageTagURL
47
47
48
48
func imageMembersURL (c * gophercloud.ServiceClient , imageID string ) string {
49
- return c .ServiceURL (imageID , "members" )
49
+ return c .ServiceURL ("images" , imageID , "members" )
50
50
}
51
51
52
52
var listMembersURL = imageMembersURL
53
53
54
54
var createMemberURL = imageMembersURL
55
55
56
56
func imageMemberURL (c * gophercloud.ServiceClient , imageID string , memberID string ) string {
57
- return c .ServiceURL (imageID , "members" , memberID )
57
+ return c .ServiceURL ("images" , imageID , "members" , memberID )
58
58
}
59
59
60
60
var getMemberURL = imageMemberURL
@@ -64,9 +64,9 @@ var updateMemberURL = imageMemberURL
64
64
var deleteMemberURL = imageMemberURL
65
65
66
66
func reactivateImageURL (c * gophercloud.ServiceClient , imageID string ) string {
67
- return c .ServiceURL (imageID , "actions" , "reactivate" )
67
+ return c .ServiceURL ("images" , imageID , "actions" , "reactivate" )
68
68
}
69
69
70
70
func deactivateImageURL (c * gophercloud.ServiceClient , imageID string ) string {
71
- return c .ServiceURL (imageID , "actions" , "deactivate" )
71
+ return c .ServiceURL ("images" , imageID , "actions" , "deactivate" )
72
72
}
0 commit comments