Skip to content

Commit

Permalink
TMP: update destroy method
Browse files Browse the repository at this point in the history
Signed-off-by: Daniel Horak <dahorak@redhat.com>
  • Loading branch information
dahorak committed Jul 19, 2024
1 parent f23dfa9 commit 3f671fd
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion ocs_ci/deployment/baremetal.py
Original file line number Diff line number Diff line change
Expand Up @@ -1131,13 +1131,19 @@ def deploy(self, log_cli_level="DEBUG"):

raise Exception("TMP ABORT - deploy() not implemented")

def destroy(self):
def destroy(self, log_level=""):
"""
Cleanup cluster related resources.
"""
# TODO: destroy process via openshift-install

# TODO: check the DNS records cleanup
# THIS:
self.aws.delete_hosted_zone(
cluster_name=config.ENV_DATA.get("cluster_name"),
delete_from_base_domain=True,
)
# OR THIS:
# delete DNS records for API and Ingress
# get the record sets
record_sets = self.aws.get_record_sets()
Expand All @@ -1158,6 +1164,9 @@ def destroy(self):
logger.info(f"Deleting DNS record: {record}")
self.aws.delete_record(record, hosted_zone_id)

self.start_dnsmasq_service_on_helper_vm()
super().destroy(log_level=log_level)


class BAREMETALAI(BAREMETALBASE):
"""
Expand Down

0 comments on commit 3f671fd

Please sign in to comment.