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 #986 from deNBI/staging
Browse files Browse the repository at this point in the history
Staging
  • Loading branch information
eKatchko authored Jan 26, 2022
2 parents 69dbe4f + a0fc15a commit fa78f29
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions VirtualMachineService/VirtualMachineHandler.py
Original file line number Diff line number Diff line change
Expand Up @@ -1955,7 +1955,7 @@ def add_udp_security_group(self, server_id):
.split(".")[-1]
)
x = int(ip_base)
udp_port_start = eval(self.UDP_PORT_CALCULATION)
udp_port_start = eval(self.UDP_FORMULAR)

security_group = self.create_security_group(
name=server.name + "_udp",
Expand Down Expand Up @@ -2081,7 +2081,12 @@ def get_active_image_by_os_version(self, os_version, os_distro):
metadata = image["metadata"]
image_os_version = metadata.get("os_version", None)
image_os_distro = metadata.get("os_distro", None)
if os_version == image_os_version and image.status == "active":
base_image_ref = metadata.get("base_image_ref", None)
if (
os_version == image_os_version
and image.status == "active"
and base_image_ref is None
):
if os_distro and os_distro == image_os_distro:
return image
elif os_distro is None:
Expand Down

0 comments on commit fa78f29

Please sign in to comment.