Skip to content

Commit bbd6793

Browse files
author
Siddharth Chatrola
committed
Merge branch 'dev' of https://github.com/Azure/azure-powershell into dev
2 parents 20cda8b + 50c3fc7 commit bbd6793

File tree

964 files changed

+380124
-237180
lines changed

Some content is hidden

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

964 files changed

+380124
-237180
lines changed

AzurePowershell.Test.targets

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@
216216
</Target>
217217

218218
<!-- Run the scenario tests -->
219-
<Target Name="ScenarioTest" DependsOnTargets="Clean;BuildDebug;BeforeRunTests">
219+
<Target Name="ScenarioTest" DependsOnTargets="Clean;Build;BeforeRunTests">
220220
<Message Importance="high" Text="Running scenario tests..." />
221221
<MSBuild Targets="InvokeMSTest"
222222
Properties="_testAssembly=$(ScenarioTestDebug);_testSettings=$(TestSettings);_testFilter=$(ScenarioTestFilter);_testResult=$(TestOutputDirectory)\ScenarioTestDebug.trx"
@@ -275,7 +275,7 @@
275275
IncludeTraits="$(XUnitIncludedTrait)" MaxParallelThreads="0" ParallelizeAssemblies="false" ParallelizeTestCollections="false" />
276276
</Target>
277277

278-
<Target Name="RunOneSDKCIT" DependsOnTargets="Clean;BuildDebug;BeforeRunTests">
278+
<Target Name="RunOneSDKCIT" DependsOnTargets="Clean;Build;BeforeRunTests">
279279
<Message Importance="high" Text="Running CIT Scenario tests..." />
280280
<Delete Files="$(TestOutputDirectory)\RunOneSDKCITDebug.trx" />
281281
<Exec
@@ -284,47 +284,47 @@
284284
</Target>
285285

286286
<!-- Run the AzureRT tests -->
287-
<Target Name="AzureRTBVTs" DependsOnTargets="Clean;BuildDebug;BeforeRunTests">
287+
<Target Name="AzureRTBVTs" DependsOnTargets="Clean;Build;BeforeRunTests">
288288
<Message Importance="high" Text="Running AzureRT BVT tests..." />
289289
<Delete Files="$(TestOutputDirectory)\RTBVTDebug.trx" />
290290
<Exec
291291
Command="MSTest.exe /testcontainer:$(AzureRTTestContainer) /testsettings:$(AzureRTTestSettings) /category:BVT /resultsfile:$(TestOutputDirectory)\RTBVTDebug.trx"
292292
ContinueOnError="false" />
293293
</Target>
294294

295-
<Target Name="AzureRTOne" DependsOnTargets="Clean;BuildDebug;BeforeRunTests">
295+
<Target Name="AzureRTOne" DependsOnTargets="Clean;Build;BeforeRunTests">
296296
<Message Importance="high" Text="Running a specific tests..." />
297297
<Delete Files="$(TestOutputDirectory)\RTFunctionalDebug.trx" />
298298
<Exec
299299
Command="MSTest.exe /testcontainer:$(AzureRTTestContainer) /testsettings:$(AzureRTSeqTestSettings) /test:$(TestName) /resultsfile:$(TestOutputDirectory)\RTFunctionalDebug.trx"
300300
ContinueOnError="false" />
301301
</Target>
302302

303-
<Target Name="AzureRTRepeat" DependsOnTargets="Clean;BuildDebug;BeforeRunTests">
303+
<Target Name="AzureRTRepeat" DependsOnTargets="Clean;Build;BeforeRunTests">
304304
<Message Importance="high" Text="Running a specific tests..." />
305305
<Delete Files="$(TestOutputDirectory)\RTFunctionalDebug.trx" />
306306
<Exec
307307
Command="for /l %%x in (1, 1, $(RepeatTimes)) do MSTest.exe /testcontainer:$(AzureRTTestContainer) /testsettings:$(AzureRTTestSettings) /test:$(TestName) /resultsfile:$(TestOutputDirectory)\RTFunctionalDebug%%x.trx"
308308
ContinueOnError="false" />
309309
</Target>
310310

