Skip to content

Commit 73da3fd

Browse files
committed
rename clusterspec_cluster
Signed-off-by: Matthias Büchse <[email protected]>
1 parent aecc697 commit 73da3fd

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

Tests/kaas/plugin/run_plugin.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,22 +35,20 @@ def cli():
3535
@click.argument('plugin_kind', type=click.Choice(list(PLUGIN_LOOKUP), case_sensitive=False))
3636
@click.argument('plugin_config', type=click.Path(exists=True, dir_okay=False))
3737
@click.argument('clusterspec_path', type=click.Path(exists=True, dir_okay=False))
38-
@click.argument('clusterspec_cluster', type=str, default="default")
39-
def create(plugin_kind, plugin_config, clusterspec_path, clusterspec_cluster):
38+
@click.argument('cluster_id', type=str, default="default")
39+
def create(plugin_kind, plugin_config, clusterspec_path, cluster_id):
4040
clusterspec = load_spec(clusterspec_path)['clusters']
4141
plugin = init_plugin(plugin_kind, plugin_config)
42-
clusterinfo = clusterspec[clusterspec_cluster]
43-
cluster_id = clusterspec_cluster
42+
clusterinfo = clusterspec[cluster_id]
4443
plugin.create_cluster(cluster_id, clusterinfo['branch'], os.path.abspath(clusterinfo['kubeconfig']))
4544

4645

4746
@cli.command()
4847
@click.argument('plugin_kind', type=click.Choice(list(PLUGIN_LOOKUP), case_sensitive=False))
4948
@click.argument('plugin_config', type=click.Path(exists=True, dir_okay=False))
5049
@click.argument('clusterspec_path', type=click.Path(exists=True, dir_okay=False))
51-
@click.argument('clusterspec_cluster', type=str, default="default")
52-
def delete(plugin_kind, plugin_config, clusterspec_path, clusterspec_cluster):
53-
cluster_id = clusterspec_cluster
50+
@click.argument('cluster_id', type=str, default="default")
51+
def delete(plugin_kind, plugin_config, clusterspec_path, cluster_id):
5452
plugin = init_plugin(plugin_kind, plugin_config)
5553
plugin.delete_cluster(cluster_id)
5654

0 commit comments

Comments
 (0)