Skip to content

Commit 6c545db

Browse files
authored
{network} az network cross-region-lb/lb frontended-ip: Migrate to Codegen V2 (#25157)
1 parent 8f504b1 commit 6c545db

20 files changed

Lines changed: 23821 additions & 4696 deletions

src/azure-cli/azure/cli/command_modules/network/_validators.py

Lines changed: 0 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -794,28 +794,6 @@ def process_lb_create_namespace(cmd, namespace):
794794
namespace.virtual_network_name = None
795795

796796

797-
def process_lb_frontend_ip_namespace(cmd, namespace):
798-
from msrestazure.tools import is_valid_resource_id, resource_id
799-
if namespace.subnet and namespace.public_ip_address:
800-
raise ValueError(
801-
'incorrect usage: --subnet NAME --vnet-name NAME | '
802-
'--subnet ID | --public-ip NAME_OR_ID')
803-
804-
if namespace.public_ip_prefix:
805-
if not is_valid_resource_id(namespace.public_ip_prefix):
806-
namespace.public_ip_prefix = resource_id(
807-
subscription=get_subscription_id(cmd.cli_ctx),
808-
resource_group=namespace.resource_group_name,
809-
namespace='Microsoft.Network',
810-
type='publicIpPrefixes',
811-
name=namespace.public_ip_prefix)
812-
813-
if namespace.subnet:
814-
get_subnet_validator()(cmd, namespace)
815-
else:
816-
get_public_ip_validator()(cmd, namespace)
817-
818-
819797
def process_cross_region_lb_create_namespace(cmd, namespace):
820798
get_default_location_from_resource_group(cmd, namespace)
821799
validate_tags(namespace)
@@ -828,21 +806,6 @@ def process_cross_region_lb_create_namespace(cmd, namespace):
828806
'specify --public-ip-dns-name only if creating a new public IP address.')
829807

830808

831-
def process_cross_region_lb_frontend_ip_namespace(cmd, namespace):
832-
from azure.mgmt.core.tools import is_valid_resource_id, resource_id
833-
834-
if namespace.public_ip_prefix:
835-
if not is_valid_resource_id(namespace.public_ip_prefix):
836-
namespace.public_ip_prefix = resource_id(
837-
subscription=get_subscription_id(cmd.cli_ctx),
838-
resource_group=namespace.resource_group_name,
839-
namespace='Microsoft.Network',
840-
type='publicIpPrefixes',
841-
name=namespace.public_ip_prefix)
842-
843-
get_public_ip_validator()(cmd, namespace)
844-
845-
846809
def process_nic_create_namespace(cmd, namespace):
847810
get_default_location_from_resource_group(cmd, namespace)
848811
validate_tags(namespace)
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
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+
# Code generated by aaz-dev-tools
6+
# --------------------------------------------------------------------------------------------
7+
8+
# pylint: skip-file
9+
# flake8: noqa
10+
11+
from azure.cli.core.aaz import *
12+
13+
14+
@register_command_group(
15+
"network lb frontend-ip",
16+
)
17+
class __CMDGroup(AAZCommandGroup):
18+
"""Manage frontend IP addresses of a load balancer.
19+
"""
20+
pass
21+
22+
23+
__all__ = ["__CMDGroup"]
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +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+
# Code generated by aaz-dev-tools
6+
# --------------------------------------------------------------------------------------------
7+
8+
# pylint: skip-file
9+
# flake8: noqa
10+
11+
from .__cmd_group import *
12+
from ._create import *
13+
from ._delete import *
14+
from ._list import *
15+
from ._show import *
16+
from ._update import *
17+
from ._wait import *

0 commit comments

Comments
 (0)