Remove boot-from-volume unreachable code path (#894172)
Remove boot-from-volume unreachable code path (#894172)

In http://review.openstack.org/1834 it was discovered that a
bool-from-volume code path in nova/compute/manager.py can never be
reached.

The code is basically:

  if ((bdm['snapshot_id'] is not None) and
      (bdm['volume_id'] is None)):
      vol = volume_api.create(context, ...)
      ...
      bdm['volume_id'] = vol['id']

  if ((bdm['snapshot_id'] is not None) and
      (bdm['volume_id'] is None)):
      ...
      raise exception.ApiError(...)

(after applying De Morgan's laws to the expression in the second if
statement, that is)

It's obvious that the code path can only be reached if the volume
API's create() method can return a volume with id=None, but it can't
ever do this.

From:

  https://code.launchpad.net/~yamahata/nova/boot-from-volume-0/+merge/62419

it looks like the author originally had this check as an assertion,
which makes more sense, but changed it to the current code following a
review comment.

Change-Id: I9f85028675f5dac8ab23bd150869eca421fc2fd0

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