Merge lp://staging/~allenap/gwacl/get-network-configuration into lp://staging/gwacl
Status: | Merged |
---|---|
Approved by: | Gavin Panella |
Approved revision: | 179 |
Merged at revision: | 170 |
Proposed branch: | lp://staging/~allenap/gwacl/get-network-configuration |
Merge into: | lp://staging/gwacl |
Diff against target: |
457 lines (+263/-27) 8 files modified
example/management/run.go (+12/-2) helpers_apiobjects_test.go (+1/-1) httperror.go (+4/-4) httperror_test.go (+6/-3) management_base.go (+19/-0) management_base_test.go (+94/-1) xmlobjects.go (+11/-8) xmlobjects_test.go (+116/-8) |
To merge this branch: | bzr merge lp://staging/~allenap/gwacl/get-network-configuration |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Julian Edwards (community) | Approve | ||
Review via email:
|
Commit message
New method GetNetworkConfi
Description of the change
- Rename SetNetworkConfi
generally applicable for Get too.
- Rename ConfigurationSet constructors to have Set suffix, to prevent
naming conflict with renamed NetworkConfigur
- Fix IsNotFoundError() to work with HTTPError, not just ServerError.
I think it's meant to work with HTTPError in general, but the
example data was inadvertently using only ServerError. The calls to
newHTTPError were hiding this, so I've changed it to explicitly use
AzureError and ServerError.
- If there's no virtual network configured, Azure returns an HTTP 404
when getting the network configuration. When this happens,
GetNetworkCon
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
review: needs-information
Needs info because of [1]
[1]
> -type SetNetworkConfi guration struct { - XMLName nfiguration" ` +type ation struct { XMLNS string xsi,attr" `
> xml.Name `xml:"NetworkCo
> NetworkConfigur
> `xml:"xmlns,attr"` - XMLNS_XSI string
> `xml:"xmlns:
Why remove this? It is required for requests. (It's also in the guration but is ignorable there I guess.)
response from GetNetworkConfi
You also changed it in the test template (which is copied directly
from the msdn web page):
> - <NetworkConfigu ration schemas. microsoft. com/ServiceHost ing/2011/ 07/NetworkConfi guration" www.w3. org/2001/ XMLSchema- instance"> ration schemas. microsoft. com/ServiceHost ing/2011/ 07/NetworkConfi guration">
xmlns="http://
xmlns:xsi="http://
> + <NetworkConfigu
xmlns="http://
[2]
> -func (s *SetNetworkConf iguration) Serialize() (string, error) { ration) Serialize() (string, error) { ration) Deserialize(data []byte) error { +
> +func (s *NetworkConfigu
> return toxml(s) }
>
> +func (s *NetworkConfigu
> return xml.Unmarshal(data, s) +} +
A small point, but "s" is no longer appropriate.
[3]
> +func (suite *xmlSuite) TestNetworkConf igurationDeseri alize(c *C) msdn.microsoft. com/en- us/library/ windowsazure/ jj157181. aspx
> { + // Template from + //
> http://
You quoted the URL for "set config". I think this should be the "get msdn.microsoft. com/en- us/library/ windowsazure/ jj157196. aspx
config" at:
http://
Everything else looks good, thanks! www.enigmail. net/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://
iEYEARECAAYFAlH cqY0ACgkQWhGlTF 8G/Hcm7gCeIJUSZ 1jQYX9dnpvErUAE echu seeYphG1osAwEvn 9e
rZEAnjhnxnaeqz0
=sfAh
-----END PGP SIGNATURE-----