Skip to content

Commit

Permalink
Fix has_ns_operator/has_clowder
Browse files Browse the repository at this point in the history
  • Loading branch information
bsquizz committed Dec 8, 2021
1 parent c64e30d commit 1189533
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions bonfire/openshift.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 1189533

Please sign in to comment.