311-
<Target Name="AzureRTMulti" DependsOnTargets="Clean;BuildDebug;BeforeRunTests">
311+
<Target Name="AzureRTMulti" DependsOnTargets="Clean;Build;BeforeRunTests">
312312
<Message Importance="high" Text="Running tests:" />
313313
<Delete Files="$(TestOutputDirectory)\RTFunctionalDebug.trx" />
314314
<Exec
315315
Command="MSTest.exe /testcontainer:$(AzureRTTestContainer) /testsettings:$(AzureRTSeqTestSettings) $(TestParams) /resultsfile:$(TestOutputDirectory)\RTFunctionalDebug.trx"
316316
ContinueOnError="false" />
317317
</Target>
318318

319-
<Target Name="AzureRTAll" DependsOnTargets="Clean;BuildDebug;BeforeRunTests">
319+
<Target Name="AzureRTAll" DependsOnTargets="Clean;Build;BeforeRunTests">
320320
<Message Importance="high" Text="Running AzureRT all tests..." />
321321
<Delete Files="$(TestOutputDirectory)\RTDebug.trx" />
322322
<Exec
323323
Command="MSTest.exe /testcontainer:$(AzureRTTestContainer) /testsettings:$(AzureRTSeqTestSettings) /category:$(AzureRTAllTestFilter) /resultsfile:$(TestOutputDirectory)\RTDebug.trx"
324324
ContinueOnError="false" />
325325
</Target>
326326

327-
<Target Name="AzureRTAllFast" DependsOnTargets="Clean;BuildDebug;BeforeRunTests">
327+
<Target Name="AzureRTAllFast" DependsOnTargets="Clean;Build;BeforeRunTests">
328328
<Message Importance="high" Text="Running AzureRT all tests..." />
329329

330330
<Delete Files="$(TestOutputDirectory)\RTSequentialDebug.trx" />
@@ -337,7 +337,7 @@
337337
ContinueOnError="false" />
338338
</Target>
339339

340-
<Target Name="AzureRTSeq" DependsOnTargets="Clean;BuildDebug;BeforeRunTests">
340+
<Target Name="AzureRTSeq" DependsOnTargets="Clean;Build;BeforeRunTests">
341341
<Message Importance="high" Text="Running AzureRT all tests..." />
342342

343343
<Delete Files="$(TestOutputDirectory)\RTSequentialDebug.trx" />
@@ -346,7 +346,7 @@
346346
ContinueOnError="true" />
347347
</Target>
348348

349-
<Target Name="AzureRTNetwork" DependsOnTargets="Clean;BuildDebug;BeforeRunTests">
349+
<Target Name="AzureRTNetwork" DependsOnTargets="Clean;Build;BeforeRunTests">
350350
<Message Importance="high" Text="Running AzureRT all tests..." />
351351

352352
<Delete Files="$(TestOutputDirectory)\RTSequentialDebug.trx" />
@@ -355,7 +355,7 @@
355355
ContinueOnError="false" />
356356
</Target>
357357

358-
<Target Name="AzureRTUploadSeq" DependsOnTargets="Clean;BuildDebug;BeforeRunTests">
358+
<Target Name="AzureRTUploadSeq" DependsOnTargets="Clean;Build;BeforeRunTests">
359359
<Message Importance="high" Text="Running AzureRT all tests..." />
360360

361361
<Delete Files="$(TestOutputDirectory)\RTSequentialDebug.trx" />
@@ -364,7 +364,7 @@
364364
ContinueOnError="false" />
365365
</Target>
366366

367-
<Target Name="AzureRTPar" DependsOnTargets="Clean;BuildDebug;BeforeRunTests">
367+
<Target Name="AzureRTPar" DependsOnTargets="Clean;Build;BeforeRunTests">
368368
<Message Importance="high" Text="Running AzureRT all tests..." />
369369

370370
<Delete Files="$(TestOutputDirectory)\RTDebug.trx" />
@@ -373,7 +373,7 @@
373373
ContinueOnError="false" />
374374
</Target>
375375

376-
<Target Name="AzureRTFunctional" DependsOnTargets="Clean;BuildDebug;BeforeRunTests">
376+
<Target Name="AzureRTFunctional" DependsOnTargets="Clean;Build;BeforeRunTests">
377377
<Message Importance="high" Text="Running AzureRT Functional tests..." />
378378

379379
<Delete Files="$(TestOutputDirectory)\RTFunctionalDebug.trx" />
@@ -382,7 +382,7 @@
382382
ContinueOnError="false" />
383383
</Target>
384384

385-
<Target Name="AzureRTScenario" DependsOnTargets="Clean;BuildDebug;BeforeRunTests">
385+
<Target Name="AzureRTScenario" DependsOnTargets="Clean;Build;BeforeRunTests">
386386
<Message Importance="high" Text="Running AzureRT Scenario tests..." />
387387

