Skip to content
Closed
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
4 changes: 4 additions & 0 deletions src/network-manager/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
Release History
===============

2.0.2
+++++
* * Add new feature (CVG PL64K) to cmd `az network manager connect-config`

2.0.1
+++++
* Fix the post commit commands for AVNM configuration (All config types)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"network manager",
)
class __CMDGroup(AAZCommandGroup):
"""Manage network-manager with network.
"""Manage Network Manager
"""
pass

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ class ListActiveConnectivityConfig(AAZCommand):
"""

_aaz_info = {
"version": "2022-01-01",
"version": "2024-07-01",
"resources": [
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.network/networkmanagers/{}/listactiveconnectivityconfigurations", "2022-01-01"],
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.network/networkmanagers/{}/listactiveconnectivityconfigurations", "2024-07-01"],
]
}

Expand Down Expand Up @@ -137,7 +137,7 @@ def url_parameters(self):
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2022-01-01",
"api-version", "2024-07-01",
required=True,
),
}
Expand Down Expand Up @@ -231,6 +231,9 @@ def _build_schema_on_200(cls):
serialized_name="appliesToGroups",
flags={"required": True},
)
properties.connectivity_capabilities = AAZObjectType(
serialized_name="connectivityCapabilities",
)
properties.connectivity_topology = AAZStrType(
serialized_name="connectivityTopology",
flags={"required": True},
Expand All @@ -247,6 +250,10 @@ def _build_schema_on_200(cls):
serialized_name="provisioningState",
flags={"read_only": True},
)
properties.resource_guid = AAZStrType(
serialized_name="resourceGuid",
flags={"read_only": True},
)

applies_to_groups = cls._schema_on_200.value.Element.properties.applies_to_groups
applies_to_groups.Element = AAZObjectType()
Expand All @@ -267,6 +274,17 @@ def _build_schema_on_200(cls):
serialized_name="useHubGateway",
)

connectivity_capabilities = cls._schema_on_200.value.Element.properties.connectivity_capabilities
connectivity_capabilities.connected_group_address_overlap = AAZStrType(
serialized_name="connectedGroupAddressOverlap",
)
connectivity_capabilities.connected_group_private_endpoints_scale = AAZStrType(
serialized_name="connectedGroupPrivateEndpointsScale",
)
connectivity_capabilities.peering_enforcement = AAZStrType(
serialized_name="peeringEnforcement",
)

hubs = cls._schema_on_200.value.Element.properties.hubs
hubs.Element = AAZObjectType()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ class ListEffectiveConnectivityConfig(AAZCommand):
"""

_aaz_info = {
"version": "2022-01-01",
"version": "2024-07-01",
"resources": [
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.network/virtualnetworks/{}/listnetworkmanagereffectiveconnectivityconfigurations", "2022-01-01"],
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.network/virtualnetworks/{}/listnetworkmanagereffectiveconnectivityconfigurations", "2024-07-01"],
]
}

Expand Down Expand Up @@ -129,7 +129,7 @@ def url_parameters(self):
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2022-01-01",
"api-version", "2024-07-01",
required=True,
),
}
Expand Down Expand Up @@ -214,6 +214,9 @@ def _build_schema_on_200(cls):
serialized_name="appliesToGroups",
flags={"required": True},
)
properties.connectivity_capabilities = AAZObjectType(
serialized_name="connectivityCapabilities",
)
properties.connectivity_topology = AAZStrType(
serialized_name="connectivityTopology",
flags={"required": True},
Expand All @@ -230,6 +233,10 @@ def _build_schema_on_200(cls):
serialized_name="provisioningState",
flags={"read_only": True},
)
properties.resource_guid = AAZStrType(
serialized_name="resourceGuid",
flags={"read_only": True},
)

applies_to_groups = cls._schema_on_200.value.Element.properties.applies_to_groups
applies_to_groups.Element = AAZObjectType()
Expand All @@ -250,6 +257,17 @@ def _build_schema_on_200(cls):
serialized_name="useHubGateway",
)

connectivity_capabilities = cls._schema_on_200.value.Element.properties.connectivity_capabilities
connectivity_capabilities.connected_group_address_overlap = AAZStrType(
serialized_name="connectedGroupAddressOverlap",
)
connectivity_capabilities.connected_group_private_endpoints_scale = AAZStrType(
serialized_name="connectedGroupPrivateEndpointsScale",
)
connectivity_capabilities.peering_enforcement = AAZStrType(
serialized_name="peeringEnforcement",
)

hubs = cls._schema_on_200.value.Element.properties.hubs
hubs.Element = AAZObjectType()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class PostCommit(AAZCommand):

def _handler(self, command_args):
super()._handler(command_args)
return self.build_lro_poller(self._execute_operations, None)
return self.build_lro_poller(self._execute_operations, self._output)

_args_schema = None

Expand Down Expand Up @@ -100,6 +100,10 @@ def pre_operations(self):
def post_operations(self):
pass

def _output(self, *args, **kwargs):
result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True)
return result

class NetworkManagerCommitsPost(AAZHttpOperation):
CLIENT_TYPE = "MgmtClient"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,6 @@ def _build_arguments_schema(cls, *args, **kwargs):
arg_group="Parameters",
help="Resource location.",
nullable=True,
fmt=AAZResourceLocationArgFormat(
resource_group_arg="resource_group",
),
)
_args_schema.tags = AAZDictArg(
options=["--tags"],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"network manager connect-config",
)
class __CMDGroup(AAZCommandGroup):
"""Manage connectivity configuration with network.
"""Manage Connectivity Configuration
"""
pass

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,12 @@
)
class Create(AAZCommand):
"""Create a new network manager connectivity configuration

:example: Create/Update Azure Virtual Network Manager Connectivity Configuration
az network manager connect-config create --configuration-name "myTestConnectivityConfig" --description "Sample Configuration" --applies-to-group group-connectivity="None" is-global=false network-group-id="/subscriptions/subscriptionA/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkManagers/testNetworkManager/networkManagerGroups/group1" use-hub-gateway=true --connectivity-topology "HubAndSpoke" --delete-existing-peering true --hub resource-id="subscriptions/subscriptionA/resourceGroups/myResourceGroup/providers/Micr osoft.Network/virtualNetworks/myTestConnectivityConfig" resource- type="Microsoft.Network/virtualNetworks" --is-global true --network-manager-name "testNetworkManager" --resource-group "myResourceGroup"
"""

