-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add standbypool. * fix commands. * fix cli. * remove sub. * update. * address comments. * address comments.
- Loading branch information
1 parent
9f7d444
commit 02e8832
Showing
38 changed files
with
8,587 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
.. :changelog: | ||
Release History | ||
=============== | ||
|
||
1.0.0b1 | ||
++++++ | ||
* 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,133 @@ | ||
# Azure CLI Standbypool Extension # | ||
|
||
This is an extension to Azure CLI to manage Standbypool resources. | ||
|
||
## How to use ## | ||
|
||
Install standby virtual machine pool extension using ths blow CLI command | ||
``` | ||
az extension add --name standby-vm-pool | ||
``` | ||
|
||
Install standby container group pool extension using ths blow CLI command | ||
``` | ||
az extension add --name standby-container-group-pool | ||
``` | ||
|
||
### Included features ### | ||
|
||
#### standby-vm-pool usage #### | ||
|
||
##### Create ##### | ||
|
||
``` | ||
az standby-vm-pool create \ | ||
--subscription 461fa159-654a-415f-853a-40b801021944 \ | ||
--resource-group myrg \ | ||
--name mypool \ | ||
--max-ready-capacity 20 \ | ||
--vm-state Running \ | ||
--vmss-id /subscriptions/461fa159-654a-415f-853a-40b801021944/resourceGroups/myrg/providers/Microsoft.Compute/virtualMachineScaleSets/myvmss \ | ||
--location eastus \ | ||
``` | ||
|
||
##### Update ##### | ||
|
||
Update max ready capacity | ||
``` | ||
az standby-vm-pool update \ | ||
--subscription 461fa159-654a-415f-853a-40b801021944 \ | ||
--resource-group myrg \ | ||
--name mypool \ | ||
--max-ready-capacity 3 \ | ||
``` | ||
|
||
Update vm state | ||
``` | ||
az standby-vm-pool update \ | ||
--subscription 461fa159-654a-415f-853a-40b801021944 \ | ||
--resource-group myrg \ | ||
--name mypool \ | ||
--vm-state Deallocate \ | ||
``` | ||
|
||
Update vmssId | ||
``` | ||
az standby-vm-pool update \ | ||
--subscription 461fa159-654a-415f-853a-40b801021944 \ | ||
--resource-group myrg \ | ||
--name mypool \ | ||
--vmss-id /subscriptions/461fa159-654a-415f-853a-40b801021944/resourceGroups/myrg/providers/Microsoft.Compute/virtualMachineScaleSets/testvmss \ | ||
``` | ||
|
||
##### show ##### | ||
|
||
``` | ||
az standby-vm-pool show --subscription 461fa159-654a-415f-853a-40b801021944 --resource-group myrg --name mypool | ||
``` | ||
|
||
##### List ##### | ||
List by subscription Id | ||
|
||
``` | ||
az standby-vm-pool list --subscription 461fa159-654a-415f-853a-40b801021944 | ||
``` | ||
|
||
List by resource group | ||
``` | ||
az standby-vm-pool list --subscription 461fa159-654a-415f-853a-40b801021944 --resource-group myrg | ||
``` | ||
|
||
##### Delete ##### | ||
|
||
``` | ||
az standby-vm-pool delete --subscription 461fa159-654a-415f-853a-40b801021944 --resource-group myrg --name mypool | ||
``` | ||
|
||
##### List VMs in StandbyPool ##### | ||
|
||
``` | ||
az standby-vm-pool vm list --subscription 461fa159-654a-415f-853a-40b801021944 --resource-group myrg --name mypool | ||
``` | ||
|
||
#### standby-container-group-pool usage #### | ||
|
||
##### Create ##### | ||
|
||
``` | ||
az standby-container-group-pool create \ | ||
--resource-group myrg \ | ||
--name mypool \ | ||
--subscription 461fa159-654a-415f-853a-40b801021944 \ | ||
--container-profile-id /subscriptions/461fa159-654a-415f-853a-40b801021944/resourceGroups/myrg/providers/Microsoft.ContainerInstance/containerGroupProfiles/mycg \ | ||
--profile-revision 1 \ | ||
--subnet-ids [0].id=/subscriptions/461fa159-654a-415f-853a-40b801021944/resourceGroups/ru-cli-test-standbypool/providers/Microsoft.Network/virtualNetworks/ru-cli-test-standbypool-vnet/subnets/testSubnet \ | ||
--refill-policy always \ | ||
--max-ready-capacity 1 \ | ||
--location eastus | ||
``` | ||
|
||
##### show ##### | ||
|
||
``` | ||
az standby-container-group-pool show --subscription 461fa159-654a-415f-853a-40b801021944 --resource-group myrg --name mypool | ||
``` | ||
|
||
##### List ##### | ||
List by subscription Id | ||
|
||
``` | ||
az standby-container-group-pool list --subscription 461fa159-654a-415f-853a-40b801021944 | ||
``` | ||
|
||
List by resource group | ||
``` | ||
az standby-container-pool list --subscription 461fa159-654a-415f-853a-40b801021944 --resource-group myrg | ||
``` | ||
|
||
##### Delete ##### | ||
|
||
``` | ||
az standby-container-group-pool delete --name mypool --subscription 461fa159-654a-415f-853a-40b801021944 --resource-group | ||
``` |
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,42 @@ | ||
# -------------------------------------------------------------------------------------------- | ||
# 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 | ||
# -------------------------------------------------------------------------------------------- | ||
|
||
from azure.cli.core import AzCommandsLoader | ||
from azext_standbypool._help import helps # pylint: disable=unused-import | ||
|
||
|
||
class StandbypoolCommandsLoader(AzCommandsLoader): | ||
|
||
def __init__(self, cli_ctx=None): | ||
from azure.cli.core.commands import CliCommandType | ||
custom_command_type = CliCommandType( | ||
operations_tmpl='azext_standbypool.custom#{}') | ||
super().__init__(cli_ctx=cli_ctx, | ||
custom_command_type=custom_command_type) | ||
|
||
def load_command_table(self, args): | ||
from azext_standbypool.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 | ||
|
||
def load_arguments(self, command): | ||
from azext_standbypool._params import load_arguments | ||
load_arguments(self, command) | ||
|
||
|
||
COMMAND_LOADER_CLS = StandbypoolCommandsLoader |
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,11 @@ | ||
# -------------------------------------------------------------------------------------------- | ||
# 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: disable=line-too-long | ||
# pylint: disable=too-many-lines | ||
|
||
from knack.help_files import helps # pylint: disable=unused-import |
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,13 @@ | ||
# -------------------------------------------------------------------------------------------- | ||
# 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: disable=too-many-lines | ||
# pylint: disable=too-many-statements | ||
|
||
|
||
def load_arguments(self, _): # pylint: disable=unused-argument | ||
pass |
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,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 | ||
# -------------------------------------------------------------------------------------------- |
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,10 @@ | ||
# -------------------------------------------------------------------------------------------- | ||
# 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 | ||
|
23 changes: 23 additions & 0 deletions
23
src/standbypool/azext_standbypool/aaz/latest/standby_container_group_pool/__cmd_group.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,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( | ||
"standby-container-group-pool", | ||
) | ||
class __CMDGroup(AAZCommandGroup): | ||
"""Standby Container Group Pool Operations | ||
""" | ||
pass | ||
|
||
|
||
__all__ = ["__CMDGroup"] |
17 changes: 17 additions & 0 deletions
17
src/standbypool/azext_standbypool/aaz/latest/standby_container_group_pool/__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,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 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 * | ||
from ._wait import * |
Oops, something went wrong.