mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
conf: Add more checks for VDS interface parameters
Add some checks that commit 0225483adc
forgot to include.
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
parent
50ca78ae6d
commit
5eb962fc1d
@ -9336,6 +9336,27 @@ virDomainNetDefParseXML(virDomainXMLOption *xmlopt,
|
|||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!portid) {
|
||||||
|
virReportError(VIR_ERR_XML_ERROR,
|
||||||
|
_("Missing source portid for interface type '%s'"),
|
||||||
|
virDomainNetTypeToString(def->type));
|
||||||
|
goto error;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!connectionid) {
|
||||||
|
virReportError(VIR_ERR_XML_ERROR,
|
||||||
|
_("Missing source connectionid for interface type '%s'"),
|
||||||
|
virDomainNetTypeToString(def->type));
|
||||||
|
goto error;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!portgroup) {
|
||||||
|
virReportError(VIR_ERR_XML_ERROR,
|
||||||
|
_("Missing source portgroup for interface type '%s'"),
|
||||||
|
virDomainNetTypeToString(def->type));
|
||||||
|
goto error;
|
||||||
|
}
|
||||||
|
|
||||||
if (virUUIDParse(switchid, def->data.vds.switch_id) < 0) {
|
if (virUUIDParse(switchid, def->data.vds.switch_id) < 0) {
|
||||||
virReportError(VIR_ERR_INTERNAL_ERROR,
|
virReportError(VIR_ERR_INTERNAL_ERROR,
|
||||||
_("Unable to parse switchid '%s'"), switchid);
|
_("Unable to parse switchid '%s'"), switchid);
|
||||||
|
Loading…
Reference in New Issue
Block a user