benchmark-runner 1.0.742__py3-none-any.whl → 1.0.744__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of benchmark-runner might be problematic. Click here for more details.
- benchmark_runner/common/clouds/BareMetal/bare_metal_operations.py +2 -2
- benchmark_runner/common/oc/oc.py +17 -1
- benchmark_runner/main/environment_variables.py +1 -0
- {benchmark_runner-1.0.742.dist-info → benchmark_runner-1.0.744.dist-info}/METADATA +1 -1
- {benchmark_runner-1.0.742.dist-info → benchmark_runner-1.0.744.dist-info}/RECORD +8 -8
- {benchmark_runner-1.0.742.dist-info → benchmark_runner-1.0.744.dist-info}/LICENSE +0 -0
- {benchmark_runner-1.0.742.dist-info → benchmark_runner-1.0.744.dist-info}/WHEEL +0 -0
- {benchmark_runner-1.0.742.dist-info → benchmark_runner-1.0.744.dist-info}/top_level.txt +0 -0
|
@@ -304,10 +304,10 @@ class BareMetalOperations:
|
|
|
304
304
|
raise OCPUpgradeFailed(status=oc.get_cluster_status())
|
|
305
305
|
|
|
306
306
|
@logger_time_stamp
|
|
307
|
-
def oc_login(self, kubeadmin_password: str):
|
|
307
|
+
def oc_login(self, kubeadmin_password: str = ''):
|
|
308
308
|
"""
|
|
309
309
|
This method login to the cluster with new credentials
|
|
310
|
-
:param kubeadmin_password
|
|
310
|
+
:param kubeadmin_password, default empty
|
|
311
311
|
:return:
|
|
312
312
|
"""
|
|
313
313
|
if kubeadmin_password:
|
benchmark_runner/common/oc/oc.py
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
import os
|
|
3
|
+
import yaml
|
|
3
4
|
import ast
|
|
4
5
|
import shutil
|
|
5
6
|
import time
|
|
@@ -46,6 +47,7 @@ class OC(SSH):
|
|
|
46
47
|
self.__kubeadmin_password = kubeadmin_password
|
|
47
48
|
else:
|
|
48
49
|
self.__kubeadmin_password = self.__environment_variables_dict.get('kubeadmin_password', '')
|
|
50
|
+
self.__kubeconfig_path = self.__environment_variables_dict.get('kubeconfig_path', '')
|
|
49
51
|
|
|
50
52
|
def get_ocp_server_version(self):
|
|
51
53
|
"""
|
|
@@ -715,6 +717,20 @@ class OC(SSH):
|
|
|
715
717
|
self.run(f"{self.__cli} get events -A > '{output_filename}' ")
|
|
716
718
|
return output_filename
|
|
717
719
|
|
|
720
|
+
def get_kube_api_server(self):
|
|
721
|
+
try:
|
|
722
|
+
with open(self.__kubeconfig_path, "r") as f:
|
|
723
|
+
config = yaml.safe_load(f)
|
|
724
|
+
|
|
725
|
+
# Extract the API server URL from the clusters section
|
|
726
|
+
return config["clusters"][0]["cluster"]["server"]
|
|
727
|
+
except FileNotFoundError:
|
|
728
|
+
return "Kubeconfig file not found."
|
|
729
|
+
except KeyError:
|
|
730
|
+
return "Invalid kubeconfig format. Could not find API server."
|
|
731
|
+
except Exception as e:
|
|
732
|
+
return f"Error: {str(e)}"
|
|
733
|
+
|
|
718
734
|
@logger_time_stamp
|
|
719
735
|
def login(self):
|
|
720
736
|
"""
|
|
@@ -723,7 +739,7 @@ class OC(SSH):
|
|
|
723
739
|
"""
|
|
724
740
|
try:
|
|
725
741
|
if self.__kubeadmin_password and self.__kubeadmin_password != '':
|
|
726
|
-
self.run(f'{self.__cli} login -u kubeadmin -p {self.__kubeadmin_password}', is_check=True)
|
|
742
|
+
self.run(f'{self.__cli} login {self.get_kube_api_server()} -u kubeadmin -p {self.__kubeadmin_password}', is_check=True)
|
|
727
743
|
except Exception as err:
|
|
728
744
|
raise LoginFailed
|
|
729
745
|
return True
|
|
@@ -50,6 +50,7 @@ class EnvironmentVariables:
|
|
|
50
50
|
# dynamic parameters - configure for local run
|
|
51
51
|
self._environment_variables_dict['workload'] = EnvironmentVariables.get_env('WORKLOAD', '')
|
|
52
52
|
self._environment_variables_dict['kubeadmin_password'] = EnvironmentVariables.get_env('KUBEADMIN_PASSWORD', '')
|
|
53
|
+
self._environment_variables_dict['kubeconfig_path'] = EnvironmentVariables.get_env('KUBECONFIG_PATH', '')
|
|
53
54
|
|
|
54
55
|
# PIN=node selector
|
|
55
56
|
self._environment_variables_dict['pin_node_benchmark_operator'] = EnvironmentVariables.get_env('PIN_NODE_BENCHMARK_OPERATOR', '')
|
|
@@ -23,7 +23,7 @@ benchmark_runner/common/clouds/Azure/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeu
|
|
|
23
23
|
benchmark_runner/common/clouds/Azure/azure_operations.py,sha256=S9_ZI0ESASUNWIpQ1WeekjrKBVtVWZDdFoIL0qEC35s,4758
|
|
24
24
|
benchmark_runner/common/clouds/BareMetal/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
25
25
|
benchmark_runner/common/clouds/BareMetal/bare_metal_exceptions.py,sha256=d-aeCfsfGpZ3e1Bho1M8pYlN0D8R-ffjwPm9YwGHvhU,1552
|
|
26
|
-
benchmark_runner/common/clouds/BareMetal/bare_metal_operations.py,sha256=
|
|
26
|
+
benchmark_runner/common/clouds/BareMetal/bare_metal_operations.py,sha256=OWzpIHu-Xqixb5YviJD5oCji_eqFAfra1ienIHxlAxw,18065
|
|
27
27
|
benchmark_runner/common/clouds/IBM/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
28
28
|
benchmark_runner/common/clouds/IBM/ibm_exceptions.py,sha256=psqHgqEBRbfFRWD1blwaWGad-QpThgOl8Puq76VIP80,417
|
|
29
29
|
benchmark_runner/common/clouds/IBM/ibm_operations.py,sha256=ZpF3Vnu2YKqAEYVf7ofBg_kOavMaLCXYCt0CdX8dKd4,3419
|
|
@@ -46,7 +46,7 @@ benchmark_runner/common/logger/init_logger.py,sha256=ERa-gNqrl2pZybj7v3csvmao7Mv
|
|
|
46
46
|
benchmark_runner/common/logger/logger_exceptions.py,sha256=rivdlRm_jIsKQ53rP_-HX8emdtOmQNO4JuIkg8fnBoc,454
|
|
47
47
|
benchmark_runner/common/logger/logger_time_stamp.py,sha256=2JgugN9LpXF4Ijx0wPRzz3DAGJB8eJpM5g1qPvbWbV8,1479
|
|
48
48
|
benchmark_runner/common/oc/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
49
|
-
benchmark_runner/common/oc/oc.py,sha256=
|
|
49
|
+
benchmark_runner/common/oc/oc.py,sha256=Y0POw_y6HSA0QGLMy5hnBAzbEjVR5TmNiqoszLCZ3Og,68560
|
|
50
50
|
benchmark_runner/common/oc/oc_exceptions.py,sha256=4JDebyFqe6yIN6Y70E-oscWnme0t7Ggg_CJBBoOuFPs,6336
|
|
51
51
|
benchmark_runner/common/ocp_resources/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
52
52
|
benchmark_runner/common/ocp_resources/create_cnv.py,sha256=AXsyR8_g_RIFHz2rkyHzzvvUDIiGdOi9rZWJPhiPzDQ,3511
|
|
@@ -160,7 +160,7 @@ benchmark_runner/krkn_hub/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJW
|
|
|
160
160
|
benchmark_runner/krkn_hub/krknhub_exceptions.py,sha256=Hk7Co6zZ0u2RSmBmS4ZAi21ffZaQ2ITTfl6tGLtiAdY,180
|
|
161
161
|
benchmark_runner/krkn_hub/krknhub_workloads.py,sha256=qNRZA-FBQZiT6h013WbP6zBRINh3c6YMnnlksN9fssA,2851
|
|
162
162
|
benchmark_runner/main/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
163
|
-
benchmark_runner/main/environment_variables.py,sha256=
|
|
163
|
+
benchmark_runner/main/environment_variables.py,sha256=FqXk-zKvmunv9vV2td9bYfpeFWaY5s2D38fEnzO-tw0,28189
|
|
164
164
|
benchmark_runner/main/environment_variables_exceptions.py,sha256=UR0Ith0P0oshsDZdJRlRq8ZUTt0h8jFvUtrnP4m4AIY,437
|
|
165
165
|
benchmark_runner/main/main.py,sha256=MWZnLXCAvx9lC2l9s6q3fzI5iiSnYA2ybyNhDhud3aA,14087
|
|
166
166
|
benchmark_runner/main/temporary_environment_variables.py,sha256=ODSHkfhgvdr_b2e3XyvykW21MVjSdyqimREyMc2klRE,957
|
|
@@ -172,8 +172,8 @@ benchmark_runner/workloads/windows_vm.py,sha256=eHK79ueAkSlNC1uamz19o7CO20wzJi-U
|
|
|
172
172
|
benchmark_runner/workloads/workloads.py,sha256=F9fnk4h715tq7ANSCbDH0jktB8fpr_u3YG61Kdi5_os,1422
|
|
173
173
|
benchmark_runner/workloads/workloads_exceptions.py,sha256=u7VII95iPRF_YhfpGH1U1RmgiIYESMOtbSF1dz7_ToE,1858
|
|
174
174
|
benchmark_runner/workloads/workloads_operations.py,sha256=SdddQUbAN5biRjZr5CvmlgKxcE4xatCnoSBm9cn1K9A,25286
|
|
175
|
-
benchmark_runner-1.0.
|
|
176
|
-
benchmark_runner-1.0.
|
|
177
|
-
benchmark_runner-1.0.
|
|
178
|
-
benchmark_runner-1.0.
|
|
179
|
-
benchmark_runner-1.0.
|
|
175
|
+
benchmark_runner-1.0.744.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
176
|
+
benchmark_runner-1.0.744.dist-info/METADATA,sha256=P8B1c3l4Bg_hmPAgz5VH9IxqCvSAxqWD4E9Hl2ANENU,11498
|
|
177
|
+
benchmark_runner-1.0.744.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
|
178
|
+
benchmark_runner-1.0.744.dist-info/top_level.txt,sha256=MP7UbTCzu59D53uKCZl5VsQeM_vheyMc7FmryczJQbk,17
|
|
179
|
+
benchmark_runner-1.0.744.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|