Skip to content

Commit bfa344f

Browse files
Merge remote-tracking branch 'us/master' into tc-core-network
# Conflicts: # src/Network/Network.Test/NetworkResourcesController.cs
2 parents f9813f0 + 1229c76 commit bfa344f

File tree

895 files changed

+2657547
-150995
lines changed

Some content is hidden

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

895 files changed

+2657547
-150995
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ before_install:
2424

2525
# https://github.com/travis-ci/travis-ci/issues/1066#issuecomment-383489298
2626
script:
27-
- sudo dotnet msbuild build.proj /t:Full /p:Configuration=$CONFIG || travis_terminate 1
27+
- sudo dotnet msbuild build.proj /t:Full /p:ExcludeAuthenticators=true /p:Configuration=$CONFIG || travis_terminate 1
2828

2929
after_success:
3030
- if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then

ChangeLog.md

Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,119 @@
1+
## 1.3.0 - February 2019
2+
#### Az.Accounts
3+
* Update to latest version of ClientRuntime
4+
5+
#### Az.AnalysisServices
6+
General availability for Az.AnalysisServices module.
7+
8+
#### Az.Compute
9+
* AEM extension: Add support for UltraSSD and P60,P70 and P80 disks
10+
* Update help description for Set-AzVMBootDiagnostics
11+
* Update help description and example for Update-AzImage
12+
13+
#### Az.RecoveryServices
14+
General availability for Az.RecoveryServices module.
15+
16+
#### Az.Resources
17+
* Fix tagging for resource groups
18+
- More information here: https://github.com/Azure/azure-powershell/issues/8166
19+
* Fix issue where `Get-AzureRmRoleAssignment` doesn't respect -ErrorAction
20+
- More information here: https://github.com/Azure/azure-powershell/issues/8235
21+
22+
#### Az.Sql
23+
* Add Get/Set AzSqlDatabaseBackupShortTermRetentionPolicy
24+
* Fix issue where not being logged into Azure account would result in nullref exception when executing SQL cmdlets
25+
* Fixed null ref exception in Get-AzSqlCapability
26+
27+
## 1.2.1 - January 2019
28+
#### Az.Accounts
29+
* Release with correct version of Authentication
30+
31+
#### Az.AnalysisServices
32+
* Release with updated Authentication dependency
33+
34+
#### Az.RecoveryServices
35+
* Release with updated Authentication dependency
36+
37+
38+
## 1.2.0 - January 2019
39+
#### Az.Accounts
40+
* Add interactive and username/password authentication for Windows PowerShell 5.1 only
41+
* Update incorrect online help URLs
42+
* Add warning message in PS Core for Uninstall-AzureRm
43+
44+
#### Az.Aks
45+
* Update incorrect online help URLs
46+
47+
#### Az.Automation
48+
* Added support for Python 2 runbooks
49+
* Update incorrect online help URLs
50+
51+
#### Az.Cdn
52+
* Update incorrect online help URLs
53+
54+
#### Az.Compute
55+
* Add Invoke-AzVMReimage cmdlet
56+
* Add TempDisk parameter to Set-AzVmss
57+
* Fix the warning message of New-AzVM
58+
59+
#### Az.ContainerRegistry
60+
* Update incorrect online help URLs
61+
62+
#### Az.DataFactory
63+
* Updated ADF .Net SDK version to 3.0.0
64+
65+
#### Az.DataLakeStore
66+
* Fix issue with ADLS endpoint when using MSI
67+
- More information here: https://github.com/Azure/azure-powershell/issues/7462
68+
* Update incorrect online help URLs
69+
70+
#### Az.IotHub
71+
* Add Encoding format to Add-IotHubRoutingEndpoint cmdlet.
72+
73+
#### Az.KeyVault
74+
* Update incorrect online help URLs
75+
76+
#### Az.Network
77+
* Update incorrect online help URLs
78+
79+
#### Az.Resources
80+
* Fix incorrect examples in 'New-AzADAppCredential' and 'New-AzADSpCredential' reference documentation
81+
* Fix issue where path for '-TemplateFile' parameter was not being resolved before executing resource group deployment cmdlets
82+
* Az.Resources: Correct documentation for New-AzureRmPolicyDefinition -Mode default value
83+
* Az.Resources: Fix for issue https://github.com/Azure/azure-powershell/issues/7522
84+
* Az.Resources: Fix for issue https://github.com/Azure/azure-powershell/issues/5747
85+
* Fix formatting issue with 'PSResourceGroupDeployment' object
86+
- More information here: https://github.com/Azure/azure-powershell/issues/2123
87+
88+
#### Az.ServiceFabric
89+
* Rollback when a certificate is added to VMSS model but an exception is thrown this is to fix bug: https://github.com/Azure/service-fabric-issues/issues/932
90+
* Fix some error messages.
91+
* Fix create cluster with default ARM template for New-AzServiceFabriCluster which was not working with migration to Az.
92+
* Fix add cluster/application certificate to only add to VM Scale Sets that correspond to the cluster by checking cluster id in the extension.
93+
94+
#### Az.SignalR
95+
* Update incorrect online help URLs
96+
97+
#### Az.Sql
98+
* Update incorrect online help URLs
99+
* Updated parameter description for LicenseType parameter with possible values
100+
* Fix for updating managed instance identity not working when it is the only updated property
101+
* Support for custom collation on managed instance
102+
103+
#### Az.Storage
104+
* Update incorrect online help URLs
105+
* Give detail error message when get/set classic Logging/Metric on Premium Storage Account, since Premium Storage Account not supoort classic Logging/Metric.
106+
- Get/Set-AzStorageServiceLoggingProperty
107+
- Get/Set-AzStorageServiceMetricsProperty
108+
109+
#### Az.TrafficManager
110+
* Update incorrect online help URLs
111+
112+
#### Az.Websites
113+
* Update incorrect online help URLs
114+
* Fixes 'New-AzWebAppSSLBinding' to upload the certificate to the correct resourcegroup+location if the app is hosted on an ASE.
115+
* Fixes 'New-AzWebAppSSLBinding' to not overwrite the tags on binding an SSL certificate to an app
116+
1117
## 1.1.0 - January 2019
2118
#### Az.Accounts
3119
* Add 'Local' Scope to Enable-AzureRmAlias

