Skip to content
Merged
Show file tree
Hide file tree
Changes from 16 commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
a9ec74b
Updated to support multihub in iot central
Jackbk Apr 14, 2020
22dc92f
Merge branch 'dev' into multihub-3
Jackbk Apr 14, 2020
aeb11e4
Fixed iot central unit tests
Jackbk Apr 14, 2020
553dc45
Merge branch 'multihub-3' of https://github.com/Jackbk/azure-iot-cli-…
Jackbk Apr 14, 2020
75aaf95
Enable iot central test
Jackbk Apr 14, 2020
1949a9c
Added newline to end of _events
Jackbk Apr 14, 2020
200317b
Merge branch 'dev' into multihub-3
Jackbk Apr 14, 2020
7b5e0c9
Merge branch 'dev' into multihub-3
Jackbk Apr 20, 2020
c7a79fc
Merge branch 'multihub-3' of https://github.com/Jackbk/azure-iot-cli-…
Jackbk Apr 20, 2020
5356b22
Updated re PR comments
Jackbk Apr 21, 2020
2b9c04b
Updated re pr comments
Jackbk Apr 21, 2020
7920db4
Updated help and error information for iot central token
Jackbk Apr 21, 2020
da16e6a
Fixed grammar
Jackbk Apr 21, 2020
4cf0562
Merge branch 'dev' into multihub-3
Jackbk Apr 24, 2020
d0b15b6
Updated re PR comments. Moved device-twin to app device-twin
Jackbk Apr 28, 2020
336bdfc
Added central test for app device-twin
Jackbk Apr 28, 2020
dc2a8f7
no message
Jackbk Apr 28, 2020
63c0d7c
Formatted document
Jackbk Apr 28, 2020
dc7421c
Added additional help to errors
Jackbk Apr 28, 2020
d71cc59
Fixed lint issue
Jackbk Apr 28, 2020
953294b
Fixed linting
Jackbk Apr 28, 2020
0ec4f52
Updated test fixture
Jackbk Apr 28, 2020
8afe9f6
Added fixture
Jackbk Apr 28, 2020
12bd1ff
Added test test_get_aad_token
Jackbk Apr 28, 2020
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
21 changes: 20 additions & 1 deletion azext_iot/_help.py
Original file line number Diff line number Diff line change
Expand Up @@ -1180,7 +1180,12 @@
"iot central app"
] = """
type: group
short-summary: Manage Azure IoT Central applications.
short-summary: |
Manage Azure IoT Central applications.

To use this command group, the user must be logged through the `az login` command,
have the correct tenant set (the users home tenant) and
have access to the application through http://apps.azureiotcentral.com"
"""

helps[
Expand Down Expand Up @@ -1261,6 +1266,20 @@
short-summary: Get the device twin from IoT Hub.
"""

helps[
"iot central app device-twin"
] = """
type: group
short-summary: Manage IoT Central device twins.
"""

helps[
"iot central app device-twin show"
] = """
type: command
short-summary: Get the device twin from IoT Hub.
"""

helps[
"iot dt"
] = """
Expand Down
11 changes: 11 additions & 0 deletions azext_iot/_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -898,6 +898,17 @@ def load_arguments(self, _):
help="IoT Central API override. For use with environments other than production.",
)

with self.argument_context("iotcentral app device-twin show") as context:
context.argument(
"device_id", options_list=["--device-id", "-d"], help="Target Device."
)
context.argument("app_id", options_list=["--app-id"], help="Target App.")
context.argument(
"central_api_uri",
options_list=["--central-api-uri"],
help="IoT Central API override. For use with environments other than production.",
)

with self.argument_context("iot central") as context:
context.argument("app_id", options_list=["--app-id"], help="Target App.")
context.argument(
Expand Down
22 changes: 16 additions & 6 deletions azext_iot/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,23 +165,22 @@ def load_command_table(self, _):
cmd_group.command("delete", "iot_dps_registration_delete")

with self.command_group(
'iotcentral', command_type=iotcentral_ops,
deprecate_info=self.deprecate(redirect='iot central', hide=True)
"iotcentral",
command_type=iotcentral_ops,
deprecate_info=self.deprecate(redirect="iot central", hide=True),
) as cmd_group:
pass

with self.command_group("iotcentral app", command_type=iotcentral_ops) as cmd_group:
cmd_group.command(
"monitor-events",
"iot_central_monitor_events",
"monitor-events", "iot_central_monitor_events",
)

with self.command_group(
"iotcentral device-twin", command_type=iotcentral_ops
) as cmd_group:
cmd_group.command(
"show",
"iot_central_device_show",
"show", "iot_central_device_show",
)

with self.command_group(
Expand All @@ -194,6 +193,17 @@ def load_command_table(self, _):

with self.command_group(
"iot central device-twin", command_type=iotcentral_ops
) as cmd_group:
cmd_group.command(
"show",
"iot_central_device_show",
deprecate_info=self.deprecate(
redirect="iot central app device-twin", hide=True
),
)

with self.command_group(
"iot central app device-twin", command_type=iotcentral_ops
) as cmd_group:
cmd_group.command("show", "iot_central_device_show")

Expand Down
Loading