Skip to content

Commit

Permalink
Consistent header placement
Browse files Browse the repository at this point in the history
  • Loading branch information
RobGeada committed Jan 31, 2025
1 parent d3bdcc0 commit 99873b6
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions trustyai_tests/setup/setup_cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ def header(text):

def wait_for_catalog_sources(operator_data):
"""Make sure all requested catalog sources are available"""
header("Waiting for Catalog Sources")

client = get_client()
header("Waiting for Catalog Sources")
catalog_sources = {o['catalogSource'] for o in operator_data}

for catalog_source in catalog_sources:
Expand All @@ -51,10 +51,9 @@ def wait_for_catalog_sources(operator_data):

def wait_for_package_manifests(operator_data):
"""Make sure the package manifest for each requested operator is available"""

client = get_client()
header("Waiting for Package Manifests")

client = get_client()
previous_return_list = None
for operator in operator_data:
tries = 0
Expand Down Expand Up @@ -85,11 +84,9 @@ def wait_for_package_manifests(operator_data):

def install_operators(operator_data):
"""Install the specified operator"""

header("Installing Operators")

client = get_client()

for operator in operator_data:
install_operator(
admin_client=client,
Expand All @@ -106,10 +103,9 @@ def install_operators(operator_data):

def verify_operator_running(operator_data):
"""Make sure all operator pods are running"""

client = get_client()
header("Verifying Operator Pods")

client = get_client()
previous_return_list = None
for operator in operator_data:
for target_pod_name in operator['correspondingPods']:
Expand Down Expand Up @@ -146,17 +142,17 @@ def verify_operator_running(operator_data):

def install_dsci():
"""Install a default DSCI"""

header("Installing DSCI")

client = get_client()
dsci = DSCInitialization(client=client, yaml_file="manifests/dsci.yaml")
dsci.create()


def install_datascience_cluster(trustyai_manifests_url):
"""Install a DSC that uses the specified manifests url"""

header("Installing Datascience Cluster")

logger.info("Using manifests from {}".format(trustyai_manifests_url))
with open("manifests/dsc_template.yaml", "r") as f:
template = f.read()
Expand Down

0 comments on commit 99873b6

Please sign in to comment.