Skip to content

Commit 85c2564

Browse files
authored
Merge branch 'preview' into preview
2 parents df7511f + b4c9224 commit 85c2564

File tree

470 files changed

+215345
-182719
lines changed

Some content is hidden

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

470 files changed

+215345
-182719
lines changed

.gitignore

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,4 +212,8 @@ FakesAssemblies/
212212
*.GhostDoc.xml
213213
pingme.txt
214214
groupMapping*.json
215-
.vscode/
215+
.vscode/
216+
/tools/AutomationTestFramework/RunBooks
217+
/tools/AutomationTestFramework/TestHelpers/TestHelpers.zip
218+
Results
219+
Package

ChangeLog.md

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

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -132,10 +132,10 @@ If you use both mechanisms on the same subscription, Microsoft Azure Active Dire
132132

133133
```powershell
134134
# Interactive login - you will get a dialog box asking for your Azure credentials
135-
Add-AzureRmAccount
135+
Connect-AzureRmAccount
136136
137137
# Non-interactive login - use service principals
138-
Add-AzureRmAccount -ServicePrincipal -ApplicationId "http://my-app" -Credential $pscredential -TenantId $tenantid
138+
Connect-AzureRmAccount -ServicePrincipal -ApplicationId "http://my-app" -Credential $pscredential -TenantId $tenantid
139139
140140
# Use the cmdlets to manage your services/applications
141141
New-AzureRmResourceGroup -Name myresourceGroup -Location "West US"
@@ -144,7 +144,7 @@ New-AzureRmResourceGroup -Name myresourceGroup -Location "West US"
144144
### Microsoft Azure China
145145

146146
```powershell
147-
Add-AzureRmAccount -EnvironmentName AzureChinaCloud
147+
Connect-AzureRmAccount -EnvironmentName AzureChinaCloud
148148
149149
# Use the cmdlets to manage your services/applications
150150
New-AzureRmResourceGroup -Name myresourceGroup -Location "China East"
@@ -153,7 +153,7 @@ New-AzureRmResourceGroup -Name myresourceGroup -Location "China East"
153153
### Microsoft Azure US Government
154154

155155
```powershell
156-
Add-AzureRmAccount -EnvironmentName AzureUSGovernment
156+
Connect-AzureRmAccount -EnvironmentName AzureUSGovernment
157157
158158
# Use the cmdlets to manage your services/applications
159159
New-AzureRmResourceGroup -Name myresourceGroup -Location "US Gov Virginia"
@@ -162,7 +162,7 @@ New-AzureRmResourceGroup -Name myresourceGroup -Location "US Gov Virginia"
162162
### Microsoft Azure Germany
163163

164164
```powershell
165-
Add-AzureRmAccount -EnvironmentName AzureGermanCloud
165+
Connect-AzureRmAccount -EnvironmentName AzureGermanCloud
166166
167167
# Use the cmdlets to manage your services/applications
168168
New-AzureRmResourceGroup -Name myresourceGroup -Location "Germany Central"

TestMappings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,4 +184,4 @@
184184
"src/ResourceManager/ApplicationInsights/": [
185185
".\\src\\ResourceManager\\ApplicationInsights\\Commands.ApplicationInsights.Test\\bin\\Debug\\Microsoft.Azure.Commands.ApplicationInsights.Test.dll"
186186
]
187-
}
187+
}

build.proj

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -509,6 +509,11 @@
509509
<Message Importance="high" Text="Running Dependency Analysis..." />
510510
<Exec Command="$(MSBuildProjectDirectory)\src\Package\StaticAnalysis.exe $(MSBuildProjectDirectory)\src\Package\$(Configuration) $(MSBuildProjectDirectory)\src\Package true $(SkipHelp)" Condition="'$(Latest)' == 'true'"/>
511511
<Exec Command="$(MSBuildProjectDirectory)\src\Package\StaticAnalysis.exe $(MSBuildProjectDirectory)\src\Stack\$(Configuration) $(MSBuildProjectDirectory)\src\Stack" Condition="'$(Stack)' == 'true'" ContinueOnError="True"/>
512+
<OnError ExecuteTargets="StaticAnalysisErrorMessage"/>
513+
</Target>
514+
515+
<Target Name="StaticAnalysisErrorMessage">
516+
<Error Text="StaticAnalysis has failed. Please follow the instructions on this doc: https://github.com/Azure/azure-powershell/blob/preview/documentation/Debugging-StaticAnalysis-Errors.md"/>
512517
</Target>
513518

