[HORIZONDB] az horizondb identity assign/list/remove/show: Introduced identity commands for HorizonDB#9865
Conversation
…ed identity commands for HorizonDB
|
Validation for Breaking Change Starting...
Thanks for your contribution! |
|
Hi @mattboentoro, |
|
Thank you for your contribution! We will review the pull request and get back to you soon. |
|
The git hooks are available for azure-cli and azure-cli-extensions repos. They could help you run required checks before creating the PR. Please sync the latest code with latest dev branch (for azure-cli) or main branch (for azure-cli-extensions). pip install azdev --upgrade
azdev setup -c <your azure-cli repo path> -r <your azure-cli-extensions repo path>
|
Release SuggestionsModule: horizondb
Notes
|
There was a problem hiding this comment.
Pull request overview
This PR introduces a new horizondb identity command group to manage user-assigned managed identities on HorizonDB clusters, wiring up command registration, parameters, and help text within the horizondb Azure CLI extension.
Changes:
- Added new identity command implementations:
assign,list,remove, andshow. - Registered the new
horizondb identitycommand group and defined CLI parameters for identity IDs and confirmation prompts. - Added CLI help entries and examples for the new commands.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
src/horizondb/azext_horizondb/commands/identity_commands.py |
Implements the identity assign/list/remove/show custom commands via begin_update and get. |
src/horizondb/azext_horizondb/cluster_commands.py |
Registers the new horizondb identity command group and binds it to the custom command implementations. |
src/horizondb/azext_horizondb/_params.py |
Adds argument definitions for the new identity commands (multi and single identity IDs, --yes). |
src/horizondb/azext_horizondb/_help.py |
Adds help text and examples for the new identity command group and commands. |
| patch_body = { | ||
| "identity": { | ||
| "type": "UserAssigned" if remaining else "None", | ||
| "userAssignedIdentities": identities_to_remove | ||
| } | ||
| } |
| return _get_user_assigned_identities(cluster) | ||
|
|
||
|
|
||
| def horizondb_identity_remove(cmd, client, resource_group_name, cluster_name, identity, no_wait=False, yes=False): |
| identity_commands = CliCommandType( | ||
| operations_tmpl='azext_horizondb.commands.identity_commands#{}') | ||
| with self.command_group('horizondb identity', horizondb_clusters_sdk, | ||
| custom_command_type=identity_commands, | ||
| client_factory=cf_horizondb_clusters) as g: | ||
| g.custom_command('assign', 'horizondb_identity_assign', supports_no_wait=True) | ||
| g.custom_command('list', 'horizondb_identity_list') | ||
| g.custom_command('remove', 'horizondb_identity_remove', supports_no_wait=True) | ||
| g.custom_command('show', 'horizondb_identity_show') |
This checklist is used to make sure that common guidelines for a pull request are followed.
Related command
General Guidelines
azdev style <YOUR_EXT>locally? (pip install azdevrequired)python scripts/ci/test_index.py -qlocally? (pip install wheel==0.30.0required)For new extensions:
About Extension Publish
There is a pipeline to automatically build, upload and publish extension wheels.
Once your pull request is merged into main branch, a new pull request will be created to update
src/index.jsonautomatically.You only need to update the version information in file setup.py and historical information in file HISTORY.rst in your PR but do not modify
src/index.json.