forked from Azure/azure-cli-extensions
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CodeGen from PR 13166 in Azure/azure-rest-api-specs
Merge b353336f78b47a9a9d83765d68a6b9b87ea76f95 into 89f00c2
- Loading branch information
SDKAuto
committed
Feb 26, 2021
1 parent
0d16cef
commit 77b5869
Showing
43 changed files
with
5,848 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
.. :changelog: | ||
Release History | ||
=============== | ||
|
||
0.1.0 | ||
++++++ | ||
* Initial release. |
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,75 @@ | ||
# Azure CLI operationsmanagement Extension # | ||
This is the extension for operationsmanagement | ||
|
||
### How to use ### | ||
Install this extension using the below CLI command | ||
``` | ||
az extension add --name operationsmanagement | ||
``` | ||
|
||
### Included Features ### | ||
#### operationsmanagement solution #### | ||
##### Create ##### | ||
``` | ||
az operationsmanagement solution create --location "East US" \ | ||
--plan name="name1" product="product1" promotion-code="promocode1" publisher="publisher1" \ | ||
--properties contained-resources="/subscriptions/sub2/resourceGroups/rg2/providers/provider1/resources/resource1" contained-resources="/subscriptions/sub2/resourceGroups/rg2/providers/provider2/resources/resource2" referenced-resources="/subscriptions/sub2/resourceGroups/rg2/providers/provider1/resources/resource2" referenced-resources="/subscriptions/sub2/resourceGroups/rg2/providers/provider2/resources/resource3" workspace-resource-id="/subscriptions/sub2/resourceGroups/rg2/providers/Microsoft.OperationalInsights/workspaces/ws1" \ | ||
--resource-group "rg1" --name "solution1" | ||
``` | ||
##### Show ##### | ||
``` | ||
az operationsmanagement solution show --resource-group "rg1" --name "solution1" | ||
``` | ||
##### List ##### | ||
``` | ||
az operationsmanagement solution list --resource-group "rg1" | ||
``` | ||
##### Update ##### | ||
``` | ||
az operationsmanagement solution update --tags Dept="IT" Environment="Test" --resource-group "rg1" --name "solution1" | ||
``` | ||
##### Delete ##### | ||
``` | ||
az operationsmanagement solution delete --resource-group "rg1" --name "solution1" | ||
``` | ||
#### operationsmanagement management-association #### | ||
##### Create ##### | ||
``` | ||
az operationsmanagement management-association create --name "managementAssociation1" --location "East US" \ | ||
--application-id "/subscriptions/sub1/resourcegroups/rg1/providers/Microsoft.Appliance/Appliances/appliance1" \ | ||
--provider-name "providerName" --resource-group "rg1" --resource-name "resourceName" \ | ||
--resource-type "resourceType" | ||
``` | ||
##### Show ##### | ||
``` | ||
az operationsmanagement management-association show --name "managementAssociation1" --provider-name "providerName" \ | ||
--resource-group "rg1" --resource-name "resourceName" --resource-type "resourceType" | ||
``` | ||
##### List ##### | ||
``` | ||
az operationsmanagement management-association list | ||
``` | ||
##### Delete ##### | ||
``` | ||
az operationsmanagement management-association delete --name "managementAssociationName" \ | ||
--provider-name "providerName" --resource-group "rg1" --resource-name "resourceName" \ | ||
--resource-type "resourceType" | ||
``` | ||
#### operationsmanagement management-configuration #### | ||
##### Create ##### | ||
``` | ||
az operationsmanagement management-configuration create --name "managementConfiguration1" --location "East US" \ | ||
--resource-group "rg1" | ||
``` | ||
##### Show ##### | ||
``` | ||
az operationsmanagement management-configuration show --name "managementConfigurationName" --resource-group "rg1" | ||
``` | ||
##### List ##### | ||
``` | ||
az operationsmanagement management-configuration list | ||
``` | ||
##### Delete ##### | ||
``` | ||
az operationsmanagement management-configuration delete --name "managementConfigurationName" --resource-group "rg1" | ||
``` |
50 changes: 50 additions & 0 deletions
50
src/operationsmanagement/azext_operationsmanagement/__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,50 @@ | ||
# -------------------------------------------------------------------------- | ||
# 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 Microsoft (R) AutoRest Code Generator. | ||
# Changes may cause incorrect behavior and will be lost if the code is | ||
# regenerated. | ||
# -------------------------------------------------------------------------- | ||
|
||
from azure.cli.core import AzCommandsLoader | ||
from azext_operationsmanagement.generated._help import helps # pylint: disable=unused-import | ||
try: | ||
from azext_operationsmanagement.manual._help import helps # pylint: disable=reimported | ||
except ImportError: | ||
pass | ||
|
||
|
||
class OperationsManagementClientCommandsLoader(AzCommandsLoader): | ||
|
||
def __init__(self, cli_ctx=None): | ||
from azure.cli.core.commands import CliCommandType | ||
from azext_operationsmanagement.generated._client_factory import cf_operationsmanagement_cl | ||
operationsmanagement_custom = CliCommandType( | ||
operations_tmpl='azext_operationsmanagement.custom#{}', | ||
client_factory=cf_operationsmanagement_cl) | ||
parent = super(OperationsManagementClientCommandsLoader, self) | ||
parent.__init__(cli_ctx=cli_ctx, custom_command_type=operationsmanagement_custom) | ||
|
||
def load_command_table(self, args): | ||
from azext_operationsmanagement.generated.commands import load_command_table | ||
load_command_table(self, args) | ||
try: | ||
from azext_operationsmanagement.manual.commands import load_command_table as load_command_table_manual | ||
load_command_table_manual(self, args) | ||
except ImportError: | ||
pass | ||
return self.command_table | ||
|
||
def load_arguments(self, command): | ||
from azext_operationsmanagement.generated._params import load_arguments | ||
load_arguments(self, command) | ||
try: | ||
from azext_operationsmanagement.manual._params import load_arguments as load_arguments_manual | ||
load_arguments_manual(self, command) | ||
except ImportError: | ||
pass | ||
|
||
|
||
COMMAND_LOADER_CLS = OperationsManagementClientCommandsLoader |
17 changes: 17 additions & 0 deletions
17
src/operationsmanagement/azext_operationsmanagement/action.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,17 @@ | ||
# -------------------------------------------------------------------------- | ||
# 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 Microsoft (R) AutoRest Code Generator. | ||
# Changes may cause incorrect behavior and will be lost if the code is | ||
# regenerated. | ||
# -------------------------------------------------------------------------- | ||
# pylint: disable=wildcard-import | ||
# pylint: disable=unused-wildcard-import | ||
|
||
from .generated.action import * # noqa: F403 | ||
try: | ||
from .manual.action import * # noqa: F403 | ||
except ImportError: | ||
pass |
4 changes: 4 additions & 0 deletions
4
src/operationsmanagement/azext_operationsmanagement/azext_metadata.json
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,4 @@ | ||
{ | ||
"azext.isExperimental": true, | ||
"azext.minCliCoreVersion": "2.15.0" | ||
} |
17 changes: 17 additions & 0 deletions
17
src/operationsmanagement/azext_operationsmanagement/custom.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,17 @@ | ||
# -------------------------------------------------------------------------- | ||
# 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 Microsoft (R) AutoRest Code Generator. | ||
# Changes may cause incorrect behavior and will be lost if the code is | ||
# regenerated. | ||
# -------------------------------------------------------------------------- | ||
# pylint: disable=wildcard-import | ||
# pylint: disable=unused-wildcard-import | ||
|
||
from .generated.custom import * # noqa: F403 | ||
try: | ||
from .manual.custom import * # noqa: F403 | ||
except ImportError: | ||
pass |
12 changes: 12 additions & 0 deletions
12
src/operationsmanagement/azext_operationsmanagement/generated/__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,12 @@ | ||
# coding=utf-8 | ||
# -------------------------------------------------------------------------- | ||
# 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 Microsoft (R) AutoRest Code Generator. | ||
# Changes may cause incorrect behavior and will be lost if the code is | ||
# regenerated. | ||
# -------------------------------------------------------------------------- | ||
|
||
__path__ = __import__('pkgutil').extend_path(__path__, __name__) |
28 changes: 28 additions & 0 deletions
28
src/operationsmanagement/azext_operationsmanagement/generated/_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,28 @@ | ||
# -------------------------------------------------------------------------- | ||
# 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 Microsoft (R) AutoRest Code Generator. | ||
# Changes may cause incorrect behavior and will be lost if the code is | ||
# regenerated. | ||
# -------------------------------------------------------------------------- | ||
|
||
|
||
def cf_operationsmanagement_cl(cli_ctx, *_): | ||
from azure.cli.core.commands.client_factory import get_mgmt_service_client | ||
from azext_operationsmanagement.vendored_sdks.operationsmanagement import OperationsManagementClient | ||
return get_mgmt_service_client(cli_ctx, | ||
OperationsManagementClient) | ||
|
||
|
||
def cf_solution(cli_ctx, *_): | ||
return cf_operationsmanagement_cl(cli_ctx).solutions | ||
|
||
|
||
def cf_management_association(cli_ctx, *_): | ||
return cf_operationsmanagement_cl(cli_ctx).management_associations | ||
|
||
|
||
def cf_management_configuration(cli_ctx, *_): | ||
return cf_operationsmanagement_cl(cli_ctx).management_configurations |
Oops, something went wrong.