Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/blueprint/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

Release History
===============
0.3.2
+++++
* Migrate to atomic commands

0.3.1
+++++
Expand Down
11 changes: 11 additions & 0 deletions src/blueprint/azext_blueprint/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,17 @@ def __init__(self, cli_ctx=None):

def load_command_table(self, args):
from azext_blueprint.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

Expand Down
12 changes: 0 additions & 12 deletions src/blueprint/azext_blueprint/_client_factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,5 @@ def cf_artifacts(cli_ctx, *_):
return cf_blueprint(cli_ctx).artifacts


def cf_published_blueprints(cli_ctx, *_):
return cf_blueprint(cli_ctx).published_blueprints


def cf_published_artifacts(cli_ctx, *_):
return cf_blueprint(cli_ctx).published_artifacts


def cf_assignments(cli_ctx, *_):
return cf_blueprint(cli_ctx).assignments


def cf_assignment_operations(cli_ctx, *_):
return cf_blueprint(cli_ctx).assignment_operations
8 changes: 5 additions & 3 deletions src/blueprint/azext_blueprint/_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,19 +43,21 @@
arg_group='Resource_scope',
options_list=['--subscription', '-s'],
help='Use subscription for the scope of the blueprint. If --management-group is not specified,'
' --subscription value or the default subscription will be used as the scope.'
' --subscription value or the default subscription will be used as the scope.',
validator=blueprint_validator
)

management_group_type = CLIArgumentType(
arg_group='Resource_scope',
options_list=['--management-group', '-m'],
help='Use management group for the scope of the blueprint.'
help='Use management group for the scope of the blueprint.',
validator=blueprint_validator
)


def load_arguments(self, _):

with self.argument_context('blueprint', validator=blueprint_validator) as c:
with self.argument_context('blueprint') as c:
c.ignore('resource_scope') # scope is divided into management_group and subscription
c.ignore('_subscription') # ignore the global subscription param
c.argument('subscription', arg_type=subscription_type)
Expand Down
6 changes: 6 additions & 0 deletions src/blueprint/azext_blueprint/aaz/__init__.py
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
# --------------------------------------------------------------------------------------------
6 changes: 6 additions & 0 deletions src/blueprint/azext_blueprint/aaz/latest/__init__.py
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
# --------------------------------------------------------------------------------------------
24 changes: 24 additions & 0 deletions src/blueprint/azext_blueprint/aaz/latest/blueprint/__cmd_group.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# --------------------------------------------------------------------------------------------
# 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(
"blueprint",
is_preview=True,
)
class __CMDGroup(AAZCommandGroup):
"""Commands to manage blueprint.
"""
pass


__all__ = ["__CMDGroup"]
17 changes: 17 additions & 0 deletions src/blueprint/azext_blueprint/aaz/latest/blueprint/__init__.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 aaz-dev-tools
# --------------------------------------------------------------------------------------------

# pylint: skip-file
# flake8: noqa

from .__cmd_group import *
from ._create import *
from ._delete import *
from ._list import *
from ._publish import *
from ._show import *
from ._update import *
Loading