コード例 #1
0
 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)
コード例 #2
0
 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)
コード例 #3
0
 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)
コード例 #4
0
 def test___init__(self, *_):
     vnf = MockVnfAprrox()
     collector = subscriber.Collector([vnf], {}, {})
     self.assertEqual(len(collector.vnfs), 1)
     self.assertEqual(collector.traffic_profile, {})
コード例 #5
0
 def test___init__(self, *_):
     vnf = MockVnfAprrox()
     collector = subscriber.Collector([vnf], self.NODES)
     self.assertEqual(len(collector.vnfs), 1)
     self.assertEqual(len(collector.nodes), 1)
コード例 #6
0
 def setUp(self):
     self.test_subscriber = subscriber.Collector(self.TRAFFIC_PROFILE,
                                                 self.VNFS)