From 5d8c5d8affad86071582466d57644b9cdbd575e1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 17 May 2021 05:02:57 +0000 Subject: [PATCH 1/4] feat(deps): bump ansible from 3.3.0 to 3.4.0 Bumps [ansible](https://github.com/ansible/ansible) from 3.3.0 to 3.4.0. - [Release notes](https://github.com/ansible/ansible/releases) - [Commits](https://github.com/ansible/ansible/commits) Signed-off-by: dependabot[bot] --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 4af05fcb..71da6064 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,7 +4,7 @@ python-keystoneclient openstacksdk ==0.56.0 deprecated == 1.2.12 Click==7.1.2 -ansible==3.3.0 +ansible==3.4.0 flake8==3.9.2 ruamel.yaml<0.18.0 paramiko==2.7.2 From 2adb4384289629356a8d84d37572da5c1a775966 Mon Sep 17 00:00:00 2001 From: dweinholz Date: Tue, 18 May 2021 10:37:02 +0200 Subject: [PATCH 2/4] fix(SecurityGroup):dont try to add sec to vm if already added --- VirtualMachineService/VirtualMachineHandler.py | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/VirtualMachineService/VirtualMachineHandler.py b/VirtualMachineService/VirtualMachineHandler.py index ac61eaa4..3d4aa25d 100644 --- a/VirtualMachineService/VirtualMachineHandler.py +++ b/VirtualMachineService/VirtualMachineHandler.py @@ -1895,7 +1895,7 @@ def add_udp_security_group(self, server_id): :param server_id: The id of the server :return: """ - LOG.info("Setting up security groups for {0}".format(server_id)) + LOG.info("Setting up UDP security group for {0}".format(server_id)) server = self.conn.get_server(name_or_id=server_id) if server is None: LOG.exception("Instance {0} not found".format(server_id)) @@ -1903,10 +1903,21 @@ def add_udp_security_group(self, server_id): sec = self.conn.get_security_group(name_or_id=server.name + "_udp") if sec: LOG.info( - "Security group with name {} already exists.".format( + "UDP Security group with name {} already exists.".format( server.name + "_udp" ) ) + server_security_groups=self.conn.list_server_security_groups(server) + for sg in server_security_groups: + if sg["name"] == server.name + "_udp": + LOG.info( + "UDP Security group with name {} already added to server.".format( + server.name + "_udp" + ) + ) + return True + + self.conn.compute.add_security_group_to_server( server=server_id, security_group=sec ) From 1dbe6eed1afa38d27c113ae1c405a11f7fbaf19a Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 18 May 2021 08:38:23 +0000 Subject: [PATCH 3/4] fix(Linting):blacked code --- VirtualMachineService/VirtualMachineHandler.py | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/VirtualMachineService/VirtualMachineHandler.py b/VirtualMachineService/VirtualMachineHandler.py index 3d4aa25d..3c6be81e 100644 --- a/VirtualMachineService/VirtualMachineHandler.py +++ b/VirtualMachineService/VirtualMachineHandler.py @@ -1907,16 +1907,15 @@ def add_udp_security_group(self, server_id): server.name + "_udp" ) ) - server_security_groups=self.conn.list_server_security_groups(server) + server_security_groups = self.conn.list_server_security_groups(server) for sg in server_security_groups: - if sg["name"] == server.name + "_udp": - LOG.info( - "UDP Security group with name {} already added to server.".format( - server.name + "_udp" - ) - ) - return True - + if sg["name"] == server.name + "_udp": + LOG.info( + "UDP Security group with name {} already added to server.".format( + server.name + "_udp" + ) + ) + return True self.conn.compute.add_security_group_to_server( server=server_id, security_group=sec From 2fa98e1ec59dfbbc4646c4b9cf16ee820a142f45 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 18 May 2021 18:53:57 +0000 Subject: [PATCH 4/4] fix(Linting):blacked code --- VirtualMachineService/VirtualMachineHandler.py | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/VirtualMachineService/VirtualMachineHandler.py b/VirtualMachineService/VirtualMachineHandler.py index 3d4aa25d..3c6be81e 100644 --- a/VirtualMachineService/VirtualMachineHandler.py +++ b/VirtualMachineService/VirtualMachineHandler.py @@ -1907,16 +1907,15 @@ def add_udp_security_group(self, server_id): server.name + "_udp" ) ) - server_security_groups=self.conn.list_server_security_groups(server) + server_security_groups = self.conn.list_server_security_groups(server) for sg in server_security_groups: - if sg["name"] == server.name + "_udp": - LOG.info( - "UDP Security group with name {} already added to server.".format( - server.name + "_udp" - ) - ) - return True - + if sg["name"] == server.name + "_udp": + LOG.info( + "UDP Security group with name {} already added to server.".format( + server.name + "_udp" + ) + ) + return True self.conn.compute.add_security_group_to_server( server=server_id, security_group=sec