Skip to content

Commit a81c927

Browse files
author
Anavi Nahar
committed
Resolved merge conflict
2 parents 300bdb2 + cecc059 commit a81c927

File tree

1,492 files changed

+288613
-177388
lines changed

Some content is hidden

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

1,492 files changed

+288613
-177388
lines changed

.github/ISSUE_TEMPLATE.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
### Cmdlet(s)
2+
3+
### PowerShell Version
4+
Instructions: to get PowerShell version, type `$PSVersionTable` and look for the value associated with `PSVersion`
5+
6+
### Module Version
7+
8+
### OS Version
9+
Instructions: to get OS version, type `$PSversionTable` and look for value associated with `BuildVersion`
10+
11+
### Description
12+
13+
### Debug Output
14+
Instructions: to get Debug Output, set `$DebugPreference="Continue"` and then execute the cmdlet or script causing the issue
15+
16+
### Script/Steps for Reproduction

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
## Comments
2+
3+
---
4+
5+
This checklist is used to make sure that common issues in a pull request are covered by the creator. You can find a more complete discussion of PowerShell cmdlet best practices [here](https://msdn.microsoft.com/en-us/library/dd878270(v=vs.85).aspx).
6+
7+
Below in **Overall Changes**, check off the boxes that apply to your PR. For the categories that you did not check off, you can remove them from this body. Within each of the categories that you did select, make sure that you can check off **all** of the boxes.
8+
9+
For information on cleaning up the commits in your pull request, click [here](../documentation/cleaning-up-commits.md).
10+
11+
## Overall Changes
12+
- [ ] [**MANDATORY** - General changes](#general)
13+
- [ ] [**MANDATORY** - Add/remove/edit test(s)](#tests)
14+
- [ ] [Add/remove/edit cmdlet(s)](#cmdlet-signature)
15+
- [ ] [Add/remove/edit parameter(s)](#parameters)
16+
- [ ] [Edit pipeline parameters](#parameters-and-the-pipeline)
17+
18+
### General
19+
- [ ] Title of the PR is clear and informative
20+
- [ ] There are a small number of commits that each have an informative message
21+
- [ ] If it applies, references the bug/issue that the PR fixes
22+
- [ ] All files have the Microsoft copyright header
23+
- [ ] Cmdlets refer to management libraries through nuget references - no dlls are checked in
24+
- [ ] The PR does not introduce breaking changes (unless a major version change occurs in the assembly and module)
25+
26+
### Tests
27+
- [ ] PR includes test coverage for the included changes
28+
- [ ] Tests must use xunit, and should either use Moq to mock management client calls, or use the scenario test framework
29+
- [ ] PowerShell scripts used in tests must not use hard-coded values for location
30+
- [ ] PowerShell scripts used in tests should do any necessary setup as part of the test or suite setup, and should not use hard-coded values for existing resources
31+
- [ ] Tests should not use App.config files for settings
32+
- [ ] Tests should use the built-in PowerShell functions for generating random names when unique names are necessary - this will store names in the test recording
33+
- [ ] Tests should use Start-Sleep to pause rather than Thread.Sleep
34+
35+
### Cmdlet Signature
36+
- [ ] Cmdlet name uses an approved PowerShell verb - use the enums for `VerbsCommon`, `VerbsCommunication`, `VerbsLifecycle`, `VerbsOther` whenever possible
37+
- [ ] Cmdlet noun name uses the AzureRm prefix for management cmdlets, and the Azure prefix for data plane cmdlets
38+
- [ ] Cmdlet specifies the `OutputType` attribute if any output is produced; if the cmdlet produces no output, it should implement a `PassThrough` parameter
39+
- [ ] If the cmdlet makes changes or has side effects, it should implement `ShouldProcess` and have `SupportShouldProcess = true` specified in the cmdlet attribute. See a discussion about correct `ShouldProcess` implementation [here](https://gist.github.com/markcowl/338e16fe5c8bbf195aff9f8af0db585d#what-is-the-change)
40+
- [ ] Cmdlets should derive from AzureRmCmdlet for management cmdlets, and AzureDataCmdlet for data cmdlets
41+
- [ ] If multiple parameter sets are implemented, the cmdlet should specify a `DefaultParameterSetName` in its cmdlet attribute
42+
43+
### Parameters
44+
- [ ] Cmdlets should have no more than four positional parameters
45+
- [ ] Cmdlet parameter sets should be mutually exclusive - each parameter set must have at least one mandatory parameter not in other parameter sets
46+
- [ ] Parameter types should not expose types from the management library - complex parameter types should be defined in the module
47+
- [ ] Complex parameter types are discouraged - a parameter type should be simple types as often as possible. If complex types are used, they should be shallow and easily creatable from a constructor or another cmdlet
48+
- [ ] Parameters should be explicitly marked as Mandatory or not, and should contain a HelpMessage
49+
- [ ] No parameter is of type `object`.
50+
- Management cmdlets should have the following parameters and aliases:
51+
- ResourceGroupName with (optional) alias to `ResourceGroup` type string marked as [ValueFromPipelineByPropertyName]
52+
- Name with alias to `ResourceName` type string marked as [ValueFromPipelineByPropertyName]
53+
- Location (if appropriate) type string
54+
- Tag, type `HashTable`
55+
56+
### Parameters and the Pipeline
57+
- [ ] Complex parameters should take values from the pipeline when possible, and certainly when they match the output type of another cmdlet
58+
- [ ] Only one parameter should use ValueFromPipeline per parameter set; parameters from different parameter sets may have this attribute, but should not be convertible
59+
- [ ] No parameter is of type `object`
60+
- [ ] Each management cmdlet should have a parameter set that takes `ResourceGroupName` and `Name` from the pipeline by property value
61+
- [ ] For a given resource type, it should be possible to pipe the output of `Get` and `New` cmdlets to the input of `Set`, `Update`, `Remove` and other action cmdlets for that resource

AzurePowershell.Test.targets

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -96,12 +96,10 @@
9696
<XUnitTests Include=".\src\ResourceManager\PowerBIEmbedded\Commands.PowerBIEmbedded.Test\bin\Debug\Microsoft.Azure.Commands.PowerBIEmbedded.Test.dll"/>
9797
<XUnitTests Include=".\src\ResourceManager\DataLakeAnalytics\Commands.DataLakeAnalytics.Test\bin\Debug\Microsoft.Azure.Commands.DataLakeAnalytics.Test.dll"/>
9898
<XUnitTests Include=".\src\ResourceManager\DataLakeStore\Commands.DataLakeStore.Test\bin\Debug\Microsoft.Azure.Commands.DataLake.Test.dll"/>
99-
<!-- <XUnitTests Include=".\src\ResourceManager\AzureStackAdmin\Commands.AzureStackAdmin.Test\bin\Debug\Microsoft.AzureStack.Commands.Admin.Test.dll"/>
100-
<XUnitTests Include=".\src\ResourceManager\AzureStackStorage\Commands.AzureStackStorage.Tests\bin\Debug\Microsoft.AzureStack.Commands.StorageAdmin.Test.dll"/>
101-
<XUnitTests Include=".\src\ResourceManager\DevTestLabs\Commands.DevTestLabs.Test\bin\Debug\Microsoft.Azure.Commands.DevTestLabs.Test.dll"/>
99+
<!-- <XUnitTests Include=".\src\ResourceManager\DevTestLabs\Commands.DevTestLabs.Test\bin\Debug\Microsoft.Azure.Commands.DevTestLabs.Test.dll"/>
102100
<XUnitTests Include=".\src\ResourceManager\HDInsight\Commands.HDInsight.Test\bin\Debug\Commands.HDInsight.Test.dll"/>
103-
<XUnitTests Include=".\src\ResourceManager\Insights\Commands.Insights.Test\bin\Debug\Microsoft.Azure.Commands.Insights.Test.dll"/>
104-
<XUnitTests Include=".\src\ResourceManager\RecoveryServices\Commands.RecoveryServices.Test\bin\Debug\Microsoft.Azure.Commands.RecoveryServicesArm.Test.dll"/> -->
101+
<XUnitTests Include=".\src\ResourceManager\Insights\Commands.Insights.Test\bin\Debug\Microsoft.Azure.Commands.Insights.Test.dll"/> -->
102+
<XUnitTests Include=".\src\ResourceManager\RecoveryServices\Commands.RecoveryServices.Test\bin\Debug\Microsoft.Azure.Commands.RecoveryServicesArm.Test.dll"/>
105103
<XUnitTests Include=".\src\ResourceManager\RecoveryServices.Backup\Commands.RecoveryServices.Backup.Test\bin\Debug\Microsoft.Azure.Commands.RecoveryServices.Backup.Test.dll"/>
106104
<XUnitTests Include=".\src\ResourceManager\RedisCache\Commands.RedisCache.Test\bin\Debug\Microsoft.Azure.Commands.RedisCache.Test.dll"/>
107105
<!--<XUnitTests Include=".\src\ResourceManager\ServerManagement\Commands.ServerManagement.Test\bin\Debug\Microsoft.Azure.Commands.ServerManagement.Test.dll"/>

ChangeLog.md

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,73 @@
1+
## 2016.09.16 version 2.2.0
2+
* Network
3+
- New switch parameter added for network interface to enable/Disable accelerated networking -New-AzureRmNetworkInterface -EnableAcceleratedNetworking
4+
5+
## 2016.09.08 version 2.1.0
6+
* Compute
7+
* Add support for querying encryption status from the AzureDiskEncryptionForLinux extension
8+
* DataFactory
9+
* Added new cmdlet for listing activity windows
10+
- Get-AzureRmDataFactoryActivityWindow
11+
* DataLake
12+
* Changed parameter `Host` to `DatabaseHost` and added alias to `Host`
13+
- New-AzureRmDataLakeAnalyticsCatalogSecret
14+
- Set-AzureRmDataLakeAnalyticsCatalogSecret
15+
* Add support for ACL and Default ACL removal
16+
* Add support for getting and setting unnamed permissions on files and folders
17+
* KeyVault
18+
* Add support for certificates
19+
- Add-AzureRmKeyVaultCertificate
20+
- Add-AzureRmKeyVaultCertificateContact
21+
- Get-AzureRmKeyVaultCertificate
22+
- Get-AzureRmKeyVaultCertificateContact
23+
- Get-AzureRmKeyVaultCertificateIssuer
24+
- Get-AzureRmKeyVaultCertificateOperation
25+
- Get-AzureRmKeyVaultCertificatePolicy
26+
- Import-AzureRmKeyVaultCertificate
27+
- New-AzureRmKeyVaultCertificateAdministratorDetails
28+
- New-AzureRmKeyVaultCertificateOrganizationDetails
29+
- New-AzureRmKeyVaultCertificatePolicy
30+
- Remove-AzureRmKeyVaultCertificate
31+
- Remove-AzureRmKeyVaultCertificateContact
32+
- Remove-AzureRmKeyVaultCertificateIssuer
33+
- Remove-AzureRmKeyVaultCertificateOperation
34+
- Set-AzureRmKeyVaultCertificateAttribute
35+
- Set-AzureRmKeyVaultCertificateIssuer
36+
- Set-AzureRmKeyVaultCertificatePolicy
37+
- Stop-AzureRmKeyVaultCertificateOperation
38+
* Network
39+
* Enable Active-Active gateway feature PowerShell cmdlets
40+
- Add-AzureRmVirtualNetworkGatewayIpConfig
41+
- Remove-AzureRmVirtualNetworkGatewayIpConfig
42+
* Added new cmdlet
43+
- Test-AzureRmPrivateIpAddressAvailability
44+
* Resources
45+
* Support zones in provider and resource cmdlets
46+
- Get-AzureRmProvider
47+
- New-AzureRmResource
48+
- Set-AzureRmResource
49+
* Sql
50+
* Added new cmdlets for Azure SQL threat detection policy management at server level
51+
- Get-AzureRmSqlServerThreatDetectionPolicy
52+
- Remove-AzureRmSqlServerThreatDetectionPolicy
53+
- Set-AzureRmSqlServerThreatDetectionPolicy
54+
* Added new cmdlets to support enabling/disabling GeoBackupPolicy for Sql Azure DataWarehouses
55+
- Get-AzureRmSqlDatabaseGeoBackupPolicy
56+
- Set-AzureRmSqlDatabaseGeoBackupPolicy
57+
* Added new cmdlets for Azure Sql Advisors and Recommended Actions APIs
58+
- Get-AzureRmSqlDatabaseAdvisor
59+
- Get-AzureRmSqlElasticPoolAdvisor
60+
- Get-AzureRmSqlServerAdvisor
61+
- Get-AzureRmSqlDatabaseRecommendedActions
62+
- Get-AzureRmSqlElasticPoolRecommendedActions
63+
- Get-AzureRmSqlServerRecommendedActions
64+
- Set-AzureRmSqlDatabaseAdvisorAutoExecuteStatus
65+
- Set-AzureRmSqlElasticPoolAdvisorAutoExecuteStatus
66+
- Set-AzureRmSqlServerAdvisorAutoExecuteStatus
67+
- Set-AzureRmSqlDatabaseRecommendedActionState
68+
- Set-AzureRmSqlElasticPoolRecommendedActionState
69+
- Set-AzureRmSqlServerRecommendedActionState
70+
171
## 2016.08.09 version 2.0.1
272
* Fixed assembly signing issue causing load problems in some PowerShell versions. (Issue #2747)
373

build.proj

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,11 @@
5858
<StaticAnalysis Include=".\tools\StaticAnalysis\StaticAnalysis.sln" />
5959
</ItemGroup>
6060

61+
<!-- Tasks -->
62+
<UsingTask TaskName="ValidateStrongNameSignatureTask" AssemblyFile="$(LibraryToolsFolder)\Microsoft.Azure.Build.Tasks.dll" />
63+
<UsingTask TaskName="FilterOutAutoRestLibraries" AssemblyFile="$(LibraryToolsFolder)\Microsoft.Azure.Build.Tasks.dll" />
64+
<UsingTask TaskName="DebugTask" AssemblyFile="$(LibraryToolsFolder)\Microsoft.Azure.Build.Tasks.dll" />
65+
6166
<!--
6267
CI build related
6368
-->
@@ -143,7 +148,7 @@
143148
<Exec Command="$(NuGetCommand) restore %(CmdletSolutionsToBuild.FullPath) $(NuGetRestoreConfigSwitch) $(NuGetRestorePackageSetting)"
144149
ContinueOnError="false" />
145150
<!-- Restore packages for static analysis-->
146-
<Exec Command="$(NuGetCommand) restore %(StaticAnalysis.FullPath) $(NuGetRestoreConfigSwitch)"
151+
<Exec Command="$(NuGetCommand) restore %(StaticAnalysis.FullPath) $(NuGetRestoreConfigSwitch) $(NuGetRestorePackageSetting)"
147152
ContinueOnError="false" />
148153

149154
<!--Restore the xunit runner needed to run unit tests-->
@@ -161,7 +166,7 @@
161166
Properties="Configuration=$(Configuration);Platform=Any CPU"
162167
BuildInParallel="$(BuildInParallel)"
163168
ContinueOnError="false" />
164-
169+
165170
<CallTarget Targets="CodeSignBinaries" Condition=" '$(CodeSign)' == 'true' " />
166171

167172
<MSBuild
@@ -193,9 +198,6 @@
193198
Targets="Build" Properties="Configuration=Debug;Platform=AnyCPU" />
194199
</Target>
195200

196-
<UsingTask TaskName="ValidateStrongNameSignatureTask" AssemblyFile="$(LibraryToolsFolder)\Microsoft.Azure.Build.Tasks.dll" />
197-
<UsingTask TaskName="FilterOutAutoRestLibraries" AssemblyFile="$(LibraryToolsFolder)\Microsoft.Azure.Build.Tasks.dll" />
198-
199201
<Target Name="CodeSignBinaries">
200202
<PropertyGroup>
201203
<!--public token associated with MSSharedLibKey.snk-->
@@ -204,10 +206,12 @@
204206
<GetFrameworkSdkPath>
205207
<Output TaskParameter="Path" PropertyName="WindowsSdkPath"/>
206208
</GetFrameworkSdkPath>
207-
209+
<Exec Command="$(PowerShellCommand) -NonInteractive -NoLogo -NoProfile -Command &quot;. $(LibraryToolsFolder)\UpdateModules.ps1 $(Configuration) $(Scope) &quot;"/>
208210
<!-- Copying shortcut to be signed -->
209211
<Copy SourceFiles="$(LibraryRoot)tools\AzureRM\AzureRM.psd1"
210212
DestinationFolder="$(LibrarySourceFolder)\Package\$(Configuration)" />
213+
<Copy SourceFiles="$(LibraryRoot)tools\AzureRM\AzureRM.psm1"
214+
DestinationFolder="$(LibrarySourceFolder)\Package\$(Configuration)" />
211215

212216
<ItemGroup>
213217
<DelaySignedAssembliesToSign Include="$(LibrarySourceFolder)\Package\$(Configuration)\**\Microsoft*Azure*Commands*.dll" />
@@ -219,7 +223,7 @@
219223

220224
<Message Importance="high" Text="$(LibrarySourceFolder)\Package\$(Configuration) does not contains any files to sign. Code sign will skip."
221225
Condition="'@(DelaySignedAssembliesToSign)' == ''" />
222-
226+
223227
<ValidateStrongNameSignatureTask
224228
WindowsSdkPath="$(WindowsSdkPath)"
225229
Assembly="%(DelaySignedAssembliesToSign.Identity)"
@@ -257,10 +261,14 @@
257261
ExpectedDelaySigned="false"
258262
ContinueOnError="false"
259263
Condition="!$(DelaySign) and '@(DelaySignedAssembliesToSign)' != ''"/>
260-
264+
265+
<Exec Command="$(PowerShellCommand) -NonInteractive -NoLogo -NoProfile -Command &quot;. $(LibraryToolsFolder)\CheckStrongNameSignature.ps1 &quot;"/>
266+
261267
<!-- Copying signed shortcut back -->
262268
<Copy SourceFiles="$(LibrarySourceFolder)\Package\$(Configuration)\AzureRM.psd1"
263269
DestinationFolder="$(LibraryRoot)tools\AzureRM" />
270+
<Copy SourceFiles="$(LibrarySourceFolder)\Package\$(Configuration)\AzureRM.psm1"
271+
DestinationFolder="$(LibraryRoot)tools\AzureRM" />
264272
</Target>
265273

266274
<Target Name="CodeSignInstaller">
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
## Breaking Change Title
2+
3+
The following cmdlets were affected this release:
4+
5+
**Cmdlet-1**
6+
- Description of what has changed
7+
8+
```powershell
9+
# Old
10+
# Sample of how the cmdlet was previously called
11+
12+
# New
13+
# Sample of how the cmdlet should now be called
14+
```
15+
16+
**Cmdlet-2**
17+
- Description of what has changed
18+
19+
```powershell
20+
# Old
21+
# Sample of how the cmdlet was previously called
22+
23+
# New
24+
# Sample of how the cmdlet should now be called
25+
```
26+
27+
For an example migration guide for breaking changes, click [here](release-notes/migration-guide.2.0.0.md).

documentation/cleaning-up-commits.md

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
## Cleaning up commits
2+
3+
### Best practices for keeping commits clean
4+
5+
During development, to make sure that your commit history stays clean while the branch you're based off of is changing, follow some of these rules:
6+
7+
1. **Rebase instead of merging**
8+
- When you need to update your branch with the changes made to the base branch, [rebasing](#rebasing) will change the commit that your branch is based off of, allowing you to add the changes from the base branch and not gain an extra commit that you would with merging
9+
2. **Large number of changes**
10+
- If you create a pull request that contains a large number of changes (*e.g.,* re-recording tests) that won't be able to be displayed on GitHub, separate your changes into multiple pull requests that reference each other.
11+
12+
### Number of commits
13+
14+
It can be difficult to follow the changes in a pull request when the number of commits that come with it become too large:
15+
- If a bug fix is being addressed, a single commit should be submitted
16+
- If a new feature is being introduced, then the pull request can have multiple logical commits with each commit clearly describing what it does
17+
18+
### Rebasing
19+
20+
Sometimes a pull request can be based on a much earlier commit in the branch that you are trying to merge into it, causing a large amount of commits and file changes to litter the pull request. In this case, it would be better to **rebase** (move branches around by changing the commit that they are based on). After rebasing, you will want to close the pull request and open a new one, which will now have fewer commits.
21+
22+
For example, if you're working from the branch **feature** and are trying to rebase with **master**, you may run one of the following commands:
23+
> `git rebase master`
24+
> `git rebase master feature`
25+
26+
You can also rebase with the following command:
27+
> `git pull --rebase`
28+
29+
A normal `git pull` is equivalent to `git fetch` followed by `git merge FETCH_HEAD`, but when you run `git pull --rebase`, it runs `git rebase` instead of `git merge`.
30+
31+
For more information on rebasing, click [here](https://git-scm.com/docs/git-rebase).
32+
33+
### Squashing
34+
35+
When your pull request has a group of commits that can be condensed into one, logical commit, use **squashing**. This will clean up the number of commits your pull request has while also grouping together common commits.
36+
37+
For example, if you wanted to squash the last three commits into one, you may run the following command:
38+
> `git rebase -i HEAD~3`
39+
40+
This will bring up an editor showing your last three commits. Pick a commit to keep (as the message), and squash the other two into it.
41+
42+
For more information on squashing, click [here](https://git-scm.com/book/en/v2/Git-Tools-Rewriting-History#Squashing-Commits).
43+
44+
### Cherry-picking
45+
46+
If you want to merge specific commits from another branch into the current one you are working from, use **cherry-picking**.
47+
48+
For example, if you're working on the **master** branch and want to pull commit X (the commit-hash) from the **feature** branch, you may run the following commands:
49+
> `git checkout master`
50+
> `git cherry-pick X -n`
51+
52+
The `-n`, or `--no-commit`, is recommended for cherry-picking because it won't automatically create a commit for the cherry-picked change; this will allow you to view the changes first and make sure that you want to add all everything from the cherry-picked commit.
53+
54+
Now, if you want to cherry-pick a range of commits, say X through Y, from the **feature** branch, you may run the following commands:
55+
> `git checkout -b temp-branch X`
56+
> `git rebase --onto master Y^`
57+
58+
For more information on cherry-picking, click [here](https://git-scm.com/docs/git-cherry-pick).

setup/azurecmd.wxs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">
33

4-
<?define productName="Microsoft Azure PowerShell - August 2016" ?>
4+
<?define productName="Microsoft Azure PowerShell - September 2016" ?>
55
<?define sourceDir="$(var.SolutionDir)..\src\Package\$(var.Configuration)" ?>
66
<?define caSourceDir="$(var.SolutionDir)setup\bin\$(var.Configuration)" ?>
77

8-
<?define version="2.0.1" ?>
8+
<?define version="2.1.0" ?>
99

1010
<Product Id="*"
1111
Name="$(var.productName)"

0 commit comments

Comments
 (0)