def test_generate_vpe_script(self): vpe_config_vnf = ConfigCreate([0], [0], 0) intf = [ { "virtual-interface": { "dst_ip": "1.1.1.1", "dst_mac": "00:00:00:00:00:00:02", }, }, ] result = vpe_config_vnf.generate_vpe_script(intf) self.assertIsInstance(result, str) self.assertNotEqual(result, '')
def test_generate_vpe_script(self): vnfd_helper = VnfdHelper(self.VNFD_0) vpe_config_vnf = ConfigCreate(vnfd_helper, 2) intf = [ { "name": 'xe1', "virtual-interface": { "dst_ip": "1.1.1.1", "dst_mac": "00:00:00:00:00:00:02", }, }, { "name": 'xe2', "virtual-interface": { "dst_ip": "1.1.1.1", "dst_mac": "00:00:00:00:00:00:02", }, }, ] vpe_config_vnf.downlink_ports = ['xe1'] vpe_config_vnf.uplink_ports = ['xe2'] result = vpe_config_vnf.generate_vpe_script(intf) self.assertIsInstance(result, str) self.assertNotEqual(result, '')