Skip to content

Commit

Permalink
changed field naming
Browse files Browse the repository at this point in the history
  • Loading branch information
mukrishn committed Sep 20, 2023
1 parent f19f7dc commit aa877e9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions libs/platforms/rosa/hypershift/hypershift.py
Original file line number Diff line number Diff line change
Expand Up @@ -487,9 +487,9 @@ def create_cluster(self, platform, cluster_name):
cluster_info["install_duration"] = cluster_end_time - cluster_start_time
access_timers = self.get_cluster_admin_access(cluster_name, cluster_info["path"])
cluster_info["kubeconfig"] = access_timers.get("kubeconfig", None)
cluster_info["cluster-admin-create"] = access_timers.get("cluster-admin-create", None)
cluster_info["cluster-admin-login"] = access_timers.get("cluster-admin-login", None)
cluster_info["cluster-oc-adm"] = access_timers.get("cluster-oc-adm", None)
cluster_info["cluster_admin_create"] = access_timers.get("cluster_admin_create", None)
cluster_info["cluster_admin_login"] = access_timers.get("cluster_admin_login", None)
cluster_info["cluster_oc_adm"] = access_timers.get("cluster_oc_adm", None)
if not cluster_info["kubeconfig"]:
self.logging.error(f"Failed to download kubeconfig file for cluster {cluster_name}. Disabling wait for workers and workload execution")
cluster_info["workers_wait_time"] = None
Expand Down
6 changes: 3 additions & 3 deletions libs/platforms/rosa/rosa.py
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ def get_cluster_admin_access(self, cluster_name, path):
else:
oc_login_time = int(time.time())
self.logging.info(f"cluster-admin user creation succesfull on cluster {cluster_name}")
return_data["cluster-admin-create"] = (int(time.time()) - cluster_admin_create_time)
return_data["cluster_admin_create"] = (int(time.time()) - cluster_admin_create_time)
self.logging.info(f"Trying to login on cluster {cluster_name} (30 minutes timeout until {datetime.datetime.fromtimestamp(oc_login_time + 30 * 60)}, 5s timeout on oc command)")
start_json = stdout.find("{")
while datetime.datetime.utcnow().timestamp() < oc_login_time + 30 * 60:
Expand All @@ -326,7 +326,7 @@ def get_cluster_admin_access(self, cluster_name, path):
else:
oc_adm_time_start = int(time.time())
self.logging.info("Login succesfull on cluster %s" % cluster_name)
return_data["cluster-admin-login"] = (int(time.time()) - oc_login_time)
return_data["cluster_admin_login"] = (int(time.time()) - oc_login_time)
return_data["kubeconfig"] = path + "/kubeconfig"
myenv = os.environ.copy()
myenv["KUBECONFIG"] = return_data["kubeconfig"]
Expand Down Expand Up @@ -356,7 +356,7 @@ def get_cluster_admin_access(self, cluster_name, path):
"Verified admin access to %s, using %s kubeconfig file."
% (cluster_name, path + "/kubeconfig")
)
return_data["cluster-oc-adm"] = (
return_data["cluster_oc_adm"] = (
int(time.time()) - oc_adm_time_start
)
return return_data
Expand Down

0 comments on commit aa877e9

Please sign in to comment.