- if dev == None:
+ if devid not in dev.DeviceID :
logger.error("Error retrieving instance for devid %s" % devid)
vsxml.undefine(options.ip)
return FAIL
-
- status = PASS
if dev.LinkTechnology != devices.LinkTechnology_Ethernet:
logger.error("LinkTechnology should be set to `%i' instead of `%s'" % \
@@ -86,20 +83,17 @@ def main():
addrs = dev.NetworkAddresses
if len(addrs) != 1:
- logger.error("Too many NetworkAddress entries (%i instead of %i)" % \
- (len(addrs), 1))
+ logger.error("Too many NetworkAddress entries (%i instead of %i)" % (len(addrs), 1))
status = FAIL
if addrs[0] != test_mac:
- logger.error("MAC address reported incorrectly (%s instead of %s)" % \
- (addrs[0], test_mac))
+ logger.error("MAC address reported incorrectly (%s instead of %s)" % (addrs[0], test_mac))
status = FAIL
if status == FAIL:
logger.error("Checked interface %s" % test_mac)