Skip to content

Commit ad9ef17

Browse files
authored
Merge pull request #4210 from wastoresh/networkacl-revert
Networkacl code change revert
2 parents fe5a16a + 2713749 commit ad9ef17

File tree

37 files changed

+19
-10533
lines changed

37 files changed

+19
-10533
lines changed

src/ResourceManager/ContainerRegistry/Commands.ContainerRegistry.Test/Commands.ContainerRegistry.Test.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
<Private>True</Private>
6262
</Reference>
6363
<Reference Include="Microsoft.Azure.Management.Storage, Version=6.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
64-
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Storage.6.5.0-preview\lib\net452\Microsoft.Azure.Management.Storage.dll</HintPath>
64+
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Storage.6.4.0-preview\lib\net452\Microsoft.Azure.Management.Storage.dll</HintPath>
6565
</Reference>
6666
<Reference Include="Microsoft.Azure.Test.Framework">
6767
<SpecificVersion>False</SpecificVersion>

src/ResourceManager/ContainerRegistry/Commands.ContainerRegistry.Test/packages.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<package id="Microsoft.Azure.Common.Dependencies" version="1.0.0" targetFramework="net45" />
66
<package id="Microsoft.Azure.Management.ContainerRegistry" version="1.2.0-preview" targetFramework="net45" />
77
<package id="Microsoft.Azure.Management.ResourceManager" version="1.6.0-preview" targetFramework="net452" />
8-
<package id="Microsoft.Azure.Management.Storage" version="6.5.0-preview" targetFramework="net452" />
8+
<package id="Microsoft.Azure.Management.Storage" version="6.4.0-preview" targetFramework="net452" />
99
<package id="Microsoft.Azure.Test.Framework" version="1.0.6179.26854-prerelease" targetFramework="net45" />
1010
<package id="Microsoft.Azure.Test.HttpRecorder" version="1.7.0" targetFramework="net45" />
1111
<package id="Microsoft.Bcl" version="1.1.10" targetFramework="net45" />

src/ResourceManager/ContainerRegistry/Commands.ContainerRegistry/Commands.ContainerRegistry.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@
6969
<Private>True</Private>
7070
</Reference>
7171
<Reference Include="Microsoft.Azure.Management.Storage, Version=6.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
72-
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Storage.6.5.0-preview\lib\net452\Microsoft.Azure.Management.Storage.dll</HintPath>
72+
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Storage.6.4.0-preview\lib\net452\Microsoft.Azure.Management.Storage.dll</HintPath>
7373
</Reference>
7474
<Reference Include="Microsoft.Rest.ClientRuntime, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
7575
<HintPath>..\..\..\packages\Microsoft.Rest.ClientRuntime.2.3.8\lib\net452\Microsoft.Rest.ClientRuntime.dll</HintPath>

src/ResourceManager/ContainerRegistry/Commands.ContainerRegistry/packages.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<package id="Microsoft.Azure.Common.Dependencies" version="1.0.0" targetFramework="net45" />
66
<package id="Microsoft.Azure.Management.ContainerRegistry" version="1.2.0-preview" targetFramework="net45" />
77
<package id="Microsoft.Azure.Management.ResourceManager" version="1.6.0-preview" targetFramework="net452" />
8-
<package id="Microsoft.Azure.Management.Storage" version="6.5.0-preview" targetFramework="net452" />
8+
<package id="Microsoft.Azure.Management.Storage" version="6.4.0-preview" targetFramework="net452" />
99
<package id="Microsoft.Bcl" version="1.1.10" targetFramework="net45" />
1010
<package id="Microsoft.Bcl.Async" version="1.0.168" targetFramework="net45" />
1111
<package id="Microsoft.Bcl.Build" version="1.0.21" targetFramework="net45" />

src/ResourceManager/ServiceFabric/Commands.ServiceFabric.Test/Commands.ServiceFabric.Test.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@
9494
<HintPath>..\..\..\packages\Microsoft.Azure.Management.ServiceFabric.1.0.0-preview\lib\net45\Microsoft.Azure.Management.ServiceFabric.dll</HintPath>
9595
</Reference>
9696
<Reference Include="Microsoft.Azure.Management.Storage, Version=6.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
97-
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Storage.6.5.0-preview\lib\net452\Microsoft.Azure.Management.Storage.dll</HintPath>
97+
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Storage.6.4.0-preview\lib\net452\Microsoft.Azure.Management.Storage.dll</HintPath>
9898
</Reference>
9999
<Reference Include="Microsoft.CSharp" />
100100
<Reference Include="Microsoft.Data.Edm">

