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

Update connectedvmware extension for public preview. #3950

Merged
merged 14 commits into from
Oct 21, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@

/src/webpubsub/ @zackliu

/src/connectedvmware/ @sanmishra18
/src/connectedvmware/ @93mishra

/src/diskpool/ @Juliehzl

Expand Down
11 changes: 10 additions & 1 deletion src/connectedvmware/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,13 @@ Release History

0.1.0
++++++
* Initial release.
* Initial release.

0.1.1
++++++
* vcenter connection details can be skipped in cli args, the user will be prompted for the skipped values in that case.
iamsantoshmishra marked this conversation as resolved.
Show resolved Hide resolved

0.1.2
++++++
* Added support for cluster, datastore and host.
* Added support for placement profile.
47 changes: 45 additions & 2 deletions src/connectedvmware/README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
# Microsoft Azure CLI ConnectedVMware Extension #
# Microsoft Azure CLI ConnectedVMware Extension

The Azure CLI extension for [Azure Arc for VMware PrivateCloud](https://github.com/Azure/azure-arc-enabled-vmware-vsphere-preview/blob/main/docs/overview.md) is an extension for Azure CLI 2.0.

## Install

```
az extension add --name connectedvmware
```

## Usage

See the [extension reference documenation](https://github.com/Azure/azure-arc-enabled-vmware-vsphere-preview/blob/main/docs/overview.md).
*Examples:*
_Examples:_

##### Create Vcenter Resource

Expand Down Expand Up @@ -38,6 +40,45 @@ az connectedvmware resource-pool create \
--name resourceName
```

##### Create Cluster Resource

```
az connectedvmware cluster create \
--subscription subscriptionId \
--resource-group resourceGroupName \
--location locationName \
--custom-location customLocationName \
--vcenter vcenterResourceName \
--mo-ref-id morefId \
--name resourceName
```

##### Create Host Resource

```
az connectedvmware host create \
--subscription subscriptionId \
--resource-group resourceGroupName \
--location locationName \
--custom-location customLocationName \
--vcenter vcenterResourceName \
--mo-ref-id morefId \
--name resourceName
```

##### Create Datastore Resource

```
az connectedvmware datastore create \
--subscription subscriptionId \
--resource-group resourceGroupName \
--location locationName \
--custom-location customLocationName \
--vcenter vcenterResourceName \
--mo-ref-id morefId \
--name resourceName
```

##### Create VM Template Resource

```
Expand Down Expand Up @@ -79,7 +120,9 @@ az connectedvmware vm create \
```

## Uninstall

You can see if the extension is installed by running `az --version` or `az extension list`. You can remove the extension by running:

```
az extension remove --name connectedvmware
```
Expand Down
28 changes: 28 additions & 0 deletions src/connectedvmware/azext_connectedvmware/_client_factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,27 @@ def cf_resource_pool(cli_ctx, *_):
return cf_connectedvmware(cli_ctx).resource_pools


def cf_cluster(cli_ctx, *_):
"""
Client factory for clusters.
"""
return cf_connectedvmware(cli_ctx).clusters


def cf_datastore(cli_ctx, *_):
"""
Client factory for datastores.
"""
return cf_connectedvmware(cli_ctx).datastores


def cf_host(cli_ctx, *_):
"""
Client factory for hosts.
"""
return cf_connectedvmware(cli_ctx).hosts


def cf_virtual_network(cli_ctx, *_):
"""
Client factory for virtual networks.
Expand All @@ -52,3 +73,10 @@ def cf_inventory_item(cli_ctx, *_):
Client factory for inventory items.
"""
return cf_connectedvmware(cli_ctx).inventory_items


def cf_guest_agent(cli_ctx, *_):
"""
Client factory for guest agent.
"""
return cf_connectedvmware(cli_ctx).guest_agent
Loading