388388
<Delete Files="$(TestOutputDirectory)\RTScenarioDebug.trx" />
@@ -391,7 +391,7 @@
391391
ContinueOnError="false" />
392392
</Target>
393393

394-
<Target Name="AzureRTAllPreview" DependsOnTargets="Clean;BuildDebug;BeforeRunTests">
394+
<Target Name="AzureRTAllPreview" DependsOnTargets="Clean;Build;BeforeRunTests">
395395
<Message Importance="high" Text="Running AzureRT all tests..." />
396396
<Delete Files="$(TestOutputDirectory)\RTAddVhdDebug.trx" />
397397
<Delete Files="$(TestOutputDirectory)\RTDebug.trx" />
@@ -403,23 +403,23 @@
403403
ContinueOnError="false" />
404404
</Target>
405405

406-
<Target Name="AzureRTPreview" DependsOnTargets="Clean;BuildDebug;BeforeRunTests">
406+
<Target Name="AzureRTPreview" DependsOnTargets="Clean;Build;BeforeRunTests">
407407
<Message Importance="high" Text="Running AzureRT all tests..." />
408408
<Delete Files="$(TestOutputDirectory)\RTPreviewDebug.trx" />
409409
<Exec
410410
Command="MSTest.exe /testcontainer:$(AzureRTTestContainer) /testsettings:$(AzureRTTestSettings) /category:Preview /resultsfile:$(TestOutputDirectory)\RTPreviewDebug.trx"
411411
ContinueOnError="false" />
412412
</Target>
413413

414-
<Target Name="AzureRTCleanUp" DependsOnTargets="Clean;BuildDebug;BeforeRunTests">
414+
<Target Name="AzureRTCleanUp" DependsOnTargets="Clean;Build;BeforeRunTests">
415415
<Message Importance="high" Text="Running AzureRT clean up tests..." />
416416
<Delete Files="$(TestOutputDirectory)\RTCleanUpDebug.trx" />
417417
<Exec
418418
Command="MSTest.exe /testcontainer:$(AzureRTTestContainer) /testsettings:$(AzureRTTestSettings) /category:AzureRTCleanUp /resultsfile:$(TestOutputDirectory)\RTCleanUpDebug.trx"
419419
ContinueOnError="false" />
420420
</Target>
421421

422-
<Target Name="ComputeCodeCoverage" DependsOnTargets="ForceRestorePackages;Clean;BuildDebug">
422+
<Target Name="ComputeCodeCoverage" DependsOnTargets="RestoreNugetPackages;Clean;Build">
423423
<Message Importance="high" Text="Gathering Code Coverage data from Compute tests..." />
424424
<Delete Files="Project.covarage" />
425425
<Exec

ChangeLog.md

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,24 @@
1-
## 2015.09.03 version 0.9.8
1+
## 2015.10.09 version 1.0 preview
2+
* Azure Resource Manager Management Cmdlets
3+
* New-AzureRmResourceGroup - Removed the template deployment parameters from this cmdlet. Template deployment will now be
4+
handled only through the New-AzureRmResourceGroupDeployment
5+
* Get-AzureRmResource - Will query directly against the Resource Provider. Removed parameters for tags from here. New cmdlets added for querying against the cache as listed below.
6+
* Get-AzureRmResourceGroup - Removed parameters for finding resources through tags. New cmdlet added for handling this
7+
functionality as mentioned below.
8+
* Find-AzureRmResource - Query against the cache.
9+
* Find-AzureRmResourceGroup - Tag parameter added for querying resource group containing specific tags.
10+
* Test-AzureResource - Cmdlet removed. Will be adding a better and reliable way to achieve this scenario which will be guaranteed to work against all Resource providers.
11+
* Test-AzureResourceGroup - Cmdlet removed. Will be adding a better and reliable way to achieve this scenario.
12+
* Get-AzureRmResourceProvider - This cmdlet has been renamed. Earlier it was called Get-AzureProvider. We have changed the output to include locations. Now you can use this to find out which providers and types are available for certain location.
13+
* Cmdlets added for policy
14+
* New-AzureRmPolicyDefinition, Get-AzureRmPolicyDefinition, Set-AzureRMPolicyDefinition, Remove-AzureRmPolicyDefinition
15+
* New-AzureRmPolicyAssignment, Get-AzureRmPolicyAssignment, Set-AzureRmPolicyAssignment, Remove-AzureRmPolicyAssignment
16+
* Consolidated Log cmdlets
17+
* Removed Get-AzureResourceLog, Get-AzureResourceGroupLog, Get-AzureProviderLog
18+
* Added new cmdlet Get-AzureLog which you can use to obtain logs at different scopes like resource group, resource, provider.
19+
* Removed Get-AzureLocation - the functionality is now provided through the Get-AzureRmResourceProvider
20+
21+
## 2015.09.03 version 0.9.8
222
* Azure Redis Cache cmdlets
323
* New-AzureRMRedisCache - 'RedisVersion' parameter is deprecated.
424
* Azure Compute (ARM) Cmdlets