src/ResourceManager/ServiceFabric/Commands.ServiceFabric.Test/packages.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<package id="Microsoft.Azure.Management.KeyVault" version="2.3.0-preview" targetFramework="net452" />
1111
<package id="Microsoft.Azure.Management.Resources" version="2.20.0-preview" targetFramework="net45" />
1212
<package id="Microsoft.Azure.Management.ServiceFabric" version="1.0.0-preview" targetFramework="net45" />
13-
<package id="Microsoft.Azure.Management.Storage" version="6.5.0-preview" targetFramework="net452" />
13+
<package id="Microsoft.Azure.Management.Storage" version="6.4.0-preview" targetFramework="net452" />
1414
<package id="Microsoft.Azure.Test.Framework" version="1.0.6179.26854-prerelease" targetFramework="net45" />
1515
<package id="Microsoft.Azure.Test.HttpRecorder" version="1.6.7-preview" targetFramework="net45" />
1616
<package id="Microsoft.Bcl" version="1.1.10" targetFramework="net45" />

src/ResourceManager/ServiceFabric/Commands.ServiceFabric/Commands.ServiceFabric.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@
183183
<HintPath>..\..\..\packages\Microsoft.Azure.Management.ServiceFabric.1.0.0-preview\lib\net45\Microsoft.Azure.Management.ServiceFabric.dll</HintPath>
184184
</Reference>
185185
<Reference Include="Microsoft.Azure.Management.Storage, Version=6.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
186-
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Storage.6.5.0-preview\lib\net452\Microsoft.Azure.Management.Storage.dll</HintPath>
186+
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Storage.6.4.0-preview\lib\net452\Microsoft.Azure.Management.Storage.dll</HintPath>
187187
</Reference>
188188
<Reference Include="Microsoft.Azure.ResourceManager, Version=2.0.0.0">
189189
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Resources.2.20.0-preview\lib\net40\Microsoft.Azure.ResourceManager.dll</HintPath>

src/ResourceManager/ServiceFabric/Commands.ServiceFabric/packages.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<package id="Microsoft.Azure.Management.ResourceManager" version="1.6.0-preview" targetFramework="net452" />
1515
<package id="Microsoft.Azure.Management.Resources" version="2.20.0-preview" targetFramework="net45" />
1616
<package id="Microsoft.Azure.Management.ServiceFabric" version="1.0.0-preview" targetFramework="net45" />
17-
<package id="Microsoft.Azure.Management.Storage" version="6.5.0-preview" targetFramework="net452" />
17+
<package id="Microsoft.Azure.Management.Storage" version="6.4.0-preview" targetFramework="net452" />
1818
<package id="Microsoft.Bcl" version="1.1.10" targetFramework="net45" />
1919
<package id="Microsoft.Bcl.Async" version="1.0.168" targetFramework="net45" />
2020
<package id="Microsoft.Bcl.Build" version="1.0.21" targetFramework="net45" />

src/ResourceManager/Storage/AzureRM.Storage.psd1

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -78,11 +78,7 @@ CmdletsToExport = 'Get-AzureRmStorageAccount', 'Get-AzureRmStorageAccountKey',
7878
'Remove-AzureRmStorageAccount', 'Set-AzureRmCurrentStorageAccount',
7979
'Set-AzureRmStorageAccount',
8080
'Get-AzureRmStorageAccountNameAvailability',
81-
'Get-AzureRmStorageUsage',
82-
'Update-AzureRmStorageAccountNetworkACL',
83-
'Get-AzureRmStorageAccountNetworkACL',
84-
'Add-AzureRmStorageAccountNetworkACLRule',
85-
'Remove-AzureRmStorageAccountNetworkACLRule'
81+
'Get-AzureRmStorageUsage'
8682

8783
# Variables to export from this module
8884
# VariablesToExport = @()

src/ResourceManager/Storage/ChangeLog.md

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,6 @@
1818
- Additional information about change #1
1919
-->
2020
## Current Release
21-
* Add NeworkAcls support to resource mode storage account cmdlets
22-
- New-AzureRmStorageAccount
23-
- Set-AzureRmStorageAccount
24-
- Get-AzureStorageAccountNetworkACL
25-
- Update-AzureStorageAccountNetworkACL
26-
- Add-AzureStorageAccountNetworkACLRule
27-
- Remove-AzureStorageAccountNetworkACLRule
2821

2922
## Version 3.1.0
3023
* Add AssignIdentity setting support to resource mode storage account cmdlets

