help='''list of VIM networks, in JSON inline format, where the cluster is
accessible via L3 routing, e.g. "{(k8s_net1:vim_network1) [,(k8s_net2:vim_network2) ...]}"''',
)
+@click.option(
+ "--init-helm2/--skip-helm2",
+ required=False,
+ default=True,
+ help="Initialize helm v2",
+)
+@click.option(
+ "--init-helm3/--skip-helm3",
+ required=False,
+ default=True,
+ help="Initialize helm v3",
+)
+@click.option(
+ "--init-jujubundle/--skip-jujubundle",
+ required=False,
+ default=True,
+ help="Initialize juju-bundle",
+)
@click.option("--description", default=None, help="human readable description")
@click.option(
"--namespace",
# help='do not return the control immediately, but keep it until the operation is completed, or timeout')
@click.pass_context
def k8scluster_add(
- ctx, name, creds, version, vim, k8s_nets, description, namespace, wait, cni
+ ctx, name, creds, version, vim, k8s_nets, init_helm2, init_helm3, init_jujubundle, description, namespace, wait, cni
):
"""adds a K8s cluster to OSM
cluster["k8s_version"] = version
cluster["vim_account"] = vim
cluster["nets"] = yaml.safe_load(k8s_nets)
+ if not (init_helm2 and init_jujubundle and init_helm3):
+ cluster["deployment_methods"] = {"helm-chart": init_helm2,
+ "juju-bundle": init_jujubundle,
+ "helm-chart-v3": init_helm3}
if description:
cluster["description"] = description
if namespace:
"Version",
"VIM",
"K8s-nets",
+ "Deployment methods",
"Operational State",
"Op. state (details)",
"Description",
cluster["k8s_version"],
vim_info,
json.dumps(cluster["nets"]),
+ json.dumps(cluster["deployment_methods"]),
cluster["_admin"]["operationalState"],
op_state_details,
trunc_text(cluster.get("description") or "", 40),