Skip to content

Commit

Permalink
refactor: hide onvif create and custom create AEP commands. (#479)
Browse files Browse the repository at this point in the history
* Also deprecate long form options in favor of shorter options.
  • Loading branch information
vilit1 authored Jan 16, 2025
1 parent cc27768 commit 40cb1bf
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
8 changes: 6 additions & 2 deletions azext_edge/edge/command_map.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,12 @@ def load_iotops_commands(self, _):
"iot ops asset endpoint create",
command_type=aep_resource_ops,
) as cmd_group:
cmd_group.command("custom", "create_custom_asset_endpoint_profile")
cmd_group.command("onvif", "create_onvif_asset_endpoint_profile", is_preview=True)
cmd_group.command(
"custom", "create_custom_asset_endpoint_profile", deprecate_info=cmd_group.deprecate(hide=True)
)
cmd_group.command(
"onvif", "create_onvif_asset_endpoint_profile", deprecate_info=cmd_group.deprecate(hide=True)
)
cmd_group.command("opcua", "create_opcua_asset_endpoint_profile")

with self.command_group(
Expand Down
11 changes: 8 additions & 3 deletions azext_edge/edge/providers/rpsaas/adr/params.py
Original file line number Diff line number Diff line change
Expand Up @@ -438,20 +438,25 @@ def load_adr_arguments(self, _):
)
context.argument(
"certificate_reference",
options_list=["--certificate-ref", "--cert-ref", "--cr"],
options_list=["--certificate-ref", "--cert-ref", context.deprecate(target="--cr", redirect="--cert-ref")],
help="Reference for the certificate used in authentication. This method of user authentication is not "
"supported yet.",
arg_group="Authentication",
)
context.argument(
"password_reference",
options_list=["--password-ref", "--pr"],
options_list=["--password-ref", "--pass-ref", context.deprecate(target="--pr", redirect="--pass-ref")],
help="Reference for the password used in authentication.",
arg_group="Authentication",
)
context.argument(
"username_reference",
options_list=["--username-reference", "--ur"],
options_list=[
context.deprecate(target="--username-reference", redirect="--user-ref"),
"--username-ref",
"--user-ref",
context.deprecate(target="--ur", redirect="--user-ref")
],
help="Reference for the username used in authentication.",
arg_group="Authentication",
)
Expand Down

0 comments on commit 40cb1bf

Please sign in to comment.