Skip to content

Commit

Permalink
New preview version for Maintenance extension (Azure#2214)
Browse files Browse the repository at this point in the history
  • Loading branch information
sotaneja authored Sep 3, 2020
1 parent 86f75fa commit 5a0fd4e
Show file tree
Hide file tree
Showing 97 changed files with 11,602 additions and 4,593 deletions.
2 changes: 2 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -147,3 +147,5 @@
/src/guestconfig/ @gehuan

/src/swiftlet/ @qwordy

/src/maintenance/ @sotaneja
13 changes: 13 additions & 0 deletions src/maintenance/HISTORY.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
.. :changelog:
Release History
===============

1.1.0
++++++
* Add schedule related fields for creating maintenance configurations
* Add public maintenance configuration APIs

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

This package is for the 'maintenance' extension.
i.e. 'az maintenance'
44 changes: 33 additions & 11 deletions src/maintenance/azext_maintenance/__init__.py
Original file line number Diff line number Diff line change
@@ -1,28 +1,50 @@
# --------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------------------------------
# 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_maintenance.generated._help import helps # pylint: disable=unused-import
try:
from azext_maintenance.manual._help import helps # pylint: disable=reimported
except ImportError:
pass

import azext_maintenance._help # pylint: disable=unused-import


class MaintenanceCommandsLoader(AzCommandsLoader):
class MaintenanceClientCommandsLoader(AzCommandsLoader):

def __init__(self, cli_ctx=None):
from azure.cli.core.commands import CliCommandType
maintenance_custom = CliCommandType(operations_tmpl='azext_maintenance.custom#{}')
super(MaintenanceCommandsLoader, self).__init__(cli_ctx=cli_ctx, custom_command_type=maintenance_custom)
from azext_maintenance.generated._client_factory import cf_maintenance_cl
maintenance_custom = CliCommandType(
operations_tmpl='azext_maintenance.custom#{}',
client_factory=cf_maintenance_cl)
parent = super(MaintenanceClientCommandsLoader, self)
parent.__init__(cli_ctx=cli_ctx, custom_command_type=maintenance_custom)

def load_command_table(self, args):
from .commands import load_command_table
from azext_maintenance.generated.commands import load_command_table
load_command_table(self, args)
try:
from azext_maintenance.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 ._params import load_arguments
from azext_maintenance.generated._params import load_arguments
load_arguments(self, command)
try:
from azext_maintenance.manual._params import load_arguments as load_arguments_manual
load_arguments_manual(self, command)
except ImportError:
pass


COMMAND_LOADER_CLS = MaintenanceCommandsLoader
COMMAND_LOADER_CLS = MaintenanceClientCommandsLoader
26 changes: 0 additions & 26 deletions src/maintenance/azext_maintenance/_client_factory.py

This file was deleted.

141 changes: 0 additions & 141 deletions src/maintenance/azext_maintenance/_help.py

This file was deleted.

65 changes: 0 additions & 65 deletions src/maintenance/azext_maintenance/_params.py

This file was deleted.

17 changes: 17 additions & 0 deletions src/maintenance/azext_maintenance/action.py
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
3 changes: 2 additions & 1 deletion src/maintenance/azext_maintenance/azext_metadata.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"azext.minCliCoreVersion": "2.0.47"
"azext.isPreview": true,
"azext.minCliCoreVersion": "2.3.1"
}
Loading

0 comments on commit 5a0fd4e

Please sign in to comment.