Skip to content

Commit

Permalink
fix code
Browse files Browse the repository at this point in the history
Signed-off-by: oviner <[email protected]>
  • Loading branch information
OdedViner committed Feb 6, 2024
1 parent 9c2ffe2 commit b6491f1
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions ocs_ci/deployment/ibmcloud.py
Original file line number Diff line number Diff line change
Expand Up @@ -405,6 +405,7 @@ def _delete_resources(resources, ignore_errors=False):
exec_cmd(delete_cmd)

if resource_group:
self.get_resource_id(resource_group)
leftovers = _get_resources(resource_group)
if not leftovers:
logger.info("No leftovers found")
Expand Down Expand Up @@ -500,6 +501,16 @@ def configure_cloud_credential_operator():
#
# return json.loads(proc.stdout)

def get_resource_id(self, resource_group):
cmd = "ibmcloud resource groups --output json"
proc = exec_cmd(cmd)
logger.info("Retrieving cluster resource group")
resource_data = json.loads(proc.stdout)
for group in resource_data:
if group["name"] == resource_group:
return group["id"]
return False

def get_created_time(self, resource_group):
"""
Get
Expand Down

0 comments on commit b6491f1

Please sign in to comment.