def test___init__no_node_information_in_context(self, *args): vnf = MockVnfAprrox() nodes = copy.deepcopy(self.NODES) nodes['context1'] = None collector = subscriber.Collector([vnf], nodes) self.assertEqual(len(collector.vnfs), 1) self.assertEqual(len(collector.nodes), 1)
def setUp(self): vnf = MockVnfAprrox() self.ssh_patch = mock.patch( 'yardstick.network_services.nfvi.resource.ssh', autospec=True) mock_ssh = self.ssh_patch.start() mock_instance = mock.Mock() mock_instance.execute.return_value = 0, '', '' mock_ssh.AutoConnectSSH.from_node.return_value = mock_instance self.collector = subscriber.Collector([vnf], self.NODES, self.TRAFFIC_PROFILE, 1800)
def setUp(self): vnf = MockVnfAprrox() vnf.start_collect = mock.Mock() vnf.stop_collect = mock.Mock() self.ssh_patch = mock.patch.object(ssh, 'AutoConnectSSH') mock_ssh = self.ssh_patch.start() mock_instance = mock.Mock() mock_instance.execute.return_value = 0, '', '' mock_ssh.from_node.return_value = mock_instance self.collector = subscriber.Collector([vnf], self.NODES)
def test___init__(self, *_): vnf = MockVnfAprrox() collector = subscriber.Collector([vnf], {}, {}) self.assertEqual(len(collector.vnfs), 1) self.assertEqual(collector.traffic_profile, {})
def test___init__(self, *_): vnf = MockVnfAprrox() collector = subscriber.Collector([vnf], self.NODES) self.assertEqual(len(collector.vnfs), 1) self.assertEqual(len(collector.nodes), 1)
def setUp(self): self.test_subscriber = subscriber.Collector(self.TRAFFIC_PROFILE, self.VNFS)