Skip to content

Commit 3108ad8

Browse files
authored
Merge pull request Azure#10115 from number213/nrp-2019-08-01
Update Network SDK to use API version 2019-08-01
2 parents de7e9ea + 9d8b6f0 commit 3108ad8

File tree

252 files changed

+202322
-216099
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

252 files changed

+202322
-216099
lines changed

src/CognitiveServices/CognitiveServices.Test/CognitiveServices.Test.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
<ItemGroup>
1414
<PackageReference Include="Microsoft.Azure.Management.CognitiveServices" Version="6.0.0-preview" />
15-
<PackageReference Include="Microsoft.Azure.Management.Network" Version="19.15.0-preview" />
15+
<PackageReference Include="Microsoft.Azure.Management.Network" Version="19.16.2-preview" />
1616
</ItemGroup>
1717

1818
</Project>

src/Compute/Compute.Test/Compute.Test.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<PackageReference Include="Microsoft.Azure.Graph.RBAC" Version="3.4.0-preview" />
1515
<PackageReference Include="Microsoft.Azure.Management.Compute" Version="29.0.0" />
1616
<PackageReference Include="Microsoft.Azure.Management.KeyVault" Version="2.4.2" />
17-
<PackageReference Include="Microsoft.Azure.Management.Network" Version="19.15.0-preview" />
17+
<PackageReference Include="Microsoft.Azure.Management.Network" Version="19.16.2-preview" />
1818
</ItemGroup>
1919

2020
<ItemGroup>

src/DataLakeStore/DataLakeStore.Test/DataLakeStore.Test.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
<ItemGroup>
1414
<PackageReference Include="Microsoft.Azure.Management.DataLake.Store" Version="2.4.2-preview" />
15-
<PackageReference Include="Microsoft.Azure.Management.Network" Version="19.15.0-preview" />
15+
<PackageReference Include="Microsoft.Azure.Management.Network" Version="19.16.2-preview" />
1616
</ItemGroup>
1717

1818
<ItemGroup>

src/Dns/Dns.Test/Dns.Test.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
<ItemGroup>
1414
<PackageReference Include="Microsoft.Azure.Management.Dns" Version="3.0.1" />
15-
<PackageReference Include="Microsoft.Azure.Management.Network" Version="19.15.0-preview" />
15+
<PackageReference Include="Microsoft.Azure.Management.Network" Version="19.16.2-preview" />
1616
</ItemGroup>
1717

1818
</Project>

src/Dns/Dns.Test/SessionRecords/Microsoft.Azure.Commands.ScenarioTest.DnsTests.ZoneTests/TestPrivateZoneCrud.json

Lines changed: 319 additions & 490 deletions
Large diffs are not rendered by default.

src/Dns/Dns.Test/SessionRecords/Microsoft.Azure.Commands.ScenarioTest.DnsTests.ZoneTests/TestPrivateZoneCrudByVirtualNetworkIds.json

Lines changed: 314 additions & 542 deletions
Large diffs are not rendered by default.

src/Dns/Dns.Test/SessionRecords/Microsoft.Azure.Commands.ScenarioTest.DnsTests.ZoneTests/TestPrivateZoneCrudByVirtualNetworkObjects.json

Lines changed: 315 additions & 543 deletions
Large diffs are not rendered by default.

src/Dns/Dns.Test/SessionRecords/Microsoft.Azure.Commands.ScenarioTest.DnsTests.ZoneTests/TestPrivateZoneCrudRegistrationVirtualNetwork.json

Lines changed: 256 additions & 313 deletions
Large diffs are not rendered by default.

src/Dns/Dns.Test/SessionRecords/Microsoft.Azure.Commands.ScenarioTest.DnsTests.ZoneTests/TestPrivateZoneCrudResolutionVirtualNetwork.json

Lines changed: 258 additions & 543 deletions
Large diffs are not rendered by default.

src/KeyVault/KeyVault.Test/KeyVault.Test.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<PackageReference Include="Microsoft.Azure.KeyVault" Version="3.0.1" />
1515
<PackageReference Include="Microsoft.Azure.KeyVault.WebKey" Version="3.0.1" />
1616
<PackageReference Include="Microsoft.Azure.Management.KeyVault" Version="2.4.2" />
17-
<PackageReference Include="Microsoft.Azure.Management.Network" Version="19.15.0-preview" />
17+
<PackageReference Include="Microsoft.Azure.Management.Network" Version="19.16.2-preview" />
1818
</ItemGroup>
1919

