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

[vmware] global reach connections #3528

Merged
merged 5 commits into from
Jun 30, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
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
1 change: 1 addition & 0 deletions src/vmware/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Other changes:
- Add `az vmware addon hcx` command group to manage a HCX addon
- Add `az vmware addon srm` command group to manage a Site Recovery Manager (SRM) addon
- Add `az vmware addon vr` command group to manage a vSphere Replication (VR) addon
- Add `az vmware global-reach-connection` command group to manage Global Reach Connections
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see there are many features in 3.0, but not released. Do you still have new features to add? If not, recommend to upgrade version in setup.py here. Or will you raise a new PR to upgrade the version in setup.py tp trigger our extension release pipeline?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new API is still behind a feature flag in production. After the feature flag is removed, I'll create a new PR to upgrade the version in setup.py to trigger the release.


## 2.0.1 (2021-02)
- Update the minimum az cli version to 2.11.0 [#3045](https://github.com/Azure/azure-cli-extensions/issues/3045)
Expand Down
5 changes: 5 additions & 0 deletions src/vmware/DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,8 @@ rm ..\azure-cli-extensions\src\vmware\azext_vmware\vendored_sdks -Recurse
autorest --python --output-folder=..\azure-cli-extensions\src\vmware\azext_vmware\vendored_sdks --use=@autorest/[email protected] --tag=package-2021-06-01 --azure-arm=true --namespace=avs_client --override-client-name=AVSClient specification\vmware\resource-manager\readme.md
```
It was run from a git clone of [azure-rest-api-specs](https://github.com/Azure/azure-rest-api-specs).

## Linter
Use [azdev](https://github.com/Azure/azure-cli-dev-tools) to check for linter errors and warnings.
- `azdev style vmware`
- `azdev linter --include-whl-extensions vmware`
3 changes: 1 addition & 2 deletions src/vmware/azext_vmware/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ def __init__(self, cli_ctx=None):
vmware_custom = CliCommandType(
operations_tmpl='azext_vmware.custom#{}',
client_factory=cf_vmware)
super(VmwareCommandsLoader, self).__init__(cli_ctx=cli_ctx,
custom_command_type=vmware_custom)
super(VmwareCommandsLoader, self).__init__(cli_ctx=cli_ctx, custom_command_type=vmware_custom) # pylint: disable=super-with-arguments

def load_command_table(self, args):
from azext_vmware.commands import load_command_table
Expand Down
25 changes: 25 additions & 0 deletions src/vmware/azext_vmware/_help.py
Original file line number Diff line number Diff line change
Expand Up @@ -351,3 +351,28 @@
- name: Delete a Site Recovery Manager (SRM) addon.
text: az vmware addon srm delete --resource-group MyResourceGroup --private-cloud MyPrivateCloud
"""

helps['vmware global-reach-connection'] = """
type: group
short-summary: Commands to manage global reach connections in a private cloud.
"""

helps['vmware global-reach-connection create'] = """
type: command
short-summary: Create a global reach connection in a private cloud.
"""

helps['vmware global-reach-connection list'] = """
type: command
short-summary: List global reach connections in a private cloud.
"""

helps['vmware global-reach-connection show'] = """
type: command
short-summary: Show details of a global reach connection in a private cloud.
"""

helps['vmware global-reach-connection delete'] = """
type: command
short-summary: Delete a global reach connection in a private cloud.
"""
9 changes: 8 additions & 1 deletion src/vmware/azext_vmware/_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------------------------------
# pylint: disable=line-too-long
# pylint: disable=line-too-long,too-many-statements


def load_arguments(self, _):
Expand Down Expand Up @@ -100,3 +100,10 @@ def load_arguments(self, _):

with self.argument_context('vmware addon srm') as c:
c.argument('license_key', help='The Site Recovery Manager (SRM) license.')

with self.argument_context('vmware global-reach-connection') as c:
c.argument('name', options_list=['--name', '-n'], help='Name of the global reach connection.')

with self.argument_context('vmware global-reach-connection create') as c:
c.argument('peer_express_route_circuit', help='Identifier of the ExpressRoute Circuit to peer with.')
c.argument('authorization_key', help='Authorization key from the peer express route.')
1 change: 1 addition & 0 deletions src/vmware/azext_vmware/_validators.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------------------------------
# pylint: disable=line-too-long


def example_name_or_id_validator(cmd, namespace):
Expand Down
7 changes: 7 additions & 0 deletions src/vmware/azext_vmware/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------------------------------
# pylint: disable=line-too-long,too-many-statements

from azure.cli.core.commands import CliCommandType
from azext_vmware._client_factory import cf_vmware
Expand Down Expand Up @@ -80,3 +81,9 @@ def load_command_table(self, _):
g.custom_show_command('show', 'addon_srm_show')
g.custom_command('update', 'addon_srm_update')
g.custom_command('delete', 'addon_srm_delete')

with self.command_group('vmware global-reach-connection', vmware_sdk, client_factory=cf_vmware) as g:
g.custom_command('create', 'globalreachconnection_create')
g.custom_command('list', 'globalreachconnection_list')
g.custom_command('delete', 'globalreachconnection_delete')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what about add confirmation for delete command?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm going to assume no. I've asked the PM. The only delete that confirms right now is private-cloud. If the PM comes back with a different answer, I'll put in another PR.

g.custom_show_command('show', 'globalreachconnection_show')
Loading