514519
<!-- Publish all packages -->

documentation/breaking-changes/breaking-changes-tool-help.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -42,24 +42,26 @@ Below are descriptions and remediations for each of the errors that can be seen
4242
| 3040 | [Changed Generic Type Argument](#3040---changed-generic-type-argument) |
4343
| 3050 | [Different Generic Type Argument Size](#3050---different-generic-type-argument-size) |
4444

45-
## 1000 - Removed Cmdlet
45+
## 1000 - Removed or Renamed Cmdlet
4646

4747
### Description
4848

4949
_The cmdlet '`<cmdlet>`' has been removed and no alias was found for the original cmdlet name._
5050

51-
When a user can no longer use a cmdlet that was previously available in a module, that is a breaking change. This can occur when the cmdlet is deleted, or the name of the cmdlet was changed with no alias to the original cmdlet name.
51+
When a user can no longer use a cmdlet that was previously available in a module, that is a breaking change. This can occur when the cmdlet is deleted, or when the name of the cmdlet was changed with no alias to the original cmdlet name.
5252

5353
### Remediation
5454

5555
_Add the cmdlet '`<cmdlet>`' back to the module, or add an alias to the original cmdlet name._
5656

5757
To add an alias to the original cmdlet name, use the `Alias` attribute for the cmdlet.
5858

59+
If you need to, you can add multiple aliases for cmdlets that need to be renamed twice.
60+
5961
```cs
60-
[Alias("Login-AzureRmAccount")]
61-
[Cmdlet(VerbsCommon.Add, "AzureRmAccount")]
62-
public class AddAzureRmAccount : Cmdlet
62+
[Cmdlet(VerbsCommunications.Connect, "AzureRmAccount")]
63+
[Alias("Login-AzureRmAccount", "Login-AzAccount", "Add-AzureRmAccount")]
64+
public class ConnectAzureRmAccount : Cmdlet
6365
{
6466
protected override void BeginProcessing()
6567
{
@@ -383,8 +385,8 @@ _Add the parameter '`<parameter>`' back to the cmdlet '`<cmdlet>`', or add an al
383385
To add an alias to the original parameter name, use the `Alias` attribute for the parameter.
384386

385387
```cs
386-
[Cmdlet(VerbsCommon.Add, "AzureRmAccount")]
387-
public class AddAzureRmAccount : Cmdlet
388+
[Cmdlet(VerbsCommunications.Connect, "AzureRmAccount")]
389+
public class ConnectAzureRmAccount : Cmdlet
388390
{
389391
[Alias("Domain")]
390392
[Parameter(ParameterSetName = "...", Mandatory = false)
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# Debugging StaticAnalysis Errors
2+
3+
Our StaticAnalysis tools help us ensure our modules follow PowerShell guidelines and prevent breaking changes from occurring outside of breaking change releases.
4+
5+
- [How to know if you have a StaticAnalysis Error](#how-to-know-if-you-have-a-staticanalysis-error)
6+
- [Where to find StaticAnalysis reports](#where-to-find-staticanalysis-reports)
7+
- [Types of StaticAnalysis Errors](#types-of-staticanalysis-errors)
8+
- [Breaking Changes](#breaking-changes)
9+
- [Signature Issues](#signature-issues)
10+
- [Help Issues](#help-issues)
11+
12+
## How to know if you have a StaticAnalysis Error
13+
If your build is failing, click on the Jenkins job inside the PR (marked as "Default" within checks). Then check the Console Output within the Jenkins job. If you have this error, then you have failed StaticAnalysis:
14+
```
15+
d:\workspace\powershell\build.proj(511,5): error MSB3073: The command "d:\workspace\powershell\src\Package\StaticAnalysis.exe d:\workspace\powershell\src\Package\Debug d:\workspace\powershell\src\Package true false" exited with code 255.
16+
```
17+
18+
## Where to find StaticAnalysis reports
19+
20+
The StaticAnalysis reports could show up in two different places in the CI build:
21+
- On the status page in Jenkins, under the Build Artifacts: the relevant files are BreakingChangeIssues.csv, SignatureIssues.csv, and/or HelpIssues.csv.
22+
- On the status page in Jenkins, click Build Artifacts then navigate to src/Package. You will see BreakingChangeIssues.csv, SignatureIssues.csv, and/or HelpIssues.csv.
23+
24+
Locally, the StaticAnalysis report will show up under Azure-PowerShell/src/Package. You will see BreakingChangeIssues.csv, SignatureIssues.csv, and/or HelpIssues.csv. You can generate these files by running
25+
```
26+
msbuild build.proj
27+
```
28+
29+
## Types of StaticAnalysis Errors
30+
The three most common Static Analysis errors are breaking changes, signature issues, and help issues. To figure out which type of error is causing the build failure, open each of the relevant .csv files (if the .csv file does not exist, there is no violation detected). Any issue marked with severity 0 or 1 must be resolved in order for the build to pass.
31+
32+
### Breaking Changes
33+
If you make a change that could cause a breaking change, it will be listed in BreakingChangeIssues.csv. Please look at each of these errors, and if they do indeed introduce a breaking change in a non-breaking change release, please revert the change that caused this violation. Sometimes the error listed in the .csv file can be a false positive (for example, if you change a parameter attribute to span all parameter sets rather than individual parameter sets). Please read the error thoroughly and examine the relevant code before deciding that an error is a false positive, and contact the Azure PowerShell team if you have questions. If you are releasing a preview module, are releasing during a breaking change release, or have determined that the error is a false positive, please follow these instructions:
34+
- Copy each of the errors you would like to suppress directly from the BreakingChangeIssues.csv file output in the Jenkins build
35+
- Paste each of these error into the [BreakingChangeIssues.csv file](https://github.com/Azure/azure-powershell/blob/preview/tools/StaticAnalysis/Exceptions/BreakingChangeIssues.csv) in our GitHub repo. Note that you will need to edit this file in a text editor rather than Excel to prevent parsing errors.
36+
- Push the changes to the .csv file and ensure the errors no longer show up in the BreakingChangeIssues.csv file output from the Jenkins build.
37+
38+
We take breaking changes very seriously, so please be mindful about the violations that you suppress in our repo.
39+
40+
### Signature Issues
41+
Signature issues occur when your cmdlets do not follow PowerShell standards. Please check [this page](https://github.com/Azure/azure-powershell/wiki/PowerShell-Cmdlet-Design-Guidelines) to ensure you are following PowerShell guidelines. Issues with severity 0 or 1 must be addressed, while issues with severity 2 are advisory. If you have an issue with severity 0 or 1 that has been approved by the Azure PowerShell team, you can suppress them following these steps:
42+
- Copy each of the errors you would like to suppress directly from the SignatureIssues.csv file output in the Jenkins build
43+
- Paste each of these error into the [SignatureIssues.csv file](https://github.com/Azure/azure-powershell/blob/preview/tools/StaticAnalysis/Exceptions/SignatureIssues.csv) in our GitHub repo. Note that you will need to edit this file in a text editor rather than Excel to prevent parsing errors.
44+
- Push the changes to the .csv file and ensure the errors no longer show up in the SignatureIssues.csv file output from the Jenkins build.
45+
46+
### Help Issues
47+
Most help issues that cause StaticAnalysis to fail occur when help has not been added for a particular cmdlet. If you have not generated help for your new cmdlets, please follow the instructions [here](https://github.com/Azure/azure-powershell/blob/preview/documentation/help-generation.md). If this is not the issue, follow the steps listed under "Remediation" for each violation listed in HelpIssues.csv.

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" xmlns:netfx="http://schemas.microsoft.com/wix/NetFxExtension">
33

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

8-
<?define version="5.1.1" ?>
8+
<?define version="5.2.0" ?>
99

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

src/Common/Commands.Common.Authentication.Abstractions/Settings/ClientFactorySettings.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ namespace Microsoft.Azure.Commands.Common.Authentication.Abstractions
2323
public class ClientFactorySettings : IExtensibleSettings
2424
{
2525
/// <summary>
26-
/// The user agents in the cusrrent client factory
26+
/// The user agents in the current client factory
2727
/// </summary>
2828
public IEnumerable<UserAgentSettings> UserAgents { get; }
2929

src/Common/Commands.Common.Authentication/Properties/Resources.resx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@
142142
<value>The environment name '{0}' is not found.</value>
143143
</data>
144144
<data name="ExpiredRefreshToken" xml:space="preserve">
145-
<value>Your Microsoft Azure credential in the Windows PowerShell session has expired. Please log in again. In PowerShell, execute Login-AzureRMAccount for Azure Resource Manager cmdlets or Add-AzureAccount for service management cmdlets.</value>
145+
<value>Your Microsoft Azure credential in the Windows PowerShell session has expired. Please log in again. In PowerShell, execute Connect-AzureRmAccount for Azure Resource Manager cmdlets or Add-AzureAccount for service management cmdlets.</value>
146146
</data>
147147
<data name="FilePathIsNotValid" xml:space="preserve">
148148
<value>File path is not valid</value>
@@ -193,7 +193,7 @@
193193
<value>Removing public environment is not supported.</value>
194194
</data>
195195
<data name="ServiceKeyNotFound" xml:space="preserve">
196-
<value>Unable to retrieve service key for ServicePrincipal account {0}. Please log in again to supply the credentials for this service principal. In PowerShell, execute Login-AzureRMAccount for Azure Resource Manager cmdlets or Add-AzureAccount for service management cmdlets.</value>
196+
<value>Unable to retrieve service key for ServicePrincipal account {0}. Please log in again to supply the credentials for this service principal. In PowerShell, execute Connect-AzureRmAccount for Azure Resource Manager cmdlets or Add-AzureAccount for service management cmdlets.</value>
197197
</data>
198198
<data name="ServiceNameExists" xml:space="preserve">
199199
<value>The provided service name {0} already exists, please pick another name</value>
@@ -259,7 +259,7 @@
259259
<value>Multiple tokens were found for this user. Please clear your token cache using, Clear-AzureProfile and try this command again.</value>
260260
</data>
261261
<data name="AdalUserInteractionRequired" xml:space="preserve">
262-
<value>User Interaction is required to authenticate this user. Please authenticate using the log in dialog. In PowerShell, execute Login-AzureRMAccount for Azure Resource Manager cmdlets or Add-AzureAccount for service management cmdlets.</value>
262+
<value>User Interaction is required to authenticate this user. Please authenticate using the log in dialog. In PowerShell, execute Connect-AzureRmAccount for Azure Resource Manager cmdlets or Add-AzureAccount for service management cmdlets.</value>
263263
</data>
264264
<data name="TenantNotFound" xml:space="preserve">
265265
<value>No tenant was found for this subscription. Please execute Clear-AzureProfile and then execute Add-AzureAccount.</value>
@@ -283,19 +283,19 @@
283283
<value>[Common.Authentication]: Authenticating for account {0} with single tenant {1}</value>
284284
</data>
285285
<data name="ArmAccountNotFound" xml:space="preserve">
286-
<value>No account found in the context. Please login using Login-AzureRMAccount.</value>
286+
<value>No account found in the context. Please login using Connect-AzureRmAccount.</value>
287287
</data>
288288
<data name="ArmUserInteractionRequired" xml:space="preserve">
289-
<value>User Interaction is required to authenticate this user. Please execute Login-AzureRMAccount without parameters and enter your credentials.</value>
289+
<value>User Interaction is required to authenticate this user. Please execute Connect-AzureRmAccount without parameters and enter your credentials.</value>
290290
</data>
291291
<data name="InvalidArmContext" xml:space="preserve">
292-
<value>Your Azure credentials have not been set up or have expired, please run Login-AzureRMAccount to set up your Azure credentials.</value>
292+
<value>Your Azure credentials have not been set up or have expired, please run Connect-AzureRmAccount to set up your Azure credentials.</value>
293293
</data>
294294
<data name="NoSubscriptionInContext" xml:space="preserve">
295-
<value>No subscription found in the context. Please ensure that the credentials you provided are authorized to access an Azure subscription, then run Login-AzureRMAccount to login.</value>
295+
<value>No subscription found in the context. Please ensure that the credentials you provided are authorized to access an Azure subscription, then run Connect-AzureRmAccount to login.</value>
296296
</data>
297297
<data name="NoTenantInContext" xml:space="preserve">
298-
<value>No tenant found in the context. Please ensure that the credentials you provided are authorized to access an Azure subscription, then run Login-AzureRMAccount to login.</value>
298+
<value>No tenant found in the context. Please ensure that the credentials you provided are authorized to access an Azure subscription, then run Connect-AzureRmAccount to login.</value>
299299
</data>
300300
<data name="UnsupportedCredentialType" xml:space="preserve">
301301
<value>Certificate authentication is not supported for account type {0}.</value>

src/Common/Commands.Common/AzurePowerShell.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ public class AzurePowerShell
2626

2727
public const string AssemblyCopyright = "Copyright © Microsoft";
2828

29-
public const string AssemblyVersion = "5.1.1";
29+
public const string AssemblyVersion = "5.2.0";
3030

31-
public const string AssemblyFileVersion = "5.1.1";
31+
public const string AssemblyFileVersion = "5.2.0";
3232

3333
public const string ProfileFile = "AzureProfile.json";
3434

src/Common/Commands.Common/Properties/Resources.resx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1537,10 +1537,10 @@ Use the Enable-AzureRmDataCollection cmdlet to turn the feature On. The cmdlet c
15371537
<value>User name needs to be specified.</value>
15381538
</data>
15391539
<data name="NoCurrentContextForDataCmdlet" xml:space="preserve">
1540-
<value>"There is no current context, please log in using Login-AzureRmAccount for Azure Resource Manager or Add-AzureAccount for Azure Service Management."</value>
1540+
<value>"There is no current context, please log in using Connect-AzureRmAccount for Azure Resource Manager or Add-AzureAccount for Azure Service Management."</value>
15411541
</data>
15421542
<data name="NoSubscriptionFoundForTenant" xml:space="preserve">
1543-
<value>No subscriptions are associated with the logged in account in Azure Service Management (RDFE). This means that the logged in user is not an administrator or co-administrator for any account.\r\nDid you mean to execute Login-AzureRmAccount?</value>
1543+
<value>No subscriptions are associated with the logged in account in Azure Service Management (RDFE). This means that the logged in user is not an administrator or co-administrator for any account.\r\nDid you mean to execute Connect-AzureRmAccount?</value>
15441544
</data>
15451545
<data name="CertificateNotFoundInStore" xml:space="preserve">
15461546
<value>No certificate was found in the certificate store with thumbprint {0}</value>

src/ResourceManager/AnalysisServices/AzureRM.AnalysisServices.psd1

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#
44
# Generated by: Microsoft Corporation
55
#
6-
# Generated on: 12/5/2017
6+
# Generated on: 1/22/2018
77
#
88

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

1414
# Version number of this module.
15-
ModuleVersion = '0.6.1'
15+
ModuleVersion = '0.6.2'
1616

1717
# Supported PSEditions
1818
# CompatiblePSEditions = @()
@@ -51,7 +51,7 @@ CLRVersion = '4.0'
5151
# ProcessorArchitecture = ''
5252

5353
# Modules that must be imported into the global environment prior to importing this module
54-
RequiredModules = @(@{ModuleName = 'AzureRM.Profile'; ModuleVersion = '4.1.1'; })
54+
RequiredModules = @(@{ModuleName = 'AzureRM.Profile'; ModuleVersion = '4.2.0'; })
5555

5656
# Assemblies that must be loaded prior to importing this module
5757
RequiredAssemblies = '.\Microsoft.Azure.Management.Analysis.dll'
@@ -114,10 +114,16 @@ PrivateData = @{
114114
# IconUri = ''
115115

116116
# ReleaseNotes of this module
117-
ReleaseNotes = '* Remove validate set of location into dynamic lookup so that all clouds are supported.'
117+
ReleaseNotes = '* Added ResourceGroup Completer to -ResourceGroup parameters allowing tab completion through resource groups in current subscription'
118+
119+
# Prerelease string of this module
120+
# Prerelease = ''
121+
122+
# Flag to indicate whether the module requires explicit user acceptance for install/update
123+
# RequireLicenseAcceptance = $false
118124

119125
# External dependent modules of this module
120-
# ExternalModuleDependencies = ''
126+
# ExternalModuleDependencies = @()
121127

122128
} # End of PSData hashtable
123129

src/ResourceManager/AnalysisServices/ChangeLog.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@
1818
- Additional information about change #1
1919
-->
2020
## Current Release
21+
* Corrected usage of `Login-AzureRmAccount` to use `Connect-AzureRmAccount`
22+
23+
## Version 0.6.2
2124
* Added ResourceGroup Completer to -ResourceGroup parameters allowing tab completion through resource groups in current subscription
2225

2326
## Version 0.6.1

0 commit comments

Comments
 (0)