libxl: Move virDomainXMLOptionNew into libxlCreateXMLConf

To allow the test suite to creat the XML option object,
move the virDomainXMLOptionNew call into a libxlCreateXMLConf
method.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
This commit is contained in:
Daniel P. Berrange 2014-05-30 15:53:12 +01:00
parent a6abdbf645
commit 3bab69c30f
3 changed files with 12 additions and 3 deletions

View File

@ -1336,3 +1336,11 @@ libxlBuildDomainConfig(virPortAllocatorPtr graphicsports,
return 0;
}
virDomainXMLOptionPtr
libxlCreateXMLConf(void)
{
return virDomainXMLOptionNew(&libxlDomainDefParserConfig,
&libxlDomainXMLPrivateDataCallbacks,
NULL);
}

View File

@ -158,6 +158,9 @@ libxlMakeVfb(virPortAllocatorPtr graphicsports,
int
libxlMakePCI(virDomainHostdevDefPtr hostdev, libxl_device_pci *pcidev);
virDomainXMLOptionPtr
libxlCreateXMLConf(void);
int
libxlBuildDomainConfig(virPortAllocatorPtr graphicsports,
virDomainDefPtr def,

View File

@ -353,9 +353,7 @@ libxlStateInitialize(bool privileged,
goto error;
}
if (!(libxl_driver->xmlopt = virDomainXMLOptionNew(&libxlDomainDefParserConfig,
&libxlDomainXMLPrivateDataCallbacks,
NULL)))
if (!(libxl_driver->xmlopt = libxlCreateXMLConf()))
goto error;
/* Load running domains first. */