Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: update instance name in template output #488

Merged
merged 2 commits into from
Jan 30, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion azext_edge/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import os

VERSION = "1.1.0"
VERSION = "1.2.0a1"
EXTENSION_NAME = "azure-iot-ops"
EXTENSION_ROOT = os.path.dirname(os.path.abspath(__file__))
USER_AGENT = "IotOperationsCliExtension/{}".format(VERSION)
2 changes: 2 additions & 0 deletions azext_edge/edge/providers/orchestration/targets.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,8 @@ def get_ops_instance_template(
dataflow_profile["name"] = f"{self.instance_name}/{DEFAULT_DATAFLOW_PROFILE}"
dataflow_endpoint["name"] = f"{self.instance_name}/{DEFAULT_DATAFLOW_ENDPOINT}"

template.content["outputs"]["aio"]["value"]["name"] = self.instance_name

if self.custom_broker_config:
if "properties" in self.custom_broker_config:
self.custom_broker_config = self.custom_broker_config["properties"]
Expand Down
1 change: 1 addition & 0 deletions azext_edge/tests/edge/orchestration/test_targets_unit.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,7 @@ def test_init_targets(target_scenario: dict):
assert instance_template["resources"]["broker_listener"]["name"] == f"{targets.instance_name}/default/default"
assert instance_template["resources"]["dataflow_profile"]["name"] == f"{targets.instance_name}/default"
assert instance_template["resources"]["dataflow_endpoint"]["name"] == f"{targets.instance_name}/default"
assert instance_template["outputs"]["aio"]["value"]["name"] == targets.instance_name

if targets.custom_broker_config:
assert instance_template["resources"]["broker"]["properties"] == targets.custom_broker_config
Expand Down