Skip to content

Commit 19ce81c

Browse files
authored
Merge branch 'network-may' into master
2 parents ecaa7d9 + 01aaef4 commit 19ce81c

File tree

104 files changed

+388397
-208004
lines changed

Some content is hidden

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

104 files changed

+388397
-208004
lines changed

src/GuestConfiguration/GuestConfiguration/Az.GuestConfiguration.psd1

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
#
2-
# Module manifest for module 'PSGet_Az.GuestConfiguration'
2+
# Module manifest for module 'Az.GuestConfiguration'
33
#
44
# Generated by: Microsoft Corporation
55
#
6-
# Generated on: 3/18/2019
6+
# Generated on: 7/9/2019
77
#
88

99
@{
@@ -12,7 +12,7 @@
1212
# RootModule = ''
1313

1414
# Version number of this module.
15-
ModuleVersion = '0.10.5'
15+
ModuleVersion = '0.10.6'
1616

1717
# Supported PSEditions
1818
CompatiblePSEditions = 'Core', 'Desktop'
@@ -107,12 +107,13 @@ PrivateData = @{
107107
# IconUri = ''
108108

109109
# ReleaseNotes of this module
110-
ReleaseNotes = '- Fixed cmdlets failure when a subscription has an incorrect format initiative definition for GuestConfiguration category.'
110+
ReleaseNotes = '* Fixed the inconsistency of compliance status reporting when Policy is non-compliant due to parameter updates scenario.
111+
* Quering data from PolicyInsights RP to get the updated compliance status. '
111112

112113
# Prerelease string of this module
113114
# Prerelease = ''
114115

115-
# Flag to indicate whether the module requires explicit user acceptance for install/update
116+
# Flag to indicate whether the module requires explicit user acceptance for install/update/save
116117
# RequireLicenseAcceptance = $false
117118

118119
# External dependent modules of this module

src/GuestConfiguration/GuestConfiguration/ChangeLog.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,10 @@
1818
- Additional information about change #1
1919
-->
2020
## Upcoming Release
21-
* Fixed the inconsistency of compliance status reporting when Policy is non-compliant due to parameter updates scenario.
22-
* Quering data from PolicyInsights RP to get the updated compliance status.
21+
22+
## Version 0.10.6
23+
* Fixed the inconsistency of compliance status reporting when Policy is non-compliant due to parameter updates scenario.
24+
* Quering data from PolicyInsights RP to get the updated compliance status.
2325

2426
## Version 0.10.5
2527
- Fixed cmdlets failure when a subscription has an incorrect format initiative definition for GuestConfiguration category.

src/GuestConfiguration/GuestConfiguration/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,5 @@
2525
[assembly: CLSCompliant(false)]
2626
[assembly: Guid("d28548d3-2673-4508-a28b-a69e0470faf7")]
2727

28-
[assembly: AssemblyVersion("0.10.5")]
29-
[assembly: AssemblyFileVersion("0.10.5")]
28+
[assembly: AssemblyVersion("0.10.6")]
29+
[assembly: AssemblyFileVersion("0.10.6")]

src/Network/Network.Test/ScenarioTests/AvailablePrivateEndpointTypeTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public AvailablePrivateEndpointTypeTests(Xunit.Abstractions.ITestOutputHelper ou
2727

2828
[Fact(Skip = "TODO: record")]
2929
[Trait(Category.AcceptanceType, Category.CheckIn)]
30-
[Trait(Category.Owner, NrpTeamAlias.wanrpdev)]
30+
[Trait(Category.Owner, NrpTeamAlias.sdnnrp)]
3131
public void TestAvailablePrivateEndpointTypeCRUD()
3232
{
3333
TestRunner.RunTestScript("Test-AvailablePrivateEndpointTypeCRUD");

src/Network/Network.Test/ScenarioTests/NetworkCloudExceptionTests.ps1

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ function Test-NotFound
3030
New-AzResourceGroup -Name $rgName -Location $location
3131

3232
# Get PublicIpAddress that doesn't exist
33-
Assert-ThrowsLike { $ip = Get-AzPublicIpAddress -ResourceGroupName $rgName -Name $resourceName } "*was not found.*StatusCode:*404*ReasonPhrase:*Not Found*OperationID :*";
33+
Assert-ThrowsLike { $ip = Get-AzPublicIpAddress -ResourceGroupName $rgName -Name $resourceName } "*was not found.*";
3434
}
3535
finally
3636
{
@@ -57,7 +57,7 @@ function Test-InvalidName
5757
# Create the resource group
5858
New-AzResourceGroup -Name $rgName -Location $location
5959

60-
Assert-ThrowsLike { $ip = New-AzPublicIpAddress -ResourceGroupName $rgName -Name $resourceInvalidName -Location $location -AllocationMethod Dynamic } "*Resource name ! is invalid.*StatusCode: 400*ReasonPhrase: Bad Request*OperationID :*";
60+
Assert-ThrowsLike { $ip = New-AzPublicIpAddress -ResourceGroupName $rgName -Name $resourceInvalidName -Location $location -AllocationMethod Dynamic } "*Resource name ! is invalid.*";
6161
}
6262
finally
6363
{
@@ -89,7 +89,7 @@ function Test-DuplicateResource
8989
$subnet = New-AzVirtualNetworkSubnetConfig -Name $resourceName -AddressPrefix $subnetAddressPrefix
9090
$vnet = New-AzVirtualNetwork -ResourceGroupName $rgName -Name $resourceName -Location $location -AddressPrefix $vnetAddressPrefix -Subnet $subnet
9191
$vnet.Subnets.Add($subnet);
92-
Assert-ThrowsLike { Set-AzVirtualNetwork -VirtualNetwork $vnet } "*Cannot parse the request.*StatusCode: 400*ReasonPhrase: Bad Request*OperationID*";
92+
Assert-ThrowsLike { Set-AzVirtualNetwork -VirtualNetwork $vnet } "*Cannot parse the request.*";
9393
}
9494
finally
9595
{
@@ -121,7 +121,7 @@ function Test-IntersectAddressSpace
121121
$subnet = New-AzVirtualNetworkSubnetConfig -Name $resourceName -AddressPrefix $subnetAddressPrefix
122122
$vnet = New-AzVirtualNetwork -ResourceGroupName $rgName -Name $resourceName -Location $location -AddressPrefix $vnetAddressPrefix -Subnet $subnet
123123
Add-AzVirtualNetworkSubnetConfig -Name "${resourceName}2" -AddressPrefix $subnetAddressPrefix -VirtualNetwork $vnet
124-
Assert-ThrowsLike { Set-AzVirtualNetwork -VirtualNetwork $vnet } "*Subnet*is not valid in virtual network*StatusCode: 400*ReasonPhrase: Bad Request*OperationID*";
124+
Assert-ThrowsLike { Set-AzVirtualNetwork -VirtualNetwork $vnet } "*Subnet*is not valid in virtual network*";
125125
}
126126
finally
127127
{

src/Network/Network.Test/ScenarioTests/NetworkSecurityGroupTests.ps1

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -275,10 +275,11 @@ function Test-NetworkSecurityGroup-MultiValuedRules
275275

276276
# Create SecurityRule
277277
$securityRule1 = New-AzNetworkSecurityRuleConfig -Name $securityRule1Name -Description "desciption" -Protocol Tcp -SourcePortRange 23-45,80-90 -DestinationPortRange 46-56,70-80 -SourceAddressPrefix 10.10.20.0/24,192.168.0.0/24 -DestinationAddressPrefix 10.10.30.0/24,192.168.2.0/24 -Access Allow -Priority 123 -Direction Inbound
278-
$securityRule2 = New-AzNetworkSecurityRuleConfig -Name $securityRule2Name -Description "desciption" -Protocol Tcp -SourcePortRange 10-20,30-40 -DestinationPortRange 10-20,30-40 -SourceAddressPrefix Storage -DestinationAddressPrefix Storage -Access Allow -Priority 120 -Direction Inbound
278+
$securityRule2 = New-AzNetworkSecurityRuleConfig -Name $securityRule2Name -Description "desciption" -Protocol Tcp -SourcePortRange 10-20,30-40 -DestinationPortRange 10-20,30-40 -SourceAddressPrefix Storage -DestinationAddressPrefix Storage -Access Allow -Priority 120 -Direction Inbound
279+
$securityRule3 = New-AzNetworkSecurityRuleConfig -Name $securityRule3Name -Description "desciption" -Protocol Icmp -SourcePortRange 50-60,100-110 -DestinationPortRange 120-130,131-140 -SourceAddressPrefix Storage -DestinationAddressPrefix Storage -Access Allow -Priority 125 -Direction Inbound
279280

280281
# Create NetworkSecurityGroup
281-
$nsg = New-AzNetworkSecurityGroup -name $nsgName -ResourceGroupName $rgname -Location $location -SecurityRules $securityRule1,$securityRule2
282+
$nsg = New-AzNetworkSecurityGroup -name $nsgName -ResourceGroupName $rgname -Location $location -SecurityRules $securityRule1,$securityRule2,$securityRule3
282283

283284
# Get NetworkSecurityGroup
284285
$getNsg = Get-AzNetworkSecurityGroup -name $nsgName -ResourceGroupName $rgName
@@ -288,7 +289,7 @@ function Test-NetworkSecurityGroup-MultiValuedRules
288289
Assert-AreEqual $nsgName $getNsg.Name
289290
Assert-NotNull $getNsg.Location
290291
Assert-NotNull $getNsg.Etag
291-
Assert-AreEqual 2 @($getNsg.SecurityRules).Count
292+
Assert-AreEqual 3 @($getNsg.SecurityRules).Count
292293
Assert-AreEqual 6 @($getNsg.DefaultSecurityRules).Count
293294
Assert-AreEqual "AllowVnetInBound" $getNsg.DefaultSecurityRules[0].Name
294295
Assert-AreEqual "AllowAzureLoadBalancerInBound" $getNsg.DefaultSecurityRules[1].Name
@@ -335,6 +336,23 @@ function Test-NetworkSecurityGroup-MultiValuedRules
335336
Assert-AreEqual "120" $getNsg.SecurityRules[1].Priority
336337
Assert-AreEqual "Inbound" $getNsg.SecurityRules[1].Direction
337338

339+
# verify rule 3
340+
Assert-AreEqual "desciption" $getNsg.SecurityRules[2].Description
341+
Assert-AreEqual "Icmp" $getNsg.SecurityRules[2].Protocol
342+
Assert-AreEqual 2 @($getNsg.SecurityRules[2].SourcePortRange).Count
343+
Assert-AreEqual "50-60" $getNsg.SecurityRules[2].SourcePortRange[0]
344+
Assert-AreEqual "100-110" $getNsg.SecurityRules[2].SourcePortRange[1]
345+
Assert-AreEqual 2 @($getNsg.SecurityRules[2].DestinationPortRange).Count
346+
Assert-AreEqual "120-130" $getNsg.SecurityRules[2].DestinationPortRange[0]
347+
Assert-AreEqual "131-140" $getNsg.SecurityRules[2].DestinationPortRange[1]
348+
Assert-AreEqual 1 @($getNsg.SecurityRules[2].SourceAddressPrefix).Count
349+
Assert-AreEqual "Storage" $getNsg.SecurityRules[2].SourceAddressPrefix[0]
350+
Assert-AreEqual 1 @($getNsg.SecurityRules[2].DestinationAddressPrefix).Count
351+
Assert-AreEqual "Storage" $getNsg.SecurityRules[2].DestinationAddressPrefix[0]
352+
Assert-AreEqual "Allow" $getNsg.SecurityRules[2].Access
353+
Assert-AreEqual "125" $getNsg.SecurityRules[2].Priority
354+
Assert-AreEqual "Inbound" $getNsg.SecurityRules[2].Direction
355+
338356
# list
339357
$list = Get-AzNetworkSecurityGroup -ResourceGroupName $rgname
340358
Assert-AreEqual 1 @($list).Count

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -505,7 +505,8 @@ function Test-PacketCapture
505505
Assert-AreEqual $pc1.Filters[0].RemoteIPAddress 127.0.0.1-127.0.0.255
506506
Assert-AreEqual $pc1.Filters[1].LocalIPAddress 127.0.0.1;127.0.0.5
507507
Assert-AreEqual $pc1.StorageLocation.FilePath C:\tmp\Capture.cap
508-
Assert-AreEqual $pcList.Count 2
508+
509+
$currentCount = $pcList.Count;
509510

510511
#Stop packet capture
511512
$job = Stop-AzNetworkWatcherPacketCapture -NetworkWatcher $nw -PacketCaptureName $pcName1 -AsJob
@@ -520,7 +521,7 @@ function Test-PacketCapture
520521

521522
#List packet captures
522523
$pcList = Get-AzNetworkWatcherPacketCapture -NetworkWatcher $nw
523-
Assert-AreEqual $pcList.Count 1
524+
Assert-AreEqual $pcList.Count ($currentCount - 1)
524525

525526
#Remove packet capture
526527
Remove-AzNetworkWatcherPacketCapture -NetworkWatcher $nw -PacketCaptureName $pcName2

src/Network/Network.Test/ScenarioTests/VirtualNetworkTests.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ function Test-subnetDelegationCRUD
223223
$resourceGroup = New-AzResourceGroup -Name $rgname -Location $rglocation -Tags @{ testtag = "testval" }
224224

225225
# Create a delegation
226-
$delegation = New-AzDelegation -Name "sqlDelegation" -ServiceName "Microsoft.Sql/servers"
226+
$delegation = New-AzDelegation -Name "sqlDelegation" -ServiceName "Microsoft.Sql/managedInstances"
227227

228228
# Create the Virtual Network
229229
$subnet = New-AzVirtualNetworkSubnetConfig -Name $subnetName -AddressPrefix 10.0.1.0/24 -delegation $delegation
@@ -253,7 +253,7 @@ function Test-subnetDelegationCRUD
253253
$vnetExpected = Get-AzvirtualNetwork -Name $vnetName -ResourceGroupName $rgname
254254
Assert-AreEqual 2 @($vnetExpected.Subnets).Count
255255
Assert-AreEqual 1 @($vnetExpected.Subnets[0].Delegations).Count
256-
Assert-AreEqual "Microsoft.Sql/servers" $vnetExpected.Subnets[0].Delegations[0].ServiceName
256+
Assert-AreEqual "Microsoft.Sql/managedInstances" $vnetExpected.Subnets[0].Delegations[0].ServiceName
257257
Assert-AreEqual 1 @($vnetExpected.Subnets[1].Delegations).Count
258258
Assert-AreEqual "Microsoft.Netapp/volumes" $vnetExpected.Subnets[1].Delegations[0].ServiceName
259259

src/Network/Network.Test/SessionRecords/Commands.Network.Test.ScenarioTests.NetworkCloudExceptionTests/TestDuplicateResource.json

Lines changed: 343 additions & 271 deletions
Large diffs are not rendered by default.

src/Network/Network.Test/SessionRecords/Commands.Network.Test.ScenarioTests.NetworkCloudExceptionTests/TestIntersectAddressSpace.json

Lines changed: 306 additions & 288 deletions
Large diffs are not rendered by default.

src/Network/Network.Test/SessionRecords/Commands.Network.Test.ScenarioTests.NetworkCloudExceptionTests/TestInvalidName.json

Lines changed: 137 additions & 134 deletions
Large diffs are not rendered by default.

src/Network/Network.Test/SessionRecords/Commands.Network.Test.ScenarioTests.NetworkCloudExceptionTests/TestNotFound.json

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

src/Network/Network.Test/SessionRecords/Commands.Network.Test.ScenarioTests.NetworkSecurityGroupTests/TestNetworkSecurityGroupMultiValuedRules.json

Lines changed: 330 additions & 300 deletions
Large diffs are not rendered by default.

src/Network/Network.Test/SessionRecords/Commands.Network.Test.ScenarioTests.NetworkWatcherAPITests/TestPacketCapture.json

Lines changed: 2521 additions & 1811 deletions
Large diffs are not rendered by default.

src/Network/Network.Test/SessionRecords/Commands.Network.Test.ScenarioTests.VirtualNetworkTests/TestVirtualNetworkSubnetDelegationCRUD.json

Lines changed: 778 additions & 697 deletions
Large diffs are not rendered by default.

src/Network/Network/ChangeLog.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@
1818
- Additional information about change #1
1919
--->
2020
## Upcoming Release
21+
* Enable ICMP protocol for network security rule configurations
22+
- Updated cmdlets
23+
- Add-AzNetworkSecurityRuleConfig
24+
- New-AzNetworkSecurityRuleConfig
25+
- Set-AzNetworkSecurityRuleConfig
2126

2227
## Version 1.11.0
2328
* Added `RoutingPreference` to public ip tags

src/Network/Network/NetworkSecurityGroup/NetworkSecurityRule/AzureNetworkSecurityRuleConfigBase.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ public class AzureNetworkSecurityRuleConfigBase : NetworkBaseCmdlet
3939
[ValidateSet(
4040
MNM.SecurityRuleProtocol.Tcp,
4141
MNM.SecurityRuleProtocol.Udp,
42+
MNM.SecurityRuleProtocol.Icmp,
4243
MNM.SecurityRuleProtocol.Asterisk,
4344
IgnoreCase = true)]
4445
[ValidateNotNullOrEmpty]

0 commit comments

Comments
 (0)