Policy check for forced_host should be before the instance is created
Policy check for forced_host should be before the instance is created

Move the policy enforcment for force_host and force_node into the
_handle_az() method so that any violation of policy is detected before
the DB entry for the instance is created.

Fixes bug: 1220220

Change-Id: Iaf6df4f8df6cca71fcb860244ccf758d7908b8f1

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