summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2012-12-12 18:17:01 +0000
committerGerrit Code Review <review@openstack.org>2012-12-12 18:17:01 +0000
commit02e83e1028bca92a64493c7c14be2e2ae19fb8a4 (patch)
tree891af320e13235c7084135d606f811ea3ad9d09e
parent7ca309c3dab84df0906cb3ad51442e150d50be6e (diff)
parent1259395061005b70a123408b9e1cdd5bb76d9b62 (diff)
downloadnova-02e83e1028bca92a64493c7c14be2e2ae19fb8a4.tar.gz
nova-02e83e1028bca92a64493c7c14be2e2ae19fb8a4.tar.xz
nova-02e83e1028bca92a64493c7c14be2e2ae19fb8a4.zip
Merge "Ensure datetimes can be properly serialized."
-rw-r--r--nova/network/manager.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/nova/network/manager.py b/nova/network/manager.py
index 6680634c9..2c342b706 100644
--- a/nova/network/manager.py
+++ b/nova/network/manager.py
@@ -65,6 +65,7 @@ from nova.network import rpcapi as network_rpcapi
from nova.openstack.common import cfg
from nova.openstack.common import excutils
from nova.openstack.common import importutils
+from nova.openstack.common import jsonutils
from nova.openstack.common import lockutils
from nova.openstack.common import log as logging
from nova.openstack.common.notifier import api as notifier
@@ -1904,7 +1905,7 @@ class NetworkManager(manager.SchedulerDependentManager):
networks = self.db.network_get_all(context)
except exception.NoNetworksFound:
return []
- return [dict(network.iteritems()) for network in networks]
+ return [jsonutils.to_primitive(network) for network in networks]
@wrap_check_policy
def disassociate_network(self, context, network_uuid):
@@ -1915,12 +1916,12 @@ class NetworkManager(manager.SchedulerDependentManager):
def get_fixed_ip(self, context, id):
"""Return a fixed ip"""
fixed = self.db.fixed_ip_get(context, id)
- return dict(fixed.iteritems())
+ return jsonutils.to_primitive(fixed)
@wrap_check_policy
def get_fixed_ip_by_address(self, context, address):
fixed = self.db.fixed_ip_get_by_address(context, address)
- return dict(fixed.iteritems())
+ return jsonutils.to_primitive(fixed)
def get_vif_by_mac_address(self, context, mac_address):
"""Returns the vifs record for the mac_address"""