diff --git a/Tests/kaas/plugin/README.md b/Tests/kaas/plugin/README.md index 04085c34e..e571dd4db 100644 --- a/Tests/kaas/plugin/README.md +++ b/Tests/kaas/plugin/README.md @@ -49,6 +49,7 @@ In addition to the core requirements, ensure the following are set up: * An **OpenStack** environment configured and accessible. * A `clouds.yaml` file defining OpenStack credentials and endpoints. * An installing the envsubst via this command: + ```bash GOBIN=/tmp go install github.com/drone/envsubst/v2/cmd/envsubst@latest ``` @@ -57,7 +58,7 @@ In addition to the core requirements, ensure the following are set up: Before running the `cluster-stacks` plugin, you need to set up the following environment variable: -- **GIT_ACCESS_TOKEN**: This token is required for Git operations, especially if your repository is private. +* **GIT_ACCESS_TOKEN**: This token is required for Git operations, especially if your repository is private. To set the `GIT_ACCESS_TOKEN`, run the following command in your terminal: diff --git a/Tests/kaas/plugin/plugin_cluster_stacks.py b/Tests/kaas/plugin/plugin_cluster_stacks.py index de3c1efc1..5183127d8 100644 --- a/Tests/kaas/plugin/plugin_cluster_stacks.py +++ b/Tests/kaas/plugin/plugin_cluster_stacks.py @@ -122,7 +122,7 @@ def setup_environment_variables(self): class PluginClusterStacks(KubernetesClusterPlugin): - def __init__(self, config_file=None): + def __init__(self, config_file): self.config = load_config(config_file) if config_file else {} logger.debug(self.config) self.working_directory = os.getcwd() @@ -132,7 +132,7 @@ def __init__(self, config_file=None): self.cs_namespace = self.config.get('cs_namespace') logger.debug(f"Working from {self.working_directory}") - def create_cluster(self, cluster_name=None, version=None, kubeconfig_filepath=None): + def create_cluster(self, cluster_name, version, kubeconfig_filepath): self.cluster_name = cluster_name self.cluster_version = version self.kubeconfig_cs_cluster = kubeconfig_filepath @@ -176,10 +176,9 @@ def create_cluster(self, cluster_name=None, version=None, kubeconfig_filepath=No self._retrieve_kubeconfig(namespace=self.cs_namespace, kubeconfig=self.kubeconfig_mgmnt) # Wait for workload system pods to be ready - # wait_for_workload_pods_ready(kubeconfig_path=self.kubeconfig_cs_cluster) wait_for_pods(self, ["kube-system"], timeout=600, interval=15, kubeconfig=self.kubeconfig_cs_cluster) - def delete_cluster(self, cluster_name=None, kubeconfig_filepath=None): + def delete_cluster(self, cluster_name, kubeconfig_filepath): self.cluster_name = cluster_name kubeconfig_cs_cluster_filename = kubeconfig_filepath diff --git a/Tests/kaas/plugin/requirements.txt b/Tests/kaas/plugin/requirements.txt index c36ca21d1..a04a03167 100644 --- a/Tests/kaas/plugin/requirements.txt +++ b/Tests/kaas/plugin/requirements.txt @@ -16,8 +16,6 @@ google-auth==2.34.0 # via kubernetes idna==3.8 # via requests -junitparser==3.2.0 - # via -r requirements.in kubernetes==30.1.0 # via -r requirements.in oauthlib==3.2.2 diff --git a/Tests/kaas/plugin/run_plugin.py b/Tests/kaas/plugin/run_plugin.py index 51a9f420b..4c384d26f 100755 --- a/Tests/kaas/plugin/run_plugin.py +++ b/Tests/kaas/plugin/run_plugin.py @@ -51,6 +51,8 @@ def create(plugin_kind, plugin_config, clusterspec_path, cluster_id): @click.argument('clusterspec_path', type=click.Path(exists=True, dir_okay=False)) @click.argument('cluster_id', type=str, default="default") def delete(plugin_kind, plugin_config, clusterspec_path, cluster_id): + clusterspec = load_spec(clusterspec_path)['clusters'] + clusterinfo = clusterspec[cluster_id] plugin = init_plugin(plugin_kind, plugin_config) plugin.delete_cluster(cluster_id, os.path.abspath(clusterinfo['kubeconfig']))