azure-iot-cli-extension icon indicating copy to clipboard operation
azure-iot-cli-extension copied to clipboard

Hub endpoint control plane

Open vilit1 opened this issue 2 years ago • 3 comments

Waiting for merge - need to have the newer SDK with the Cosmos DB feature released due to non-backwards compatible API.

Addition of Cosmos DB Endpoint creation!

Essentially moving over endpoint and route management right now. The new command groups are:

  • az iot hub message-endpoint
  • az iot hub message-route

Sadly the sdk used still has models (endpoints's UserAssignedIdentities property does not work well with modelless)

Endpoints creation is broken up, like so:

  • az iot hub messaging-endpoint create cosmosdb-collection
  • az iot hub messaging-endpoint create eventhub
  • az iot hub messaging-endpoint create servicebus-topic
  • az iot hub messaging-endpoint create servicebus-queue
  • az iot hub messaging-endpoint create storage-container

This helps isolate which params are needed for which specific endpoints.

Other quality of life fixes:

  • Improved tests for endpoints! Now all types of endpoints are created (including service types and auth types)!
  • Fixed route test app-properties and system-properties to correctly try to change the format of those arguments to json before sending it to the service *
  • Changed how endpoint delete works (especially when specifying both the name and type)
  • Added connection string lookup for endpoint creation
  • Added test fixtures
  • these will be fixed in the azure cli core commands too.

Also added a small fix in the dynamosettings, if the value is "sentinel" then it is nulled out. This value gets set if there is misconfigured pipeline variable (especially if adding new pipeline variables).


This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

Thank you for contributing to the IoT extension!

This checklist is used to make sure that common guidelines for a pull request are followed.

General Guidelines

Intent for Production

  • [ ] It is expected that pull requests made to default or core branches such as dev or main are of production grade. Corollary to this, any merged contributions to these branches may be deployed in a public release at any given time. By checking this box, you agree and commit to the expected production quality of code.

Basic expectations

  • [ ] If introducing new functionality or modified behavior, are they backed by unit and/or integration tests?
  • [ ] In the same context as above are command names and their parameter definitions accurate? Do help docs have sufficient content?
  • [ ] Have all the relevant unit and integration tests pass? i.e. pytest <project root> -vv. Please provide evidence in the form of a screenshot showing a succesful run of tests locally OR a link to a test pipeline that has been run against the change-set.
  • [ ] Have linter checks passed using the .pylintrc and .flake8 rules? Look at the CI scripts for example usage.
  • [ ] Have extraneous print or debug statements, commented out code-blocks or code-statements (if any) been removed from the surface area of changes?
  • [ ] Have you made an entry in HISTORY.rst which concisely explains your user-facing feature or change?

Azure IoT CLI maintainers reserve the right to enforce any of the outlined expectations.

A PR is considered ready for review when all basic expectations have been met (or do not apply).

vilit1 avatar Jul 29 '22 16:07 vilit1

local Test runs: if cosmos db is not created: image

if cosmos db is created before tests: image

vilit1 avatar Aug 16 '22 21:08 vilit1

image currently tests pass locally

vilit1 avatar Sep 14 '22 22:09 vilit1

local hub test pass image

vilit1 avatar Sep 19 '22 23:09 vilit1

https://dev.azure.com/azureiotdevxp/aziotcli/_build/results?buildId=6855&view=results

vilit1 avatar Oct 27 '22 20:10 vilit1

There is a stacktrace when attempting to create a message-endpoint

image image

digimaun avatar Oct 27 '22 20:10 digimaun

There is a stacktrace when attempting to create a message-endpoint

image image

temporary fix is to do pip install -U azure-mgmt-iothub

vilit1 avatar Nov 03 '22 19:11 vilit1

/azp run

c-ryan-k avatar Nov 11 '22 17:11 c-ryan-k

Azure Pipelines successfully started running 1 pipeline(s).

azure-pipelines[bot] avatar Nov 11 '22 17:11 azure-pipelines[bot]

test run: The job with messaging endpoints isnt failing but the other job is timing out so far: https://dev.azure.com/azureiotdevxp/aziotcli/_build/results?buildId=7128&view=results

going to look into this more

vilit1 avatar Dec 15 '22 01:12 vilit1

https://dev.azure.com/azureiotdevxp/aziotcli/_build/results?buildId=7138&view=results

vilit1 avatar Dec 15 '22 18:12 vilit1

better test run https://dev.azure.com/azureiotdevxp/aziotcli/_build/results?buildId=7145&view=results

vilit1 avatar Dec 16 '22 00:12 vilit1

/azp run

vilit1 avatar Dec 16 '22 17:12 vilit1

Azure Pipelines successfully started running 1 pipeline(s).

azure-pipelines[bot] avatar Dec 16 '22 17:12 azure-pipelines[bot]

nightly passing: https://dev.azure.com/azureiotdevxp/aziotcli/_build/results?buildId=7152&view=results the min cli version does not support the cosmos db yet so that test is skipped

vilit1 avatar Dec 16 '22 18:12 vilit1

/azp run

vilit1 avatar Dec 19 '22 21:12 vilit1

Azure Pipelines successfully started running 1 pipeline(s).

azure-pipelines[bot] avatar Dec 19 '22 21:12 azure-pipelines[bot]