src/ResourceManager/Storage/Commands.Management.Storage.Test/Commands.Management.Storage.Test.csproj

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Authorization.2.0.0\lib\net40\Microsoft.Azure.Management.Authorization.dll</HintPath>
5353
</Reference>
5454
<Reference Include="Microsoft.Azure.Management.Storage, Version=6.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
55-
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Storage.6.5.0-preview\lib\net452\Microsoft.Azure.Management.Storage.dll</HintPath>
55+
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Storage.6.4.0-preview\lib\net452\Microsoft.Azure.Management.Storage.dll</HintPath>
5656
</Reference>
5757
<Reference Include="Microsoft.Azure.ResourceManager, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
5858
<SpecificVersion>False</SpecificVersion>
@@ -170,9 +170,6 @@
170170
<None Include="SessionRecords\Microsoft.Azure.Commands.Management.Storage.Test.ScenarioTests.StorageAccountTests\TestGetAzureStorageAccountKey.json">
171171
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
172172
</None>
173-
<None Include="SessionRecords\Microsoft.Azure.Commands.Management.Storage.Test.ScenarioTests.StorageAccountTests\TestNetworkAcl.json" >
174-
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
175-
</None>
176173
<None Include="SessionRecords\Microsoft.Azure.Commands.Management.Storage.Test.ScenarioTests.StorageAccountTests\TestNewAzureStorageAccount.json">
177174
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
178175
</None>

src/ResourceManager/Storage/Commands.Management.Storage.Test/ScenarioTests/Common.ps1

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -147,13 +147,4 @@ Gets the default location for a provider
147147
function Get-ProviderLocation($provider)
148148
{
149149
"westus"
150-
}
151-
152-
<#
153-
.SYNOPSIS
154-
Gets the Canary location for a provider
155-
#>
156-
function Get-ProviderLocation_Canary($provider)
157-
{
158-
"eastus2euap"
159150
}

src/ResourceManager/Storage/Commands.Management.Storage.Test/ScenarioTests/StorageAccountTests.cs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -105,12 +105,5 @@ public void TestSetAzureRmStorageAccountKeySource()
105105
TestController.NewInstance.RunPsTest("Test-SetAzureRmStorageAccountKeySource");
106106
}
107107

108-
[Fact]
109-
[Trait(Category.AcceptanceType, Category.CheckIn)]
110-
public void TestNetworkAcl()
111-
{
112-
TestController.NewInstance.RunPsTest("Test-NetworkAcl");
113-
}
114-
115108
}
116109
}

src/ResourceManager/Storage/Commands.Management.Storage.Test/ScenarioTests/StorageAccountTests.ps1

Lines changed: 0 additions & 93 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,6 @@ function Test-GetAzureStorageAccount
159159
$kind = 'Storage'
160160

161161
New-AzureRmResourceGroup -Name $rgname -Location $loc;
162-
Write-Output ("Resource Group created")
163162

164163
New-AzureRmStorageAccount -ResourceGroupName $rgname -Name $stoname -Location $loc -Type $stotype ;
165164

