def test_nic_attributes(self): nic = self.store.nic assert util.is_str(nic.name) assert nic.network is not None assert util.is_str_uuid(nic.network.id) assert nic.type in ('E1000', 'PV', 'RTL8139', 'RTL8139_PV') assert nic.mac is not None # BUG: ticket #177 assert util.is_str_mac(nic.mac.address)
def _test_attributes(self): nic = self.store.nic assert nic is not None assert util.is_str_uuid(nic.id) assert util.is_str(nic.href) and nic.href.endswith(nic.id) assert util.is_str(nic.name) and len(nic.name) > 0 assert nic.status in ('UP', 'DOWN') # BUG: missing assert util.is_str_int(nic.host.id) or util.is_str_uuid(nic.host.id) assert util.is_str_uuid(nic.network.id) assert util.is_str_mac(nic.mac.address) assert util.is_str_ip(nic.ip.address) assert util.is_str_ip(nic.ip.netmask) assert util.is_str_ip(nic.ip.gateway) if nic.vlan is not None: assert util.is_int(nic.vlan.id) and nic.vlan.id > 0 assert util.is_int(nic.speed) # BUG: missing assert nic.boot_protocol in ('DHCP', 'STATIC', 'NONE') # BUG: missing assert isinstance(nic.check_connectivity, bool) # BUG: missing