2020
<ItemGroup>

src/NetAppFiles/NetAppFiles.Test/NetAppFiles.Test.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
<ItemGroup>
1414
<PackageReference Include="Microsoft.Azure.Management.NetApp" Version="1.1.0" />
15-
<PackageReference Include="Microsoft.Azure.Management.Network" Version="19.15.0-preview" />
15+
<PackageReference Include="Microsoft.Azure.Management.Network" Version="19.16.2-preview" />
1616
</ItemGroup>
1717

1818
</Project>

src/NetAppFiles/NetAppFiles.Test/ScenarioTests/VolumeTests.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ function Test-VolumeCrud
113113
Assert-AreEqual $retrievedVolume.ExportPolicy.Rules[0].AllowedClients '0.0.0.0/0'
114114
Assert-AreEqual $retrievedVolume.ExportPolicy.Rules[1].AllowedClients '1.2.3.0/24'
115115
Assert-AreEqual $retrievedVolume.ProtocolTypes[0] 'NFSv3'
116-
Assert-AreEqual $retrievedVolume.ProtocolTypes[1] 'NFSv4'
116+
Assert-AreEqual $retrievedVolume.ProtocolTypes[1] 'NFSv4.1'
117117
Assert-NotNull $retrievedVolume.MountTargets
118118

119119
# create second volume and check using the confirm flag

src/NetAppFiles/NetAppFiles.Test/SessionRecords/Microsoft.Azure.Commands.NetAppFiles.Test.ScenarioTests.ScenarioTest.SnapshotTests/TestSnapshotCrud.json

Lines changed: 749 additions & 991 deletions
Large diffs are not rendered by default.

src/NetAppFiles/NetAppFiles.Test/SessionRecords/Microsoft.Azure.Commands.NetAppFiles.Test.ScenarioTests.ScenarioTest.SnapshotTests/TestSnapshotPipelines.json

Lines changed: 714 additions & 1179 deletions
Large diffs are not rendered by default.

src/NetAppFiles/NetAppFiles.Test/SessionRecords/Microsoft.Azure.Commands.NetAppFiles.Test.ScenarioTests.ScenarioTest.VolumeTests/TestVolumeCrud.json

Lines changed: 954 additions & 1419 deletions
Large diffs are not rendered by default.

src/NetAppFiles/NetAppFiles.Test/SessionRecords/Microsoft.Azure.Commands.NetAppFiles.Test.ScenarioTests.ScenarioTest.VolumeTests/TestVolumePipelines.json

Lines changed: 611 additions & 1082 deletions
Large diffs are not rendered by default.

src/Network/Network.Test/Network.Test.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
<ItemGroup>
1616
<PackageReference Include="Microsoft.Azure.Graph.RBAC" Version="3.4.0-preview" />
17-
<PackageReference Include="Microsoft.Azure.Management.Network" Version="19.15.0-preview" />
17+
<PackageReference Include="Microsoft.Azure.Management.Network" Version="19.16.2-preview" />
1818
<PackageReference Include="Microsoft.Azure.Insights" Version="0.16.0-preview" />
1919
<PackageReference Include="Microsoft.Azure.Management.Compute" Version="29.0.0" />
2020
<PackageReference Include="Microsoft.Azure.Management.ContainerInstance" Version="2.0.0" />

src/Network/Network.Test/ScenarioTests/ApplicationGatewayTests.ps1

Lines changed: 20 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -716,7 +716,7 @@ function Test-ApplicationGatewayCRUDRewriteRuleSet
716716

717717
# remove autoscale config
718718
$getgw = Remove-AzApplicationGatewayAutoscaleConfiguration -ApplicationGateway $getgw -Force
719-
$getgw = Set-AzApplicationGatewaySku -Name Standard_v2 -Tier Standard_v2 -Capacity 3 -ApplicationGateway $getgw
719+
$getgw = Set-AzApplicationGatewaySku -Name Standard_v2 -Tier Standard_v2 -Capacity 2 -ApplicationGateway $getgw
720720

