From 11895339a495e46028da794b4e327a6fb7e63c5f Mon Sep 17 00:00:00 2001 From: Brandon Squizzato Date: Wed, 8 Dec 2021 13:18:03 -0500 Subject: [PATCH] Fix has_ns_operator/has_clowder --- bonfire/openshift.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/bonfire/openshift.py b/bonfire/openshift.py index 3cb26947..28721b09 100644 --- a/bonfire/openshift.py +++ b/bonfire/openshift.py @@ -53,17 +53,19 @@ def get_api_resources(): def has_ns_operator(): - log.info("Checking api-resources...") for res in get_api_resources(): - log.info("name: %s / group: %s", res["name"], res["apigroup"]) - if res["name"] == "namespacereservation" and res["apigroup"] == "cloud.redhat.com": + name = res["name"] + apigroup = res["apigroup"].split("/")[0] + if name == "namespacereservation" and apigroup == "cloud.redhat.com": return True return False def has_clowder(): for res in get_api_resources(): - if res["name"] == "clowdapp" and res["apigroup"] == "cloud.redhat.com": + name = res["name"] + apigroup = res["apigroup"].split("/")[0] + if name == "clowdapp" and apigroup == "cloud.redhat.com": return True return False