-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
[ssh] Add support to "Microsoft.ConnectedVMwarevSphere/virtualMachines" resource type #5367
Conversation
…pport for connectedvmware
ssh |
… the non async operations
…ckHCI/virtualMachines without adding it to documentation
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
from azext_ssh.vendored_sdks.connectedvmware import AzureArcVMwareManagementServiceAPI | ||
return get_mgmt_service_client(cli_ctx, | ||
AzureArcVMwareManagementServiceAPI) |
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.
Please define a CustomResourceType
for AzureArcVMwareManagementServiceAPI
, such as:
azure-cli-extensions/src/storage-preview/azext_storage_preview/profiles.py
Lines 11 to 12 in 7962586
CUSTOM_MGMT_STORAGE = CustomResourceType('azext_storage_preview.vendored_sdks.azure_mgmt_storage', | |
'StorageManagementClient') |
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.
@zhoxing-ms Why do we need to use this custom resource type? do I need to use it for the other clients in the same file as well? (hybrid connectivity and connected machine clients)
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.
@zhoxing-ms when I try to use that I get this error: azure.cli.core.profiles._shared.APIVersionException: Unable to get API version for type '<azure.cli.core.profiles._shared.CustomResourceType object at 0x00000267F5ADE250>' in profile 'latest
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.
@zhoxing-ms I pushed the changes you requested, but this error still happens. Do you know what might cause that?
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.
@vthiebaut10 I recommended you define CustomResourceType
because the parameter of method get_mgmt_service_client
should be passed in client_or_resource_type
, I personally think it will be more in line with the code specification.
But it seems that AzureArcVMwareManagementServiceAPI
is non-versioned client
, so it is not suitable to define as CustomResourceType
. So please use AzureArcVMwareManagementServiceAPI
directly as before , thanks~
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.
@zhoxing-ms I reverted the changes.
Please add PR description in the |
@vthiebaut10 Please resolve those conflicts |
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 azdev
required)python scripts/ci/test_index.py -q
locally?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.The precondition is to put your code inside this repository and upgrade the version in the pull request but do not modify
src/index.json
.