721721
# Set
722722
$getgw01 = Set-AzApplicationGateway -ApplicationGateway $getgw
@@ -750,7 +750,7 @@ function Test-ApplicationGatewayCRUDRewriteRuleSet
750750
# check sku
751751
$sku01 = Get-AzApplicationGatewaySku -ApplicationGateway $getgw01
752752
Assert-NotNull $sku01
753-
Assert-AreEqual $sku01.Capacity 3
753+
Assert-AreEqual $sku01.Capacity 2
754754
Assert-AreEqual $sku01.Name Standard_v2
755755
Assert-AreEqual $sku01.Tier Standard_v2
756756

@@ -919,7 +919,7 @@ function Test-ApplicationGatewayCRUDRewriteRuleSetWithConditions
919919

920920
# remove autoscale config
921921
$getgw = Remove-AzApplicationGatewayAutoscaleConfiguration -ApplicationGateway $getgw -Force
922-
$getgw = Set-AzApplicationGatewaySku -Name Standard_v2 -Tier Standard_v2 -Capacity 3 -ApplicationGateway $getgw
922+
$getgw = Set-AzApplicationGatewaySku -Name Standard_v2 -Tier Standard_v2 -Capacity 2 -ApplicationGateway $getgw
923923

924924
# Set
925925
$getgw01 = Set-AzApplicationGateway -ApplicationGateway $getgw
@@ -954,7 +954,7 @@ function Test-ApplicationGatewayCRUDRewriteRuleSetWithConditions
954954
# check sku
955955
$sku01 = Get-AzApplicationGatewaySku -ApplicationGateway $getgw01
956956
Assert-NotNull $sku01
957-
Assert-AreEqual $sku01.Capacity 3
957+
Assert-AreEqual $sku01.Capacity 2
958958
Assert-AreEqual $sku01.Name Standard_v2
959959
Assert-AreEqual $sku01.Tier Standard_v2
960960

@@ -1088,15 +1088,15 @@ function Test-ApplicationGatewayCRUD3
10881088

10891089
# remove autoscale config
10901090
$getgw = Remove-AzApplicationGatewayAutoscaleConfiguration -ApplicationGateway $getgw -Force
1091-
$getgw = Set-AzApplicationGatewaySku -Name Standard_v2 -Tier Standard_v2 -Capacity 3 -ApplicationGateway $getgw
1091+
$getgw = Set-AzApplicationGatewaySku -Name Standard_v2 -Tier Standard_v2 -Capacity 2 -ApplicationGateway $getgw
10921092

10931093
# Set
10941094
$getgw01 = Set-AzApplicationGateway -ApplicationGateway $getgw
10951095

10961096
# check sku
10971097
$sku01 = Get-AzApplicationGatewaySku -ApplicationGateway $getgw01
10981098
Assert-NotNull $sku01
1099-
Assert-AreEqual $sku01.Capacity 3
1099+
Assert-AreEqual $sku01.Capacity 2
11001100
Assert-AreEqual $sku01.Name Standard_v2
11011101
Assert-AreEqual $sku01.Tier Standard_v2
11021102

@@ -1739,20 +1739,24 @@ function Test-ApplicationGatewayCRUDSubItems2
17391739
$appgw = Set-AzApplicationGateway -ApplicationGateway $appgw
17401740

17411741
# WAF Policy and Custom Rule
1742-
$variable = New-AzApplicationGatewayFirewallMatchVariable -VariableName RequestHeaders -Selector Content-Length
1742+
# Disabled until Firewall Policy cmdlets are updated
1743+
<#$variable = New-AzApplicationGatewayFirewallMatchVariable -VariableName RequestHeaders -Selector Content-Length
17431744
$condition = New-AzApplicationGatewayFirewallCondition -MatchVariable $variable -Operator GreaterThan -MatchValue 1000 -Transform Lowercase -NegationCondition $False
17441745
$rule = New-AzApplicationGatewayFirewallCustomRule -Name example -Priority 2 -RuleType MatchRule -MatchCondition $condition -Action Block
17451746
New-AzApplicationGatewayFirewallPolicy -Name $wafPolicy -ResourceGroupName $rgname -Location $location
17461747
$policy = Get-AzApplicationGatewayFirewallPolicy -Name $wafPolicy -ResourceGroupName $rgname
17471748
$policy.CustomRules = $rule
1748-
Set-AzApplicationGatewayFirewallPolicy -InputObject $policy
1749-
# Get Application Gateway
1749+
Set-AzApplicationGatewayFirewallPolicy -InputObject $policy#>
1750+
1751+
# Get Application Gateway
17501752
$appgw = Get-AzApplicationGateway -Name $appgwName -ResourceGroupName $rgname
1751-
$appgw.FirewallPolicy = $policy
1752-
$appgw = Set-AzApplicationGateway -ApplicationGateway $appgw
1753+
1754+
# Disabled until Firewall Policy cmdlets are updated
1755+
#$appgw.FirewallPolicy = $policy
1756+
#$appgw = Set-AzApplicationGateway -ApplicationGateway $appgw
17531757