@@ -502,95 +501,3 @@ function Test-SetAzureRmCurrentStorageAccount
502501
Clean-ResourceGroup $rgname
503502
}
504503
}
505-
506-
507-
<#
508-
.SYNOPSIS
509-
Test NetworkAcl
510-
#>
511-
function Test-NetworkAcl
512-
{
513-
# Setup
514-
$rgname = Get-StorageManagementTestResourceName;
515-
516-
try
517-
{
518-
# Test
519-
$stoname = 'sto' + $rgname;
520-
$stotype = 'Standard_LRS';
521-
$loc = Get-ProviderLocation_Canary ResourceManagement;
522-
$ip1 = "20.11.0.0/16";
523-
$ip2 = "10.0.0.0/7";
524-
$ip3 = "11.1.1.0/24";
525-
$ip4 = "28.0.2.0/19";
526-
527-
New-AzureRmResourceGroup -Name $rgname -Location $loc;
528-
529-
New-AzureRmStorageAccount -ResourceGroupName $rgname -Name $stoname -Location $loc -Type $stotype -NetworkAcl (@{bypass="Logging,Metrics,AzureServices";
530-
ipRules=(@{IPAddressOrRange="$ip1";Action="allow"},
531-
@{IPAddressOrRange="$ip2";Action="allow"});
532-
defaultAction="Deny"})
533-
534-
$stoacl = (Get-AzureRmStorageAccount -ResourceGroupName $rgname -Name $stoname).NetworkAcls
535-
Assert-AreEqual $stoacl.Bypass 7;
536-
Assert-AreEqual $stoacl.DefaultAction Deny;
537-
Assert-AreEqual $stoacl.IpRules.Count 2
538-
Assert-AreEqual $stoacl.IpRules[0].IPAddressOrRange $ip1;
539-
Assert-AreEqual $stoacl.IpRules[1].IPAddressOrRange $ip2;
540-
Assert-AreEqual $stoacl.VirtualNetworkRules $null
541-
542-
Update-AzureRmStorageAccountNetworkACL -verbose -ResourceGroupName $rgname -Name $stoname -Bypass AzureServices,Metrics -DefaultAction Allow -IpRule (@{IPAddressOrRange="$ip3";Action="allow"},@{IPAddressOrRange="$ip4";Action="allow"})
543-
$stoacl = Get-AzureRmStorageAccountNetworkACL -ResourceGroupName $rgname -Name $stoname
544-
$stoacliprule = $stoacl.IpRules
545-
Assert-AreEqual $stoacl.Bypass 6;
546-
Assert-AreEqual $stoacl.DefaultAction Allow;
547-
Assert-AreEqual $stoacl.IpRules.Count 2
548-
Assert-AreEqual $stoacl.IpRules[0].IPAddressOrRange $ip3;
549-
Assert-AreEqual $stoacl.IpRules[1].IPAddressOrRange $ip4;
550-
Assert-AreEqual $stoacl.VirtualNetworkRules $null
551-
552-
Remove-AzureRmStorageAccountNetworkACLRule -ResourceGroupName $rgname -Name $stoname -IPAddressOrRange "$ip3"
553-
$stoacl = Get-AzureRmStorageAccountNetworkACL -ResourceGroupName $rgname -Name $stoname
554-
Assert-AreEqual $stoacl.Bypass 6;
555-
Assert-AreEqual $stoacl.DefaultAction Allow;
556-
Assert-AreEqual $stoacl.IpRules.Count 1
557-
Assert-AreEqual $stoacl.IpRules[0].IPAddressOrRange $ip4;
558-
Assert-AreEqual $stoacl.VirtualNetworkRules $null
559-
560-
Update-AzureRmStorageAccountNetworkACL -ResourceGroupName $rgname -Name $stoname -IpRule @() -DefaultAction Deny -Bypass None
561-
$stoacl = Get-AzureRmStorageAccountNetworkACL -ResourceGroupName $rgname -Name $stoname
562-
Assert-AreEqual $stoacl.Bypass 0;
563-
Assert-AreEqual $stoacl.DefaultAction Deny;
564-
Assert-AreEqual $stoacl.IpRules $null
565-
Assert-AreEqual $stoacl.VirtualNetworkRules $null
566-
567-
$stoacliprule | Add-AzureRmStorageAccountNetworkACLRule -ResourceGroupName $rgname -Name $stoname
568-
$stoacl = Get-AzureRmStorageAccountNetworkACL -ResourceGroupName $rgname -Name $stoname
569-
Assert-AreEqual $stoacl.Bypass 0;
570-
Assert-AreEqual $stoacl.DefaultAction Deny;
571-
Assert-AreEqual $stoacl.IpRules.Count 2
572-
Assert-AreEqual $stoacl.IpRules[0].IPAddressOrRange $ip3;
573-
Assert-AreEqual $stoacl.IpRules[1].IPAddressOrRange $ip4;
574-
Assert-AreEqual $stoacl.VirtualNetworkRules $null
575-
576-
Set-AzureRmStorageAccount -ResourceGroupName $rgname -Name $stoname -NetworkAcl (@{bypass="AzureServices";
577-
ipRules=(@{IPAddressOrRange="$ip1";Action="allow"},
578-
@{IPAddressOrRange="$ip2";Action="allow"});
579-
defaultAction="Allow"})
580-
581-
$stoacl = Get-AzureRmStorageAccountNetworkACL -ResourceGroupName $rgname -Name $stoname
582-
Assert-AreEqual $stoacl.Bypass 4;
583-
Assert-AreEqual $stoacl.DefaultAction Allow;
584-
Assert-AreEqual $stoacl.IpRules.Count 2
585-
Assert-AreEqual $stoacl.IpRules[0].IPAddressOrRange $ip1;
586-
Assert-AreEqual $stoacl.IpRules[1].IPAddressOrRange $ip2;
587-
Assert-AreEqual $stoacl.VirtualNetworkRules $null
588-
589-
Remove-AzureRmStorageAccount -Force -ResourceGroupName $rgname -Name $stoname;
590-
}
591-
finally
592-
{
593-
# Cleanup
594-
Clean-ResourceGroup $rgname
595-
}
596-
}

0 commit comments

Comments
 (0)