build.proj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,8 @@
214214
<DelaySignedAssembliesToSign Include="$(LibrarySourceFolder)\Package\$(Configuration)\**\Microsoft*Azure*Commands*.dll" />
215215
<DelaySignedAssembliesToSign Include="$(LibrarySourceFolder)\Package\$(Configuration)\**\Microsoft.Azure.Common.Extensions.dll" />
216216
<ScriptsToSign Include="$(LibrarySourceFolder)\Package\$(Configuration)\**\*.ps1" />
217+
<ScriptsToSign Include="$(LibrarySourceFolder)\Package\$(Configuration)\**\*.psm1" />
218+
<ScriptsToSign Include="$(LibrarySourceFolder)\Package\$(Configuration)\**\*.ps1xml" />
217219
</ItemGroup>
218220

219221
<Message Importance="high" Text="$(LibrarySourceFolder)\Package\$(Configuration) does not contains any files to sign. Code sign will skip."

setup-powershellget/Setup/ShortcutStartup.ps1

Lines changed: 46 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,12 @@
1111
# See the License for the specific language governing permissions and
1212
# limitations under the License.
1313
# ----------------------------------------------------------------------------------
14-
[CmdletBinding()]
14+
[CmdletBinding(DefaultParametersetName="none")]
1515
Param(
16-
[Parameter(Mandatory=$False, HelpMessage="Use Install parameter to install Azure modules from PowerShell Gallery.")]
17-
[switch]$Install
16+
[Parameter(Mandatory=$True, HelpMessage="Use Install parameter to install Azure modules from PowerShell Gallery.", ParameterSetName="install")]
17+
[switch]$Install,
18+
[Parameter(Mandatory=$True, HelpMessage="Use Uninstall parameter to uninstall Azure modules from PowerShell Gallery.", ParameterSetName="uninstall")]
19+
[switch]$Uninstall
1820
)
1921

