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
11 changes: 11 additions & 0 deletions src/azure-cli/azure/cli/command_modules/network/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,17 @@ def __init__(self, cli_ctx=None):

def load_command_table(self, args):
from azure.cli.command_modules.network.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
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,6 @@ def cf_app_gateway_waf_policy(cli_ctx, _):
return network_client_factory(cli_ctx).web_application_firewall_policies


def cf_application_security_groups(cli_ctx, _):
return network_client_factory(cli_ctx).application_security_groups


def cf_connection_monitor(cli_ctx, _):
return network_client_factory(cli_ctx).connection_monitors

Expand Down
56 changes: 0 additions & 56 deletions src/azure-cli/azure/cli/command_modules/network/_help.py
Original file line number Diff line number Diff line change
Expand Up @@ -1787,62 +1787,6 @@
text: az network application-gateway ssl-profile list --gateway-name MyAppGateway -g MyResourceGroup
"""

helps['network asg'] = """
type: group
short-summary: Manage application security groups (ASGs).
long-summary: >
You can configure network security as a natural extension of an application's structure, ASG allows
you to group virtual machines and define network security policies based on those groups. You can specify an
application security group as the source and destination in a NSG security rule. For more information
visit https://docs.microsoft.com/azure/virtual-network/create-network-security-group-preview
"""

helps['network asg create'] = """
type: command
short-summary: Create an application security group.
parameters:
- name: --name -n
short-summary: Name of the new application security group resource.
examples:
- name: Create an application security group.
text: az network asg create -g MyResourceGroup -n MyAsg --tags MyWebApp, CostCenter=Marketing
"""

helps['network asg delete'] = """
type: command
short-summary: Delete an application security group.
examples:
- name: Delete an application security group.
text: az network asg delete -g MyResourceGroup -n MyAsg
"""

helps['network asg list'] = """
type: command
short-summary: List all application security groups in a subscription.
examples:
- name: List all application security groups in a subscription.
text: az network asg list
"""

helps['network asg show'] = """
type: command
short-summary: Get details of an application security group.
examples:
- name: Get details of an application security group.
text: az network asg show -g MyResourceGroup -n MyAsg
"""

helps['network asg update'] = """
type: command
short-summary: Update an application security group.
long-summary: >
This command can only be used to update the tags for an application security group.
Name and resource group are immutable and cannot be updated.
examples:
- name: Update an application security group with a modified tag value.
text: az network asg update -g MyResourceGroup -n MyAsg --set tags.CostCenter=MyBusinessGroup
"""

helps['network ddos-protection'] = """
type: group
short-summary: Manage DDoS Protection Plans.
Expand Down
5 changes: 0 additions & 5 deletions src/azure-cli/azure/cli/command_modules/network/_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -630,11 +630,6 @@ def load_arguments(self, _):
c.argument('rule_ids', nargs='+', help='List of rules that will be disabled. If provided, --group-name must be provided too.')
# region

# region ApplicationSecurityGroups
with self.argument_context('network asg') as c:
c.argument('application_security_group_name', name_arg_type, id_part='name', help='The name of the application security group.')
# endregion

# region DDoS Protection Plans
with self.argument_context('network ddos-protection') as c:
for dest in ['ddos_plan_name', 'ddos_protection_plan_name']:
Expand Down
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
# --------------------------------------------------------------------------------------------
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
# --------------------------------------------------------------------------------------------
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(
"network",
)
class __CMDGroup(AAZCommandGroup):
"""Manage Azure Network resources.
"""
pass


__all__ = ["__CMDGroup"]
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: skip-file
# flake8: noqa

from .__cmd_group import *
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# --------------------------------------------------------------------------------------------
# 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(
"network asg",
)
class __CMDGroup(AAZCommandGroup):
"""Manage application security groups (ASGs).

You can configure network security as a natural extension of an application's structure, ASG allows you to group virtual machines and define network security policies based on those groups. You can specify an application security group as the source and destination in a NSG security rule. For more information, visit https://docs.microsoft.com/azure/virtual-network/create-network-security-group-preview.
"""
pass


__all__ = ["__CMDGroup"]
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 *
Loading