Segregate the VSM calls from database calls in N1kv plugin
Segregate the VSM calls from database calls in N1kv plugin

Rearrange the code in such a way that the calls to the VSM are
outside the database session. This avoids DB locks on n1kv tables.

Change-Id: Ic0f0d816cca06a3b03fdd9b58ee7599ddf65473e
Closes-Bug: 1290646

mattt416/neutron,watonyweng/neutron,skyddv/neutron,yanheven/neutron,vivekanand1101/neutron,openstack/neutron,paninetworks/neutron,asgard-lab/neutron,noironetworks/neutron,NeCTAR-RC/neutron,waltBB/neutron_read,aristanetworks/neutron,gkotton/neutron,apporc/neutron,vbannai/neutron,cloudbase/neutron-virtualbox,dhanunjaya/neutron,noironetworks/neutron,openstack/neutron,pnavarro/neutron,mandeepdhami/neutron,gopal1cloud/neutron,rdo-management/neutron,bigswitch/neutron,jumpojoy/neutron,antonioUnina/neutron,sebrandon1/neutron,jerryz1982/neutron,SmartInfrastructures/neutron,eonpatapon/neutron,infobloxopen/neutron,barnsnake351/neutron,sasukeh/neutron,sebrandon1/neutron,chitr/neutron,cloudbase/neutron-virtualbox,CiscoSystems/neutron,asgard-lab/neutron,bgxavier/neutron,eayunstack/neutron,jumpojoy/neutron,glove747/liberty-neutron,openstack/neutron,bigswitch/neutron,jacknjzhou/neutron,blueboxgroup/neutron,MaximNevrov/neutron,cisco-openstack/neutron,pnavarro/neutron,projectcalico/calico-neutron,swdream/neutron,JioCloud/neutron,gkotton/neutron,Stavitsky/neutron,mattt416/neutron,redhat-openstack/neutron,mahak/neutron,mahak/neutron,dims/neutron,shahbazn/neutron,cisco-openstack/neutron,cernops/neutron,yamahata/tacker,yuewko/neutron,magic0704/neutron,Metaswitch/calico-neutron,klmitch/neutron,watonyweng/neutron,javaos74/neutron,igor-toga/local-snat,virtualopensystems/neutron,SmartInfrastructures/neutron,vivekanand1101/neutron,vbannai/neutron,gkotton/neutron,skyddv/neutron,SamYaple/neutron,CiscoSystems/neutron,mmnelemane/neutron,huntxu/neutron,wenhuizhang/neutron,glove747/liberty-neutron,virtualopensystems/neutron,MaximNevrov/neutron,infobloxopen/neutron,jacknjzhou/neutron,magic0704/neutron,paninetworks/neutron,silenci/neutron,rdo-management/neutron,cloudbase/neutron,wolverineav/neutron,yanheven/neutron,leeseuljeong/leeseulstack_neutron,suneeth51/neutron,swdream/neutron,jerryz1982/neutron,miyakz1192/neutron,klmitch/neutron,cloudbase/neutron,alexandrucoman/vbox-neutron-agent,blueboxgroup/neutron,SamYaple/neutron,redhat-openstack/neutron,Stavitsky/neutron,silenci/neutron,adelina-t/neutron,yamahata/tacker,adelina-t/neutron,barnsnake351/neutron,neoareslinux/neutron,cernops/neutron,eayunstack/neutron,JianyuWang/neutron,waltBB/neutron_read,leeseuljeong/leeseulstack_neutron,Metaswitch/calico-neutron,dhanunjaya/neutron,leeseulstack/openstack,takeshineshiro/neutron,vveerava/Openstack,chitr/neutron,JianyuWang/neutron,CiscoSystems/neutron,gopal1cloud/neutron,igor-toga/local-snat,bgxavier/neutron,sasukeh/neutron,neoareslinux/neutron,vbannai/neutron,NeCTAR-RC/neutron,shahbazn/neutron,projectcalico/calico-neutron,huntxu/neutron,mahak/neutron,leeseulstack/openstack,antonioUnina/neutron,leeseulstack/openstack,JioCloud/neutron,vveerava/Openstack,miyakz1192/neutron,wenhuizhang/neutron,yuewko/neutron,takeshineshiro/neutron,leeseuljeong/leeseulstack_neutron,mandeepdhami/neutron,yamahata/tacker,alexandrucoman/vbox-neutron-agent,wolverineav/neutron,blueboxgroup/neutron,virtualopensystems/neutron,dims/neutron,suneeth51/neutron,javaos74/neutron,vveerava/Openstack,aristanetworks/neutron,mmnelemane/neutron,eonpatapon/neutron,apporc/neutron