Skip to content

Add IPv6 support to VirtualHub and enableOnlyIpv6Peering to HubVnetConnection - #29894

Open
carenlim20 wants to merge 1 commit into
Azure:mainfrom
carenlim20:carenlim/VirtualHubIPv6-enableOnlyIPv6Peering
Open

Add IPv6 support to VirtualHub and enableOnlyIpv6Peering to HubVnetConnection#29894
carenlim20 wants to merge 1 commit into
Azure:mainfrom
carenlim20:carenlim/VirtualHubIPv6-enableOnlyIPv6Peering

Conversation

@carenlim20

@carenlim20 carenlim20 commented Jul 24, 2026

Copy link
Copy Markdown

Description

Added IPv6 support to Virtual Hub and Hub Virtual Network Connection cmdlets in Az.Network (API version 2025-09-01).

Updated cmdlets:

  • New-AzVirtualHub: Added -AddressPrefixV6 parameter to specify the IPv6 address prefix for the VirtualHub.
  • Update-AzVirtualHub: Added -AddressPrefixV6 parameter to update the IPv6 address prefix for the VirtualHub.
  • New-AzVirtualHubVnetConnection: Added -EnableOnlyIpv6Peering parameter to enable only IPv6 peering for the connection.

New properties exposed:

  • VirtualHub.AddressPrefixV6 — IPv6 address prefix for the hub
  • VirtualHub.VirtualRouterIpsV6 — VirtualRouter IPv6 IPs (read-only)
  • HubVirtualNetworkConnection.EnableOnlyIpv6Peering — Enable/Disable IPv6-only peering

Corresponding swagger PR: Azure/azure-rest-api-specs#44955

Mandatory Checklist

  • SHOULD update ChangeLog.md file(s) appropriately
    • Update src/{{SERVICE}}/{{SERVICE}}/ChangeLog.md.
      • A snippet outlining the change(s) made in the PR should be written under the ## Upcoming Release header in the past tense.
    • Should not change ChangeLog.md if no new release is required, such as fixing test case only.
  • SHOULD regenerate markdown help files if there is cmdlet API change. Instruction
  • SHOULD have proper test coverage for changes in pull request.
  • SHOULD NOT adjust version of module manually in pull request

Copilot AI review requested due to automatic review settings July 24, 2026 06:58
@azure-pipelines

Copy link
Copy Markdown
Contributor
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

@a0x1ab

a0x1ab commented Jul 24, 2026

Copy link
Copy Markdown
Member

/azp run

@azure-pipelines

Copy link
Copy Markdown
Contributor
Azure Pipelines:
Successfully started running 3 pipeline(s).

@carenlim20
carenlim20 force-pushed the carenlim/VirtualHubIPv6-enableOnlyIPv6Peering branch from c7113db to be2ac2f Compare July 24, 2026 07:04

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR adds IPv6-related surface area to the Az.Network Virtual Hub and Hub Virtual Network Connection cmdlets (targeting API version 2025-09-01), exposing new IPv6 properties and parameters across models, cmdlets, help, changelog, and scenario tests.

Changes:

  • Added -AddressPrefixV6 to New-AzVirtualHub / Update-AzVirtualHub and wired it through PS models and SDK models.
  • Added -EnableOnlyIpv6Peering to New-AzVirtualHubVnetConnection / Update-AzVirtualHubVnetConnection and exposed it on the connection PS model and SDK model.
  • Added a new live-only scenario test covering creation/update flows for the new IPv6 parameters/properties, and documented the new parameters in help + changelog.

Reviewed changes

