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 help documentation to avoid html tag issues #711

Merged
merged 4 commits into from
Aug 12, 2024
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
4 changes: 2 additions & 2 deletions azext_iot/_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
arg_group="Access Control",
help="Indicates whether the operation should auto-derive a policy key or use the current Azure AD session. "
"If the authentication type is login and the resource hostname is provided, resource lookup will be skipped unless needed."
"You can configure the default using `az configure --defaults iotdps-data-auth-type=<auth-type-value>`",
"You can configure the default using `az configure --defaults iotdps-data-auth-type={auth-type-value}`",
configured_default="iotdps-data-auth-type",
)

Expand All @@ -58,7 +58,7 @@
arg_group="Access Control",
help="Indicates whether the operation should auto-derive a policy key or use the current Azure AD session. "
"If the authentication type is login and the resource hostname is provided, resource lookup will be skipped unless needed."
"You can configure the default using `az configure --defaults iothub-data-auth-type=<auth-type-value>`",
"You can configure the default using `az configure --defaults iothub-data-auth-type={auth-type-value}`",
configured_default="iothub-data-auth-type",
)

Expand Down
8 changes: 4 additions & 4 deletions azext_iot/central/params.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ def load_central_arguments(self, _):
"content",
options_list=["--content", "-k"],
help="The device template definition. Provide path to JSON file or raw stringified JSON."
" [File Path Example: ./path/to/file.json] [Example of stringified JSON: {<Device Template JSON>}]."
" [File Path Example: ./path/to/file.json] [Example of stringified JSON: {Device Template JSON}]."
" The request body must contain CapabilityModel.",
)

Expand Down Expand Up @@ -480,7 +480,7 @@ def load_central_arguments(self, _):
options_list=["--content", "-k"],
help="The job data definition. Provide path to JSON file or raw stringified JSON."
" [File Path Example:./path/to/file.json]"
" [Example of stringified JSON:[{<Job Data JSON>}]. The request body must contain array of JobData.",
" [Example of stringified JSON:[{Job Data JSON}]. The request body must contain array of JobData.",
)
context.argument(
"batch_type",
Expand Down Expand Up @@ -591,7 +591,7 @@ def load_central_arguments(self, _):
options_list=["--content", "-k"],
help="The partial export definition. Provide path to JSON file or raw stringified JSON."
" [File Path Example:./path/to/file.json]"
" [Example of stringified JSON:{<Export Data JSON>}]. The request body must contain partial content of Export.",
" [Example of stringified JSON:{Export Data JSON}]. The request body must contain partial content of Export.",
)

with self.argument_context("iot central export destination") as context:
Expand Down Expand Up @@ -650,7 +650,7 @@ def load_central_arguments(self, _):
options_list=["--content", "-k"],
help="The partial destination definition. Provide path to JSON file or raw stringified JSON."
" [File Path Example:./path/to/file.json]"
" [Example of stringified JSON:{<Destination Data JSON>}]."
" [Example of stringified JSON:{Destination Data JSON}]."
" The request body must contain partial content of Destination.",
)

Expand Down
8 changes: 4 additions & 4 deletions azext_iot/deviceupdate/params.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,23 +32,23 @@ def load_deviceupdate_arguments(self, _):
"resource_group_name",
arg_type=resource_group_name_type,
help="Device Update account resource group name. "
"You can configure the default group using `az config set defaults.adu_group=<name>`.",
"You can configure the default group using `az config set defaults.adu_group={name}`.",
arg_group="Account Identifier",
configured_default="adu_group",
)
context.argument(
"name",
options_list=["-n", "--account"],
help="Device Update account name. "
"You can configure the default account name using `az config set defaults.adu_account=<name>`.",
"You can configure the default account name using `az config set defaults.adu_account={name}`.",
arg_group="Account Identifier",
configured_default="adu_account",
)
context.argument(
"instance_name",
options_list=["-i", "--instance"],
help="Device Update instance name. "
"You can configure the default instance name using `az config set defaults.adu_instance=<name>`.",
"You can configure the default instance name using `az config set defaults.adu_instance={name}`.",
arg_group="Account Identifier",
configured_default="adu_instance",
)
Expand All @@ -71,7 +71,7 @@ def load_deviceupdate_arguments(self, _):
"location",
options_list=["-l", "--location"],
help="Device Update account location. If no location is provided the resource group location is used. "
"You can configure the default location using `az configure --defaults location=<name>`.",
"You can configure the default location using `az configure --defaults location={name}`.",
)
context.argument(
"assign_identity",
Expand Down
6 changes: 3 additions & 3 deletions azext_iot/digitaltwins/params.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def load_digitaltwins_arguments(self, _):
"resource_group_name",
arg_type=resource_group_name_type,
help="Digital Twins instance resource group. "
"You can configure the default group using `az configure --defaults group=<name>`.",
"You can configure the default group using `az configure --defaults group={name}`.",
)
context.argument(
"name",
Expand All @@ -58,7 +58,7 @@ def load_digitaltwins_arguments(self, _):
"location",
options_list=["--location", "-l"],
help="Digital Twins instance location. If no location is provided the resource group location is used."
"You can configure the default location using `az configure --defaults location=<name>`.",
"You can configure the default location using `az configure --defaults location={name}`.",
),
context.argument(
"tags",
Expand Down Expand Up @@ -699,7 +699,7 @@ def load_digitaltwins_arguments(self, _):
options_list=["--output-file", "--of"],
help="Name of the bulk import job's output file. This file will contain logs as well as error information. "
"The file gets created automatically once the job finishes. The file gets overwritten if it already exists. "
"If not provided the output file is created with the name: <job_id>_output.txt",
"If not provided the output file is created with the name: {job_id}_output.txt",
arg_group="Bulk Import Job",
)
context.argument(
Expand Down
4 changes: 2 additions & 2 deletions azext_iot/iothub/_help.py
Original file line number Diff line number Diff line change
Expand Up @@ -291,9 +291,9 @@ def load_iothub_help():
- name: Send application properties
text: az iot device send-d2c-message -n {iothub_name} -d {device_id} --props 'key0=value0;key1=value1'
- name: Send system properties (Message Id and Correlation Id)
text: az iot device send-d2c-message -n {iothub_name} -d {device_id} --props '$.mid=<id>;$.cid=<id>'
text: az iot device send-d2c-message -n {iothub_name} -d {device_id} --props '$.mid={id};$.cid={id}'
- name: Send custom data by specifying content-type and content-encoding in system properties
text: az iot device send-d2c-message -n {iothub_name} -d {device_id} --props '$.ct=<content-type>;$.ce=<content-encoding>' --data {message_body}
text: az iot device send-d2c-message -n {iothub_name} -d {device_id} --props '$.ct={content-type};$.ce={content-encoding}' --data {message_body}
- name: Send custom data in binary format by specifying content-encoding in system properties
text: az iot device send-d2c-message -n {iothub_name} -d {device_id} --props '$.ct=application/octet-stream' --data-file-path {file_path}
- name: Send custom data in JSON format by specifying content-type and content-encoding in system properties
Expand Down