提交 998c9e34 编写于 作者: P Peter Krempa

conf: Rename VIR_DOMAIN_DEF_PARSE_VALIDATE to VIR_DOMAIN_DEF_PARSE_VALIDATE_SCHEMA

Make it obvious that the flag is controlling RNG schema validation.
上级 0c8fe3d4
......@@ -526,7 +526,7 @@ bhyveDomainDefineXMLFlags(virConnectPtr conn, const char *xml, unsigned int flag
virCheckFlags(VIR_DOMAIN_DEFINE_VALIDATE, NULL);
if (flags & VIR_DOMAIN_DEFINE_VALIDATE)
parse_flags |= VIR_DOMAIN_DEF_PARSE_VALIDATE;
parse_flags |= VIR_DOMAIN_DEF_PARSE_VALIDATE_SCHEMA;
caps = bhyveDriverGetCapabilities(privconn);
if (!caps)
......@@ -924,7 +924,7 @@ bhyveDomainCreateXML(virConnectPtr conn,
VIR_DOMAIN_START_VALIDATE, NULL);
if (flags & VIR_DOMAIN_START_VALIDATE)
parse_flags |= VIR_DOMAIN_DEF_PARSE_VALIDATE;
parse_flags |= VIR_DOMAIN_DEF_PARSE_VALIDATE_SCHEMA;
if (flags & VIR_DOMAIN_START_AUTODESTROY)
start_flags |= VIR_BHYVE_PROCESS_START_AUTODESTROY;
......
......@@ -15343,7 +15343,7 @@ virDomainDefParseXML(xmlDocPtr xml,
bool usb_master = false;
char *netprefix = NULL;
if (flags & VIR_DOMAIN_DEF_PARSE_VALIDATE) {
if (flags & VIR_DOMAIN_DEF_PARSE_VALIDATE_SCHEMA) {
char *schema = virFileFindResource("domain.rng",
abs_topsrcdir "/docs/schemas",
PKGDATADIR "/schemas");
......
......@@ -2574,7 +2574,7 @@ typedef enum {
/* parse only source half of <disk> */
VIR_DOMAIN_DEF_PARSE_DISK_SOURCE = 1 << 6,
/* perform RNG schema validation on the passed XML document */
VIR_DOMAIN_DEF_PARSE_VALIDATE = 1 << 7,
VIR_DOMAIN_DEF_PARSE_VALIDATE_SCHEMA = 1 << 7,
/* don't validate os.type and arch against capabilities. Prevents
* VMs from disappearing when qemu is removed and libvirtd is restarted */
VIR_DOMAIN_DEF_PARSE_SKIP_OSTYPE_CHECKS = 1 << 8,
......
......@@ -3036,7 +3036,7 @@ esxDomainDefineXMLFlags(virConnectPtr conn, const char *xml, unsigned int flags)
virCheckFlags(VIR_DOMAIN_DEFINE_VALIDATE, NULL);
if (flags & VIR_DOMAIN_DEFINE_VALIDATE)
parse_flags |= VIR_DOMAIN_DEF_PARSE_VALIDATE;
parse_flags |= VIR_DOMAIN_DEF_PARSE_VALIDATE_SCHEMA;
memset(&data, 0, sizeof(data));
......
......@@ -967,7 +967,7 @@ libxlDomainCreateXML(virConnectPtr conn, const char *xml,
VIR_DOMAIN_START_VALIDATE, NULL);
if (flags & VIR_DOMAIN_START_VALIDATE)
parse_flags |= VIR_DOMAIN_DEF_PARSE_VALIDATE;
parse_flags |= VIR_DOMAIN_DEF_PARSE_VALIDATE_SCHEMA;
if (!(def = virDomainDefParseString(xml, cfg->caps, driver->xmlopt,
parse_flags)))
......@@ -2714,7 +2714,7 @@ libxlDomainDefineXMLFlags(virConnectPtr conn, const char *xml, unsigned int flag
virCheckFlags(VIR_DOMAIN_DEFINE_VALIDATE, NULL);
if (flags & VIR_DOMAIN_DEFINE_VALIDATE)
parse_flags |= VIR_DOMAIN_DEF_PARSE_VALIDATE;
parse_flags |= VIR_DOMAIN_DEF_PARSE_VALIDATE_SCHEMA;
if (!(def = virDomainDefParseString(xml, cfg->caps, driver->xmlopt,
parse_flags)))
......
......@@ -463,7 +463,7 @@ lxcDomainDefineXMLFlags(virConnectPtr conn, const char *xml, unsigned int flags)
virCheckFlags(VIR_DOMAIN_DEFINE_VALIDATE, NULL);
if (flags & VIR_DOMAIN_DEFINE_VALIDATE)
parse_flags |= VIR_DOMAIN_DEF_PARSE_VALIDATE;
parse_flags |= VIR_DOMAIN_DEF_PARSE_VALIDATE_SCHEMA;
if (!(caps = virLXCDriverGetCapabilities(driver, false)))
goto cleanup;
......@@ -1223,7 +1223,7 @@ lxcDomainCreateXMLWithFiles(virConnectPtr conn,
if (flags & VIR_DOMAIN_START_VALIDATE)
parse_flags |= VIR_DOMAIN_DEF_PARSE_VALIDATE;
parse_flags |= VIR_DOMAIN_DEF_PARSE_VALIDATE_SCHEMA;
virNWFilterReadLockFilterUpdates();
......
......@@ -989,7 +989,7 @@ openvzDomainDefineXMLFlags(virConnectPtr conn, const char *xml, unsigned int fla
virCheckFlags(VIR_DOMAIN_DEFINE_VALIDATE, NULL);
if (flags & VIR_DOMAIN_DEFINE_VALIDATE)
parse_flags |= VIR_DOMAIN_DEF_PARSE_VALIDATE;
parse_flags |= VIR_DOMAIN_DEF_PARSE_VALIDATE_SCHEMA;
openvzDriverLock(driver);
if ((vmdef = virDomainDefParseString(xml, driver->caps, driver->xmlopt,
......@@ -1078,7 +1078,7 @@ openvzDomainCreateXML(virConnectPtr conn, const char *xml,
virCheckFlags(VIR_DOMAIN_START_VALIDATE, NULL);
if (flags & VIR_DOMAIN_START_VALIDATE)
parse_flags |= VIR_DOMAIN_DEF_PARSE_VALIDATE;
parse_flags |= VIR_DOMAIN_DEF_PARSE_VALIDATE_SCHEMA;
openvzDriverLock(driver);
if ((vmdef = virDomainDefParseString(xml, driver->caps, driver->xmlopt,
......
......@@ -3569,7 +3569,7 @@ phypDomainCreateXML(virConnectPtr conn,
virCheckFlags(VIR_DOMAIN_START_VALIDATE, NULL);
if (flags & VIR_DOMAIN_START_VALIDATE)
parse_flags |= VIR_DOMAIN_DEF_PARSE_VALIDATE;
parse_flags |= VIR_DOMAIN_DEF_PARSE_VALIDATE_SCHEMA;
if (!(def = virDomainDefParseString(xml, phyp_driver->caps,
phyp_driver->xmlopt,
......
......@@ -1780,7 +1780,7 @@ static virDomainPtr qemuDomainCreateXML(virConnectPtr conn,
VIR_DOMAIN_START_VALIDATE, NULL);
if (flags & VIR_DOMAIN_START_VALIDATE)
parse_flags |= VIR_DOMAIN_DEF_PARSE_VALIDATE;
parse_flags |= VIR_DOMAIN_DEF_PARSE_VALIDATE_SCHEMA;
if (flags & VIR_DOMAIN_START_PAUSED)
start_flags |= VIR_QEMU_PROCESS_START_PAUSED;
if (flags & VIR_DOMAIN_START_AUTODESTROY)
......@@ -7252,7 +7252,7 @@ qemuDomainDefineXMLFlags(virConnectPtr conn,
virCheckFlags(VIR_DOMAIN_DEFINE_VALIDATE, NULL);
if (flags & VIR_DOMAIN_DEFINE_VALIDATE)
parse_flags |= VIR_DOMAIN_DEF_PARSE_VALIDATE;
parse_flags |= VIR_DOMAIN_DEF_PARSE_VALIDATE_SCHEMA;
cfg = virQEMUDriverGetConfig(driver);
......
......@@ -1605,7 +1605,7 @@ testDomainCreateXML(virConnectPtr conn, const char *xml,
virCheckFlags(VIR_DOMAIN_START_VALIDATE, NULL);
if (flags & VIR_DOMAIN_START_VALIDATE)
parse_flags |= VIR_DOMAIN_DEF_PARSE_VALIDATE;
parse_flags |= VIR_DOMAIN_DEF_PARSE_VALIDATE_SCHEMA;
testDriverLock(privconn);
if ((def = virDomainDefParseString(xml, privconn->caps, privconn->xmlopt,
......@@ -2610,7 +2610,7 @@ static virDomainPtr testDomainDefineXMLFlags(virConnectPtr conn,
virCheckFlags(VIR_DOMAIN_DEFINE_VALIDATE, NULL);
if (flags & VIR_DOMAIN_DEFINE_VALIDATE)
parse_flags |= VIR_DOMAIN_DEF_PARSE_VALIDATE;
parse_flags |= VIR_DOMAIN_DEF_PARSE_VALIDATE_SCHEMA;
if ((def = virDomainDefParseString(xml, privconn->caps, privconn->xmlopt,
parse_flags)) == NULL)
......
......@@ -1594,7 +1594,7 @@ static virDomainPtr umlDomainCreateXML(virConnectPtr conn, const char *xml,
VIR_DOMAIN_START_VALIDATE, NULL);
if (flags & VIR_DOMAIN_START_VALIDATE)
parse_flags |= VIR_DOMAIN_DEF_PARSE_VALIDATE;
parse_flags |= VIR_DOMAIN_DEF_PARSE_VALIDATE_SCHEMA;
virNWFilterReadLockFilterUpdates();
umlDriverLock(driver);
......@@ -2076,7 +2076,7 @@ umlDomainDefineXMLFlags(virConnectPtr conn, const char *xml, unsigned int flags)
virCheckFlags(VIR_DOMAIN_DEFINE_VALIDATE, NULL);
if (flags & VIR_DOMAIN_DEFINE_VALIDATE)
parse_flags |= VIR_DOMAIN_DEF_PARSE_VALIDATE;
parse_flags |= VIR_DOMAIN_DEF_PARSE_VALIDATE_SCHEMA;
umlDriverLock(driver);
if (!(def = virDomainDefParseString(xml, driver->caps, driver->xmlopt,
......
......@@ -1864,7 +1864,7 @@ vboxDomainDefineXMLFlags(virConnectPtr conn, const char *xml, unsigned int flags
virCheckFlags(VIR_DOMAIN_DEFINE_VALIDATE, NULL);
if (flags & VIR_DOMAIN_DEFINE_VALIDATE)
parse_flags |= VIR_DOMAIN_DEF_PARSE_VALIDATE;
parse_flags |= VIR_DOMAIN_DEF_PARSE_VALIDATE_SCHEMA;
if (!data->vboxObj)
return ret;
......
......@@ -377,7 +377,7 @@ vmwareDomainDefineXMLFlags(virConnectPtr conn, const char *xml, unsigned int fla
virCheckFlags(VIR_DOMAIN_DEFINE_VALIDATE, NULL);
if (flags & VIR_DOMAIN_DEFINE_VALIDATE)
parse_flags |= VIR_DOMAIN_DEF_PARSE_VALIDATE;
parse_flags |= VIR_DOMAIN_DEF_PARSE_VALIDATE_SCHEMA;
ctx.parseFileName = NULL;
ctx.formatFileName = vmwareCopyVMXFileName;
......@@ -670,7 +670,7 @@ vmwareDomainCreateXML(virConnectPtr conn, const char *xml,
virCheckFlags(VIR_DOMAIN_START_VALIDATE, NULL);
if (flags & VIR_DOMAIN_START_VALIDATE)
parse_flags |= VIR_DOMAIN_DEF_PARSE_VALIDATE;
parse_flags |= VIR_DOMAIN_DEF_PARSE_VALIDATE_SCHEMA;
ctx.parseFileName = NULL;
ctx.formatFileName = vmwareCopyVMXFileName;
......
......@@ -742,7 +742,7 @@ vzDomainDefineXMLFlags(virConnectPtr conn, const char *xml, unsigned int flags)
virCheckFlags(VIR_DOMAIN_DEFINE_VALIDATE, NULL);
if (flags & VIR_DOMAIN_DEFINE_VALIDATE)
parse_flags |= VIR_DOMAIN_DEF_PARSE_VALIDATE;
parse_flags |= VIR_DOMAIN_DEF_PARSE_VALIDATE_SCHEMA;
virObjectLock(driver);
if ((def = virDomainDefParseString(xml, driver->caps, driver->xmlopt,
......
......@@ -759,7 +759,7 @@ xenUnifiedDomainCreateXML(virConnectPtr conn,
virCheckFlags(VIR_DOMAIN_START_VALIDATE, NULL);
if (flags & VIR_DOMAIN_START_VALIDATE)
parse_flags |= VIR_DOMAIN_DEF_PARSE_VALIDATE;
parse_flags |= VIR_DOMAIN_DEF_PARSE_VALIDATE_SCHEMA;
if (!(def = virDomainDefParseString(xml, priv->caps, priv->xmlopt,
parse_flags)))
......@@ -1799,7 +1799,7 @@ xenUnifiedDomainDefineXMLFlags(virConnectPtr conn, const char *xml, unsigned int
virCheckFlags(VIR_DOMAIN_DEFINE_VALIDATE, NULL);
if (flags & VIR_DOMAIN_DEFINE_VALIDATE)
parse_flags |= VIR_DOMAIN_DEF_PARSE_VALIDATE;
parse_flags |= VIR_DOMAIN_DEF_PARSE_VALIDATE_SCHEMA;
if (!(def = virDomainDefParseString(xml, priv->caps, priv->xmlopt,
parse_flags)))
......
......@@ -562,7 +562,7 @@ xenapiDomainCreateXML(virConnectPtr conn,
virCheckFlags(VIR_DOMAIN_START_VALIDATE, NULL);
if (flags & VIR_DOMAIN_START_VALIDATE)
parse_flags |= VIR_DOMAIN_DEF_PARSE_VALIDATE;
parse_flags |= VIR_DOMAIN_DEF_PARSE_VALIDATE_SCHEMA;
virDomainDefPtr defPtr = virDomainDefParseString(xmlDesc,
priv->caps, priv->xmlopt,
......@@ -1744,7 +1744,7 @@ xenapiDomainDefineXMLFlags(virConnectPtr conn, const char *xml, unsigned int fla
virCheckFlags(VIR_DOMAIN_DEFINE_VALIDATE, NULL);
if (flags & VIR_DOMAIN_DEFINE_VALIDATE)
parse_flags |= VIR_DOMAIN_DEF_PARSE_VALIDATE;
parse_flags |= VIR_DOMAIN_DEF_PARSE_VALIDATE_SCHEMA;
if (!priv->caps)
return NULL;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册