Azure / azure-iot-cli-extension

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

fix: ensure IoT Hub list persists over DPS enrollment (group) updates #701

Closed vilit1 closed 1 month ago

vilit1 commented 1 month ago

With respect to https://github.com/Azure/azure-cli/issues/29002

Fixing some weirdness in DPS enrollments and enrollment groups:

  1. fix the iot hub param to allow multiple uses

create a new enrollment group with 2 iot hubs (here I just use the same one): image

  1. ensure that update will keep the iot hub list unless a new list is given

re-use the enrollment; update the allocation policy and see that the hubs are still there: image

try to update to static, get expected failure because there are 2 hubs: image

get it to work when a single hub is defined: image

  1. minimize the number of inputs needed to update custom allocation policy enrollments

going from static to custom, all inputs are still needed: image

image

only want to update the url: image

tests image


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).