forked from Azure/azure-cli
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert "[DeploymentManager] BREAKING CHANGE:
az deploymentmanager
: …
…Remove command module since it is no longer maintained by service (Azure#25523)" This reverts commit 5d5ed03.
- Loading branch information
1 parent
9a1b2a9
commit 4deb7da
Showing
29 changed files
with
2,329 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
src/azure-cli/azure/cli/command_modules/deploymentmanager/__init__.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|
||
import azure.cli.command_modules.deploymentmanager._help # pylint: disable=unused-import | ||
|
||
|
||
class DeploymentManagerCommandsLoader(AzCommandsLoader): | ||
|
||
def __init__(self, cli_ctx=None): | ||
from azure.cli.core.commands import CliCommandType | ||
from azure.cli.core.profiles import ResourceType | ||
deploymentmanager_custom = CliCommandType( | ||
operations_tmpl='azure.cli.command_modules.deploymentmanager.custom#{}') | ||
super(DeploymentManagerCommandsLoader, self).__init__(cli_ctx=cli_ctx, | ||
resource_type=ResourceType.MGMT_DEPLOYMENTMANAGER, | ||
custom_command_type=deploymentmanager_custom) | ||
|
||
def load_command_table(self, args): | ||
from azure.cli.command_modules.deploymentmanager.commands import load_command_table | ||
load_command_table(self, args) | ||
return self.command_table | ||
|
||
def load_arguments(self, command): | ||
from azure.cli.command_modules.deploymentmanager._params import load_arguments | ||
load_arguments(self, command) | ||
|
||
|
||
COMMAND_LOADER_CLS = DeploymentManagerCommandsLoader |
34 changes: 34 additions & 0 deletions
34
src/azure-cli/azure/cli/command_modules/deploymentmanager/_client_factory.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# -------------------------------------------------------------------------------------------- | ||
# Copyright (c) Microsoft Corporation. All rights reserved. | ||
# Licensed under the MIT License. See License.txt in the project root for license information. | ||
# -------------------------------------------------------------------------------------------- | ||
|
||
|
||
def _deploymentmanager_client_factory(cli_ctx, *_): | ||
from azure.cli.core.commands.client_factory import get_mgmt_service_client | ||
from azure.mgmt.deploymentmanager import DeploymentManagerClient | ||
return get_mgmt_service_client(cli_ctx, DeploymentManagerClient) | ||
|
||
|
||
def cf_artifact_sources(cli_ctx, *_): | ||
return _deploymentmanager_client_factory(cli_ctx).artifact_sources | ||
|
||
|
||
def cf_service_topologies(cli_ctx, *_): | ||
return _deploymentmanager_client_factory(cli_ctx).service_topologies | ||
|
||
|
||
def cf_services(cli_ctx, *_): | ||
return _deploymentmanager_client_factory(cli_ctx).services | ||
|
||
|
||
def cf_service_units(cli_ctx, *_): | ||
return _deploymentmanager_client_factory(cli_ctx).service_units | ||
|
||
|
||
def cf_steps(cli_ctx, *_): | ||
return _deploymentmanager_client_factory(cli_ctx).steps | ||
|
||
|
||
def cf_rollouts(cli_ctx, *_): | ||
return _deploymentmanager_client_factory(cli_ctx).rollouts |
Oops, something went wrong.