From 621be7cd730ce507ca7366e4b6fd71b8b5501ff0 Mon Sep 17 00:00:00 2001 From: Hongbin Lu Date: Thu, 22 Sep 2016 17:11:10 -0500 Subject: [PATCH] Fix the generated k8s config file The bay-config command generated an incorrect file. This commit fixed it. Change-Id: I95563153d6494efe49a76d81ab48e68fc24be872 Closes-bug: #1626764 --- magnumclient/v1/bays_shell.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/magnumclient/v1/bays_shell.py b/magnumclient/v1/bays_shell.py index 2b23509c..cea59563 100644 --- a/magnumclient/v1/bays_shell.py +++ b/magnumclient/v1/bays_shell.py @@ -246,13 +246,13 @@ def _config_bay_kubernetes(bay, baymodel, cfg_dir, force=False): cfg_file = "%s/config" % cfg_dir if baymodel.tls_disabled: cfg = ("apiVersion: v1\n" - "bays:\n" - "- bay:\n" + "clusters:\n" + "- cluster:\n" " server: %(api_address)s\n" " name: %(name)s\n" "contexts:\n" "- context:\n" - " bay: %(name)s\n" + " cluster: %(name)s\n" " user: %(name)s\n" " name: default/%(name)s\n" "current-context: default/%(name)s\n" @@ -263,14 +263,14 @@ def _config_bay_kubernetes(bay, baymodel, cfg_dir, force=False): % {'name': bay.name, 'api_address': bay.api_address}) else: cfg = ("apiVersion: v1\n" - "bays:\n" - "- bay:\n" + "clusters:\n" + "- cluster:\n" " certificate-authority: ca.pem\n" " server: %(api_address)s\n" " name: %(name)s\n" "contexts:\n" "- context:\n" - " bay: %(name)s\n" + " cluster: %(name)s\n" " user: %(name)s\n" " name: default/%(name)s\n" "current-context: default/%(name)s\n"