From 6583a970483bacad99b5bb7cb8cf79016068f01d Mon Sep 17 00:00:00 2001 From: dweinholz Date: Thu, 5 May 2022 16:51:18 +0200 Subject: [PATCH 1/8] Update VirtualMachineHandler.py --- VirtualMachineService/VirtualMachineHandler.py | 1 + 1 file changed, 1 insertion(+) diff --git a/VirtualMachineService/VirtualMachineHandler.py b/VirtualMachineService/VirtualMachineHandler.py index cc73f3c8..46b8d864 100644 --- a/VirtualMachineService/VirtualMachineHandler.py +++ b/VirtualMachineService/VirtualMachineHandler.py @@ -2190,6 +2190,7 @@ def start_cluster(self, public_key, master_instance, worker_instances, user): "masterInstance": master_instance, "workerInstances": wI, "useMasterWithPublicIp": False, + "ansibleGalaxyRoles": [{"name":"autoscaling","hosts":"all","git":"https://github.com/patricS4/autoscaling-config-ansible"}] } for mode in self.BIBIGRID_MODES: body.update({mode: True}) From d8f243ec660568109b22b1fc2f25b713c6079d48 Mon Sep 17 00:00:00 2001 From: dweinholz Date: Fri, 6 May 2022 06:26:26 +0000 Subject: [PATCH 2/8] fix(Linting):blacked code --- VirtualMachineService/VirtualMachineHandler.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/VirtualMachineService/VirtualMachineHandler.py b/VirtualMachineService/VirtualMachineHandler.py index 46b8d864..589cb948 100644 --- a/VirtualMachineService/VirtualMachineHandler.py +++ b/VirtualMachineService/VirtualMachineHandler.py @@ -2190,7 +2190,13 @@ def start_cluster(self, public_key, master_instance, worker_instances, user): "masterInstance": master_instance, "workerInstances": wI, "useMasterWithPublicIp": False, - "ansibleGalaxyRoles": [{"name":"autoscaling","hosts":"all","git":"https://github.com/patricS4/autoscaling-config-ansible"}] + "ansibleGalaxyRoles": [ + { + "name": "autoscaling", + "hosts": "all", + "git": "https://github.com/patricS4/autoscaling-config-ansible", + } + ], } for mode in self.BIBIGRID_MODES: body.update({mode: True}) From fd1341f196f6385c0083f3ca4c7525cf6d67541b Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Sun, 8 May 2022 10:16:45 +0000 Subject: [PATCH 3/8] feat(Dependencies): Update peter-evans/create-pull-request action to v4.0.3 | datasource | package | from | to | | ----------- | ------------------------------- | ------ | ------ | | github-tags | peter-evans/create-pull-request | v4.0.2 | v4.0.3 | --- .github/workflows/blacked.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/blacked.yml b/.github/workflows/blacked.yml index 12276689..aedd6e57 100644 --- a/.github/workflows/blacked.yml +++ b/.github/workflows/blacked.yml @@ -17,7 +17,7 @@ jobs: - name: Create Pull Request if: steps.git-check.outputs.modified == 'true' id: cpr - uses: peter-evans/create-pull-request@v4.0.2 + uses: peter-evans/create-pull-request@v4.0.3 with: token: ${{ secrets.GITHUB_TOKEN }} commit-message: fix(Linting):blacked code From df52e77d481e7606100b7f09ebfc119d909ed1b1 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Sun, 8 May 2022 14:48:58 +0000 Subject: [PATCH 4/8] feat(Dependencies): Update dependency redis to v4.3.0 | datasource | package | from | to | | ---------- | ------- | ----- | ----- | | pypi | redis | 4.2.2 | 4.3.0 | --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index a274d2d6..66b22a2a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -9,6 +9,6 @@ flake8==4.0.1 paramiko==2.10.4 ruamel.yaml==0.17.21 pyvim==3.0.2 -redis==4.2.2 +redis==4.3.0 requests==2.27.1 pyyaml==6.0 From 4953f2343f7676e7d7b43fef05b29aadfe581394 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Mon, 9 May 2022 14:09:15 +0000 Subject: [PATCH 5/8] feat(Dependencies): Update dependency redis to v4.3.1 | datasource | package | from | to | | ---------- | ------- | ----- | ----- | | pypi | redis | 4.3.0 | 4.3.1 | --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 66b22a2a..b1e59fc3 100644 --- a/requirements.txt +++ b/requirements.txt @@ -9,6 +9,6 @@ flake8==4.0.1 paramiko==2.10.4 ruamel.yaml==0.17.21 pyvim==3.0.2 -redis==4.3.0 +redis==4.3.1 requests==2.27.1 pyyaml==6.0 From acb2bd873b9a60cf23ad5874911dffa10ef63794 Mon Sep 17 00:00:00 2001 From: dweinholz Date: Tue, 10 May 2022 18:22:04 +0200 Subject: [PATCH 6/8] feat(Jupyter):added base_url --- VirtualMachineService/ancon/Playbook.py | 48 ++++++++++++++----------- 1 file changed, 28 insertions(+), 20 deletions(-) diff --git a/VirtualMachineService/ancon/Playbook.py b/VirtualMachineService/ancon/Playbook.py index c1e82c9f..168467e7 100644 --- a/VirtualMachineService/ancon/Playbook.py +++ b/VirtualMachineService/ancon/Playbook.py @@ -31,20 +31,20 @@ class Playbook(object): - ACTIVE = "ACTIVE" PLAYBOOK_FAILED = "PLAYBOOK_FAILED" def __init__( - self, - ip, - port, - playbooks_information, - osi_private_key, - public_key, - pool, - loaded_metadata_keys, - cloud_site, + self, + ip, + port, + playbooks_information, + osi_private_key, + public_key, + pool, + loaded_metadata_keys, + cloud_site, + ): self.loaded_metadata_keys = loaded_metadata_keys self.cloud_site = cloud_site @@ -57,6 +57,9 @@ def __init__( None # init process, returncode, standard output, standard error output ) self.returncode = -1 + self.playbooks_information = playbooks_information + LOG.exception(self.playbooks_information) + self.stdout = "" self.stderr = "" # init temporary directories and mandatory generic files @@ -86,10 +89,10 @@ def __init__( ) inventory_string = ( - "[vm]\n" + ip + ":" + port + " ansible_user=ubuntu " - "ansible_ssh_private_key_file=" - + self.private_key.name - + " ansible_python_interpreter=/usr/bin/python3" + "[vm]\n" + ip + ":" + port + " ansible_user=ubuntu " + "ansible_ssh_private_key_file=" + + self.private_key.name + + " ansible_python_interpreter=/usr/bin/python3" ) self.inventory.write(inventory_string) self.inventory.close() @@ -105,12 +108,12 @@ def copy_playbooks_and_init(self, playbooks_information, public_key): self.playbooks_dir + "/change_key_vars_file.yml", self.directory.name ) with open( - self.directory.name + "/change_key_vars_file.yml", mode="r" + self.directory.name + "/change_key_vars_file.yml", mode="r" ) as key_file: data_ck = self.yaml_exec.load(key_file) data_ck["change_key_vars"]["key"] = public_key.strip('"') with open( - self.directory.name + "/change_key_vars_file.yml", mode="w" + self.directory.name + "/change_key_vars_file.yml", mode="w" ) as key_file: self.yaml_exec.dump(data_ck, key_file) self.add_to_playbook_always_lists("change_key") @@ -120,14 +123,14 @@ def copy_playbooks_and_init(self, playbooks_information, public_key): self.playbooks_dir + "/" + self.playbook_exec_name, self.directory.name ) with open( - self.directory.name + "/" + self.playbook_exec_name, mode="r" + self.directory.name + "/" + self.playbook_exec_name, mode="r" ) as generic_playbook: data_gp = self.yaml_exec.load(generic_playbook) data_gp[0]["vars_files"] = self.vars_files data_gp[0]["tasks"][0]["block"] = self.tasks data_gp[0]["tasks"][0]["always"] = self.always_tasks with open( - self.directory.name + "/" + self.playbook_exec_name, mode="w" + self.directory.name + "/" + self.playbook_exec_name, mode="w" ) as generic_playbook: self.yaml_exec.dump(data_gp, generic_playbook) @@ -145,10 +148,15 @@ def load_vars(): data[playbook_name + "_tools"][k] = p_dict if playbook_name in self.loaded_metadata_keys: for k, v in playbook_vars.items(): + LOG.info(playbook_vars) if k == "template_version": data[playbook_name + "_vars"][k] = v if k == "create_only_backend": data[playbook_name + "_vars"][k] = v + if k == "base_url": + data[playbook_name + "_vars"][k] = v + + if playbook_name == OPTIONAL: for k, v in playbook_vars.items(): if k == MOSH: @@ -165,12 +173,12 @@ def load_vars(): try: shutil.copy(self.playbooks_dir + playbook_var_yml, self.directory.name) with open( - self.directory.name + playbook_var_yml, mode="r" + self.directory.name + playbook_var_yml, mode="r" ) as variables: data = self.yaml_exec.load(variables) load_vars() with open( - self.directory.name + playbook_var_yml, mode="w" + self.directory.name + playbook_var_yml, mode="w" ) as variables: self.yaml_exec.dump(data, variables) self.add_to_playbook_lists(playbook_name_local, playbook_name) From 28a413202075eef147b5ea61abd695b835097b1d Mon Sep 17 00:00:00 2001 From: dweinholz Date: Tue, 10 May 2022 16:22:47 +0000 Subject: [PATCH 7/8] fix(Linting):blacked code --- VirtualMachineService/ancon/Playbook.py | 40 ++++++++++++------------- 1 file changed, 19 insertions(+), 21 deletions(-) diff --git a/VirtualMachineService/ancon/Playbook.py b/VirtualMachineService/ancon/Playbook.py index 168467e7..f99c8eec 100644 --- a/VirtualMachineService/ancon/Playbook.py +++ b/VirtualMachineService/ancon/Playbook.py @@ -35,16 +35,15 @@ class Playbook(object): PLAYBOOK_FAILED = "PLAYBOOK_FAILED" def __init__( - self, - ip, - port, - playbooks_information, - osi_private_key, - public_key, - pool, - loaded_metadata_keys, - cloud_site, - + self, + ip, + port, + playbooks_information, + osi_private_key, + public_key, + pool, + loaded_metadata_keys, + cloud_site, ): self.loaded_metadata_keys = loaded_metadata_keys self.cloud_site = cloud_site @@ -89,10 +88,10 @@ def __init__( ) inventory_string = ( - "[vm]\n" + ip + ":" + port + " ansible_user=ubuntu " - "ansible_ssh_private_key_file=" - + self.private_key.name - + " ansible_python_interpreter=/usr/bin/python3" + "[vm]\n" + ip + ":" + port + " ansible_user=ubuntu " + "ansible_ssh_private_key_file=" + + self.private_key.name + + " ansible_python_interpreter=/usr/bin/python3" ) self.inventory.write(inventory_string) self.inventory.close() @@ -108,12 +107,12 @@ def copy_playbooks_and_init(self, playbooks_information, public_key): self.playbooks_dir + "/change_key_vars_file.yml", self.directory.name ) with open( - self.directory.name + "/change_key_vars_file.yml", mode="r" + self.directory.name + "/change_key_vars_file.yml", mode="r" ) as key_file: data_ck = self.yaml_exec.load(key_file) data_ck["change_key_vars"]["key"] = public_key.strip('"') with open( - self.directory.name + "/change_key_vars_file.yml", mode="w" + self.directory.name + "/change_key_vars_file.yml", mode="w" ) as key_file: self.yaml_exec.dump(data_ck, key_file) self.add_to_playbook_always_lists("change_key") @@ -123,14 +122,14 @@ def copy_playbooks_and_init(self, playbooks_information, public_key): self.playbooks_dir + "/" + self.playbook_exec_name, self.directory.name ) with open( - self.directory.name + "/" + self.playbook_exec_name, mode="r" + self.directory.name + "/" + self.playbook_exec_name, mode="r" ) as generic_playbook: data_gp = self.yaml_exec.load(generic_playbook) data_gp[0]["vars_files"] = self.vars_files data_gp[0]["tasks"][0]["block"] = self.tasks data_gp[0]["tasks"][0]["always"] = self.always_tasks with open( - self.directory.name + "/" + self.playbook_exec_name, mode="w" + self.directory.name + "/" + self.playbook_exec_name, mode="w" ) as generic_playbook: self.yaml_exec.dump(data_gp, generic_playbook) @@ -156,7 +155,6 @@ def load_vars(): if k == "base_url": data[playbook_name + "_vars"][k] = v - if playbook_name == OPTIONAL: for k, v in playbook_vars.items(): if k == MOSH: @@ -173,12 +171,12 @@ def load_vars(): try: shutil.copy(self.playbooks_dir + playbook_var_yml, self.directory.name) with open( - self.directory.name + playbook_var_yml, mode="r" + self.directory.name + playbook_var_yml, mode="r" ) as variables: data = self.yaml_exec.load(variables) load_vars() with open( - self.directory.name + playbook_var_yml, mode="w" + self.directory.name + playbook_var_yml, mode="w" ) as variables: self.yaml_exec.dump(data, variables) self.add_to_playbook_lists(playbook_name_local, playbook_name) From 3e2cefb028872c196a47161ca005f88d10497ced Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Tue, 10 May 2022 18:09:17 +0000 Subject: [PATCH 8/8] feat(Dependencies): Update dependency setuptools to v62.2.0 | datasource | package | from | to | | ---------- | ---------- | ------ | ------ | | pypi | setuptools | 62.1.0 | 62.2.0 | --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index b1e59fc3..c823b88e 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ -setuptools==62.1.0 +setuptools==62.2.0 thrift==0.16.0 python-keystoneclient openstacksdk ==0.61.0