In changeset 21653,
dev_type = sxp.name(dev_config)
should not have been moved, otherwise, the checking "mac"
paragraph is of no use.
(The original patch as submitted was correct but I had to make the
change manually as it had been mangled.)
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Signed-off-by Chunyan Liu <CYLiu@novell.com>
@type dev_config: SXP object (parsed config)
"""
log.debug("XendDomainInfo.device_create: %s" % scrub_password(dev_config))
+ dev_type = sxp.name(dev_config)
+
if dev_type == 'vif':
for x in dev_config:
if x != 'vif' and x[0] == 'mac':
log.error("Virtual network interface creation error - invalid MAC Address entered: %s", x[1])
raise VmError("Cannot create a new virtual network interface - MAC address is not valid!");
- dev_type = sxp.name(dev_config)
dev_uuid = self.info.device_add(dev_type, cfg_sxp = dev_config)
dev_config_dict = self.info['devices'][dev_uuid][1]
log.debug("XendDomainInfo.device_create: %s" % scrub_password(dev_config_dict))