From 45d6381a8d07dbe1c283472d9417a9e68efc6251 Mon Sep 17 00:00:00 2001 From: Hari Prasad Perabattula Date: Thu, 8 Oct 2020 22:05:22 +0530 Subject: [PATCH 1/7] Adding new fields in PutvNetPeering to support address space update in peered vNets Added the new fields and the examples to support the address space update in peered vNets. --- .../examples/VirtualNetworkPeeringCreate.json | 16 +++++++++++++-- .../examples/VirtualNetworkPeeringGet.json | 8 +++++++- .../examples/VirtualNetworkPeeringList.json | 16 +++++++++++++-- .../stable/2020-07-01/virtualNetwork.json | 20 ++++++++++++++++++- 4 files changed, 54 insertions(+), 6 deletions(-) diff --git a/specification/network/resource-manager/Microsoft.Network/stable/2020-07-01/examples/VirtualNetworkPeeringCreate.json b/specification/network/resource-manager/Microsoft.Network/stable/2020-07-01/examples/VirtualNetworkPeeringCreate.json index 51507e38cf87..b4b6e32cf1d4 100644 --- a/specification/network/resource-manager/Microsoft.Network/stable/2020-07-01/examples/VirtualNetworkPeeringCreate.json +++ b/specification/network/resource-manager/Microsoft.Network/stable/2020-07-01/examples/VirtualNetworkPeeringCreate.json @@ -35,12 +35,18 @@ "12.0.0.0/8" ] }, + "remoteVirtualNetworkAddressSpace": { + "addressPrefixes": [ + "12.0.0.0/8" + ] + }, "remoteBgpCommunities": { "virtualNetworkCommunity": "12076:20002", "regionalCommunity": "12076:50004" }, "peeringState": "Initiated", - "provisioningState": "Succeeded" + "provisioningState": "Succeeded", + "peeringSyncLevel": "FullySynced" } } }, @@ -61,12 +67,18 @@ "12.0.0.0/8" ] }, + "remoteVirtualNetworkAddressSpace": { + "addressPrefixes": [ + "12.0.0.0/8" + ] + }, "remoteBgpCommunities": { "virtualNetworkCommunity": "12076:20002", "regionalCommunity": "12076:50004" }, "peeringState": "Initiated", - "provisioningState": "Succeeded" + "provisioningState": "Succeeded", + "peeringSyncLevel": "FullySynced" } } } diff --git a/specification/network/resource-manager/Microsoft.Network/stable/2020-07-01/examples/VirtualNetworkPeeringGet.json b/specification/network/resource-manager/Microsoft.Network/stable/2020-07-01/examples/VirtualNetworkPeeringGet.json index 32569e79424e..6998d9a99703 100644 --- a/specification/network/resource-manager/Microsoft.Network/stable/2020-07-01/examples/VirtualNetworkPeeringGet.json +++ b/specification/network/resource-manager/Microsoft.Network/stable/2020-07-01/examples/VirtualNetworkPeeringGet.json @@ -24,12 +24,18 @@ "12.0.0.0/8" ] }, + "remoteVirtualNetworkAddressSpace": { + "addressPrefixes": [ + "12.0.0.0/8" + ] + }, "remoteBgpCommunities": { "virtualNetworkCommunity": "12076:20002", "regionalCommunity": "12076:50004" }, "peeringState": "Initiated", - "provisioningState": "Succeeded" + "provisioningState": "Succeeded", + "peeringSyncLevel": "FullySynced" } } } diff --git a/specification/network/resource-manager/Microsoft.Network/stable/2020-07-01/examples/VirtualNetworkPeeringList.json b/specification/network/resource-manager/Microsoft.Network/stable/2020-07-01/examples/VirtualNetworkPeeringList.json index af8a21220f94..257400138675 100644 --- a/specification/network/resource-manager/Microsoft.Network/stable/2020-07-01/examples/VirtualNetworkPeeringList.json +++ b/specification/network/resource-manager/Microsoft.Network/stable/2020-07-01/examples/VirtualNetworkPeeringList.json @@ -25,12 +25,18 @@ "12.0.0.0/8" ] }, + "remoteVirtualNetworkAddressSpace": { + "addressPrefixes": [ + "12.0.0.0/8" + ] + }, "remoteBgpCommunities": { "virtualNetworkCommunity": "12076:20002", "regionalCommunity": "12076:50004" }, "peeringState": "Initiated", - "provisioningState": "Succeeded" + "provisioningState": "Succeeded", + "peeringSyncLevel": "FullySynced" } }, { @@ -49,12 +55,18 @@ "13.0.0.0/8" ] }, + "remoteVirtualNetworkAddressSpace": { + "addressPrefixes": [ + "13.0.0.0/8" + ] + }, "remoteBgpCommunities": { "virtualNetworkCommunity": "12076:20003", "regionalCommunity": "12076:50004" }, "peeringState": "Initiated", - "provisioningState": "Succeeded" + "provisioningState": "Succeeded", + "peeringSyncLevel": "FullySynced" } } ] diff --git a/specification/network/resource-manager/Microsoft.Network/stable/2020-07-01/virtualNetwork.json b/specification/network/resource-manager/Microsoft.Network/stable/2020-07-01/virtualNetwork.json index de81f59efbfa..10bf33117039 100644 --- a/specification/network/resource-manager/Microsoft.Network/stable/2020-07-01/virtualNetwork.json +++ b/specification/network/resource-manager/Microsoft.Network/stable/2020-07-01/virtualNetwork.json @@ -1550,7 +1550,11 @@ }, "remoteAddressSpace": { "$ref": "#/definitions/AddressSpace", - "description": "The reference to the remote virtual network address space." + "description": "The reference to the address space peered with the remote virtual network." + }, + "remoteVirtualNetworkAddressSpace": { + "$ref": "#/definitions/AddressSpace", + "description": "The reference to the curent address space of the remote virtual network." }, "remoteBgpCommunities": { "$ref": "#/definitions/VirtualNetworkBgpCommunities", @@ -1570,6 +1574,20 @@ "modelAsString": true } }, + "peeringSyncLevel": { + "type": "string", + "description": "The peering sync status of the virtual network peering.", + "enum": [ + "FullySynced", + "RemoteUnsynced", + "LocalUnsynced", + "LocalAndRemoteUnsynced" + ], + "x-ms-enum": { + "name": "VirtualNetworkPeeringLevel", + "modelAsString": true + } + }, "provisioningState": { "readOnly": true, "$ref": "./network.json#/definitions/ProvisioningState", From b34238a5b97ba883dfe6efc5faa228b1f6730590 Mon Sep 17 00:00:00 2001 From: Hari Prasad Perabattula Date: Tue, 13 Oct 2020 20:29:41 +0530 Subject: [PATCH 2/7] Fixing spell checks --- .../Microsoft.Network/stable/2020-07-01/virtualNetwork.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/network/resource-manager/Microsoft.Network/stable/2020-07-01/virtualNetwork.json b/specification/network/resource-manager/Microsoft.Network/stable/2020-07-01/virtualNetwork.json index 7ed5ac28c62b..7edb67a74e8e 100644 --- a/specification/network/resource-manager/Microsoft.Network/stable/2020-07-01/virtualNetwork.json +++ b/specification/network/resource-manager/Microsoft.Network/stable/2020-07-01/virtualNetwork.json @@ -1554,7 +1554,7 @@ }, "remoteVirtualNetworkAddressSpace": { "$ref": "#/definitions/AddressSpace", - "description": "The reference to the curent address space of the remote virtual network." + "description": "The reference to the current address space of the remote virtual network." }, "remoteBgpCommunities": { "$ref": "#/definitions/VirtualNetworkBgpCommunities", From 64a0e819f1e748c76a8a03d0a00a14124ac10e72 Mon Sep 17 00:00:00 2001 From: Hari Prasad Perabattula Date: Tue, 13 Oct 2020 21:59:47 +0530 Subject: [PATCH 3/7] Update custom-words.txt --- custom-words.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/custom-words.txt b/custom-words.txt index 18ae93d414ad..6acf8af868f5 100644 --- a/custom-words.txt +++ b/custom-words.txt @@ -1676,6 +1676,7 @@ Unregistering Unregisters unrestorable unsubstituted +Unsynced untagged Untracked unvalidated From 6d70aeb7e49aeeec1a2b8b0c555d9e5f32012594 Mon Sep 17 00:00:00 2001 From: Hari Prasad Perabattula Date: Wed, 14 Oct 2020 15:35:24 +0530 Subject: [PATCH 4/7] Adding the feature to sync the address space on peering --- .../examples/VirtualNetworkPeeringUpdate.json | 57 +++++++++++++++++++ .../stable/2020-07-01/virtualNetwork.json | 5 ++ 2 files changed, 62 insertions(+) create mode 100644 specification/network/resource-manager/Microsoft.Network/stable/2020-07-01/examples/VirtualNetworkPeeringUpdate.json diff --git a/specification/network/resource-manager/Microsoft.Network/stable/2020-07-01/examples/VirtualNetworkPeeringUpdate.json b/specification/network/resource-manager/Microsoft.Network/stable/2020-07-01/examples/VirtualNetworkPeeringUpdate.json new file mode 100644 index 000000000000..b20d3aa6f1a9 --- /dev/null +++ b/specification/network/resource-manager/Microsoft.Network/stable/2020-07-01/examples/VirtualNetworkPeeringUpdate.json @@ -0,0 +1,57 @@ +{ + "parameters": { + "virtualNetworkPeeringName": "peer", + "virtualNetworkName": "vnet1", + "resourceGroupName": "peerTest", + "api-version": "2020-07-01", + "subscriptionId": "subid", + "VirtualNetworkPeeringParameters": { + "properties": { + "allowVirtualNetworkAccess": true, + "allowForwardedTraffic": true, + "allowGatewayTransit": false, + "useRemoteGateways": false, + "syncRemoteAddressSpace": true, + "remoteVirtualNetwork": { + "id": "/subscriptions/subid/resourceGroups/peerTest/providers/Microsoft.Network/virtualNetworks/vnet2" + } + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/subid/resourceGroups/peerTest/providers/Microsoft.Network/virtualNetworks/vnet1/virtualNetworkPeerings/peer", + "name": "peer", + "properties": { + "allowVirtualNetworkAccess": true, + "allowForwardedTraffic": true, + "allowGatewayTransit": false, + "useRemoteGateways": false, + "remoteVirtualNetwork": { + "id": "/subscriptions/subid/resourceGroups/peerTest/providers/Microsoft.Network/virtualNetworks/vnet2" + }, + "remoteAddressSpace": { + "addressPrefixes": [ + "12.0.0.0/8", + "13.0.0.0/16" + ] + }, + "remoteVirtualNetworkAddressSpace": { + "addressPrefixes": [ + "12.0.0.0/8", + "13.0.0.0/16" + ] + }, + "remoteBgpCommunities": { + "virtualNetworkCommunity": "12076:20002", + "regionalCommunity": "12076:50004" + }, + "peeringState": "Connected", + "provisioningState": "Succeeded", + "peeringSyncLevel": "FullySynced" + } + } + } + } +} diff --git a/specification/network/resource-manager/Microsoft.Network/stable/2020-07-01/virtualNetwork.json b/specification/network/resource-manager/Microsoft.Network/stable/2020-07-01/virtualNetwork.json index 7edb67a74e8e..af42c1e8a75f 100644 --- a/specification/network/resource-manager/Microsoft.Network/stable/2020-07-01/virtualNetwork.json +++ b/specification/network/resource-manager/Microsoft.Network/stable/2020-07-01/virtualNetwork.json @@ -1588,6 +1588,11 @@ "modelAsString": true } }, + "syncRemoteAddressSpace": { + "type": "boolean", + "default": false, + "description": "Provided when user wants to sync the peering with address space on the remote virtual network after the address space is updated." + }, "provisioningState": { "readOnly": true, "$ref": "./network.json#/definitions/ProvisioningState", From 56e3903bfc7a1d3c118f23d7929a7d49f71b51a1 Mon Sep 17 00:00:00 2001 From: Hari Prasad Perabattula Date: Wed, 14 Oct 2020 20:43:18 +0530 Subject: [PATCH 5/7] Using the new example file added --- .../Microsoft.Network/stable/2020-07-01/virtualNetwork.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/specification/network/resource-manager/Microsoft.Network/stable/2020-07-01/virtualNetwork.json b/specification/network/resource-manager/Microsoft.Network/stable/2020-07-01/virtualNetwork.json index af42c1e8a75f..129ffcb2ea32 100644 --- a/specification/network/resource-manager/Microsoft.Network/stable/2020-07-01/virtualNetwork.json +++ b/specification/network/resource-manager/Microsoft.Network/stable/2020-07-01/virtualNetwork.json @@ -1068,6 +1068,9 @@ "x-ms-examples": { "Create peering": { "$ref": "./examples/VirtualNetworkPeeringCreate.json" + }, + "Update peering": { + "$ref": "./examples/VirtualNetworkPeeringUpdate.json" } }, "x-ms-long-running-operation": true, From b5ba2c18ed6858e5923fc3f0453f543069b5b168 Mon Sep 17 00:00:00 2001 From: Hari Prasad Perabattula Date: Wed, 14 Oct 2020 22:46:29 +0530 Subject: [PATCH 6/7] Reverting the new file as it's mot working --- .../examples/VirtualNetworkPeeringCreate.json | 1 + .../examples/VirtualNetworkPeeringUpdate.json | 57 ------------------- .../stable/2020-07-01/virtualNetwork.json | 3 - 3 files changed, 1 insertion(+), 60 deletions(-) delete mode 100644 specification/network/resource-manager/Microsoft.Network/stable/2020-07-01/examples/VirtualNetworkPeeringUpdate.json diff --git a/specification/network/resource-manager/Microsoft.Network/stable/2020-07-01/examples/VirtualNetworkPeeringCreate.json b/specification/network/resource-manager/Microsoft.Network/stable/2020-07-01/examples/VirtualNetworkPeeringCreate.json index b4b6e32cf1d4..39df51f05681 100644 --- a/specification/network/resource-manager/Microsoft.Network/stable/2020-07-01/examples/VirtualNetworkPeeringCreate.json +++ b/specification/network/resource-manager/Microsoft.Network/stable/2020-07-01/examples/VirtualNetworkPeeringCreate.json @@ -11,6 +11,7 @@ "allowForwardedTraffic": true, "allowGatewayTransit": false, "useRemoteGateways": false, + "syncRemoteAddressSpace": true, "remoteVirtualNetwork": { "id": "/subscriptions/subid/resourceGroups/peerTest/providers/Microsoft.Network/virtualNetworks/vnet2" } diff --git a/specification/network/resource-manager/Microsoft.Network/stable/2020-07-01/examples/VirtualNetworkPeeringUpdate.json b/specification/network/resource-manager/Microsoft.Network/stable/2020-07-01/examples/VirtualNetworkPeeringUpdate.json deleted file mode 100644 index b20d3aa6f1a9..000000000000 --- a/specification/network/resource-manager/Microsoft.Network/stable/2020-07-01/examples/VirtualNetworkPeeringUpdate.json +++ /dev/null @@ -1,57 +0,0 @@ -{ - "parameters": { - "virtualNetworkPeeringName": "peer", - "virtualNetworkName": "vnet1", - "resourceGroupName": "peerTest", - "api-version": "2020-07-01", - "subscriptionId": "subid", - "VirtualNetworkPeeringParameters": { - "properties": { - "allowVirtualNetworkAccess": true, - "allowForwardedTraffic": true, - "allowGatewayTransit": false, - "useRemoteGateways": false, - "syncRemoteAddressSpace": true, - "remoteVirtualNetwork": { - "id": "/subscriptions/subid/resourceGroups/peerTest/providers/Microsoft.Network/virtualNetworks/vnet2" - } - } - } - }, - "responses": { - "200": { - "body": { - "id": "/subscriptions/subid/resourceGroups/peerTest/providers/Microsoft.Network/virtualNetworks/vnet1/virtualNetworkPeerings/peer", - "name": "peer", - "properties": { - "allowVirtualNetworkAccess": true, - "allowForwardedTraffic": true, - "allowGatewayTransit": false, - "useRemoteGateways": false, - "remoteVirtualNetwork": { - "id": "/subscriptions/subid/resourceGroups/peerTest/providers/Microsoft.Network/virtualNetworks/vnet2" - }, - "remoteAddressSpace": { - "addressPrefixes": [ - "12.0.0.0/8", - "13.0.0.0/16" - ] - }, - "remoteVirtualNetworkAddressSpace": { - "addressPrefixes": [ - "12.0.0.0/8", - "13.0.0.0/16" - ] - }, - "remoteBgpCommunities": { - "virtualNetworkCommunity": "12076:20002", - "regionalCommunity": "12076:50004" - }, - "peeringState": "Connected", - "provisioningState": "Succeeded", - "peeringSyncLevel": "FullySynced" - } - } - } - } -} diff --git a/specification/network/resource-manager/Microsoft.Network/stable/2020-07-01/virtualNetwork.json b/specification/network/resource-manager/Microsoft.Network/stable/2020-07-01/virtualNetwork.json index 129ffcb2ea32..af42c1e8a75f 100644 --- a/specification/network/resource-manager/Microsoft.Network/stable/2020-07-01/virtualNetwork.json +++ b/specification/network/resource-manager/Microsoft.Network/stable/2020-07-01/virtualNetwork.json @@ -1068,9 +1068,6 @@ "x-ms-examples": { "Create peering": { "$ref": "./examples/VirtualNetworkPeeringCreate.json" - }, - "Update peering": { - "$ref": "./examples/VirtualNetworkPeeringUpdate.json" } }, "x-ms-long-running-operation": true, From 956d45c6705ff866bb8ff5e5e9766da96509a7b6 Mon Sep 17 00:00:00 2001 From: Hari Prasad Perabattula Date: Thu, 15 Oct 2020 15:54:53 +0530 Subject: [PATCH 7/7] Fixing a prettier error --- .../Microsoft.Network/stable/2020-07-01/virtualNetwork.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/network/resource-manager/Microsoft.Network/stable/2020-07-01/virtualNetwork.json b/specification/network/resource-manager/Microsoft.Network/stable/2020-07-01/virtualNetwork.json index af42c1e8a75f..91ca76e75d9b 100644 --- a/specification/network/resource-manager/Microsoft.Network/stable/2020-07-01/virtualNetwork.json +++ b/specification/network/resource-manager/Microsoft.Network/stable/2020-07-01/virtualNetwork.json @@ -1588,7 +1588,7 @@ "modelAsString": true } }, - "syncRemoteAddressSpace": { + "syncRemoteAddressSpace": { "type": "boolean", "default": false, "description": "Provided when user wants to sync the peering with address space on the remote virtual network after the address space is updated."