Skip to content

Commit 71b9c47

Browse files
committed
Merge branch 'preview' of https://github.com/Azure/azure-powershell into remove-xml-help
# Conflicts: # src/ResourceManager/Storage/Commands.Management.Storage/Microsoft.Azure.Commands.Management.Storage.dll-Help.xml # src/ResourceManager/Storage/Commands.Management.Storage/help/New-AzureRmStorageAccount.md # src/ResourceManager/Storage/Commands.Management.Storage/help/Set-AzureRmStorageAccount.md
2 parents d90a7f4 + f9a7854 commit 71b9c47

File tree

23 files changed

+1188
-6501
lines changed

23 files changed

+1188
-6501
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,3 +203,4 @@ FakesAssemblies/
203203
/tools/*.dll
204204
*.GhostDoc.xml
205205
pingme.txt
206+
groupMapping*.json

appveyor.yml

Lines changed: 15 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -2,61 +2,29 @@ branches:
22
only:
33
- master
44
environment:
5+
nodejs_version: "6"
56
github_access_token:
67
secure: VMFbecLLHzDq/09YDPbcM0VDDSwwgY57vr5GXK6cZZ4Ti/Xs5RZoylzV8MMr1350
78

8-
build_script:
9-
- ps: |
10-
$ErrorActionPreference = "Stop"
11-
$response = Invoke-WebRequest ("https://api.github.com/repos/" + $env:APPVEYOR_REPO_NAME + "/releases/latest") -Timeout 10
12-
if($response -ne $null -and $response.StatusCode -ne 200)
13-
{
14-
$host.SetShouldExit(1)
15-
}
16-
17-
$unzip_path = "C:\projects\release"
18-
$unzip_file = $unzip_path + "zip"
19-
Invoke-WebRequest ($response.Content | ConvertFrom-Json).zipball_url -OutFile $unzip_file
20-
7z x $unzip_file -o"$unzip_path"
21-
$src = Join-Path (ls $unzip_path -dir | select -First 1 | % { $_.FullName }) "src"
22-
$global:output = Join-Path $unzip_path "output"
23-
ni $global:output -type dir
24-
$pattern = "\d(.\d)*"
25-
26-
foreach($folder in (ls $src -dir))
27-
{
28-
foreach($module in (ls $folder.FullName -dir | % { $_.FullName }))
29-
{
30-
# find out docs in help folder and version in .psd1 file
31-
$help = ls $module -dir -Recurse | ? { $_.Name -eq "help" } | select -First 1 | % { $_.FullName }
32-
if($help -eq $null)
33-
{
34-
continue
35-
}
36-
$psd1= ls $module | ? { $_.extension -eq ".psd1" } | select -First 1 | % { $_.FullName }
37-
if($psd1 -eq $null)
38-
{
39-
continue
40-
}
41-
if((gc $psd1 | Out-String) -notmatch "ModuleVersion\s*=\s*'$pattern'")
42-
{
43-
continue
44-
}
45-
if($matches[0] -match $pattern)
46-
{
47-
robocopy $help "*.md" (Join-Path $global:output $folder | Join-Path -ChildPath (gi $psd1).BaseName | Join-Path -ChildPath ("v" + $matches[0]))
48-
}
49-
}
50-
}
51-
test: off
52-
shallow_clone: true
53-
on_success:
9+
before_build:
10+
- ps: Install-Product node $env:nodejs_version
5411
- git config --global credential.helper store
5512
- ps: ac "$env:USERPROFILE\.git-credentials" "https://$($env:github_access_token):[email protected]`n"
5613
- git config --global user.email %email%
5714
- git config --global user.name %name%
15+
- git clone -q https://github.com/MicrosoftDocs/azure-psdocs-ciscripts azpsci
16+
- cd azpsci
17+
- npm install
18+
- npm install typescript
19+
- node ./node_modules/typescript/bin/tsc
20+
- cd ..
21+
build_script:
22+
- node azpsci/out/ci0.js src c:\projects\_output
23+
24+
test: off
25+
on_success:
5826
- git clone -q --branch=%target_branch% %content_repo% %TEMP%\Azure
5927
- cd %TEMP%\Azure
60-
- ps: ls $global:output -dir | % { copy $_.FullName (ls -dir | select -First 1) -Recurse -Force }
28+
- ps: ls c:\projects\_output -dir | % { copy $_.FullName (ls -dir | select -First 1) -Recurse -Force }
6129
- git add -A
6230
- git diff --quiet --exit-code --cached || git commit -m "Sync docs from source code repo to content repo." && git push origin %target_branch% && appveyor AddMessage "Content Updated"

build.proj

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,8 @@
176176
<!-- Build all flavors of the Cmdlets -->
177177
<Target Name="Build" DependsOnTargets="RestoreNugetPackages;BuildMsBuildTask">
178178
<Message Importance="high" Text="Building Cmdlets..." />
179+
180+
<Exec ContinueOnError="false" Command="$(PowerShellCommand) -NonInteractive -NoLogo -NoProfile -Command &quot; . $(LibraryToolsFolder)\CreateMappings.ps1 -RootPath $(LibrarySourceFolder) -OutputFile $(PackageDirectory)\groupMapping.json -WarningFile $(PackageDirectory)\groupMappingWarnings.json -RulesFile $(LibraryToolsFolder)\CreateMappings_rules.json &quot;"/>
179181

180182
<MSBuild
181183
Projects="@(CmdletSolutionsToBuild)"
@@ -392,4 +394,4 @@
392394
<Message Importance="high" Text="Running live tests..." />
393395
<CallTarget Targets="LiveTests"/>
394396
</Target>
395-
</Project>
397+
</Project>

src/ResourceManager/Compute/Commands.Compute.Test/SessionRecords/Microsoft.Azure.Commands.Compute.Test.ScenarioTests.AEMExtensionTests/TestAEMExtensionAdvancedWindowsMD.json

Lines changed: 1 addition & 5722 deletions
Large diffs are not rendered by default.

src/ResourceManager/Network/Commands.Network.Test/Commands.Network.Test.csproj

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,9 @@
198198
<None Include="..\..\Common\Commands.ScenarioTests.ResourceManager.Common\AzureRM.Resources.ps1">
199199
<Link>ScenarioTests\AzureRM.Resources.ps1</Link>
200200
</None>
201+
<None Include="..\..\Common\Commands.ScenarioTests.ResourceManager.Common\AzureRM.Storage.ps1">
202+
<Link>ScenarioTests\AzureRM.Storage.ps1</Link>
203+
</None>
201204
<None Include="MSSharedLibKey.snk" />
202205
<None Include="packages.config">
203206
<SubType>Designer</SubType>

src/ResourceManager/Network/Commands.Network.Test/NetworkResourcesController.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ public void RunPsTestWorkflow(
127127
helper.GetRMModulePath("AzureRM.Network.psd1"),
128128
helper.GetRMModulePath("AzureRM.Compute.psd1"),
129129
helper.RMStorageDataPlaneModule,
130-
helper.GetRMModulePath("AzureRM.Storage.psd1"),
130+
"AzureRM.Storage.ps1",
131131
"AzureRM.Resources.ps1");
132132

133133
try

src/ResourceManager/Storage/ChangeLog.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@
1818
- Additional information about change #1
1919
-->
2020
## Current Release
21-
* Get-AzureRmStorageAccountKey: Key list is now enumerated on the pipeline
21+
* Upgrade SRP SDK to 6.3.0
22+
* New/Set-AzureRmStorageAccount:Add a new parameter to support EnableHttpsTrafficOnly
23+
* New/Set/Get-AzureRmStorageAccount: Returned Storage Account contains a new attribute EnableHttpsTrafficOnly
2224
## Version 2.8.0
2325

2426
## Version 2.7.0

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,12 @@
1111
<AppDesignerFolder>Properties</AppDesignerFolder>
1212
<RootNamespace>Microsoft.Azure.Commands.Management.Storage.Test</RootNamespace>
1313
<AssemblyName>Microsoft.Azure.Commands.Management.Storage.Test</AssemblyName>
14-
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
14+
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
1515
<FileAlignment>512</FileAlignment>
1616
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\..\..\</SolutionDir>
1717
<RestorePackages>true</RestorePackages>
1818
<NuGetPackageImportStamp>f747f8a7</NuGetPackageImportStamp>
19+
<TargetFrameworkProfile />
1920
</PropertyGroup>
2021
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
2122
<DebugSymbols>true</DebugSymbols>
@@ -51,7 +52,7 @@
5152
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Authorization.2.0.0\lib\net40\Microsoft.Azure.Management.Authorization.dll</HintPath>
5253
</Reference>
5354
<Reference Include="Microsoft.Azure.Management.Storage, Version=6.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
54-
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Storage.6.1.0-preview\lib\net45\Microsoft.Azure.Management.Storage.dll</HintPath>
55+
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Storage.6.3.0-preview\lib\net452\Microsoft.Azure.Management.Storage.dll</HintPath>
5556
<Private>True</Private>
5657
</Reference>
5758
<Reference Include="Microsoft.Azure.ResourceManager, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
@@ -72,7 +73,7 @@
7273
<HintPath>..\..\..\packages\Microsoft.IdentityModel.Clients.ActiveDirectory.2.28.3\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.WindowsForms.dll</HintPath>
7374
</Reference>
7475
<Reference Include="Microsoft.Rest.ClientRuntime, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
75-
<HintPath>..\..\..\packages\Microsoft.Rest.ClientRuntime.2.3.5\lib\net45\Microsoft.Rest.ClientRuntime.dll</HintPath>
76+
<HintPath>..\..\..\packages\Microsoft.Rest.ClientRuntime.2.3.6\lib\net45\Microsoft.Rest.ClientRuntime.dll</HintPath>
7677
<Private>True</Private>
7778
</Reference>
7879
<Reference Include="Microsoft.Rest.ClientRuntime.Azure, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">

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

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -160,20 +160,22 @@ function Test-GetAzureStorageAccount
160160

161161
New-AzureRmResourceGroup -Name $rgname -Location $loc;
162162

163-
New-AzureRmStorageAccount -ResourceGroupName $rgname -Name $stoname -Location $loc -Type $stotype;
163+
New-AzureRmStorageAccount -ResourceGroupName $rgname -Name $stoname -Location $loc -Type $stotype ;
164164

165165
Retry-IfException { $global:sto = Get-AzureRmStorageAccount -ResourceGroupName $rgname -Name $stoname; }
166166
$stotype = 'StandardGRS';
167167
Assert-AreEqual $sto.StorageAccountName $stoname;
168168
Assert-AreEqual $sto.Sku.Name $stotype;
169169
Assert-AreEqual $sto.Location $loc;
170170
Assert-AreEqual $sto.Kind $kind;
171+
Assert-AreEqual $sto.EnableHttpsTrafficOnly $false;
171172

172173
$stos = Get-AzureRmStorageAccount -ResourceGroupName $rgname;
173174
Assert-AreEqual $stos[0].StorageAccountName $stoname;
174175
Assert-AreEqual $stos[0].Sku.Name $stotype;
175176
Assert-AreEqual $stos[0].Location $loc;
176177
Assert-AreEqual $sto.Kind $kind;
178+
Assert-AreEqual $sto.EnableHttpsTrafficOnly $false;
177179

178180
Remove-AzureRmStorageAccount -Force -ResourceGroupName $rgname -Name $stoname;
179181
}
@@ -203,14 +205,15 @@ function Test-SetAzureStorageAccount
203205
$encryptionServiceBF = "File,Blob"
204206

205207
New-AzureRmResourceGroup -Name $rgname -Location $loc;
206-
New-AzureRmStorageAccount -ResourceGroupName $rgname -Name $stoname -Location $loc -Type $stotype -Kind $kind -EnableEncryptionService $encryptionServiceBF;
208+
New-AzureRmStorageAccount -ResourceGroupName $rgname -Name $stoname -Location $loc -Type $stotype -Kind $kind -EnableEncryptionService $encryptionServiceBF -EnableHttpsTrafficOnly $true;
207209

208210
Retry-IfException { $global:sto = Get-AzureRmStorageAccount -ResourceGroupName $rgname -Name $stoname; }
209211
$stotype = 'StandardGRS';
210212
Assert-AreEqual $sto.StorageAccountName $stoname;
211213
Assert-AreEqual $sto.Sku.Name $stotype;
212214
Assert-AreEqual $sto.Location $loc;
213215
Assert-AreEqual $sto.Kind $kind;
216+
Assert-AreEqual $sto.EnableHttpsTrafficOnly $true;
214217
Assert-AreEqual $sto.Encryption.Services.Blob.Enabled $true
215218
Assert-AreEqual $sto.Encryption.Services.File.Enabled $true
216219

@@ -219,12 +222,13 @@ function Test-SetAzureStorageAccount
219222
Assert-AreEqual $stos[0].Sku.Name $stotype;
220223
Assert-AreEqual $stos[0].Location $loc;
221224
Assert-AreEqual $sto.Kind $kind;
225+
Assert-AreEqual $sto.EnableHttpsTrafficOnly $true;
222226
Assert-AreEqual $sto.Encryption.Services.Blob.Enabled $true
223227
Assert-AreEqual $sto.Encryption.Services.File.Enabled $true
224228

225229
$stotype = 'Standard_LRS';
226230
# TODO: Still need to do retry for Set-, even after Get- returns it.
227-
Retry-IfException { Set-AzureRmStorageAccount -ResourceGroupName $rgname -Name $stoname -Type $stotype -DisableEncryptionService $encryptionServiceBF; }
231+
Retry-IfException { Set-AzureRmStorageAccount -ResourceGroupName $rgname -Name $stoname -Type $stotype -DisableEncryptionService $encryptionServiceBF -EnableHttpsTrafficOnly $false; }
228232
$stotype = 'Standard_RAGRS';
229233
Set-AzureRmStorageAccount -ResourceGroupName $rgname -Name $stoname -Type $stotype;
230234

@@ -234,6 +238,7 @@ function Test-SetAzureStorageAccount
234238
Assert-AreEqual $sto.Sku.Name $stotype;
235239
Assert-AreEqual $sto.Location $loc;
236240
Assert-AreEqual $sto.Kind $kind;
241+
Assert-AreEqual $sto.EnableHttpsTrafficOnly $false;
237242
Assert-AreEqual $sto.Encryption $null
238243

239244
Remove-AzureRmStorageAccount -Force -ResourceGroupName $rgname -Name $stoname;

0 commit comments

Comments
 (0)