Copilot reviewed 11 out of 13 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/Network/Network/Models/Cortex/PSVirtualHub.cs Exposes AddressPrefixV6 and VirtualRouterIpsV6 on the PowerShell Virtual Hub model.
src/Network/Network/Models/Cortex/PSHubVirtualNetworkConnection.cs Exposes EnableOnlyIpv6Peering on the PowerShell Hub VNet connection model.
src/Network/Network/help/Update-AzVirtualHubVnetConnection.md Documents new -EnableOnlyIpv6Peering parameter for update cmdlet.
src/Network/Network/help/Update-AzVirtualHub.md Documents new -AddressPrefixV6 parameter for update cmdlet.
src/Network/Network/help/New-AzVirtualHubVnetConnection.md Documents new -EnableOnlyIpv6Peering parameter for create cmdlet.
src/Network/Network/help/New-AzVirtualHub.md Documents new -AddressPrefixV6 parameter for create cmdlet.
src/Network/Network/Cortex/VirtualHub/UpdateAzureRmVirtualHubCommand.cs Adds AddressPrefixV6 parameter and applies it during VirtualHub update.
src/Network/Network/Cortex/VirtualHub/NewAzureRmVirtualHubCommand.cs Adds AddressPrefixV6 parameter and includes it in VirtualHub create payload.
src/Network/Network/Cortex/HubVnetConnection/UpdateAzureRmHubVirtualNetworkConnectionCommand.cs Adds EnableOnlyIpv6Peering parameter and applies it during connection update.
src/Network/Network/Cortex/HubVnetConnection/NewAzureRmHubVirtualNetworkConnectionCommand.cs Adds EnableOnlyIpv6Peering parameter and includes it in connection create payload.
src/Network/Network/ChangeLog.md Adds an Upcoming Release entry describing the new IPv6 parameters.
src/Network/Network.Test/ScenarioTests/CortexTests.ps1 Adds a new live-only scenario test script for IPv6 hub + IPv6-only peering.
src/Network/Network.Test/ScenarioTests/CortexTests.cs Wires the new test script into xUnit test execution (LiveOnly).
src/Network/Network.Management.Sdk/Generated/Models/VirtualHub.cs Updates generated SDK model to include AddressPrefixV6 and VirtualRouterIpsV6.
src/Network/Network.Management.Sdk/Generated/Models/HubVirtualNetworkConnection.cs Updates generated SDK model to include EnableOnlyIpv6Peering.

Copilot AI review requested due to automatic review settings July 24, 2026 07:06

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 11 out of 13 changed files in this pull request and generated 3 comments.

Comments suppressed due to low confidence (1)

src/Network/Network/Cortex/HubVnetConnection/NewAzureRmHubVirtualNetworkConnectionCommand.cs:142

  • The cmdlet accepts any string for -EnableOnlyIpv6Peering and will send it to the service, which can lead to avoidable runtime failures. Since only "Enabled"/"Disabled" are intended, add a ValidateSet to enforce allowed values (you can keep PSArgumentCompleter for UX).
        [Parameter(
            Mandatory = false,
            HelpMessage = "Enable only IPv6 peering for this connection.")]
        [PSArgumentCompleter("Enabled", "Disabled")]
        public string EnableOnlyIpv6Peering { get; set; }

Comment thread src/Network/Network/help/New-AzVirtualHubVnetConnection.md Outdated
Comment thread src/Network/Network.Test/ScenarioTests/CortexTests.ps1 Outdated
Comment thread src/Network/Network/ChangeLog.md
Copilot AI review requested due to automatic review settings July 24, 2026 19:51
@carenlim20
carenlim20 force-pushed the carenlim/VirtualHubIPv6-enableOnlyIPv6Peering branch from be2ac2f to ea78c4f Compare July 24, 2026 19:51

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 11 out of 13 changed files in this pull request and generated 1 comment.

Comment thread src/Network/Network.Test/ScenarioTests/CortexTests.ps1 Outdated
Copilot AI review requested due to automatic review settings July 24, 2026 22:59
@carenlim20
carenlim20 force-pushed the carenlim/VirtualHubIPv6-enableOnlyIPv6Peering branch from ea78c4f to 60a300e Compare July 24, 2026 22:59

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 11 out of 13 changed files in this pull request and generated 3 comments.

Comment on lines +141 to +144
VirtualWan : /subscriptions/{subscriptionId}resourceGroups/testRG/providers/Microsoft.Network/virtualWans/myVirtualWAN
ResourceGroupName : testRG
Name : westushub
Id : /subscriptions/{subscriptionId}resourceGroups/testRG/providers/Microsoft.Network/virtualHubs/westushub
Comment on lines +166 to +169
VirtualWan : /subscriptions/{subscriptionId}resourceGroups/testRG/providers/Microsoft.Network/virtualWans/myVirtualWAN
ResourceGroupName : testRG
Name : westushub
Id : /subscriptions/{subscriptionId}resourceGroups/testRG/providers/Microsoft.Network/virtualHubs/westushub
Name = this.Name,
VirtualWan = new PSResourceId() { Id = resolvedVirtualWan.Id },
AddressPrefix = this.AddressPrefix,
AddressPrefixV6 = this.AddressPrefixV6,
@VeryEarly VeryEarly self-assigned this Jul 26, 2026
@VeryEarly

Copy link
Copy Markdown
Collaborator

/azp run

@VeryEarly
VeryEarly enabled auto-merge (squash) July 26, 2026 11:39
@azure-pipelines

Copy link
Copy Markdown
Contributor
Azure Pipelines:
Successfully started running 3 pipeline(s).

@VeryEarly

Copy link
Copy Markdown
Collaborator

@carenlim20 please do not update SDK manually

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants