[IoT] DPS track 2 update, access-policy deprecation, and linked-hub parameter changes#20682
[IoT] DPS track 2 update, access-policy deprecation, and linked-hub parameter changes#20682zhoxing-ms merged 11 commits intoAzure:devfrom
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.
Could you add some comments or samples to explain the regular expression to increase it's readability?
There was a problem hiding this comment.
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) |
| 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.
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-iothubprovisioningservicesto track 2 SDK and adds convenience arguments toiot dps linked-hub createAlso begins the process of deprecating
iot dps access-policyin favor ofiot dps policynamespace for policy commands.Testing Guide
Test new
iot dps policycommands to replace alliot dps access-policycommands by simply replacingaccess-policywithpolicyin the existing commands.Test using
iot dps linked-hub createto link an IoT Hub to a DPS instance with new convenience arguments:--connection_string,--hub_name, and--hub_resource_group_nameHistory 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.