Implemented HW2HW network performance testing
Implemented HW2HW network performance test:
- Added K8S client manager and API methods
- Added method for collecting HW compute nodes
- Improved and extended global config
- Extended requirements.txt, pinned some modules
- Extended and improved SSH methods
Added some small improvements:
- extended .gitignore
- Added some custom exceptions instead of basic ones
- Renamed some classes
- Set iperf v2 to be default for multi-threads tests
- Updated README file
Related-PROD: PROD-36943
Change-Id: I265058967ccc01d96bf3bca532a8a0ae2a26f1f2
diff --git a/fixtures/base.py b/fixtures/base.py
index fb4fb43..9774e5b 100644
--- a/fixtures/base.py
+++ b/fixtures/base.py
@@ -6,11 +6,27 @@
import logging
from utils import helpers
+from utils.k8s_client import K8SClientManager
from utils import os_client
logger = logging.getLogger(__name__)
+nodes = utils.get_pairs()
+hw_nodes = utils.get_hw_pairs()
+
+
+@pytest.fixture(scope='session', params=list(nodes.values()),
+ ids=list(nodes.keys()))
+def pair(request):
+ return request.param
+
+
+@pytest.fixture(scope='session', params=list(hw_nodes.values()),
+ ids=list(hw_nodes.keys()))
+def hw_pair(request):
+ return request.param
+
@pytest.fixture(scope='session')
def openstack_clients():
@@ -24,15 +40,6 @@
)
-nodes = utils.get_pairs()
-
-
-@pytest.fixture(scope='session', params=list(nodes.values()),
- ids=list(nodes.keys()))
-def pair(request):
- return request.param
-
-
@pytest.fixture(scope='session')
def os_resources(openstack_clients):
logger.info("Setting up resources in admin project...")
@@ -214,6 +221,15 @@
alt_project.name))
+@pytest.fixture(scope='module')
+def k8s_v1_client():
+ config = utils.get_configuration()
+ logger.info("Getting the K8S config path from the global_config.yaml file.")
+ k8s_config_path = config.get('mos_kubeconfig_path') or ""
+ k8s_manager = K8SClientManager(k8s_config_path=k8s_config_path)
+ return k8s_manager.k8s_v1
+
+
@pytest.fixture(scope="session")
def html_report():
yield