Beispiel #1
0
 def setup_vdpa():
     """
     Setup vDPA environment
     """
     test_env_obj = None
     if test_target == "simulator":
         test_env_obj = utils_vdpa.VDPASimulatorTest()
     else:
         pf_pci = utils_vdpa.get_vdpa_pci()
         test_env_obj = utils_vdpa.VDPAOvsTest(pf_pci)
     test_env_obj.setup()
     return test_env_obj
Beispiel #2
0
 def setup_vdpa():
     """
     Setup vDPA environment
     """
     test_env_obj = None
     test_target = params.get('test_target', '')
     test.log.info("TEST_SETUP: Setup vDPA environment.")
     if test_target == "simulator":
         test_env_obj = utils_vdpa.VDPASimulatorTest()
     else:
         pf_pci = utils_vdpa.get_vdpa_pci()
         test_env_obj = utils_vdpa.VDPAOvsTest(pf_pci)
     test_env_obj.setup()
     return test_env_obj
Beispiel #3
0
    def setup_vdpa(test_target):
        """
        Setup vDPA environment

        :param test_target: Test target, simulator or mellanox
        :return: An object of vDPA test environment setup
        """
        test_env_obj = None
        test.log.info("TEST_SETUP: Setup vDPA environment.")
        if test_target == "simulator":
            test_env_obj = utils_vdpa.VDPASimulatorTest()
        else:
            pf_pci = utils_vdpa.get_vdpa_pci()
            test_env_obj = utils_vdpa.VDPAOvsTest(pf_pci)
        test_env_obj.setup()
        return test_env_obj
Beispiel #4
0
    def setup_vdpa():
        """
        Setup vDPA environment
        """
        setup_default()
        test_env_obj = None
        if test_target == "simulator":
            test_env_obj = utils_vdpa.VDPASimulatorTest()
            test_env_obj.setup()
        else:
            vdpa_mgmt_tool_extra = params.get("vdpa_mgmt_tool_extra", "")
            pf_pci = utils_vdpa.get_vdpa_pci()
            test_env_obj = utils_vdpa.VDPAOvsTest(pf_pci, mgmt_tool_extra=vdpa_mgmt_tool_extra)
            test_env_obj.setup()
            params['mac_addr'] = test_env_obj.vdpa_mac.get(params.get("vdpa_dev", "vdpa0"))

        return test_env_obj