17541758
$appgw = Get-AzApplicationGateway -Name $appgwName -ResourceGroupName $rgname
1755-
$policy = Get-AzApplicationGatewayFirewallPolicy -Name $wafPolicy -ResourceGroupName $rgname
1759+
#$policy = Get-AzApplicationGatewayFirewallPolicy -Name $wafPolicy -ResourceGroupName $rgname
17561760

17571761
# First Check firewall configuraiton
17581762
Assert-AreEqual $appgw.WebApplicationFirewallConfiguration.Enabled $true
@@ -1764,9 +1768,10 @@ function Test-ApplicationGatewayCRUDSubItems2
17641768
Assert-AreEqual $appgw.WebApplicationFirewallConfiguration.MaxRequestBodySizeInKb 80
17651769
Assert-AreEqual $appgw.WebApplicationFirewallConfiguration.FileUploadLimitInMb 70
17661770
Assert-AreEqual $appgw.WebApplicationFirewallConfiguration.Exclusions.Count 2
1767-
1771+
1772+
# Disabled until Firewall Policy cmdlets are updated
17681773
# Second check firewll policy
1769-
Assert-AreEqual $policy.Id $appgw.FirewallPolicy.Id
1774+
<#Assert-AreEqual $policy.Id $appgw.FirewallPolicy.Id
17701775
Assert-AreEqual $policy.CustomRules[0].Name $rule.Name
17711776
Assert-AreEqual $policy.CustomRules[0].RuleType $rule.RuleType
17721777
Assert-AreEqual $policy.CustomRules[0].Action $rule.Action
@@ -1776,7 +1781,7 @@ function Test-ApplicationGatewayCRUDSubItems2
17761781
Assert-AreEqual $policy.CustomRules[0].MatchConditions[0].NegationConditon $rule.MatchConditions[0].NegationConditon
17771782
Assert-AreEqual $policy.CustomRules[0].MatchConditions[0].MatchValues[0] $rule.MatchConditions[0].MatchValues[0]
17781783
Assert-AreEqual $policy.CustomRules[0].MatchConditions[0].MatchVariables[0].VariableName $rule.MatchConditions[0].MatchVariables[0].VariableName
1779-
Assert-AreEqual $policy.CustomRules[0].MatchConditions[0].MatchVariables[0].Selector $rule.MatchConditions[0].MatchVariables[0].Selector
1784+
Assert-AreEqual $policy.CustomRules[0].MatchConditions[0].MatchVariables[0].Selector $rule.MatchConditions[0].MatchVariables[0].Selector#>
17801785

17811786
# Set non-exiting
17821787
Assert-ThrowsLike { Set-AzApplicationGatewayHttpListenerCustomError -HttpListener $listener01 -StatusCode HttpStatus408 -CustomErrorPageUrl $customError403Url02 } "*does not exist*"

src/Network/Network.Test/ScenarioTests/NetworkWatcherAPITests.ps1

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,20 @@ function Get-NrpResourceGroupName
108108
Get-ResourceGroupName "psnrp";
109109
}
110110

111+
function Wait-Vm($vm)
112+
{
113+
# Don't wait more than N minutes to avoid getting stuck in a loop if VM can't recover
114+
$minutes = 30;
115+
while((Get-AzVM -ResourceGroupName $vm.ResourceGroupName -Name $vm.Name).ProvisioningState -ne "Succeeded")
116+
{
117+
Start-TestSleep 60;
118+
if(--$minutes -eq 0)
119+
{
120+
break;
121+
}
122+
}
123+
}
124+
111125
<#
112126
.SYNOPSIS
113127
Get existing Network Watcher.
@@ -1006,27 +1020,33 @@ function Test-ConnectionMonitor
10061020

10071021
#Remove connection monitor
10081022
Remove-AzNetworkWatcherConnectionMonitor -NetworkWatcher $nw -Name $cmName1
1023+
Wait-Vm $vm
10091024

10101025
#Create connection monitor
10111026
$job1 = New-AzNetworkWatcherConnectionMonitor -Location $locationMod -Name $cmName1 -SourceResourceId $vm.Id -DestinationAddress bing.com -DestinationPort 80 -ConfigureOnly -MonitoringIntervalInSeconds 30 -AsJob
10121027
$job1 | Wait-Job
1013-
###
10141028
$cm1 = $job1 | Receive-Job
1029+
10151030
Remove-AzNetworkWatcherConnectionMonitor -Location $locationMod -Name $cmName1
1031+
Wait-Vm $vm
10161032

1033+
#Create connection monitor
10171034
$job1 = New-AzNetworkWatcherConnectionMonitor -ResourceGroup $nw.ResourceGroupName -NetworkWatcherName $nw.Name -Name $cmName1 -SourceResourceId $vm.Id -DestinationAddress bing.com -DestinationPort 80 -ConfigureOnly -MonitoringIntervalInSeconds 30 -AsJob
10181035
$job1 | Wait-Job
10191036
$cm1 = $job1 | Receive-Job
10201037

10211038
Remove-AzNetworkWatcherConnectionMonitor -ResourceId $cm1.Id
1039+
Wait-Vm $vm
10221040

1041+
#Create connection monitor
10231042
$job1 = New-AzNetworkWatcherConnectionMonitor -ResourceGroup $nw.ResourceGroupName -NetworkWatcherName $nw.Name -Name $cmName1 -SourceResourceId $vm.Id -DestinationAddress bing.com -DestinationPort 80 -ConfigureOnly -MonitoringIntervalInSeconds 30 -AsJob
10241043
$job1 | Wait-Job
10251044
$cm1 = $job1 | Receive-Job
10261045

10271046
$rmJob = Remove-AzNetworkWatcherConnectionMonitor -InputObject $cm1 -AsJob -PassThru
10281047
$rmJob | Wait-Job
10291048
$result = $rmJob | Receive-Job
1049+
Wait-Vm $vm
10301050

10311051
Assert-ThrowsLike { Set-AzNetworkWatcherConnectionMonitor -NetworkWatcher $nw -Name "fakeName" -SourceResourceId $vm.Id -DestinationAddress test.com -DestinationPort 80 -MonitoringIntervalInSeconds 42 } "*not*found*"
10321052

src/Network/Network.Test/SessionRecords/Commands.Network.Test.ScenarioTests.ApplicationGatewayTests/TestApplicationGatewayCRUD.json

Lines changed: 3182 additions & 3567 deletions
Large diffs are not rendered by default.

src/Network/Network.Test/SessionRecords/Commands.Network.Test.ScenarioTests.ApplicationGatewayTests/TestApplicationGatewayCRUD2.json

Lines changed: 6011 additions & 4087 deletions
Large diffs are not rendered by default.

src/Network/Network.Test/SessionRecords/Commands.Network.Test.ScenarioTests.ApplicationGatewayTests/TestApplicationGatewayCRUD3.json

Lines changed: 2239 additions & 3519 deletions
Large diffs are not rendered by default.

src/Network/Network.Test/SessionRecords/Commands.Network.Test.ScenarioTests.ApplicationGatewayTests/TestApplicationGatewayCRUDRewriteRuleSet.json

Lines changed: 2173 additions & 3773 deletions
Large diffs are not rendered by default.

src/Network/Network.Test/SessionRecords/Commands.Network.Test.ScenarioTests.ApplicationGatewayTests/TestApplicationGatewayCRUDRewriteRuleSetWithConditions.json

Lines changed: 2246 additions & 4038 deletions
Large diffs are not rendered by default.

src/Network/Network.Test/SessionRecords/Commands.Network.Test.ScenarioTests.ApplicationGatewayTests/TestApplicationGatewayCRUDSubItems.json

Lines changed: 4587 additions & 9797 deletions
Large diffs are not rendered by default.

src/Network/Network.Test/SessionRecords/Commands.Network.Test.ScenarioTests.ApplicationGatewayTests/TestApplicationGatewayCRUDSubItems2.json

Lines changed: 2529 additions & 4771 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)