Merge lp:~wallyworld/goose/fix-nil-string-unmarshalling into lp:goose
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Ian Booth | ||||
Approved revision: | 126 | ||||
Merged at revision: | 126 | ||||
Proposed branch: | lp:~wallyworld/goose/fix-nil-string-unmarshalling | ||||
Merge into: | lp:goose | ||||
Diff against target: |
181 lines (+69/-32) 2 files modified
nova/json.go (+31/-17) nova/json_test.go (+38/-15) |
||||
To merge this branch: | bzr merge lp:~wallyworld/goose/fix-nil-string-unmarshalling | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Juju Engineering | Pending | ||
Review via email: mp+223017@code.launchpad.net |
Commit message
Fix unmarshalling of nil strings
In some nova structs sent and received over the
wire, serialised as json, there are id attributes
which can be string or int. We have custom marshalling
to handle that, but where the attributes were string
pointers, we were always unmarshalling as "" if the
value was nil. This broke things like floating ip
address usage.
Description of the change
Fix unmarshalling of nil strings
In some nova structs sent and received over the
wire, serialised as json, there are id attributes
which can be string or int. We have custom marshalling
to handle that, but where the attributes were string
pointers, we were always unmarshalling as "" if the
value was nil. This broke things like floating ip
address usage.
Reviewers: mp+223017_ code.launchpad. net,
Message:
Please take a look.
Description:
Fix unmarshalling of nil strings
In some nova structs sent and received over the
wire, serialised as json, there are id attributes
which can be string or int. We have custom marshalling
to handle that, but where the attributes were string
pointers, we were always unmarshalling as "" if the
value was nil. This broke things like floating ip
address usage.
https:/ /code.launchpad .net/~wallyworl d/goose/ fix-nil- string- unmarshalling/ +merge/ 223017
(do not edit description out of merge proposal)
Please review this at https:/ /codereview. appspot. com/105180043/
Affected files (+71, -32 lines):
A [revision details]
M nova/json.go
M nova/json_test.go