Skip to content

Commit acf3151

Browse files
author
SDK Automation
committed
Update from master
1 parent 0009d7e commit acf3151

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+3520
-1687
lines changed

src/account/HISTORY.rst

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
.. :changelog:
2-
3-
Release History
4-
===============
5-
6-
0.1.0
7-
++++++
8-
* Initial release.
1+
.. :changelog:
2+
3+
Release History
4+
===============
5+
6+
0.1.0
7+
++++++
8+
* Initial release.
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
Microsoft Azure CLI 'account' Extension
2-
==========================================
3-
4-
This package is for the 'account' extension.
5-
i.e. 'az account'
1+
Microsoft Azure CLI 'account' Extension
2+
==========================================
3+
4+
This package is for the 'account' extension.
5+
i.e. 'az account'

src/account/azext_account/.flake8

Lines changed: 0 additions & 3 deletions
This file was deleted.
Lines changed: 46 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,46 @@
1-
# --------------------------------------------------------------------------------------------
2-
# Copyright (c) Microsoft Corporation. All rights reserved.
3-
# Licensed under the MIT License. See License.txt in the project root for license information.
4-
# --------------------------------------------------------------------------------------------
5-
6-
from azure.cli.core import AzCommandsLoader
7-
from azext_account.generated._help import helps # pylint: disable=unused-import
8-
9-
10-
class SubscriptionClientCommandsLoader(AzCommandsLoader):
11-
12-
def __init__(self, cli_ctx=None):
13-
from azure.cli.core.commands import CliCommandType
14-
from azext_account.generated._client_factory import cf_account
15-
account_custom = CliCommandType(
16-
operations_tmpl='azext_account.custom#{}',
17-
client_factory=cf_account)
18-
super(SubscriptionClientCommandsLoader, self).__init__(cli_ctx=cli_ctx,
19-
custom_command_type=account_custom)
20-
21-
def load_command_table(self, args):
22-
from azext_account.generated.commands import load_command_table
23-
load_command_table(self, args)
24-
try:
25-
from azext_account.manual.commands import load_command_table as load_command_table_manual
26-
load_command_table_manual(self, args)
27-
except ImportError:
28-
pass
29-
return self.command_table
30-
31-
def load_arguments(self, command):
32-
from azext_account.generated._params import load_arguments
33-
load_arguments(self, command)
34-
try:
35-
from azext_account.manual._params import load_arguments as load_arguments_manual
36-
load_arguments_manual(self, command)
37-
except ImportError:
38-
pass
39-
40-
41-
COMMAND_LOADER_CLS = SubscriptionClientCommandsLoader
1+
# --------------------------------------------------------------------------
2+
# Copyright (c) Microsoft Corporation. All rights reserved.
3+
# Licensed under the MIT License. See License.txt in the project root for
4+
# license information.
5+
#
6+
# Code generated by Microsoft (R) AutoRest Code Generator.
7+
# Changes may cause incorrect behavior and will be lost if the code is
8+
# regenerated.
9+
# --------------------------------------------------------------------------
10+
11+
from azure.cli.core import AzCommandsLoader
12+
from azext_account.generated._help import helps # pylint: disable=unused-import
13+
14+
15+
class SubscriptionClientCommandsLoader(AzCommandsLoader):
16+
17+
def __init__(self, cli_ctx=None):
18+
from azure.cli.core.commands import CliCommandType
19+
from azext_account.generated._client_factory import cf_account
20+
account_custom = CliCommandType(
21+
operations_tmpl='azext_account.custom#{}',
22+
client_factory=cf_account)
23+
parent = super(SubscriptionClientCommandsLoader, self)
24+
parent.__init__(cli_ctx=cli_ctx, custom_command_type=account_custom)
25+
26+
def load_command_table(self, args):
27+
from azext_account.generated.commands import load_command_table
28+
load_command_table(self, args)
29+
try:
30+
from azext_account.manual.commands import load_command_table as load_command_table_manual
31+
load_command_table_manual(self, args)
32+
except ImportError:
33+
pass
34+
return self.command_table
35+
36+
def load_arguments(self, command):
37+
from azext_account.generated._params import load_arguments
38+
load_arguments(self, command)
39+
try:
40+
from azext_account.manual._params import load_arguments as load_arguments_manual
41+
load_arguments_manual(self, command)
42+
except ImportError:
43+
pass
44+
45+
46+
COMMAND_LOADER_CLS = SubscriptionClientCommandsLoader
Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
1-
# --------------------------------------------------------------------------------------------
2-
# Copyright (c) Microsoft Corporation. All rights reserved.
3-
# Licensed under the MIT License. See License.txt in the project root for license information.
4-
# --------------------------------------------------------------------------------------------
5-
6-
# pylint: disable=wildcard-import
7-
# pylint: disable=unused-wildcard-import
8-
9-
from azext_account.generated.action import * # noqa: F403
10-
try:
11-
from azext_account.manual.action import * # noqa: F403
12-
except ImportError:
13-
pass
1+
# --------------------------------------------------------------------------
2+
# Copyright (c) Microsoft Corporation. All rights reserved.
3+
# Licensed under the MIT License. See License.txt in the project root for
4+
# license information.
5+
#
6+
# Code generated by Microsoft (R) AutoRest Code Generator.
7+
# Changes may cause incorrect behavior and will be lost if the code is
8+
# regenerated.
9+
# --------------------------------------------------------------------------
10+
# pylint: disable=wildcard-import
11+
# pylint: disable=unused-wildcard-import
12+
13+
from .generated.action import * # noqa: F403
14+
try:
15+
from .manual.action import * # noqa: F403
16+
except ImportError:
17+
pass
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{
2-
"azext.isExperimental": true,
3-
"azext.minCliCoreVersion": "2.3.1"
1+
{
2+
"azext.isExperimental": true,
3+
"azext.minCliCoreVersion": "2.3.1"
44
}
Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
1-
# --------------------------------------------------------------------------------------------
2-
# Copyright (c) Microsoft Corporation. All rights reserved.
3-
# Licensed under the MIT License. See License.txt in the project root for license information.
4-
# --------------------------------------------------------------------------------------------
5-
6-
# pylint: disable=wildcard-import
7-
# pylint: disable=unused-wildcard-import
8-
9-
from azext_account.generated.custom import * # noqa: F403
10-
try:
11-
from azext_account.manual.custom import * # noqa: F403
12-
except ImportError:
13-
pass
1+
# --------------------------------------------------------------------------
2+
# Copyright (c) Microsoft Corporation. All rights reserved.
3+
# Licensed under the MIT License. See License.txt in the project root for
4+
# license information.
5+
#
6+
# Code generated by Microsoft (R) AutoRest Code Generator.
7+
# Changes may cause incorrect behavior and will be lost if the code is
8+
# regenerated.
9+
# --------------------------------------------------------------------------
10+
# pylint: disable=wildcard-import
11+
# pylint: disable=unused-wildcard-import
12+
13+
from .generated.custom import * # noqa: F403
14+
try:
15+
from .manual.custom import * # noqa: F403
16+
except ImportError:
17+
pass
Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
1-
# --------------------------------------------------------------------------------------------
2-
# Copyright (c) Microsoft Corporation. All rights reserved.
3-
# Licensed under the MIT License. See License.txt in the project root for license information.
4-
# --------------------------------------------------------------------------------------------
1+
# coding=utf-8
2+
# --------------------------------------------------------------------------
3+
# Copyright (c) Microsoft Corporation. All rights reserved.
4+
# Licensed under the MIT License. See License.txt in the project root for
5+
# license information.
6+
#
7+
# Code generated by Microsoft (R) AutoRest Code Generator.
8+
# Changes may cause incorrect behavior and will be lost if the code is
9+
# regenerated.
10+
# --------------------------------------------------------------------------
11+
12+
__path__ = __import__('pkgutil').extend_path(__path__, __name__)
Lines changed: 27 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,27 @@
1-
# --------------------------------------------------------------------------------------------
2-
# Copyright (c) Microsoft Corporation. All rights reserved.
3-
# Licensed under the MIT License. See License.txt in the project root for license information.
4-
# --------------------------------------------------------------------------------------------
5-
6-
7-
def cf_account(cli_ctx, *_):
8-
from azure.cli.core.commands.client_factory import _get_mgmt_service_client
9-
from ..vendored_sdks.subscription import SubscriptionClient
10-
return _get_mgmt_service_client(cli_ctx, SubscriptionClient,
11-
subscription_bound=False,
12-
base_url_bound=False)[0]
13-
14-
15-
def cf_subscription(cli_ctx, *_):
16-
return cf_account(cli_ctx).subscription
17-
18-
19-
def cf_subscription_operation(cli_ctx, *_):
20-
return cf_account(cli_ctx).subscription_operation
21-
22-
23-
def cf_operation(cli_ctx, *_):
24-
return cf_account(cli_ctx).operation
1+
# --------------------------------------------------------------------------
2+
# Copyright (c) Microsoft Corporation. All rights reserved.
3+
# Licensed under the MIT License. See License.txt in the project root for
4+
# license information.
5+
#
6+
# Code generated by Microsoft (R) AutoRest Code Generator.
7+
# Changes may cause incorrect behavior and will be lost if the code is
8+
# regenerated.
9+
# --------------------------------------------------------------------------
10+
11+
12+
def cf_account(cli_ctx, *_):
13+
from azure.cli.core.commands.client_factory import get_mgmt_service_client
14+
from ..vendored_sdks.subscription import SubscriptionClient
15+
return get_mgmt_service_client(cli_ctx, SubscriptionClient)
16+
17+
18+
def cf_subscription(cli_ctx, *_):
19+
return cf_account(cli_ctx).subscription
20+
21+
22+
def cf_tenant(cli_ctx, *_):
23+
return cf_account(cli_ctx).tenant
24+
25+
26+
def cf_subscription(cli_ctx, *_):
27+
return cf_account(cli_ctx).subscription

0 commit comments

Comments
 (0)