Skip to content

Commit 35e9bd6

Browse files
committed
Use new optional attr in AQ Hostname create
Use the new optional sandbox attr in AQ Hostname create
1 parent ff8fde5 commit 35e9bd6

File tree

4 files changed

+8
-15
lines changed

4 files changed

+8
-15
lines changed

OpenStack-Rabbit-Consumer/rabbit_consumer/aq_api.py

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -158,14 +158,6 @@ def delete_machine(machine_name: str) -> None:
158158
setup_requests(url, "delete", "Delete Machine")
159159

160160

161-
def _is_sandbox(image_meta: AqMetadata) -> bool:
162-
"""
163-
Returns True if the image is a sandbox image
164-
we do a simple test for a '/' in the domain name
165-
"""
166-
return "/" in image_meta.aq_domain
167-
168-
169161
def create_host(
170162
image_meta: AqMetadata, addresses: List[OpenstackAddress], machine_name: str
171163
) -> None:
@@ -184,8 +176,8 @@ def create_host(
184176
"osversion": image_meta.aq_os_version,
185177
}
186178

187-
if _is_sandbox(image_meta):
188-
params["sandbox"] = image_meta.aq_domain
179+
if image_meta.aq_sandbox:
180+
params["sandbox"] = image_meta.aq_sandbox
189181
else:
190182
params["domain"] = image_meta.aq_domain
191183

OpenStack-Rabbit-Consumer/test/test_aq_api.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,8 @@ def test_aq_create_host_with_sandbox(
292292
env_config = config.return_value
293293
env_config.aq_url = "https://example.com"
294294

295-
image_metadata.aq_domain = "example/sandbox"
295+
image_metadata.aq_domain = "example_domain"
296+
image_metadata.aq_sandbox = "example/sandbox"
296297

297298
create_host(image_metadata, openstack_address_list, machine_name)
298299
address = openstack_address_list[0]
@@ -304,7 +305,7 @@ def test_aq_create_host_with_sandbox(
304305
"personality": image_metadata.aq_personality,
305306
"osname": image_metadata.aq_os,
306307
"osversion": image_metadata.aq_os_version,
307-
"sandbox": image_metadata.aq_domain,
308+
"sandbox": image_metadata.aq_sandbox,
308309
}
309310

310311
expected_url = f"https://example.com/host/{address.hostname}"
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.3.3
1+
2.3.4

charts/rabbit-consumer/Chart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ type: application
66
# This is the chart version. This version number should be incremented each time you make changes
77
# to the chart and its templates, including the app version.
88
# Versions are expected to follow Semantic Versioning (https://semver.org/)
9-
version: 1.4.3
9+
version: 1.4.4
1010

1111
# This is the version number of the application being deployed. This version number should be
1212
# incremented each time you make changes to the application. Versions are not expected to
1313
# follow Semantic Versioning. They should reflect the version the application is using.
1414
# It is recommended to use it with quotes.
15-
appVersion: "v2.3.3"
15+
appVersion: "v2.3.4"
1616

0 commit comments

Comments
 (0)