diff options
author | Victor Morales <victor.morales@intel.com> | 2018-03-13 12:36:55 -0700 |
---|---|---|
committer | Gary Wu <gary.i.wu@huawei.com> | 2018-03-15 16:58:22 +0000 |
commit | df17a7ff9ba569227e8a2b5b1863800bbb8e1806 (patch) | |
tree | 749011aaf1b514e17c31edd9c12252a95f0aec18 /bootstrap/vagrant-onap/lib/files/kubectl_config_generator.py | |
parent | 1393fc2533cae1271126498f1661dec893922dae (diff) |
Deprecate vagrant-onap tool
The vagrant-onap tool needs to be moved to its own repo to have better
control of versions and autonomy. This change removes the project from
integration repository.
Change-Id: I90bd4505a9fc7376c31a780aa1b833ee2663af3e
Signed-off-by: Victor Morales <victor.morales@intel.com>
Depends-On: I79df8c35fccaa266a789217d441a6cf1183bd42a
Issue-ID: INT-441
Diffstat (limited to 'bootstrap/vagrant-onap/lib/files/kubectl_config_generator.py')
-rw-r--r-- | bootstrap/vagrant-onap/lib/files/kubectl_config_generator.py | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/bootstrap/vagrant-onap/lib/files/kubectl_config_generator.py b/bootstrap/vagrant-onap/lib/files/kubectl_config_generator.py deleted file mode 100644 index 6b5a6e9f6..000000000 --- a/bootstrap/vagrant-onap/lib/files/kubectl_config_generator.py +++ /dev/null @@ -1,40 +0,0 @@ -import requests -import os -import base64 - -RANCHER_URL = str(os.environ['RANCHER_URL']) -RANCHER_ENVIRONMENT_ID = str(os.environ['RANCHER_ENVIRONMENT']) -data = requests.post(RANCHER_URL + '/v1/projects/' + RANCHER_ENVIRONMENT_ID + '/apikeys', - {"accountId": RANCHER_ENVIRONMENT_ID, - "description": "ONAP on Kubernetes", - "name": "ONAP on Kubernetes", - "publicValue": "string", - "secretValue": "password"}) -json_dct = data.json() -access_key = json_dct['publicValue'] -secret_key = json_dct['secretValue'] -auth_header = 'Basic ' + base64.b64encode(access_key + ':' + secret_key) -token = "\"" + str(base64.b64encode(auth_header)) + "\"" -dct = \ -""" -apiVersion: v1 -kind: Config -clusters: -- cluster: - api-version: v1 - insecure-skip-tls-verify: true - server: "{}/r/projects/{}/kubernetes:6443" - name: "onap_on_kubernetes" -contexts: -- context: - cluster: "onap_on_kubernetes" - user: "onap_on_kubernetes" - name: "onap_on_kubernetes" -current-context: "onap_on_kubernetes" -users: -- name: "onap_on_kubernetes" - user: - token: {} -""".format(RANCHER_URL, RANCHER_ENVIRONMENT_ID, token) -with open("config", "w") as file: - file.write(dct) |