Merge lp:~allenap/gwacl/list-hosted-services into lp:gwacl

Proposed by Gavin Panella
Status: Merged
Approved by: Gavin Panella
Approved revision: 110
Merged at revision: 109
Proposed branch: lp:~allenap/gwacl/list-hosted-services
Merge into: lp:gwacl
Diff against target: 73 lines (+8/-6)
4 files modified
example/management/run.go (+1/-1)
management.go (+2/-2)
management_test.go (+3/-3)
xmlobjects.go (+2/-0)
To merge this branch: bzr merge lp:~allenap/gwacl/list-hosted-services
Reviewer Review Type Date Requested Status
Julian Edwards (community) Approve
Review via email: mp+169931@code.launchpad.net

Commit message

Rename ListHostedServiceDescriptors to ListHostedServices to match Azure's naming.

To post a comment you must log in.
Revision history for this message
Julian Edwards (julian-edwards) wrote :

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

 review: approve
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iEYEARECAAYFAlG/t58ACgkQWhGlTF8G/HdWNwCgnZ8+MQ9hR+/FajX6h7IQI758
b+kAoIl2BDnLxiLaHYJXCoSaCs3MJsGh
=jz/b
-----END PGP SIGNATURE-----

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'example/management/run.go'
2--- example/management/run.go 2013-06-11 10:14:14 +0000
3+++ example/management/run.go 2013-06-17 19:58:28 +0000
4@@ -106,7 +106,7 @@
5 fmt.Println("Done creating a hosted service\n")
6
7 fmt.Println("Listing hosted services...")
8- hostedServices, err := api.ListHostedServiceDescriptors()
9+ hostedServices, err := api.ListHostedServices()
10 checkError(err)
11 fmt.Printf("Got %d hosted service(s)\n", len(hostedServices))
12 if len(hostedServices) > 0 {
13
14=== renamed file 'managementapi.go' => 'management.go'
15--- managementapi.go 2013-04-26 15:31:50 +0000
16+++ management.go 2013-06-17 19:58:28 +0000
17@@ -106,11 +106,11 @@
18 return &images, err
19 }
20
21-// ListHostedServiceDescriptors loads a list of HostedServiceDescriptor objects from the
22+// ListHostedServices loads a list of HostedServiceDescriptor objects from the
23 // Azure management API.
24 // HostedServiceDescriptor objects contains a small subset of the fields present in
25 // HostedService objects.
26-func (api *ManagementAPI) ListHostedServiceDescriptors() ([]HostedServiceDescriptor, error) {
27+func (api *ManagementAPI) ListHostedServices() ([]HostedServiceDescriptor, error) {
28 URI := "services/hostedservices"
29 res, err := api.session.get(URI)
30 if err != nil {
31
32=== renamed file 'managementapi_test.go' => 'management_test.go'
33--- managementapi_test.go 2013-04-26 15:41:12 +0000
34+++ management_test.go 2013-06-17 19:58:28 +0000
35@@ -350,7 +350,7 @@
36 c.Check(receivedNames, DeepEquals, imageNames)
37 }
38
39-func (suite *managementAPISuite) TestListHostedServiceDescriptors(c *C) {
40+func (suite *managementAPISuite) TestListHostedServices(c *C) {
41 api := makeAPI(c)
42 fixedResponse := x509Response{
43 StatusCode: http.StatusOK,
44@@ -360,14 +360,14 @@
45 recordedRequests := make([]*x509Request, 0)
46 rigRecordingDispatcher(&recordedRequests)
47
48- _, err := api.ListHostedServiceDescriptors()
49+ _, err := api.ListHostedServices()
50
51 c.Assert(err, IsNil)
52 expectedURL := AZURE_URL + api.session.subscriptionId + "/services/hostedservices"
53 checkOneRequest(c, &recordedRequests, expectedURL, []byte{}, "GET")
54 }
55
56-// TODO test that ListHostedServiceDescriptors parses the structures correctly
57+// TODO test that ListHostedServices parses the structures correctly
58
59 func (suite *managementAPISuite) TestLoadHostedService(c *C) {
60 api := makeAPI(c)
61
62=== modified file 'xmlobjects.go'
63--- xmlobjects.go 2013-06-11 10:14:14 +0000
64+++ xmlobjects.go 2013-06-17 19:58:28 +0000
65@@ -293,6 +293,8 @@
66 HostedServices []HostedServiceDescriptor `xml:"HostedService"`
67 }
68
69+// HostedServiceDescriptor contains a subset of the details in HostedService,
70+// and is used when describing a list of HostedServices.
71 type HostedServiceDescriptor struct {
72 XMLNS string `xml:"xmlns,attr"`
73 URL string `xml:"Url"`

Subscribers

People subscribed via source and target branches

to all changes: