-
Notifications
You must be signed in to change notification settings - Fork 3.3k
{Keyvault} Migrate azure-mgmt-keyvault to typespec generated SDK #32419
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
base: dev
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
|
|
@@ -43,7 +43,7 @@ | |||||||
|
|
||||||||
| def _default_certificate_profile(cmd): | ||||||||
| def get_model(x): | ||||||||
| return cmd.loader.get_sdk(x, resource_type=ResourceType.DATA_KEYVAULT_CERTIFICATES, mod='_generated_models') | ||||||||
| return cmd.loader.get_models(x, resource_type=ResourceType.DATA_KEYVAULT_CERTIFICATES, mod='_generated_models') | ||||||||
|
|
||||||||
| Action = get_model('Action') | ||||||||
| ActionType = get_model('ActionType') | ||||||||
|
|
@@ -354,7 +354,7 @@ def recover_vault(cmd, client, vault_name, resource_group_name, location, no_wai | |||||||
| return sdk_no_wait(no_wait, client.begin_create_or_update, | ||||||||
| resource_group_name=resource_group_name, | ||||||||
| vault_name=vault_name, | ||||||||
| parameters=params) | ||||||||
| parameters=params).result() | ||||||||
|
|
||||||||
|
|
||||||||
| def _parse_network_acls(cmd, resource_group_name, network_acls_json, network_acls_ips, network_acls_vnets, | ||||||||
|
|
@@ -623,7 +623,7 @@ def create_vault(cmd, client, # pylint: disable=too-many-locals, too-many-state | |||||||
| if no_self_perms or enable_rbac_authorization: | ||||||||
| access_policies = [] | ||||||||
| else: | ||||||||
| permissions = Permissions(keys=[KeyPermissions.all], | ||||||||
| permissions = Permissions(keys_property=[KeyPermissions.all], | ||||||||
| secrets=[SecretPermissions.all], | ||||||||
| certificates=[CertificatePermissions.all], | ||||||||
| storage=[StoragePermissions.all]) | ||||||||
|
|
@@ -661,7 +661,7 @@ def create_vault(cmd, client, # pylint: disable=too-many-locals, too-many-state | |||||||
| return sdk_no_wait(no_wait, client.begin_create_or_update, | ||||||||
| resource_group_name=resource_group_name, | ||||||||
| vault_name=vault_name, | ||||||||
| parameters=parameters) | ||||||||
| parameters=parameters).result() | ||||||||
|
||||||||
|
|
||||||||
|
|
||||||||
| def update_vault_setter(cmd, client, parameters, resource_group_name, vault_name, no_wait=False): | ||||||||
|
|
@@ -673,7 +673,7 @@ def update_vault_setter(cmd, client, parameters, resource_group_name, vault_name | |||||||
| parameters=VaultCreateOrUpdateParameters( | ||||||||
| location=parameters.location, | ||||||||
| tags=parameters.tags, | ||||||||
| properties=parameters.properties)) | ||||||||
| properties=parameters.properties)).result() | ||||||||
|
||||||||
| properties=parameters.properties)).result() | |
| properties=parameters.properties) | |
| ) |
Copilot
AI
Nov 13, 2025
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.
Calling .result() after sdk_no_wait() breaks the no-wait functionality. When no_wait=True, sdk_no_wait returns a poller without waiting, but immediately calling .result() forces the operation to wait anyway, defeating the purpose of the no_wait parameter.
The .result() call should be removed here. The sdk_no_wait function already handles the no_wait parameter correctly by returning either the result (when no_wait=False) or the poller (when no_wait=True).
| properties=vault.properties)).result() | |
| properties=vault.properties)) |
Copilot
AI
Nov 13, 2025
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.
Calling .result() after sdk_no_wait() breaks the no-wait functionality. When no_wait=True, sdk_no_wait returns a poller without waiting, but immediately calling .result() forces the operation to wait anyway, defeating the purpose of the no_wait parameter.
The .result() call should be removed here. The sdk_no_wait function already handles the no_wait parameter correctly by returning either the result (when no_wait=False) or the poller (when no_wait=True).
| properties=vault.properties)).result() | |
| properties=vault.properties)) |
Copilot
AI
Nov 13, 2025
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.
Calling .result() after sdk_no_wait() breaks the no-wait functionality. When no_wait=True, sdk_no_wait returns a poller without waiting, but immediately calling .result() forces the operation to wait anyway, defeating the purpose of the no_wait parameter.
The .result() call should be removed here. The sdk_no_wait function already handles the no_wait parameter correctly by returning either the result (when no_wait=False) or the poller (when no_wait=True).
| properties=vault.properties)).result() | |
| properties=vault.properties)) |
Copilot
AI
Nov 13, 2025
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.
Calling .result() after sdk_no_wait() breaks the no-wait functionality. When no_wait=True, sdk_no_wait returns a poller without waiting, but immediately calling .result() forces the operation to wait anyway, defeating the purpose of the no_wait parameter.
The .result() call should be removed here. The sdk_no_wait function already handles the no_wait parameter correctly by returning either the result (when no_wait=False) or the poller (when no_wait=True).
| properties=vault.properties)).result() | |
| properties=vault.properties)) |
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.
Calling
.result()aftersdk_no_wait()breaks the no-wait functionality. Whenno_wait=True,sdk_no_waitreturns a poller without waiting, but immediately calling.result()forces the operation to wait anyway, defeating the purpose of theno_waitparameter.The
.result()call should be removed here. Thesdk_no_waitfunction already handles theno_waitparameter correctly by returning either the result (whenno_wait=False) or the poller (whenno_wait=True).