Skip to content
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

Merged
merged 17 commits into from
Oct 21, 2022

Conversation

vthiebaut10
Copy link
Contributor

  • Refactored how we check the resource type of the target to facilitate adding support for more resource types in the future.
  • Changed how we check the OS of the target resources to make it optional in the future.
  • Added connectedvmware sdk
  • Fixed the supported resource types names. (Extension was using resource provider names as resource types). Not a breaking change, we still support resource providers.

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

Related command

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?

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.

@yonzhan
Copy link
Collaborator

yonzhan commented Sep 19, 2022

ssh

@wangzelin007
Copy link
Member

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Comment on lines +35 to +37
from azext_ssh.vendored_sdks.connectedvmware import AzureArcVMwareManagementServiceAPI
return get_mgmt_service_client(cli_ctx,
AzureArcVMwareManagementServiceAPI)
Copy link
Contributor

@zhoxing-ms zhoxing-ms Oct 17, 2022

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:

CUSTOM_MGMT_STORAGE = CustomResourceType('azext_storage_preview.vendored_sdks.azure_mgmt_storage',
'StorageManagementClient')

Copy link
Contributor Author

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)

Copy link
Contributor Author

@vthiebaut10 vthiebaut10 Oct 18, 2022

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

Copy link
Contributor Author

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?

Copy link
Contributor

@zhoxing-ms zhoxing-ms Oct 19, 2022

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~

Copy link
Contributor Author

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.

@zhoxing-ms
Copy link
Contributor

zhoxing-ms commented Oct 17, 2022

Please add PR description in the HISTORY.md. And if you want to release a new version for the extension, please also upgrade the version defined in the setup.py.

@zhoxing-ms
Copy link
Contributor

@vthiebaut10 Please resolve those conflicts

@zhoxing-ms zhoxing-ms merged commit 94bd54a into Azure:main Oct 21, 2022
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