-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
[IoT] DPS track 2 update, access-policy deprecation, and linked-hub parameter changes #20682
Conversation
* Change rg to be optional Deprecate access-policy to policy Add hub name parameter options to linked hub Bucket arguments * support name or host name in linked hub * update wording to have DPS later * update expiration
@zhoxing-ms Can we get this into the current milestone targeted for a January release? |
Add @jsntcy to help with |
val = re.sub(r'[S|s]hared[A|a]ccess[K|k]ey=([^\*].+=)', 'SharedAccessKey={}' | ||
.format(MOCK_KEY), val, flags=re.IGNORECASE) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add some comments or samples to explain the regular expression to increase it's readability?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, though these are just for removing SAS keys from our recorded tests.
The typical connection string response is SharedAccessKey=***
but one of our calls is either using (SDK) or receiving (service) keys in lowercase - sharedaccesskey=***
- and this just stops them from appearing in the test recordings. I can add comments to the function.
val = re.sub(br'[S|s]hared[A|a]ccess[K|k]ey=([^\*].+=)', 'SharedAccessKey={}' | ||
.format(MOCK_KEY).encode(), val, flags=re.IGNORECASE) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above
with self.command_group('iot dps access-policy', | ||
client_factory=iot_service_provisioning_factory, | ||
deprecate_info=self.deprecate(redirect='iot dps policy', | ||
expiration='2.35.0') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The expiration causes lots of failures in CI after Azure CLI is updated to 2.35.0:
- FAIL - HIGH severity: faulty_help_example_parameters_rule
Help-Entry: `iot dps access-policy create` -
There is a violation:
"az iot dps access-policy create --dps-name MyDps --resource-group MyResourceGroup --name MyPolicy --rights EnrollmentRead" is not a valid command.
argument _subcommand: unknown parser 'access-policy' (choices: list, show, create, delete, update, linked-hub, certificate, policy).
...
- FAIL - HIGH severity: expired_command_group
Command-Group: `iot dps access-policy` - Deprecated command group is expired and should be removed.
...
- FAIL - HIGH severity: missing_command_help
Command: `iot dps access-policy create` - Missing help
Command: `iot dps access-policy delete` - Missing help
Command: `iot dps access-policy list` - Missing help
Command: `iot dps access-policy show` - Missing help
Command: `iot dps access-policy update` - Missing help
Description
Updates DPS
azure-mgmt-iothubprovisioningservices
to track 2 SDK and adds convenience arguments toiot dps linked-hub create
Also begins the process of deprecating
iot dps access-policy
in favor ofiot dps policy
namespace for policy commands.Testing Guide
Test new
iot dps policy
commands to replace alliot dps access-policy
commands by simply replacingaccess-policy
withpolicy
in the existing commands.Test using
iot dps linked-hub create
to link an IoT Hub to a DPS instance with new convenience arguments:--connection_string
,--hub_name
, and--hub_resource_group_name
History Notes
[IoT]
az iot dps access-policy
: Being replaced withaz iot dps policy
[IoT]
az iot dps linked-hub create
: Add convenience arguments for linking hubs.This checklist is used to make sure that common guidelines for a pull request are followed.
The PR title and description has followed the guideline in Submitting Pull Requests.
I adhere to the Command Guidelines.
I adhere to the Error Handling Guidelines.