Skip to content
This repository has been archived by the owner on May 27, 2024. It is now read-only.

Commit

Permalink
Merge pull request #709 from deNBI/fix(linting)_refs/heads/dev
Browse files Browse the repository at this point in the history
Automated Blacked Linting
  • Loading branch information
dweinholz authored May 19, 2021
2 parents 738a7dd + 68f2fe8 commit 35c88cb
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions VirtualMachineService/VirtualMachineHandler.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 35c88cb

Please sign in to comment.