libvirt: Stub O_DIRECT in test if not supported
libvirt: Stub O_DIRECT in test if not supported

`os.O_DIRECT` is only defined on platforms that support direct I/O. On
Macs, which don't support direct I/O in this way, `os.O_DIRECT` will
raise an `AttributeError`.

We can still test the code-path, however, by just stubbing out the
value on platforms where it's not supported.

Closes-Bug: 1286958

Change-Id: I8f10d6dfc4a63b6a961006b029b828e703870e46

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