Fix image_type=base after snapshot
Fix image_type=base after snapshot

When an instance is snapshotted, the resultant image should have the
image_type property set to "snapshot".  However, if the base image
already had image_type set to "base", the image_type on the snapshot
will also be set to "base".  This turns out to be because we set
image properties in two different places.  The first is when the
image record is created in glance, which occurs in
nova.compute.api:API._create_image(); this is when image_type is set
to "snapshot".  However, in nova.virt.xenapi.vm_utils:upload_image(),
all the properties from the base image are copied over, so all the
properties set by _create_image() could be overwritten.

The quick solution was to extend the non_inheritable_image_properties
configuration setting to also cover the image properties set by
_create_image().  Long-term, these two metadata-setting processes
need to be more closely unified.  (It should be noted that the
upload_image() function contains a TODO stating that the code should
move into the compute manager, so it can be shared across
hypervisors…)

Fixes bug 1031079.

Change-Id: I936bc147fb823eca67e40084cba5c3bc1a7fe73a

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