_aaz_info = {
"version": "2022-01-01",
"version": "2024-07-01",
"resources": [
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.network/networkmanagers/{}/connectivityconfigurations/{}", "2022-01-01"],
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.network/networkmanagers/{}/connectivityconfigurations/{}", "2024-07-01"],
]
}

Expand All @@ -45,12 +42,12 @@ def _build_arguments_schema(cls, *args, **kwargs):

_args_schema = cls._args_schema
_args_schema.configuration_name = AAZStrArg(
options=["--configuration-name"],
options=["-n", "--name", "--configuration-name"],
help="The name of the network manager connectivity configuration.",
required=True,
)
_args_schema.network_manager_name = AAZStrArg(
options=["-n", "--name", "--network-manager-name"],
options=["--network-manager-name"],
help="The name of the network manager.",
required=True,
)
Expand All @@ -63,10 +60,14 @@ def _build_arguments_schema(cls, *args, **kwargs):
_args_schema = cls._args_schema
_args_schema.applies_to_groups = AAZListArg(
options=["--applies-to-groups"],
singular_options=["--applies-to-group"],
arg_group="Properties",
help="Groups for configuration",
)
_args_schema.connect_capabilities = AAZObjectArg(
options=["--connect-capabilities"],
arg_group="Properties",
help="Collection of additional settings to enhance specific topology behaviors of the connectivity configuration resource.",
)
_args_schema.connectivity_topology = AAZStrArg(
options=["--connectivity-topology"],
arg_group="Properties",
Expand All @@ -86,7 +87,6 @@ def _build_arguments_schema(cls, *args, **kwargs):
)
_args_schema.hubs = AAZListArg(
options=["--hubs"],
singular_options=["--hub"],
arg_group="Properties",
help="List of hubItems",
)
Expand All @@ -103,13 +103,13 @@ def _build_arguments_schema(cls, *args, **kwargs):
_element = cls._args_schema.applies_to_groups.Element
_element.group_connectivity = AAZStrArg(
options=["group-connectivity"],
help="Group connectivity type. Only required if topology is Hub and Spoke.",
help="Group connectivity type.",
required=True,
enum={"DirectlyConnected": "DirectlyConnected", "None": "None"},
)
_element.is_global = AAZStrArg(
options=["is-global"],
help="Flag if global is supported. Only required if topology is Hub and Spoke.",
help="Flag if global is supported.",
enum={"False": "False", "True": "True"},
)
_element.network_group_id = AAZStrArg(
Expand All @@ -119,10 +119,33 @@ def _build_arguments_schema(cls, *args, **kwargs):
)
_element.use_hub_gateway = AAZStrArg(
options=["use-hub-gateway"],
help="Flag if need to use hub gateway. Only required if topology is Hub and Spoke.",
help="Flag if need to use hub gateway.",
enum={"False": "False", "True": "True"},
)

