Ensure datetimes can be properly serialized.
Ensure datetimes can be properly serialized.

The nova-network manager was returning db models from methods invoked
via rpc.call(). These db models include non-primitive types that can
not be properly serialized (namely datetime objects). Use
to_primitive() to ensure that the data gets serialized properly.

Fix bug: #1089430

Change-Id: I0519e88444b8fcc3af5e43170ea07dd966ccef05
Signed-off-by: zhiyanliu <473d1d8f6fc0edcb1527304889c4774eeef74c04@gmail.com>
ted-gould/nova,TwinkleChawla/nova,jianghuaw/nova,houshengbo/nova_vmware_compute_driver,j-carpentier/nova,akash1808/nova,orbitfp7/nova,Juniper/nova,petrutlucian94/nova,sridevikoushik31/nova,apporc/nova,vmturbo/nova,whitepages/nova,mikalstill/nova,JioCloud/nova,zzicewind/nova,SUSE-Cloud/nova,Yuriy-Leonov/nova,mmnelemane/nova,NeCTAR-RC/nova,gspilio/nova,ewindisch/nova,zaina/nova,JianyuWang/nova,shootstar/novatest,cernops/nova,phenoxim/nova,blueboxgroup/nova,rickerc/nova_audit,gooddata/openstack-nova,belmiromoreira/nova,gooddata/openstack-nova,klmitch/nova,cernops/nova,shahar-stratoscale/nova,mgagne/nova,spring-week-topos/nova-week,tangfeixiong/nova,JioCloud/nova,Triv90/Nova,OpenAcademy-OpenStack/nova-scheduler,cloudbase/nova-virtualbox,eharney/nova,angdraug/nova,mahak/nova,maelnor/nova,bgxavier/nova,sridevikoushik31/openstack,Tehsmash/nova,Triv90/Nova,ruslanloman/nova,DirectXMan12/nova-hacking,rajalokan/nova,CCI-MOC/nova,badock/nova,leilihh/nova,dstroppa/openstack-smartos-nova-grizzly,kimjaejoong/nova,vmturbo/nova,citrix-openstack-build/nova,mahak/nova,cyx1231st/nova,gspilio/nova,cloudbau/nova,fajoy/nova,silenceli/nova,mmnelemane/nova,JioCloud/nova_test_latest,Metaswitch/calico-nova,ewindisch/nova,yosshy/nova,jianghuaw/nova,jianghuaw/nova,cernops/nova,whitepages/nova,Stavitsky/nova,TieWei/nova,openstack/nova,sebrandon1/nova,alaski/nova,adelina-t/nova,viggates/nova,mgagne/nova,tealover/nova,rahulunair/nova,devendermishrajio/nova,leilihh/nova,Brocade-OpenSource/OpenStack-DNRM-Nova,qwefi/nova,affo/nova,yatinkumbhare/openstack-nova,scripnichenko/nova,tianweizhang/nova,eayunstack/nova,saleemjaveds/https-github.com-openstack-nova,fajoy/nova,berrange/nova,shootstar/novatest,CEG-FYP-OpenStack/scheduler,isyippee/nova,jeffrey4l/nova,devoid/nova,ted-gould/nova,virtualopensystems/nova,petrutlucian94/nova,rajalokan/nova,luogangyi/bcec-nova,vmturbo/nova,cloudbau/nova,takeshineshiro/nova,mandeepdhami/nova,devendermishrajio/nova_test_latest,watonyweng/nova,zhimin711/nova,barnsnake351/nova,maheshp/novatest,CCI-MOC/nova,JianyuWang/nova,Yuriy-Leonov/nova,noironetworks/nova,dawnpower/nova,isyippee/nova,shahar-stratoscale/nova,rickerc/nova_audit,vladikr/nova_drafts,LoHChina/nova,hanlind/nova,zhimin711/nova,plumgrid/plumgrid-nova,mandeepdhami/nova,thomasem/nova,apporc/nova,viggates/nova,joker946/nova,fnordahl/nova,Brocade-OpenSource/OpenStack-DNRM-Nova,eonpatapon/nova,scripnichenko/nova,ntt-sic/nova,leilihh/novaha,bclau/nova,spring-week-topos/nova-week,sacharya/nova,akash1808/nova_test_latest,maheshp/novatest,shail2810/nova,plumgrid/plumgrid-nova,sridevikoushik31/nova,devendermishrajio/nova_test_latest,tudorvio/nova,devendermishrajio/nova,maelnor/nova,klmitch/nova,bigswitch/nova,CiscoSystems/nova,eayunstack/nova,maoy/zknova,Juniper/nova,double12gzh/nova,imsplitbit/nova,sridevikoushik31/nova,tealover/nova,berrange/nova,ntt-sic/nova,yrobla/nova,gooddata/openstack-nova,varunarya10/nova_test_latest,maoy/zknova,raildo/nova,Tehsmash/nova,klmitch/nova,adelina-t/nova,houshengbo/nova_vmware_compute_driver,cloudbase/nova-virtualbox,saleemjaveds/https-github.com-openstack-nova,alexandrucoman/vbox-nova-driver,sridevikoushik31/openstack,j-carpentier/nova,Francis-Liu/animated-broccoli,belmiromoreira/nova,orbitfp7/nova,silenceli/nova,BeyondTheClouds/nova,petrutlucian94/nova_dev,akash1808/nova,sridevikoushik31/openstack,ruslanloman/nova,tudorvio/nova,kimjaejoong/nova,CloudServer/nova,mahak/nova,MountainWei/nova,rajalokan/nova,sridevikoushik31/nova,Yusuke1987/openstack_template,phenoxim/nova,OpenAcademy-OpenStack/nova-scheduler,dims/nova,eharney/nova,imsplitbit/nova,dstroppa/openstack-smartos-nova-grizzly,barnsnake351/nova,bigswitch/nova,alexandrucoman/vbox-nova-driver,raildo/nova,blueboxgroup/nova,DirectXMan12/nova-hacking,rajalokan/nova,affo/nova,akash1808/nova_test_latest,alaski/nova,bgxavier/nova,LoHChina/nova,iuliat/nova,luogangyi/bcec-nova,dims/nova,projectcalico/calico-nova,Metaswitch/calico-nova,DirectXMan12/nova-hacking,yrobla/nova,yatinkumbhare/openstack-nova,felixma/nova,cloudbase/nova,double12gzh/nova,houshengbo/nova_vmware_compute_driver,dawnpower/nova,citrix-openstack-build/nova,projectcalico/calico-nova,hanlind/nova,edulramirez/nova,rahulunair/nova,fnordahl/nova,TwinkleChawla/nova,felixma/nova,tanglei528/nova,leilihh/novaha,maoy/zknova,fajoy/nova,eonpatapon/nova,TieWei/nova,maheshp/novatest,tangfeixiong/nova,rahulunair/nova,zzicewind/nova,mikalstill/nova,nikesh-mahalka/nova,gooddata/openstack-nova,Yusuke1987/openstack_template,zaina/nova,rrader/nova-docker-plugin,sacharya/nova,iuliat/nova,Stavitsky/nova,Juniper/nova,JioCloud/nova_test_latest,rrader/nova-docker-plugin,mikalstill/nova,angdraug/nova,openstack/nova,petrutlucian94/nova_dev,yosshy/nova,qwefi/nova,jeffrey4l/nova,devoid/nova,CloudServer/nova,badock/nova,alvarolopez/nova,gspilio/nova,vladikr/nova_drafts,MountainWei/nova,cloudbase/nova,joker946/nova,Juniper/nova,redhat-openstack/nova,tianweizhang/nova,edulramirez/nova,alvarolopez/nova,BeyondTheClouds/nova,SUSE-Cloud/nova,CiscoSystems/nova,openstack/nova,Triv90/Nova,NeCTAR-RC/nova,shail2810/nova,vmturbo/nova,sebrandon1/nova,klmitch/nova,bclau/nova,yrobla/nova,cloudbase/nova,hanlind/nova,BeyondTheClouds/nova,noironetworks/nova,watonyweng/nova,cyx1231st/nova,Francis-Liu/animated-broccoli,redhat-openstack/nova,virtualopensystems/nova,CEG-FYP-OpenStack/scheduler,dstroppa/openstack-smartos-nova-grizzly,sebrandon1/nova,jianghuaw/nova,varunarya10/nova_test_latest,thomasem/nova,tanglei528/nova,nikesh-mahalka/nova,takeshineshiro/nova