Skip to content

[HORIZONDB] az horizondb identity assign/list/remove/show: Introduced identity commands for HorizonDB#9865

Open
mattboentoro wants to merge 1 commit into
Azure:mainfrom
mattboentoro:mattboentoro/horizon-identity
Open

[HORIZONDB] az horizondb identity assign/list/remove/show: Introduced identity commands for HorizonDB#9865
mattboentoro wants to merge 1 commit into
Azure:mainfrom
mattboentoro:mattboentoro/horizon-identity

Conversation

@mattboentoro
Copy link
Copy Markdown
Member


This checklist is used to make sure that common guidelines for a pull request are followed.

Related command

  • az horizondb identity assign
  • az horizondb identity list
  • az horizondb identity remove
  • az horizondb identity show

General Guidelines

  • Have you run azdev style <YOUR_EXT> locally? (pip install azdev required)
  • Have you run python scripts/ci/test_index.py -q locally? (pip install wheel==0.30.0 required)
  • My extension version conforms to the Extension version schema

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.json automatically.
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.

Copilot AI review requested due to automatic review settings May 13, 2026 18:06
@azure-client-tools-bot-prd
Copy link
Copy Markdown

Validation for Breaking Change Starting...

Thanks for your contribution!

@azure-client-tools-bot-prd
Copy link
Copy Markdown

Hi @mattboentoro,
Please write the description of changes which can be perceived by customers into HISTORY.rst.
If you want to release a new extension version, please update the version in setup.py as well.

@yonzhan
Copy link
Copy Markdown
Collaborator

yonzhan commented May 13, 2026

Thank you for your contribution! We will review the pull request and get back to you soon.

@github-actions
Copy link
Copy Markdown
Contributor

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).
After that please run the following commands to enable git hooks:

pip install azdev --upgrade
azdev setup -c <your azure-cli repo path> -r <your azure-cli-extensions repo path>

@github-actions
Copy link
Copy Markdown
Contributor

Hi @mattboentoro

Release Suggestions

Module: horizondb

  • Please log updates into to src/horizondb/HISTORY.rst
  • Update VERSION to 1.0.0b2 in src/horizondb/setup.py

Notes

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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, and show.
  • Registered the new horizondb identity command 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.

Comment on lines +63 to +68
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):
Comment on lines +30 to +38
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')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants