-
Notifications
You must be signed in to change notification settings - Fork 3.4k
[Compute] Update command az sig create, az sig show and add command group az sig identity to manage the service identity of a Shared Image Gallery (SIG)
#33137
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
Open
william051200
wants to merge
20
commits into
Azure:dev
Choose a base branch
from
william051200:32814-sig-identity
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
e65d8b1
Generate az sig identity aaz code
william051200 0f21f1c
Update az sig create and show aaz code
william051200 3451492
Add test case for sig identity
william051200 0190058
Update aaz code
william051200 b8d5e0a
Set sig identity remove as registered command
william051200 06fe6c3
Add example to sig identity remove
william051200 8d57862
Update test case
william051200 51c90e0
Update sig identity aaz code
william051200 c24d102
Update test case
william051200 38baf30
Complete sig identity
william051200 4af5100
Record test case
william051200 13d680a
Update test case and test case recording
william051200 30a108b
Update sig create param group
william051200 416e0ec
Update command help
william051200 fe91c00
Add no wait to az sig create
william051200 cb360e4
Update sig create
william051200 4e3df5c
update code
william051200 f6d3c05
Update code style
william051200 cd72191
Merge remote-tracking branch 'origin/dev' into 32814-sig-identity
william051200 19e9f45
Update test case and recording
william051200 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1351,6 +1351,35 @@ def load_arguments(self, _): | |
| c.argument('gallery_image_name', options_list=['--gallery-image-definition', '-i'], help='gallery image definition') | ||
| c.argument('gallery_image_version', options_list=['--gallery-image-version', '-e'], help='gallery image version') | ||
|
|
||
| with self.argument_context('sig create') as c: | ||
| c.argument('eula', arg_group='CommunityGalleryInfo', help='Community gallery publisher eula') | ||
| c.argument('public_name_prefix', arg_group='CommunityGalleryInfo', help='Community gallery public name prefix') | ||
| c.argument('publisher_contact', arg_group='CommunityGalleryInfo', options_list=["--publisher-email", "--publisher-contact"], help='Community gallery publisher contact email') | ||
| c.argument('publisher_uri', arg_group='CommunityGalleryInfo', help='Community gallery publisher uri') | ||
| c.argument('location', get_location_type(self.cli_ctx), arg_group='Gallery', | ||
| help='Location in which to create VM and related resources. If default location is not configured, will default to the resource group\'s location') | ||
| c.argument('tags', tags_type, arg_group='Gallery') | ||
| c.argument('description', arg_group='Properties', help='The description of the gallery.') | ||
| c.argument('permissions', arg_group='SharingProfile', arg_type=get_enum_type(['Community', 'Groups', 'Private']), | ||
| help='This property allows you to specify the permission of sharing gallery.') | ||
| c.argument('soft_delete', arg_group='SoftDeletePolicy', arg_type=get_three_state_flag(), help='Enable soft-deletion for resources in this gallery, allowing them to be recovered within retention time.') | ||
| c.argument('assign_identity', nargs='*', arg_group='Managed Service Identity', help="accept system or user assigned identities separated by spaces. Use '[system]' to refer system assigned identity, or a resource id to refer user assigned identity. Check out help for more examples") | ||
|
|
||
| with self.argument_context('sig identity remove') as c: | ||
| c.argument('identities', nargs='*', help="Space-separated identities to remove. Use '{0}' to refer to the system assigned identity. Default: '{0}'".format(MSI_LOCAL_ID)) | ||
|
|
||
| with self.argument_context('sig identity assign') as c: | ||
| c.argument('assign_identity', options_list=['--identities'], nargs='*', help="Space-separated identities to assign. Use '{0}' to refer to the system assigned identity. Default: '{0}'".format(MSI_LOCAL_ID)) | ||
|
Comment on lines
+1368
to
+1372
|
||
|
|
||
| for scope in ['sig create', 'sig identity assign']: | ||
| with self.argument_context(scope) as c: | ||
| arg_group = 'Managed Service Identity' if scope.split()[-1] == 'create' else None | ||
| c.argument('identity_scope', options_list=['--scope'], arg_group=arg_group, | ||
| help="Scope that the system assigned identity can access. ") | ||
| c.argument('identity_role', options_list=['--role'], arg_group=arg_group, | ||
| help='Role name or id the system assigned identity will have. ') | ||
| c.ignore('identity_role_id') | ||
|
|
||
| with self.argument_context('sig image-definition create') as c: | ||
| c.argument('offer', options_list=['--offer', '-f'], help='image offer') | ||
| c.argument('sku', options_list=['--sku', '-s'], help='image sku') | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
sig identitycommand group includes ashowcommand (registered incommands.py), but there is no corresponding help entry here. Addhelps['sig identity show'](and examples if appropriate) to keep help coverage consistent withassign/remove.