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
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
===============

3.0.0
+++++
* Add new parameter connect-capabilities 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 @@ -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 @@ -50,7 +47,7 @@ def _build_arguments_schema(cls, *args, **kwargs):
required=True,
)
_args_schema.network_manager_name = AAZStrArg(
options=["-n", "--name", "--network-manager-name"],
options=["--name", "--network-manager-name", "-n"],
help="The name of the network manager.",
required=True,
)
Expand All @@ -67,6 +64,11 @@ def _build_arguments_schema(cls, *args, **kwargs):
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 Down Expand Up @@ -103,13 +105,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 +121,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 +158,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 +231,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 +261,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 +279,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 +339,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 +358,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 +382,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
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,12 @@
)
class Delete(AAZCommand):
"""Delete a network manager connectivity configuration, specified by the resource group, network manager name, and connectivity configuration name

:example: Delete Azure Virtual Network Manager Connectivity Configuration
az network manager connect-config delete --configuration-name "myTestConnectivityConfig" --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 Down Expand Up @@ -53,7 +50,7 @@ def _build_arguments_schema(cls, *args, **kwargs):
id_part="child_name_1",
)
_args_schema.network_manager_name = AAZStrArg(
options=["-n", "--name", "--network-manager-name"],
options=["--name", "--network-manager-name", "-n"],
help="The name of the network manager.",
required=True,
id_part="name",
Expand Down Expand Up @@ -160,7 +157,7 @@ def query_parameters(self):
"force", self.ctx.args.force,
),
**self.serialize_query_param(
"api-version", "2022-01-01",
"api-version", "2024-07-01",
required=True,
),
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,12 @@
)
class List(AAZCommand):
"""List all the network manager connectivity configuration in a specified network manager.

:example: List Azure Virtual Network Manager Connecitivity Configuration
az network manager connect-config list --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 @@ -46,7 +43,7 @@ def _build_arguments_schema(cls, *args, **kwargs):

_args_schema = cls._args_schema
_args_schema.network_manager_name = AAZStrArg(
options=["-n", "--name", "--network-manager-name"],
options=["--name", "--network-manager-name", "-n"],
help="The name of the network manager.",
required=True,
)
Expand Down Expand Up @@ -139,7 +136,7 @@ def query_parameters(self):
"$top", self.ctx.args.top,
),
**self.serialize_query_param(
"api-version", "2022-01-01",
"api-version", "2024-07-01",
required=True,
),
}
Expand Down Expand Up @@ -206,6 +203,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 @@ -222,6 +222,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 @@ -242,6 +246,20 @@ 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",
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.value.Element.properties.hubs
hubs.Element = AAZObjectType()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,12 @@
)
class Show(AAZCommand):
"""Get a Network Connectivity Configuration, specified by the resource group, network manager name, and connectivity Configuration name

:example: Get Azure Virtual Network Manager Connectivity Configuration
az network manager connect-config show --configuration-name "myTestConnectivityConfig" --network-manager-name "testNetworkManager" --resource-group "myResourceGroup"
"""
Comment on lines 18 to 19
Copy link

Copilot AI Sep 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The docstring appears incomplete with missing proper formatting. It should end with a period and maintain consistent formatting with other command docstrings.

Copilot uses AI. Check for mistakes.

_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 @@ -51,7 +48,7 @@ def _build_arguments_schema(cls, *args, **kwargs):
id_part="child_name_1",
)
_args_schema.network_manager_name = AAZStrArg(
options=["-n", "--name", "--network-manager-name"],
options=["--name", "--network-manager-name", "-n"],
help="The name of the network manager.",
required=True,
id_part="name",
Expand Down Expand Up @@ -130,7 +127,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 @@ -188,6 +185,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 @@ -204,6 +204,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.properties.applies_to_groups
applies_to_groups.Element = AAZObjectType()
Expand All @@ -224,6 +228,20 @@ def _build_schema_on_200(cls):
serialized_name="useHubGateway",
)

connectivity_capabilities = cls._schema_on_200.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.properties.hubs
hubs.Element = AAZObjectType()

Expand Down
Loading
Loading