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: init result aioVersion -> opsVersion and not show individual component versions. #90

Merged
merged 2 commits into from
Nov 9, 2023
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/edge/_help.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def load_iotops_help():
short-summary: Evaluate IoT Operations service deployment for health, configuration and usability.
long-summary: |
[Supported service APIs]
{MQ_ACTIVE_API.as_str()}
{COMPAT_MQ_APIS.as_str()}
{COMPAT_DATA_PROCESSOR_APIS.as_str()}
{COMPAT_LNM_APIS.as_str()}
"""
Expand Down
2 changes: 2 additions & 0 deletions azext_edge/edge/params.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,12 +179,14 @@ def load_iotops_arguments(self, _):
options_list=["--trace-ids"],
help="Space-separated trace ids in hex format.",
arg_group="Trace",
deprecate_info=context.deprecate(hide=True),
)
context.argument(
"trace_dir",
options_list=["--trace-dir"],
help="Local directory where traces will be bundled and stored at.",
arg_group="Trace",
deprecate_info=context.deprecate(hide=True),
)

with self.argument_context("iot ops init") as context:
Expand Down
2 changes: 1 addition & 1 deletion azext_edge/edge/providers/orchestration/template.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class TemplateVer(NamedTuple):

@property
def component_vers(self) -> dict:
return self.content["variables"]["VERSIONS"]
return self.content["variables"]["__VERSION__"]

@property
def parameters(self) -> dict:
Expand Down
2 changes: 1 addition & 1 deletion azext_edge/edge/providers/orchestration/work.py
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ def do_work(self):
terminal_deployment = wait_for_terminal_state(deployment_poller)
deployment_result["deploymentState"]["status"] = terminal_deployment.properties.provisioning_state
deployment_result["deploymentState"]["correlationId"] = terminal_deployment.properties.correlation_id
deployment_result["deploymentState"]["aioVersion"] = template.component_vers
deployment_result["deploymentState"]["opsVersion"] = template.component_vers
deployment_result["deploymentState"]["timestampUtc"]["ended"] = get_timestamp_now_utc()
deployment_result["deploymentState"]["resources"] = [
resource.id.split(
Expand Down
7 changes: 7 additions & 0 deletions azext_edge/tests/edge/init/test_work_unit.py
Original file line number Diff line number Diff line change
Expand Up @@ -584,6 +584,13 @@ def test_work_order(
assert result["clusterNamespace"]
assert result["deploymentLink"]
assert result["deploymentState"]
assert result["deploymentState"]["status"]
assert result["deploymentState"]["correlationId"]
assert result["deploymentState"]["opsVersion"]
assert result["deploymentState"]["timestampUtc"]
assert result["deploymentState"]["timestampUtc"]["started"]
assert result["deploymentState"]["timestampUtc"]["ended"]
assert "resources" in result["deploymentState"]

mocked_deploy_template.assert_called_once()
assert mocked_deploy_template.call_args.kwargs["template"]
Expand Down