Skip to content

Commit

Permalink
Merge pull request #116 from 2ndWatch/case_mania
Browse files Browse the repository at this point in the history
update to v0.2.8. case sensitivity fixes.
  • Loading branch information
twarnock authored May 1, 2020
2 parents 533da56 + 73cd82a commit b589875
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ SHA1 := $$(git log -1 --pretty=%h)
CURRENT_BRANCH := $$(git symbolic-ref -q --short HEAD)
LATEST_TAG := ${REPO_NAME}:latest
GIT_TAG := ${REPO_NAME}:${SHA1}
VERSION := v0.2.7
VERSION := v0.2.8

info: ## Show information about the current git state.
@echo "Github Project: https://github.com/${REPO_NAME}\nCurrent Branch: ${CURRENT_BRANCH}\nSHA1: ${SHA1}\n"
Expand Down
2 changes: 1 addition & 1 deletion cloudendure/__version__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.2.7"
__version__ = "0.2.8"
9 changes: 4 additions & 5 deletions cloudendure/cloudendure.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ def __init__(
self.private_ip_action = "CREATE_NEW"
self.security_group_id: str = self.config.active_config.get("security_group_id", "")
self.target_machines: List[str] = self.config.active_config.get("machines", "").split(",")
self.target_machines = [x.upper() for x in self.target_machines]
self.target_instance_types: List[str] = self.config.active_config.get("instance_types", "").split(",")
if len(self.target_machines) == len(self.target_instance_types):
self.target_instances: Dict[str, str] = dict(zip(self.target_machines, self.target_instance_types))
Expand Down Expand Up @@ -345,9 +346,7 @@ def check(self) -> bool:
for machine in json.loads(machines_response.text).get("items", []):
source_props: Dict[str, Any] = machine.get("sourceProperties", {})
ref_name: str = source_props.get("name") or source_props.get("machineCloudId", "NONE")
if _machine == source_props.get("name", "NONE") or _machine == source_props.get(
"machineCloudId", "NONE"
):
if ref_name.upper() == _machine:
machine_exist = True

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

if not machine_data_dict:
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "cloudendure"
version = "0.2.7"
version = "0.2.8"
description = "Python wrapper and CLI for CloudEndure"
authors = ["Mark Beacom <mark@markbeacom.com>", "Tom Warnock <twarnock@2ndwatch.com>"]
maintainers = ["Evan Lucchesi <evan@2ndwatch.com>", "Nick Selpa <nselpa@2ndwatch.com>"]
Expand Down

0 comments on commit b589875

Please sign in to comment.