2022
function EnsureRegistryPath
@@ -35,11 +37,10 @@ function EnsureRegistryPath
3537
$error.clear()
3638
try {
3739
if ($Install.IsPresent) {
38-
EnsureRegistryPath
3940
Write-Output @"
4041
4142
Finalizing installation of Azure PowerShell.
42-
Installing Azure Modules from PowerShell Gallery.
43+
Installing AzureRM Modules from PowerShell Gallery.
4344
This may take some time...
4445
"@
4546
$env:PSModulePath = "$env:USERPROFILE\Documents\WindowsPowerShell\Modules;$env:ProgramFiles\WindowsPowerShell\Modules;$env:SystemRoot\system32\WindowsPowerShell\v1.0\Modules\"
@@ -50,28 +51,59 @@ This may take some time...
5051

5152
Import-Module PowerShellGet
5253

53-
Install-Module AzureRM
54-
Write-Output "AzureRM $((Get-InstalledModule -Name AzureRM)[0].Version) installed..."
55-
Update-AzureRM
56-
} else {
54+
$DefaultPSRepository = $env:DefaultPSRepository
55+
if ([string]::IsNullOrWhiteSpace($DefaultPSRepository))
56+
{
57+
$DefaultPSRepository = "PSGallery"
58+
}
59+
60+
$_InstallationPolicy = (Get-PSRepository -Name $DefaultPSRepository).InstallationPolicy
61+
try
62+
{
63+
Set-PSRepository -Name $DefaultPSRepository -InstallationPolicy Trusted
64+
65+
Install-Module AzureRM -Repository $DefaultPSRepository
66+
Write-Output "AzureRM $((Get-InstalledModule -Name AzureRM)[0].Version) installed..."
67+
68+
Update-AzureRM -Repository $DefaultPSRepository
69+
} finally {
70+
# Clean up
71+
Set-PSRepository -Name $DefaultPSRepository -InstallationPolicy $_InstallationPolicy
72+
}
73+
}
74+
elseif ($Uninstall.IsPresent)
75+
{
76+
Write-Output @"
77+
78+
Finalizing uninstallation of Azure PowerShell.
79+
This may take some time...
80+
"@
81+
$env:PSModulePath = "$env:USERPROFILE\Documents\WindowsPowerShell\Modules;$env:ProgramFiles\WindowsPowerShell\Modules;$env:SystemRoot\system32\WindowsPowerShell\v1.0\Modules\"
82+
83+
Uninstall-AzureRM
84+
Uninstall-Module -Name AzureRM -Confirm:$false -Force
85+
}
86+
else
87+
{
5788
cd c:\
5889
$welcomeMessage = @"
59-
For a list of all Azure cmdlets type 'help azure'.
60-
For a list of Azure Pack cmdlets type 'Get-Command *wapack*'.
90+
For a list of all Azure RM cmdlets type 'help azurerm'.
91+
92+
To start using Azure RM login via Login-AzureRmAccount cmdlet.
93+
To switch between subscriptions use Set-AzureRmContext.
94+
For more details, see http://aka.ms/azps-getting-started.
6195
6296
To use Azure Service Management cmdlets please execute the following cmdlet:
6397
Install-Module Azure
6498
"@
6599
Write-Output $welcomeMessage
66-
67-
$VerbosePreference = "Continue"
68100
}
69101
}
70102
catch
71103
{
72104
Write-Output "An error occured during installation."
73105
Write-Output $error
74106
Write-Output "Press any key..."
75-
$host.UI.RawUI.ReadKey("NoEcho,IncludeKeyDown")
107+
$key = $host.UI.RawUI.ReadKey("NoEcho,IncludeKeyDown")
76108
}
77109

setup-powershellget/azurecmd.wxs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<?define sourceDir="$(var.SolutionDir)..\src\Package\$(var.Configuration)" ?>
66
<?define caSourceDir="$(var.SolutionDir)setup\bin\$(var.Configuration)" ?>
77

8-
<?define version="0.10.0" ?>
8+
<?define version="1.0.0" ?>
99
<?define versionedStartMenuFolder="Microsoft Azure" ?>
1010
<?define staleStartMenuFolder="Windows Azure" ?>
1111

@@ -97,12 +97,14 @@
9797
<CustomAction Id="UpdatePSShortcut" BinaryKey="CustomActions" DllEntry="UpdatePSShortcut" Execute ="deferred" Impersonate="no"/>
9898
<CustomAction Id="SetExecutionPolicy" Property="POWERSHELLEXE" ExeCommand="-NoLogo -NoProfile -Command &quot;Set-ExecutionPolicy RemoteSigned -Force&quot;" Execute="deferred" Impersonate="no" Return="check"/>
9999
<CustomAction Id="RunModuleInstallScript" Property="POWERSHELLEXE" ExeCommand="-NoLogo -NoProfile -Command &quot;. \&quot;[PowerShellFolder]\ShortcutStartup.ps1\&quot; -Install&quot;" Execute="deferred" Impersonate="no" Return="check"/>
100+
<CustomAction Id="RunModuleUninstallScript" Property="POWERSHELLEXE" ExeCommand="-NoLogo -NoProfile -Command &quot;. \&quot;[PowerShellFolder]\ShortcutStartup.ps1\&quot; -Uninstall&quot;" Execute="deferred" Impersonate="no" Return="check"/>
100101

101102
<InstallExecuteSequence>
102103
<Custom Action="SetCustomActionDataValue" After="CreateShortcuts">NOT Installed</Custom>
103104
<Custom Action="UpdatePSShortcut" After="SetCustomActionDataValue">NOT Installed</Custom>
104105
<Custom Action="SetExecutionPolicy" After="UpdatePSShortcut">NOT Installed</Custom>
105106
<Custom Action="RunModuleInstallScript" After="SetExecutionPolicy">NOT Installed</Custom>
107+
<Custom Action="RunModuleUninstallScript" After="InstallInitialize">(NOT UPGRADINGPRODUCTCODE) AND (REMOVE="ALL")</Custom>
106108
</InstallExecuteSequence>
107109

108110
<WixVariable Id="WixUILicenseRtf" Value="$(var.ProjectDir)\media\License.rtf" />

0 commit comments

Comments
 (0)