connect_capabilities = cls._args_schema.connect_capabilities
connect_capabilities.connected_group_address_overlap = AAZStrArg(
options=["connected-group-address-overlap"],
help="Behavior to handle overlapped IP address space among members of the connected group of the connectivity configuration.",
required=True,
default="Allowed",
enum={"Allowed": "Allowed", "Disallowed": "Disallowed"},
)
connect_capabilities.connected_group_private_endpoints_scale = AAZStrArg(
options=["connected-group-private-endpoints-scale"],
help="Option indicating the scale of private endpoints allowed in the connected group of the connectivity configuration.",
required=True,
default="Standard",
enum={"HighScale": "HighScale", "Standard": "Standard"},
)
connect_capabilities.peering_enforcement = AAZStrArg(
options=["peering-enforcement"],
help="Option indicating enforcement of peerings created by the connectivity configuration.",
required=True,
default="Unenforced",
enum={"Enforced": "Enforced", "Unenforced": "Unenforced"},
)

hubs = cls._args_schema.hubs
hubs.Element = AAZObjectArg()

Expand All @@ -133,7 +156,7 @@ def _build_arguments_schema(cls, *args, **kwargs):
)
_element.resource_type = AAZStrArg(
options=["resource-type"],
help="Resource Type, suggested value(s): 'Microsoft.Network/virtualNetworks'",
help="Resource Type.",
)
return cls._args_schema

Expand Down Expand Up @@ -206,7 +229,7 @@ def url_parameters(self):
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2022-01-01",
"api-version", "2024-07-01",
required=True,
),
}
Expand Down Expand Up @@ -236,6 +259,7 @@ def content(self):
properties = _builder.get(".properties")
if properties is not None:
properties.set_prop("appliesToGroups", AAZListType, ".applies_to_groups", typ_kwargs={"flags": {"required": True}})
properties.set_prop("connectivityCapabilities", AAZObjectType, ".connect_capabilities")
properties.set_prop("connectivityTopology", AAZStrType, ".connectivity_topology", typ_kwargs={"flags": {"required": True}})
properties.set_prop("deleteExistingPeering", AAZStrType, ".delete_existing_peering")
properties.set_prop("description", AAZStrType, ".description")
Expand All @@ -253,6 +277,12 @@ def content(self):
_elements.set_prop("networkGroupId", AAZStrType, ".network_group_id", typ_kwargs={"flags": {"required": True}})
_elements.set_prop("useHubGateway", AAZStrType, ".use_hub_gateway")

connectivity_capabilities = _builder.get(".properties.connectivityCapabilities")
if connectivity_capabilities is not None:
connectivity_capabilities.set_prop("connectedGroupAddressOverlap", AAZStrType, ".connected_group_address_overlap", typ_kwargs={"flags": {"required": True}})
connectivity_capabilities.set_prop("connectedGroupPrivateEndpointsScale", AAZStrType, ".connected_group_private_endpoints_scale", typ_kwargs={"flags": {"required": True}})
connectivity_capabilities.set_prop("peeringEnforcement", AAZStrType, ".peering_enforcement", typ_kwargs={"flags": {"required": True}})

hubs = _builder.get(".properties.hubs")
if hubs is not None:
hubs.set_elements(AAZObjectType, ".")
Expand Down Expand Up @@ -307,6 +337,9 @@ def _build_schema_on_200_201(cls):
serialized_name="appliesToGroups",
flags={"required": True},
)
properties.connectivity_capabilities = AAZObjectType(
serialized_name="connectivityCapabilities",
)
properties.connectivity_topology = AAZStrType(
serialized_name="connectivityTopology",
flags={"required": True},
Expand All @@ -323,6 +356,10 @@ def _build_schema_on_200_201(cls):
serialized_name="provisioningState",
flags={"read_only": True},
)
properties.resource_guid = AAZStrType(
serialized_name="resourceGuid",
flags={"read_only": True},
)

applies_to_groups = cls._schema_on_200_201.properties.applies_to_groups
applies_to_groups.Element = AAZObjectType()
Expand All @@ -343,6 +380,20 @@ def _build_schema_on_200_201(cls):
serialized_name="useHubGateway",
)

connectivity_capabilities = cls._schema_on_200_201.properties.connectivity_capabilities
connectivity_capabilities.connected_group_address_overlap = AAZStrType(
serialized_name="connectedGroupAddressOverlap",
flags={"required": True},
)
connectivity_capabilities.connected_group_private_endpoints_scale = AAZStrType(
serialized_name="connectedGroupPrivateEndpointsScale",
flags={"required": True},
)
connectivity_capabilities.peering_enforcement = AAZStrType(
serialized_name="peeringEnforcement",
flags={"required": True},
)

hubs = cls._schema_on_200_201.properties.hubs
hubs.Element = AAZObjectType()

Expand Down
Loading
Loading