Azure / azure-iot-cli-extension

Azure IoT extension for Azure CLI
Other
82 stars 64 forks source link

Iot message endpoint update #665

Closed vilit1 closed 1 year ago

vilit1 commented 1 year ago

Originally an ask from the customer to update connection strings for endpoints. I expanded on this idea to create this update command:

  1. Like create, update is also subdivided into commands by type. This limits the amount of checking we need to do (we can assume that inputs will be valid for that type) and makes the help clean and clear
  2. Allows for changes to any property allowed by the service without deleting associated routes or message enrichments. Possible uses can be: a. Change auth type for the endpoint from connection string to identity based (encouraged by Azure) b. Remove certain properties from the endpoint (cosmos db partition key names) c. Change the source of the endpoint (eventhub A -> eventhub B)
  3. If changing authentication type, null out unneeded properties, like connection string for when the endpoint becomes identity based.
  4. Add a keyword that would signify "I want you to fetch the connection string for me".

Todo: add unit tests, make sure there are no missed gaps

History:

* Add command group `az iot hub endpoint update`, which will allow you to update your endpoint without deleting it.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com 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

Basic expectations

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 commented 1 year ago

Things are more or less working https://dev.azure.com/azureiotdevxp/aziotcli/_build/results?buildId=8628&view=results

vilit1 commented 1 year ago

https://dev.azure.com/azureiotdevxp/aziotcli/_build/results?buildId=8671&view=logs&j=6c5ef33c-c99f-53f8-99b2-716ee366dbc8&t=64c2748c-227f-5b4c-ee99-9c56b6eaac78 tests still pass so will merge