Skip to content

Commit

Permalink
Update connectedvmware extension for public preview. (#3950)
Browse files Browse the repository at this point in the history
* Update connectedvmware extension for public preview.

* Update src/connectedvmware/HISTORY.rst

Co-authored-by: Xing Zhou <[email protected]>

* Update src/connectedvmware/azext_connectedvmware/_params.py

Co-authored-by: Xing Zhou <[email protected]>

* Update src/connectedvmware/azext_connectedvmware/_params.py

Co-authored-by: Xing Zhou <[email protected]>

* Update src/connectedvmware/azext_connectedvmware/_params.py

Co-authored-by: Xing Zhou <[email protected]>

* Addressed Zhoxing review comment.

* Addressed Zhoxing review comment.

* Fixed violation test.

* Fixed violation test.

* removed deps

Co-authored-by: Santosh Mishra <[email protected]>
Co-authored-by: Xing Zhou <[email protected]>
  • Loading branch information
3 people authored Oct 21, 2021
1 parent fa2b1dd commit f0d9f88
Show file tree
Hide file tree
Showing 45 changed files with 8,565 additions and 1,191 deletions.
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@

/src/webpubsub/ @zackliu

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

/src/diskpool/ @Juliehzl

Expand Down
12 changes: 11 additions & 1 deletion src/connectedvmware/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,16 @@
Release History
===============

0.1.2
++++++
* Added support for cluster, datastore and host.
* Added support for placement profile.

0.1.1
++++++
* vcenter connection details can be skipped in CLI args, the user will be prompted for the skipped values in that case.

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

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

0 comments on commit f0d9f88

Please sign in to comment.