Skip to content

Commit

Permalink
Migrate vmware (#6617)
Browse files Browse the repository at this point in the history
* Migrate vmware private-cloud show/create/update/delete/list

* migrate vmware private-cloud list-admin-credential/rotate-vcenter-password

* Migrate commands vmware private-cloud identity and enable-cmk-encryption/disable-cmk-encryption

* migrate commands group 'vmware cluster'

* migrate commands group 'vmware authorization'

* migrate commands group 'vmware hcx-enterprise-site'

* Optimize the confirmation prompt for vmware create command

* migrate commands group 'vmware location'

* migrate commands group 'vmware datastore'

* migrate commands group 'vmware addon'

* migrate commands group 'vmware global-reach-connection'

* migrate commands group 'vmware cloud-link'

* migrate commands group 'vmware script-cmdlet'

* migrate commands group 'vmware script-package'

* migrate commands group 'vmware workload-network dhcp'

* migrate commands group 'vmware workload-network dns-service'

* migrate commands group 'vmware workload-network dns-zone'

* migrate commands group 'vmware workload-network port-mirroring'

* migrate commands group 'vmware workload-network segment'

* migrate commands group 'vmware workload-network public-ip'

* migrate commands group 'vmware workload-network vm-group'

* migrate commands group 'vmware workload-network vm'

* migrate commands group 'vmware workload-network gateway'

* migrate commands group 'vmware placement-policy'

* migrate commands group 'vmware vm'

* Migrate vmware private-cloud identity-source

* migrate command group 'vmware script-execution', except create command

* record test for test_vmware_private_cloud

* fix test issues

* add tests for vmware delete

* update vmware tests

* fix identity source create tests

* fix ci issues

* fix ci issues

* migrate command 'az vmware script-execution create'

* clean up code

* fix linter issues

* remove vendored_sdks

* fix linter issues
  • Loading branch information
kairu-ms authored Sep 13, 2023
1 parent bd1542b commit ca53b85
Show file tree
Hide file tree
Showing 234 changed files with 59,701 additions and 31,690 deletions.
16 changes: 12 additions & 4 deletions src/vmware/azext_vmware/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,22 @@ class VmwareCommandsLoader(AzCommandsLoader):

def __init__(self, cli_ctx=None):
from azure.cli.core.commands import CliCommandType
from azext_vmware._client_factory import cf_vmware
vmware_custom = CliCommandType(
operations_tmpl='azext_vmware.custom#{}',
client_factory=cf_vmware)
vmware_custom = CliCommandType(operations_tmpl='azext_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
from azure.cli.core.aaz import load_aaz_command_table
try:
from . import aaz
except ImportError:
aaz = None
if aaz:
load_aaz_command_table(
loader=self,
aaz_pkg_name=aaz.__name__,
args=args
)
load_command_table(self, args)
return self.command_table

Expand Down
4 changes: 2 additions & 2 deletions src/vmware/azext_vmware/_help.py
Original file line number Diff line number Diff line change
Expand Up @@ -846,15 +846,15 @@
short-summary: Create a segment by ID in a private cloud workload network.
examples:
- name: Create a segment by ID in a workload network.
text: az vmware workload-network segment create --resource-group group1 --private-cloud cloud1 --segment segment1 --display-name segment1 --connected-gateway /infra/tier-1s/gateway --revision 1 --dhcp-ranges 40.20.0.0 40.20.0.1 --gateway-address 40.20.20.20/16 --port-name port1
text: az vmware workload-network segment create --resource-group group1 --private-cloud cloud1 --segment segment1 --display-name segment1 --connected-gateway /infra/tier-1s/gateway --revision 1 --dhcp-ranges 40.20.0.0 40.20.0.1 --gateway-address 40.20.20.20/16
"""

helps['vmware workload-network segment update'] = """
type: command
short-summary: Update a segment by ID in a private cloud workload network.
examples:
- name: Update a segment by ID in a workload network.
text: az vmware workload-network segment update --resource-group group1 --private-cloud cloud1 --segment segment1 --display-name segment1 --connected-gateway /infra/tier-1s/gateway --revision 1 --dhcp-ranges 40.20.0.0 40.20.0.1 --gateway-address 40.20.20.20/16 --port-name port1
text: az vmware workload-network segment update --resource-group group1 --private-cloud cloud1 --segment segment1 --display-name segment1 --connected-gateway /infra/tier-1s/gateway --revision 1 --dhcp-ranges 40.20.0.0 40.20.0.1 --gateway-address 40.20.20.20/16
"""

helps['vmware workload-network segment delete'] = """
Expand Down
178 changes: 5 additions & 173 deletions src/vmware/azext_vmware/_params.py

Large diffs are not rendered by default.

29 changes: 0 additions & 29 deletions src/vmware/azext_vmware/_validators.py

This file was deleted.

6 changes: 6 additions & 0 deletions src/vmware/azext_vmware/aaz/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
#
# Code generated by aaz-dev-tools
# --------------------------------------------------------------------------------------------
6 changes: 6 additions & 0 deletions src/vmware/azext_vmware/aaz/latest/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
#
# Code generated by aaz-dev-tools
# --------------------------------------------------------------------------------------------
23 changes: 23 additions & 0 deletions src/vmware/azext_vmware/aaz/latest/vmware/__cmd_group.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
#
# Code generated by aaz-dev-tools
# --------------------------------------------------------------------------------------------

# pylint: skip-file
# flake8: noqa

from azure.cli.core.aaz import *


@register_command_group(
"vmware",
)
class __CMDGroup(AAZCommandGroup):
"""Commands to manage Azure VMware Solution.
"""
pass


__all__ = ["__CMDGroup"]
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------------------------------


def cf_vmware(cli_ctx, *_):

from azure.cli.core.commands.client_factory import get_mgmt_service_client
from azext_vmware.vendored_sdks.avs_client import AVSClient
return get_mgmt_service_client(cli_ctx, AVSClient)
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
#
# Code generated by aaz-dev-tools
# --------------------------------------------------------------------------------------------

# pylint: skip-file
# flake8: noqa

from .__cmd_group import *
23 changes: 23 additions & 0 deletions src/vmware/azext_vmware/aaz/latest/vmware/addon/__cmd_group.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
#
# Code generated by aaz-dev-tools
# --------------------------------------------------------------------------------------------

# pylint: skip-file
# flake8: noqa

from azure.cli.core.aaz import *


@register_command_group(
"vmware addon",
)
class __CMDGroup(AAZCommandGroup):
"""Commands to manage addons for a private cloud.
"""
pass


__all__ = ["__CMDGroup"]
16 changes: 16 additions & 0 deletions src/vmware/azext_vmware/aaz/latest/vmware/addon/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
#
# Code generated by aaz-dev-tools
# --------------------------------------------------------------------------------------------

# pylint: skip-file
# flake8: noqa

from .__cmd_group import *
from ._create import *
from ._delete import *
from ._list import *
from ._show import *
from ._update import *
Loading

0 comments on commit ca53b85

Please sign in to comment.