Esempio n. 1
0
    def test_create_vpe_config(self):
        priv_ports = [
            {
                'index': 0,
                'dpdk_port_num': 1,
                'peer_intf': {
                    'dpdk_port_num': 2,
                    'index': 3,
                },
            },
        ]

        pub_ports = [
            {
                'index': 2,
                'dpdk_port_num': 3,
                'peer_intf': {
                    'dpdk_port_num': 0,
                    'index': 1,
                },
            },
        ]

        config_create = ConfigCreate(priv_ports, pub_ports, 23)
        curr_path = os.path.dirname(os.path.abspath(__file__))
        vpe_cfg = "samples/vnf_samples/nsut/vpe/vpe_config"
        vnf_cfg = os.path.join(curr_path, "../../../../..", vpe_cfg)
        config_create.create_vpe_config(vnf_cfg)
        os.system("git checkout -- %s" % vnf_cfg)
Esempio n. 2
0
    def test_create_vpe_config(self):
        uplink_ports = [
            {
                'index': 0,
                'dpdk_port_num': 1,
                'peer_intf': {
                    'dpdk_port_num': 2,
                    'index': 3,
                },
            },
        ]

        downlink_ports = [
            {
                'index': 2,
                'dpdk_port_num': 3,
                'peer_intf': {
                    'dpdk_port_num': 0,
                    'index': 1,
                },
            },
        ]

        vnfd_helper = VnfdHelper(self.VNFD_0)
        config_create = ConfigCreate(vnfd_helper, 23)
        config_create.downlink_ports = ['xe1']
        config_create.uplink_ports = ['xe1']
        curr_path = os.path.dirname(os.path.abspath(__file__))
        vpe_cfg = "samples/vnf_samples/nsut/vpe/vpe_config"
        vnf_cfg = os.path.join(curr_path, "../../../../..", vpe_cfg)
        config_create.create_vpe_config(vnf_cfg)
        os.system("git checkout -- %s" % vnf_cfg)
Esempio n. 3
0
 def test_create_vpe_config(self):
     vnfd_helper = VnfdHelper(self.VNFD_0)
     config_create = ConfigCreate(vnfd_helper, 23)
     config_create.downlink_ports = ['xe1']
     config_create.uplink_ports = ['xe1']
     curr_path = os.path.dirname(os.path.abspath(__file__))
     vpe_cfg = "samples/vnf_samples/nsut/vpe/vpe_config"
     vnf_cfg = os.path.join(curr_path, "../../../../..", vpe_cfg)
     config_create.create_vpe_config(vnf_cfg)
     os.system("git checkout -- %s" % vnf_cfg)