Beispiel #1
0
    def test_collect_kpi(self, ssh, _):
        m = mock_ssh(ssh)

        vnfd = self.VNFD['vnfd:vnfd-catalog']['vnfd'][0]
        router_vnf = RouterVNF(name, vnfd)
        router_vnf.ssh_helper = m
        result = {'packets_dropped': 0, 'packets_fwd': 0, 'packets_in': 0, 'link_stats': {}}
        self.assertEqual(result, router_vnf.collect_kpi())
Beispiel #2
0
    def test_collect_kpi(self, ssh, *args):
        m = mock_ssh(ssh)

        vnfd = self.VNFD['vnfd:vnfd-catalog']['vnfd'][0]
        router_vnf = RouterVNF(name, vnfd)
        router_vnf.scenario_helper.scenario_cfg = {
            'nodes': {router_vnf.name: "mock"}
        }
        router_vnf.ssh_helper = m
        result = {
            'physical_node': 'mock_node',
            'packets_dropped': 0,
            'packets_fwd': 0,
            'packets_in': 0,
            'link_stats': {}
        }
        self.assertEqual(result, router_vnf.collect_kpi())