From 712b9d4a9fdb43c2334b5f0358eda607adbe7e42 Mon Sep 17 00:00:00 2001 From: Brandon Squizzato <35474886+bsquizz@users.noreply.github.com> Date: Fri, 20 Aug 2021 17:48:34 -0400 Subject: [PATCH] Revert "Add check against invalid cluster session (#96)" (#101) This reverts commit 213aac26033432a98efa1aecf4ab17fc298e672d. --- bonfire/openshift.py | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/bonfire/openshift.py b/bonfire/openshift.py index 7b91ba38..d4d14fff 100644 --- a/bonfire/openshift.py +++ b/bonfire/openshift.py @@ -16,14 +16,6 @@ log = logging.getLogger(__name__) -def run_oc_status(): - try: - oc("status", _silent=True) - return True - except ErrorReturnCode: - return False - - # assume that the result of this will not change during execution of our app @functools.lru_cache(maxsize=None, typed=False) def get_api_resources(): @@ -685,14 +677,10 @@ def on_k8s(): def get_all_namespaces(): - - if run_oc_status(): - if not on_k8s(): - all_namespaces = get_json("project")["items"] - else: - all_namespaces = get_json("namespace")["items"] + if not on_k8s(): + all_namespaces = get_json("project")["items"] else: - raise ValueError("Error running oc status, check cluster login session") + all_namespaces = get_json("namespace")["items"] return all_namespaces