xenapi: refactor - extract get_stream_funct_for
xenapi: refactor - extract get_stream_funct_for

This change extracts the get_stream_funct_for function. As we would like
to support tar.gz compressed raw images, the stream function for them
should be different from the plain ones.

related to blueprint xenapi-supported-image-import-export

Change-Id: I27681da069ba2cd23670ef41f54ed9ac5af31ae6

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