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
Original file line number Diff line number Diff line change
Expand Up @@ -613,7 +613,7 @@ def load_arguments(self, _):

with self.argument_context('network public-ip create') as c:
c.argument('name', completer=None)
c.argument('sku', help='Name of a public IP address SKU', arg_type=get_enum_type(["Basic", "Standard"]), default="Standard")
c.argument('sku', help='Name of a public IP address SKU', arg_type=get_enum_type(["Basic", "Standard", "StandardV2"]), default="Standard")
c.argument('tier', help='Tier of a public IP address SKU and Global tier is only supported for standard SKU public IP addresses', arg_type=get_enum_type(["Regional", "Global"]))
c.ignore('dns_name_type')
c.argument('edge_zone', edge_zone)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,12 @@ def _build_arguments_schema(cls, *args, **kwargs):
help="A reference to the source virtual network using this nat gateway resource.",
)
cls._build_args_sub_resource_create(_args_schema.source_vnet)
_args_schema.sku = AAZStrArg(
options=["--sku"],
help="Name of Nat Gateway SKU.",
default="Standard",
enum={"Standard": "Standard", "StandardV2": "StandardV2"},
)
_args_schema.tags = AAZDictArg(
options=["--tags"],
help="Space-separated tags: key[=value] [key[=value] ...].",
Expand Down Expand Up @@ -126,20 +132,6 @@ def _build_arguments_schema(cls, *args, **kwargs):
zone.Element = AAZStrArg()

# define Arg Group "Parameters"

_args_schema = cls._args_schema
_args_schema.sku = AAZObjectArg(
options=["--sku"],
arg_group="Parameters",
help="The nat gateway SKU.",
)

sku = cls._args_schema.sku
sku.name = AAZStrArg(
options=["name"],
help="Name of Nat Gateway SKU.",
enum={"Standard": "Standard", "StandardV2": "StandardV2"},
)
return cls._args_schema

_args_sub_resource_create = None
Expand Down Expand Up @@ -268,7 +260,7 @@ def content(self):
)
_builder.set_prop("location", AAZStrType, ".location")
_builder.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}})
_builder.set_prop("sku", AAZObjectType, ".sku")
_builder.set_prop("sku", AAZObjectType)
Comment thread
necusjz marked this conversation as resolved.
_builder.set_prop("tags", AAZDictType, ".tags")
_builder.set_prop("zones", AAZListType, ".zone")

Expand Down Expand Up @@ -307,7 +299,7 @@ def content(self):

sku = _builder.get(".sku")
if sku is not None:
sku.set_prop("name", AAZStrType, ".name")
sku.set_prop("name", AAZStrType, ".sku")
Comment thread
necusjz marked this conversation as resolved.

tags = _builder.get(".tags")
if tags is not None:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ def _build_arguments_schema(cls, *args, **kwargs):
)
args_schema.pip_addresses._registered = False
args_schema.pip_prefixes._registered = False
args_schema.sku._registered = False
return args_schema

def pre_operations(self):
Expand Down
Loading