Skip to content
This repository was archived by the owner on Aug 28, 2025. It is now read-only.
Closed
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
8 changes: 8 additions & 0 deletions src/migrate/HISTORY.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
.. :changelog:

Release History
===============

0.1.0
++++++
* Initial release.
5 changes: 5 additions & 0 deletions src/migrate/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Microsoft Azure CLI 'migrate' Extension
==========================================

This package is for the 'migrate' extension.
i.e. 'az migrate'
32 changes: 32 additions & 0 deletions src/migrate/azext_migrate/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------------------------------

from azure.cli.core import AzCommandsLoader

from azext_migrate.generated._help import helps # pylint: disable=unused-import


class AzureMigrateCommandsLoader(AzCommandsLoader):

def __init__(self, cli_ctx=None):
from azure.cli.core.commands import CliCommandType
from azext_migrate.generated._client_factory import cf_migrate
migrate_custom = CliCommandType(
operations_tmpl='azext_migrate.custom#{}',
client_factory=cf_migrate)
super(AzureMigrateCommandsLoader, self).__init__(cli_ctx=cli_ctx,
custom_command_type=migrate_custom)

def load_command_table(self, args):
from azext_migrate.generated.commands import load_command_table
load_command_table(self, args)
return self.command_table

def load_arguments(self, command):
from azext_migrate.generated._params import load_arguments
load_arguments(self, command)


COMMAND_LOADER_CLS = AzureMigrateCommandsLoader
13 changes: 13 additions & 0 deletions src/migrate/azext_migrate/action.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------------------------------

# pylint: disable=wildcard-import
# pylint: disable=unused-wildcard-import

from azext_migrate.generated.action import * # noqa: F403
try:
from azext_migrate.manual.action import * # noqa: F403
except ImportError:
pass
4 changes: 4 additions & 0 deletions src/migrate/azext_migrate/azext_metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"azext.isPreview": true,
"azext.minCliCoreVersion": "2.0.67"
}
13 changes: 13 additions & 0 deletions src/migrate/azext_migrate/commands.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------------------------------

# pylint: disable=wildcard-import
# pylint: disable=unused-wildcard-import

from azext_migrate.generated.commands import * # noqa: F403
try:
from azext_migrate.manual.commands import * # noqa: F403
except ImportError:
pass
13 changes: 13 additions & 0 deletions src/migrate/azext_migrate/custom.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------------------------------

# pylint: disable=wildcard-import
# pylint: disable=unused-wildcard-import

from azext_migrate.generated.custom import * # noqa: F403
try:
from azext_migrate.manual.custom import * # noqa: F403
except ImportError:
pass
42 changes: 42 additions & 0 deletions src/migrate/azext_migrate/generated/_client_factory.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------------------------------


def cf_migrate(cli_ctx, *_):
from azure.cli.core.commands.client_factory import get_mgmt_service_client
from ..vendored_sdks.migrate import AzureMigrate
return get_mgmt_service_client(cli_ctx, AzureMigrate)


def cf_location(cli_ctx, *_):
return cf_migrate(cli_ctx).location


def cf_assessment_option(cli_ctx, *_):
return cf_migrate(cli_ctx).assessment_option


def cf_project(cli_ctx, *_):
return cf_migrate(cli_ctx).project


def cf_machine(cli_ctx, *_):
return cf_migrate(cli_ctx).machine


def cf_group(cli_ctx, *_):
return cf_migrate(cli_ctx).group


def cf_assessment(cli_ctx, *_):
return cf_migrate(cli_ctx).assessment


def cf_assessed_machine(cli_ctx, *_):
return cf_migrate(cli_ctx).assessed_machine


def cf_operation(cli_ctx, *_):
return cf_migrate(cli_ctx).operation
Loading