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

Merge with Dev branch #385

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
c0f3ffb
Introducing IoT Hub dataplane RBAC support + various improvements (#341)
digimaun May 17, 2021
624d849
Iotc command versioning (#340)
valluriraj May 17, 2021
4bf999a
Add warning for qos deprecation and update contributing guide (#342)
avagraw May 18, 2021
b45c7f5
Integrate TQDM to show progress bar when simulator sends d2c messages
avagraw May 18, 2021
72df955
remove unused loop varable
avagraw May 18, 2021
1714e84
Update progress bar descriptionb
avagraw May 18, 2021
43160ec
Merge remote-tracking branch 'other/device_client_integration' into d…
avagraw May 20, 2021
b268dbe
Iotc command ga (#348)
valluriraj May 24, 2021
a4baacb
Use enum value instead of literal str. (#349)
digimaun May 25, 2021
79bf6cb
Managed identity support for device-identity import and export (#344)
c-ryan-k May 25, 2021
616e2c0
Update azext_metadata.json (#351)
digimaun May 25, 2021
9ee1ddc
Increment version to v0.10.13
digimaun May 25, 2021
3f12f21
Update README.md
digimaun May 25, 2021
058648a
Update HISTORY.rst
digimaun May 25, 2021
5a251d9
update twin reported properties during simulation
avagraw May 27, 2021
70f806f
update unit tests
avagraw May 27, 2021
759503a
Add dataplane reset (#352)
vilit1 May 27, 2021
f4333a9
styling updates
avagraw May 27, 2021
f82ef12
C2D messaging improvements. (#354)
digimaun May 27, 2021
48af558
Digital Twin wait commands (#345)
vilit1 May 27, 2021
354a98d
Add Identity Storage Account ID param to sentinel values (#355)
c-ryan-k May 28, 2021
0e983b8
Using SDK Listener for Twin properties update
avagraw Jun 1, 2021
21e2370
Merge remote-tracking branch 'upstream/device_client_integration' int…
avagraw Jun 1, 2021
b498a60
Module identity renew key (#356)
vilit1 Jun 1, 2021
72fa744
Update README.md
digimaun Jun 1, 2021
e9f8803
merge from remote
avagraw Jun 1, 2021
2ef0a41
Pipeline updates (#359)
c-ryan-k Jun 1, 2021
3b1ded1
Merge remote-tracking branch 'upstream/device_client_integration' int…
avagraw Jun 2, 2021
d4fb875
Structured mqtt formatting and eliminate dependency on six
avagraw Jun 2, 2021
1e9ada4
remove indent property not needed any more
avagraw Jun 2, 2021
3170fd8
Check for conditionals before running test jobs (#363)
c-ryan-k Jun 2, 2021
bb3c5d9
Update d2c and simulate commands to return errors for non SaS devices…
avagraw Jun 3, 2021
acf59c0
Support C2D Message decoding and Add TQDM for HTTP simulation
avagraw Jun 5, 2021
e64f460
Update MQTT operations to run on web sockets
avagraw Jun 7, 2021
50e96a2
Merge remote-tracking branch 'upstream/device_client_integration' int…
avagraw Jun 7, 2021
773bfbb
Remove duplicate test already in dev branch
avagraw Jun 7, 2021
fecc2d8
Device connection is automatic now
avagraw Jun 7, 2021
260e273
Styling update
avagraw Jun 7, 2021
b72ebb3
Merge remote-tracking branch 'upstream/device_client_integration' int…
avagraw Jun 10, 2021
c7e0896
Merging changes from dev branch
avagraw Jun 10, 2021
f36ca7b
Update simulate message (#371)
rido-min Jun 10, 2021
d88c94c
Make gitHubConnection a variable. (#373)
digimaun Jun 11, 2021
6738afb
Iotc updates (#368)
valluriraj Jun 15, 2021
589d678
Feature to support setting twin reported properties during simulation
avagraw Jun 22, 2021
2c0ba67
Merging with upstream
avagraw Jun 22, 2021
bbb82ca
Remove extra quote
avagraw Jun 23, 2021
54a46e5
update twin reported properties during simulation
avagraw May 27, 2021
b7d9d12
update unit tests
avagraw May 27, 2021
1487c1f
styling updates
avagraw May 27, 2021
782e34b
Using SDK Listener for Twin properties update
avagraw Jun 1, 2021
a588704
Support C2D Message decoding and Add TQDM for HTTP simulation
avagraw Jun 5, 2021
a15c8a0
Merging changes
avagraw Jun 23, 2021
0ae6dab
Merge remote-tracking branch 'upstream/device_client_integration' int…
avagraw Jun 24, 2021
a2adb11
Edge deployment validation changes. (#382)
digimaun Jun 29, 2021
81c1153
Couple linter fixes. (#384)
digimaun Jun 29, 2021
6dbae11
Separate IoT Hub per test suite to enable parallel test execution
avagraw Jun 29, 2021
4c14f9e
lint fixes
avagraw Jun 29, 2021
5b30336
Extend generate token (#375)
vilit1 Jun 30, 2021
fdcdfbe
Roll pipeline ubuntu versions back to Ubuntu-16.04 (#386)
c-ryan-k Jun 30, 2021
71b1f37
Merging with dev
avagraw Jun 30, 2021
c9e6e27
Reverting changes to submit a PR for merge with dev branch
avagraw Jul 1, 2021
7ff9830
indent fix
avagraw Jul 1, 2021
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
8 changes: 4 additions & 4 deletions .azure-devops/create-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ stages:

- job: 'Build_Publish_Azure_IoT_CLI_Extension'
pool:
vmImage: 'ubuntu-latest'
vmImage: 'Ubuntu-16.04'

steps:
- task: UsePythonVersion@0
Expand All @@ -46,7 +46,7 @@ stages:

- job: 'Build_Publish_Azure_CLI_Test_SDK'
pool:
vmImage: 'ubuntu-latest'
vmImage: 'Ubuntu-16.04'

steps:
- task: UsePythonVersion@0
Expand All @@ -72,7 +72,7 @@ stages:
- stage: 'test'
displayName: 'Run tests'
pool:
vmImage: 'ubuntu-latest'
vmImage: 'Ubuntu-16.04'
dependsOn: build
jobs:
- job: 'testCentral'
Expand Down Expand Up @@ -171,7 +171,7 @@ stages:

- task: GitHubRelease@0
inputs:
gitHubConnection: AzIoTCLIGitHub
gitHubConnection: $(GithubReleaseConnection)
repositoryName: $(Build.Repository.Name)
action: 'create'
target: '$(Build.SourceVersion)'
Expand Down
10 changes: 5 additions & 5 deletions .azure-devops/merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:

- job: 'build_and_publish_azure_iot_cli_ext'
pool:
vmImage: 'ubuntu-latest'
vmImage: 'Ubuntu-16.04'

steps:
- task: UsePythonVersion@0
Expand All @@ -31,7 +31,7 @@ jobs:

- job: 'build_and_publish_azure_cli_test_sdk'
pool:
vmImage: 'ubuntu-latest'
vmImage: 'Ubuntu-16.04'

steps:
- task: UsePythonVersion@0
Expand All @@ -45,7 +45,7 @@ jobs:
- job: 'run_unit_tests_ubuntu'
dependsOn: [ 'build_and_publish_azure_iot_cli_ext', 'build_and_publish_azure_cli_test_sdk']
pool:
vmImage: 'ubuntu-latest'
vmImage: 'Ubuntu-16.04'
strategy:
matrix:
Python36:
Expand Down Expand Up @@ -99,7 +99,7 @@ jobs:
- job: 'run_style_check'
dependsOn: ['build_and_publish_azure_iot_cli_ext', 'build_and_publish_azure_cli_test_sdk']
pool:
vmImage: 'ubuntu-latest'
vmImage: 'Ubuntu-16.04'

steps:
- task: UsePythonVersion@0
Expand All @@ -124,7 +124,7 @@ jobs:
dependsOn: ['build_and_publish_azure_iot_cli_ext']
displayName: 'Evaluate IoT extension command table'
pool:
vmImage: 'ubuntu-latest'
vmImage: 'Ubuntu-16.04'

steps:
- task: UsePythonVersion@0
Expand Down
6 changes: 3 additions & 3 deletions .azure-devops/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ stages:

- job: 'Build_Publish_Azure_IoT_CLI_Extension'
pool:
vmImage: 'ubuntu-latest'
vmImage: 'Ubuntu-16.04'

steps:
- task: UsePythonVersion@0
Expand All @@ -31,7 +31,7 @@ stages:

- job: 'Build_Publish_Azure_CLI_Test_SDK'
pool:
vmImage: 'ubuntu-latest'
vmImage: 'Ubuntu-16.04'

steps:
- task: UsePythonVersion@0
Expand All @@ -57,7 +57,7 @@ stages:
- stage: 'test'
displayName: 'Run all tests'
pool:
vmImage: 'ubuntu-latest'
vmImage: 'Ubuntu-16.04'
dependsOn: build
jobs:
- job: 'azEdge'
Expand Down
3 changes: 2 additions & 1 deletion .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,8 @@ disable=import-outside-toplevel,
comprehension-escape,
not-callable,
raise-missing-from,
super-with-arguments
super-with-arguments,
consider-using-dict-items,

# Enable the message, report, category or checker with the given id(s). You can
# either give multiple identifier separated by comma (,) or put this option
Expand Down
21 changes: 17 additions & 4 deletions HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,30 @@ Release History
0.10.14
+++++++++++++++

**IoT Central updates**

* Adds support to run root/interface level device commands.
* Adds support to get command history for root/interface level device commands.
* The --interface-id parameter for commands "device command run" , "device command history" changed to optional.

**IoT Hub updates**

* Fix for "az iot hub c2d-message receive" - the command will use the "ContentEncoding" header value (which indicates the message body encoding)
or fallback to utf-8 to decode the received message body.

* Addition for "az iot hub generate-sas-token" - the command will allow offline generation of a SAS Token using a connection string.

* Changes to Edge validation for set-modules and edge deployment creation:

By default only properties of system modules $edgeAgent and $edgeHub are validated against schemas installed with the IoT extension.
This can be disabled by using the --no-validation switch.

**Azure Digital Twins updates**

* Addition of the following commands

* az dt reset - Preview command which deletes all data entities from the target instance (models, twins, twin relationships).


0.10.13
+++++++++++++++
Expand All @@ -34,7 +47,7 @@ Release History
* Public API GA update

* Remove preview tag for api-token, device, device-template, user routes. Default routes use central GA API's.
* Add support for preview and 1.0 routes.
* Add support for preview and 1.0 routes.
* Addition of the optional '--av' argument to specify the version of API for the requested operation.

**IoT Hub updates**
Expand Down Expand Up @@ -102,7 +115,7 @@ For more information about IoT Hub support for AAD visit: https://docs.microsoft

* Addition of the following commands

* az iot central device manual-failover - Execute a manual failover of device across multiple IoT Hubs
* az iot central device manual-failover - Execute a manual failover of device across multiple IoT Hubs
* az iot central device manual-failback - Reverts the previously executed failover command by moving the device back to it's original IoT Hub

For more information about device high availability visit https://github.com/iot-for-all/iot-central-high-availability-clients#readme
Expand Down Expand Up @@ -138,7 +151,7 @@ For more information about device high availability visit https://github.com/iot
**IoT Hub updates**

* Improve http debug logging.
* Fix bug related to issue #296. Adds a clause to device-identity update that allows user to update primary-key / secondary-key
* Fix bug related to issue #296. Adds a clause to device-identity update that allows user to update primary-key / secondary-key
and primary-thumbprint / secondary-thumbprint values (respectively, per auth method) without needing to specify the auth_method in the update command.


Expand Down
18 changes: 18 additions & 0 deletions azext_iot/_help.py
Original file line number Diff line number Diff line change
Expand Up @@ -577,6 +577,18 @@
text: >
az iot hub generate-sas-token -d {device_id}
--login 'HostName=myhub.azure-devices.net;SharedAccessKeyName=iothubowner;SharedAccessKey=12345'
- name: Generate an Iot Hub SAS token using an IoT Hub connection string
text: >
az iot hub generate-sas-token
--connection-string 'HostName=myhub.azure-devices.net;SharedAccessKeyName=iothubowner;SharedAccessKey=12345'
- name: Generate a Device SAS token using a Device connection string
text: >
az iot hub generate-sas-token --connection-string
'HostName=myhub.azure-devices.net;DeviceId=mydevice;SharedAccessKeyName=iothubowner;SharedAccessKey=12345'
- name: Generate a Module SAS token using a Module connection string
text: >
az iot hub generate-sas-token --connection-string
'HostName=myhub.azure-devices.net;DeviceId=mydevice;ModuleId=mymodule;SharedAccessKeyName=iothubowner;SharedAccessKey=12345'
"""

helps[
Expand Down Expand Up @@ -928,6 +940,9 @@
long-summary: |
Modules content is json and in the form of {"modulesContent":{...}} or {"content":{"modulesContent":{...}}}.

By default properties of system modules $edgeAgent and $edgeHub are validated against schemas installed with the IoT extension.
This can be disabled by using the --no-validation switch.

Note: Upon execution the command will output the collection of modules applied to the device.
examples:
- name: Test edge modules while in development by setting modules on a target device.
Expand All @@ -950,6 +965,9 @@
long-summary: |
Deployment content is json and in the form of {"modulesContent":{...}} or {"content":{"modulesContent":{...}}}.

By default properties of system modules $edgeAgent and $edgeHub are validated against schemas installed with the IoT extension.
This can be disabled by using the --no-validation switch.

Edge deployments can be created with user defined metrics for on demand evaluation.
User metrics are json and in the form of {"queries":{...}} or {"metrics":{"queries":{...}}}.
examples:
Expand Down
7 changes: 7 additions & 0 deletions azext_iot/_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,13 @@ def load_arguments(self, _):
arg_type=get_three_state_flag(),
help="Flag indicating edge enablement.",
)
context.argument(
"connection_string",
options_list=["--connection-string", "--cs"],
help="Target connection string. This bypasses the IoT Hub registry and generates the SAS token directly"
" from the supplied symmetric key without further validation. All other command parameters aside from"
" duration will be ignored. Supported connection string types: Iot Hub, Device, Module."
)

with self.argument_context("iot hub") as context:
context.argument(
Expand Down
6 changes: 5 additions & 1 deletion azext_iot/_validators.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ def mode2_iot_login_handler(cmd, namespace):
login_value = args['login']
iot_cmd_type = None
entity_value = None
offline = None

if 'hub_name' in args:
iot_cmd_type = 'IoT Hub'
Expand All @@ -24,5 +25,8 @@ def mode2_iot_login_handler(cmd, namespace):
iot_cmd_type = 'DPS'
entity_value = args['dps_name']

if not any([login_value, entity_value]):
if 'connection_string' in args:
offline = args['connection_string']

if not any([login_value, entity_value, offline]):
raise CLIError(error_no_hub_or_login_on_input(iot_cmd_type))
Loading