Skip to content

Commit

Permalink
Fix Network object encoding issue when using qpid
Browse files Browse the repository at this point in the history
When creating network via REST API will throw the exception
"CodecException: no encoding for
<nova.db.sqlalchemy.models.Network object at 0x4a8ea10>".
It only occurs when using qpid.
Fix this issue through using jsonutils.to_primitive method.

Fix bug 1143584.

Change-Id: I833aef451f8e3d5eaa246c19d67b2474a9d36910
(cherry picked from commit b4d43b0)
  • Loading branch information
zhhuabj authored and djipko committed Apr 5, 2013
1 parent 02236b0 commit 975a312
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nova/network/manager.py
Expand Up @@ -1646,7 +1646,7 @@ def find_next(subnet):

if network and cidr and subnet_v4:
self._create_fixed_ips(context, network['id'], fixed_cidr)
return networks
return jsonutils.to_primitive(networks)

@wrap_check_policy
def delete_network(self, context, fixed_range, uuid,
Expand Down

0 comments on commit 975a312

Please sign in to comment.