def test_nic_have_all_keys(self): nic = FakeNic(name='vnet0', model='virtio', mac_addr='00:1a:4a:16:01:51') testvm = FakeVM(nics=(nic, )) stats = vmstats._nic_traffic(testvm, nic.name, nic.nicModel, nic.macAddr, self.bulk_stats, 0, self.bulk_stats, 0, self.interval) self.assertStatsHaveKeys(stats, self._EXPECTED_KEYS)
def test_nic_have_all_keys(self): nic = FakeNic(name='vnet0', model='virtio', mac_addr='00:1a:4a:16:01:51') testvm = FakeVM(nics=(nic,)) stats = vmstats._nic_traffic( testvm, nic.name, nic.nicModel, nic.macAddr, self.bulk_stats, 0, self.bulk_stats, 0, self.interval) self.assertStatsHaveKeys(stats, self._EXPECTED_KEYS)
def test_nic_have_all_keys(self): nic = FakeNic(name='vnet0', model='virtio', mac_addr='00:1a:4a:16:01:51', is_hostdevice=False) testvm = FakeVM(nics=(nic,)) stats = vmstats._nic_traffic( testvm, nic, self.bulk_stats, 0, self.bulk_stats, 0, ) self.assertStatsHaveKeys(stats, self._EXPECTED_KEYS)