Skip to content

Commit 73cd82a

Browse files
author
Tom Warnock
committed
update to v0.2.8
1 parent 533da56 commit 73cd82a

File tree

4 files changed

+7
-8
lines changed

4 files changed

+7
-8
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ SHA1 := $$(git log -1 --pretty=%h)
88
CURRENT_BRANCH := $$(git symbolic-ref -q --short HEAD)
99
LATEST_TAG := ${REPO_NAME}:latest
1010
GIT_TAG := ${REPO_NAME}:${SHA1}
11-
VERSION := v0.2.7
11+
VERSION := v0.2.8
1212

1313
info: ## Show information about the current git state.
1414
@echo "Github Project: https://github.com/${REPO_NAME}\nCurrent Branch: ${CURRENT_BRANCH}\nSHA1: ${SHA1}\n"

cloudendure/__version__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "0.2.7"
1+
__version__ = "0.2.8"

cloudendure/cloudendure.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ def __init__(
6767
self.private_ip_action = "CREATE_NEW"
6868
self.security_group_id: str = self.config.active_config.get("security_group_id", "")
6969
self.target_machines: List[str] = self.config.active_config.get("machines", "").split(",")
70+
self.target_machines = [x.upper() for x in self.target_machines]
7071
self.target_instance_types: List[str] = self.config.active_config.get("instance_types", "").split(",")
7172
if len(self.target_machines) == len(self.target_instance_types):
7273
self.target_instances: Dict[str, str] = dict(zip(self.target_machines, self.target_instance_types))
@@ -345,9 +346,7 @@ def check(self) -> bool:
345346
for machine in json.loads(machines_response.text).get("items", []):
346347
source_props: Dict[str, Any] = machine.get("sourceProperties", {})
347348
ref_name: str = source_props.get("name") or source_props.get("machineCloudId", "NONE")
348-
if _machine == source_props.get("name", "NONE") or _machine == source_props.get(
349-
"machineCloudId", "NONE"
350-
):
349+
if ref_name.upper() == _machine:
351350
machine_exist = True
352351

353352
if "lastConsistencyDateTime" not in machine["replicationInfo"]:
@@ -456,8 +455,8 @@ def update_blueprint(self) -> bool:
456455
for machine in json.loads(machines_response.text).get("items", []):
457456
source_props: Dict[str, Any] = machine.get("sourceProperties", {})
458457
machine_id: str = machine.get("id")
459-
machine_name: str = source_props.get("name")
460-
if machine_name in self.target_machines or machine_name.upper() in self.target_machines:
458+
machine_name: str = source_props.get("name", "").upper()
459+
if machine_name in self.target_machines:
461460
machine_data_dict[machine_id] = machine_name
462461

463462
if not machine_data_dict:

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "cloudendure"
3-
version = "0.2.7"
3+
version = "0.2.8"
44
description = "Python wrapper and CLI for CloudEndure"
55
authors = ["Mark Beacom <[email protected]>", "Tom Warnock <[email protected]>"]
66
maintainers = ["Evan Lucchesi <[email protected]>", "Nick Selpa <[email protected]>"]

0 commit comments

Comments
 (0)