CodeSign.targets

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
<ItemGroup Condition="'$(Scope)' == 'All' or '$(Scope)' == 'Latest' or '$(Scope)' == 'Netcore'">
2222
<DelaySignedAssembliesToSign Include="$(PackageDirectory)\$(Configuration)\**\Microsoft*Azure*PowerShell*Cmdlets*.dll;
2323
$(PackageDirectory)\$(Configuration)\Az.Accounts\Microsoft.Azure.PowerShell.Authentication.ResourceManager.dll;
24+
$(PackageDirectory)\$(Configuration)\**\Microsoft.Azure.PowerShell.Authenticators.dll;
2425
$(PackageDirectory)\$(Configuration)\Az.Accounts\Microsoft.Azure.PowerShell.Authentication.dll" />
2526
</ItemGroup>
2627

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ To change the subscription that you are using for your current context, use the
8989
Set-AzContext -Subscription $SubscriptionName -Name 'MyContext'
9090
9191
# Set the Azure PowerShell context using piping
92-
Get-AzSubscription -SubscriptionName $SubscriptionName | Set-AzureRmContext -Name 'MyContext'
92+
Get-AzSubscription -SubscriptionName $SubscriptionName | Set-AzContext -Name 'MyContext'
9393
```
9494

9595
For details on Azure PowerShell contexts, see our [persisted credentials guide][PersistedCredentialsGuide].

build.proj

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -218,8 +218,11 @@
218218
<!-- Build and create package content -->
219219
<Exec Command="dotnet --version" />
220220
<Exec Command="dotnet new sln -n Azure.PowerShell --force" />
221+
<PropertyGroup Condition="'$(ExcludeAuthenticators)' == 'true'">
222+
<AuthenticatorExclusions>$(LibraryRoot)src/**/Authenticators.csproj;</AuthenticatorExclusions>
223+
</PropertyGroup>
221224
<ItemGroup>
222-
<ModuleCsprojFiles Include="$(LibraryRoot)src/**/*.csproj" Exclude="$(LibraryRoot)src/**/*.Test.csproj" />
225+
<ModuleCsprojFiles Include="$(LibraryRoot)src/**/*.csproj" Exclude="$(AuthenticatorExclusions)$(LibraryRoot)src/**/*.Test.csproj" />
223226
</ItemGroup>
224227
<!-- https://stackoverflow.com/a/35477012/294804 -->
225228
<ItemGroup>
@@ -228,7 +231,7 @@
228231
</ModuleCsprojFilesRelative>
229232
</ItemGroup>
230233
<Exec Command="dotnet sln Azure.PowerShell.sln add @(ModuleCsprojFilesRelative->'%(RelativePath)', ' ')" />
231-
<Exec Command="dotnet sln Azure.PowerShell.sln add $(LibraryRoot)tools/Tools.Common/Tools.Common.Netcore.csproj $(LibraryRoot)tools/StaticAnalysis/StaticAnalysis.Netcore.csproj" />
234+
<Exec Command="dotnet sln Azure.PowerShell.sln add $(LibraryRoot)tools/Tools.Common/Tools.Common.Netcore.csproj $(LibraryRoot)tools/StaticAnalysis/StaticAnalysis.Netcore.csproj $(LibraryRoot)tools/VersionController/VersionController.Netcore.csproj" />
232235
<Exec Command="dotnet publish Azure.PowerShell.sln -c $(Configuration)" />
233236

234237

@@ -372,14 +375,17 @@
372375

373376
<Target Name="Test">
374377
<Message Importance="high" Text="Running check in tests..." />
378+
<PropertyGroup Condition="'$(ExcludeAuthenticators)' == 'true'">
379+
<AuthenticatorExclusions>$(LibraryRoot)src/**/Authenticators.csproj;</AuthenticatorExclusions>
380+
</PropertyGroup>
375381

376382
<CallTarget Targets="BinScopeCheck" Condition="'$(OnPremiseBuild)'" />
377383
<CallTarget Targets="RunPoliCheck" Condition="'$(OnPremiseBuild)'" />
378384

379385
<MakeDir Directories="$(TestOutputDirectory)" ContinueOnError="false" />
380386
<Exec Command="dotnet new sln -n Azure.PowerShell --force" />
381387
<ItemGroup>
382-
<ModuleCsprojFiles Include="$(LibraryRoot)src/**/*.csproj" />
388+
<ModuleCsprojFiles Include="$(LibraryRoot)src/**/*.csproj" Exclude="$(AuthenticatorExclusions)"/>
383389
</ItemGroup>
384390
<!-- https://stackoverflow.com/a/35477012/294804 -->
385391
<ItemGroup>

documentation/development-docs/generate-format.ps1xml-file.md

Lines changed: 66 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -180,18 +180,18 @@ namespace Microsoft.Azure.Commands.Profile.Models
180180

181181
// code omitted for brevity
182182
183-
[Ps1Xml(Label = "Subscription Id", Target = ViewControl.Table)]
183+
[Ps1Xml(Label = "SubscriptionId", Target = ViewControl.Table)]
184184
public string Id { get; set; }
185185

186-
[Ps1Xml(Label = "Subscription Name", Target = ViewControl.Table)]
186+
[Ps1Xml(Label = "Name", Target = ViewControl.Table)]
187187
public string Name { get; set; }
188188

189189
[Ps1Xml(Label = "State", Target = ViewControl.Table)]
190190
public string State { get; set; }
191191

192192
public string SubscriptionId { get { return Id; } }
193193

194-
[Ps1Xml(Label = "Tenant Id", Target = ViewControl.Table)]
194+
[Ps1Xml(Label = "TenantId", Target = ViewControl.Table)]
195195
public string TenantId
196196
{
197197
get
@@ -260,8 +260,8 @@ To specify what goes into the table view - use the **ScriptBlock** attribute pro
260260
{
261261
// code omitted for brevity
262262
263-
[Ps1Xml(Label = "Account Id", Target = ViewControl.Table, ScriptBlock = "$_.Account.Id")]
264-
[Ps1Xml(Label = "Account Type", Target = ViewControl.Table, ScriptBlock = "$_.Account.Type")]
263+
[Ps1Xml(Label = "Account.Id", Target = ViewControl.Table, ScriptBlock = "$_.Account.Id")]
264+
[Ps1Xml(Label = "Account.Type", Target = ViewControl.Table, ScriptBlock = "$_.Account.Type")]
265265
public IAzureAccount Account { get; set; }
266266

267267
// code omitted for brevity
@@ -272,8 +272,8 @@ Note: **$_** symbol in PowerShell means the same as **this** key word means in C
272272

273273
These two attribute will result in 2 column in the table view:
274274
```Ps
275-
Account Id Account Type
276-
========== ============
275+
Account.Id Account.Type
276+
========== ============
277277
```
278278
## GroupBy a property.
279279

@@ -284,7 +284,7 @@ public class PSAzureSubscription : IAzureSubscription
284284

285285
// code omitted for brevity
286286
287-
[Ps1Xml(Label = "Subscription Id", Target = ViewControl.Table, GroupByThis = true)]
287+
[Ps1Xml(Label = "SubscriptionId", Target = ViewControl.Table, GroupByThis = true)]
288288
public string Id { get; set; }
289289

290290
// code omitted for brevity
@@ -298,7 +298,7 @@ public class PSAzureSubscription : IAzureSubscription
298298

299299
// code omitted for brevity
300300
301-
[Ps1Xml(Label = "Subscription Name", Target = ViewControl.Table, Position = 0)]
301+
[Ps1Xml(Label = "Name", Target = ViewControl.Table, Position = 0)]
302302
public string Name { get; set; }
303303

304304
// code omitted for brevity
@@ -309,53 +309,70 @@ This will place the column at the very beginning of the table.
309309

310310
# How to generate format.ps1xml file.
311311

312-
1. First of all you need to [build](https://github.com/Azure/azure-powershell/blob/master/documentation/development-docs/azure-powershell-developer-guide.md#building-the-environment) PowerShell Azure:
313-
314-
```Powershell
315-
PS E:\git\azure-powershell> msbuild build.proj /p:SkipHelp=true
316-
```
317-
318-
* After the build is completed you can find build artifacts in the ```.\artifacts\Debug``` folder:
319-
320-
```Powershell
321-
PS E:\git\azure-powershell> ls .\artifacts\Debug\
312+
## Let's consider how to generate a format.ps1xml file for the Az.Storage and Az.Account modules.
313+
1. Start PowerShell 6
314+
2. Build and import the FormatPs1XmlGenerator module.
315+
* Go to the generator directory
316+
```Powershell
317+
PS C:\Users\you> cd E:\git\azure-powershell\tools\FormatPs1XmlGenerator\
318+
```
319+
* Build the generator solution
320+
```Powershell
321+
PS E:\git\azure-powershell\tools\FormatPs1XmlGenerator> dotnet build
322+
```
323+
* Import the generator module
324+
```Powershell
325+
PS E:\git\azure-powershell\tools\FormatPs1XmlGenerator> Import-Module .\FormatPs1XmlGenerator\bin\Debug\FormatPs1XmlGenerator.psd1
326+
```
327+
328+
3. Build the Az.Storage module.
329+
* Go to the Storage directory
330+
```Powershell
331+
PS C:\Users\you>cd E:\git\azure-powershell\src\Storage
332+
```
333+
* Build the module
334+
```Powershell
335+
PS E:\git\azure-powershell\src\Storage>dotnet build
336+
```
337+
* Go to the repository root folder
338+
```Powershell
339+
PS E:\git\azure-powershell\src\Storage>cd E:\git\azure-powershell\
340+
```
341+
* Check the artifacts folder - all built modules should be there. Since Az.Storage depends on the Az.Accounts module both Az.Accounts and Az.Storage modules should be there:
342+
```Powershell
343+
PS E:\git\azure-powershell> ls .\artifacts\Debug\
322344

323345

324346
Directory: E:\git\azure-powershell\artifacts\Debug
325347

326348

327-
Mode LastWriteTime Length Name
328-
---- ------------- ------ ----
329-
d----- 4/25/2018 4:37 PM ResourceManager
330-
d----- 4/25/2018 4:35 PM ServiceManagement
331-
d----- 4/25/2018 4:35 PM Storage
332-
-a---- 4/25/2018 4:31 PM 11384 Az.psd1
333-
-a---- 4/25/2018 4:50 PM 8708 Az.psm1
334-
335-
```
336-
337-
2. Import the **RepoTask cmdlets**:
338-
339-
```PowerShell
340-
PS E:\git\azure-powershell> Import-Module E:\git\azure-powershell\tools\RepoTasks\RepoTasks.Cmdlets\bin\Debug\RepoTasks.Cmdlets.dll
341-
```
342-
3. Run the **New-FormatPs1Xml** cmdlet.
343-
* The cmdlet has one required argument **-ModulePath** - a path to a module manifest (psd1) file. Since in our example we are using the Get-AzSubscription cmdlet from the Az.Accounts module we need to specify path to the Az.Accounts module manifest which is
344-
```
345-
E:\git\azure-powershell\artifacts\Debug\Az.Accounts\Az.Accounts.psd1
346-
```
347-
* Also with the cmdlet we need to use **-OnlyMarkedProperties** switch.
348-
* You may also want to specify an output path for the generated file with the **-OutputPath** argument. If not specified this is current folder.
349-
350-
```
351-
PS E:\git\azure-powershell> New-FormatPs1Xml -ModulePath .\artifacts\Debug\Az.Accounts\Az.Accounts.psd1 -OnlyMarkedProperties
352-
353-
E:\git\azure-powershell\Microsoft.Azure.Commands.Profile.generated.format.ps1xml
354-
```
355-
* After a successful run the cmdlet outputs the full path to the generated format.ps1xml file.
349+
Mode LastWriteTime Length Name
350+
---- ------------- ------ ----
351+
d----- 1/29/2019 2:18 PM Az.Accounts
352+
d----- 1/29/2019 2:18 PM Az.Storage
353+
```
354+
4. Run the **New-FormatPs1Xml** cmdlet.
355+
* The cmdlet has one required parameter **-ModulePath** - a path to a module manifest (psd1) file.
356+
* Also with the cmdlet we need to use **-OnlyMarkedProperties** switch.
357+
* You may also want to specify an output path for the generated file with the **-OutputPath** argument. If not specified this is current folder.
358+
* After a successful run the cmdlet outputs the full path to the generated format.ps1xml file.
359+
360+
* Below is an example of how to generate a format.ps1xml file for the ```Az.Storage``` module:
361+
```Powershell
362+
PS E:\git\azure-powershell> New-FormatPs1Xml -OnlyMarkedProperties -ModulePath .\artifacts\Debug\Az.Storage\Az.Storage.psd1
363+
E:\git\azure-powershell\Microsoft.Azure.PowerShell.Cmdlets.Storage.Management.generated.format.ps1xml
364+
E:\git\azure-powershell\Microsoft.Azure.PowerShell.Cmdlets.Storage.generated.format.ps1xml
365+
```
366+
* Below is an example of how to generate a format.ps1xml file for the ```Az.Account``` module:
367+
```powershell
368+
PS E:\git\azure-powershell> New-FormatPs1Xml -OnlyMarkedProperties -ModulePath .\artifacts\Debug\Az.Accounts\Az.Accounts.psd1
369+
E:\git\azure-powershell\Microsoft.Azure.PowerShell.Cmdlets.Accounts.generated.format.ps1xml
370+
PS E:\git\azure-powershell>
371+
```
356372

357373
# How to test the format.ps1xml file.
358374

375+
## Let's take a look at how to check the newly created format.ps1xml file for the ```Az.Account``` module.
359376
**Note:** All the paths used in the example in the section are under **_azure-powershell/artifacts/Debug_**
360377

361378
1. **Copy** the generated format.ps1xml file to the built module folder (this is where your module manifest file psd1 is located). In our example the module folder is
@@ -396,7 +413,7 @@ PS C:\> Import-Module E:\git\azure-powershell\artifacts\Debug\Az.Accounts\Az.Acc
396413
```Powershell
397414
PS C:\> Get-AzSubscription
398415

399-
Subscription Id Subscription Name State Tenant Id
416+
SubscriptionId Name State TenantId
400417
--------------- ----------------- ----- ---------
401418
c9cbd920-c00c-427c-852b-c329e824c3a8 Azure SDK Powershell Test Enabled 72f988bf-86f1-41af-91ab-7a64d1d63df5
402419
6b085460-5f21-477e-ba44-4cd9fbd030ef Azure SDK Infrastructure Enabled 72f988bf-86f1-41af-91ab-7a64d1d63df5

src/Accounts/Accounts.Test/AutosaveTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
using Microsoft.Azure.Commands.ScenarioTest;
3131
using Microsoft.Azure.Commands.ResourceManager.Common;
3232

33-
namespace Microsoft.Azure.Commands.ResourceManager.Profile.Test
33+
namespace Microsoft.Azure.Commands.Profile.Test
3434
{
3535
public class AutosaveTests
3636
{

0 commit comments

Comments
 (0)