Skip to content

Commit f2256e0

Browse files
authored
Merge pull request #1 from Azure/master
Sync
2 parents 7df84c6 + 809cc7d commit f2256e0

File tree

2,335 files changed

+624799
-413557
lines changed

Some content is hidden

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

2,335 files changed

+624799
-413557
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: 137 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,142 @@
1+
## 1.2.0 - January 2019
2+
#### Az.Accounts
3+
* Add interactive and username/password authentication for Windows PowerShell 5.1 only
4+
* Update incorrect online help URLs
5+
* Add warning message in PS Core for Uninstall-AzureRm
6+
7+
#### Az.Aks
8+
* Update incorrect online help URLs
9+
10+
#### Az.Automation
11+
* Added support for Python 2 runbooks
12+
* Update incorrect online help URLs
13+
14+
#### Az.Cdn
15+
* Update incorrect online help URLs
16+
17+
#### Az.Compute
18+
* Add Invoke-AzVMReimage cmdlet
19+
* Add TempDisk parameter to Set-AzVmss
20+
* Fix the warning message of New-AzVM
21+
22+
#### Az.ContainerRegistry
23+
* Update incorrect online help URLs
24+
25+
#### Az.DataFactory
26+
* Updated ADF .Net SDK version to 3.0.0
27+
28+
#### Az.DataLakeStore
29+
* Fix issue with ADLS endpoint when using MSI
30+
- More information here: https://github.com/Azure/azure-powershell/issues/7462
31+
* Update incorrect online help URLs
32+
33+
#### Az.IotHub
34+
* Add Encoding format to Add-IotHubRoutingEndpoint cmdlet.
35+
36+
#### Az.KeyVault
37+
* Update incorrect online help URLs
38+
39+
#### Az.Network
40+
* Update incorrect online help URLs
41+
42+
#### Az.Resources
43+
* Fix incorrect examples in 'New-AzADAppCredential' and 'New-AzADSpCredential' reference documentation
44+
* Fix issue where path for '-TemplateFile' parameter was not being resolved before executing resource group deployment cmdlets
45+
* Az.Resources: Correct documentation for New-AzureRmPolicyDefinition -Mode default value
46+
* Az.Resources: Fix for issue https://github.com/Azure/azure-powershell/issues/7522
47+
* Az.Resources: Fix for issue https://github.com/Azure/azure-powershell/issues/5747
48+
* Fix formatting issue with 'PSResourceGroupDeployment' object
49+
- More information here: https://github.com/Azure/azure-powershell/issues/2123
50+
51+
#### Az.ServiceFabric
52+
* 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
53+
* Fix some error messages.
54+
* Fix create cluster with default ARM template for New-AzServiceFabriCluster which was not working with migration to Az.
55+
* Fix add cluster/application certificate to only add to VM Scale Sets that correspond to the cluster by checking cluster id in the extension.
56+
57+
#### Az.SignalR
58+
* Update incorrect online help URLs
59+
60+
#### Az.Sql
61+
* Update incorrect online help URLs
62+
* Updated parameter description for LicenseType parameter with possible values
63+
* Fix for updating managed instance identity not working when it is the only updated property
64+
* Support for custom collation on managed instance
65+
66+
#### Az.Storage
67+
* Update incorrect online help URLs
68+
* Give detail error message when get/set classic Logging/Metric on Premium Storage Account, since Premium Storage Account not supoort classic Logging/Metric.
69+
- Get/Set-AzStorageServiceLoggingProperty
70+
- Get/Set-AzStorageServiceMetricsProperty
71+
72+
#### Az.TrafficManager
73+
* Update incorrect online help URLs
74+
75+
#### Az.Websites
76+
* Update incorrect online help URLs
77+
* Fixes 'New-AzWebAppSSLBinding' to upload the certificate to the correct resourcegroup+location if the app is hosted on an ASE.
78+
* Fixes 'New-AzWebAppSSLBinding' to not overwrite the tags on binding an SSL certificate to an app
79+
80+
## 1.1.0 - January 2019
81+
#### Az.Accounts
82+
* Add 'Local' Scope to Enable-AzureRmAlias
83+
84+
#### Az.Compute
85+
* Name is now optional in ID parameter set for Restart/Start/Stop/Remove/Set-AzVM and Save-AzVMImage
86+
* Updated the description of ID in help files
87+
* Fix backward compatibility issue with Az.Accounts module
88+
89+
#### Az.DataLakeStore
90+
* Update the sdk version of dataplane to 1.1.14 for SDK fixes.
91+
- Fix handling of negative acesstime and modificationtime for getfilestatus and liststatus, Fix async cancellation token
92+
93+
#### Az.EventGrid
94+
* Updated to use the 2019-01-01 API version.
95+
* Update the following cmdlets to support new scenario in 2019-01-01 API version
96+
- New-AzureRmEventGridSubscription: Add new optional parameters for specifying:
97+
- Event Time-To-Live,
98+
- Maximum number of delivery attempts for the events,
99+
- Dead letter endpoint.
100+
- Update-AzureRmEventGridSubscription: Add new optional parameters for specifying:
101+
- Event Time-To-Live,
102+
- Maximum number of delivery attempts for the events,
103+
- Dead letter endpoint.
104+
* Add new enum values (namely, storageQueue and hybridConnection) for EndpointType option in New-AzureRmEventGridSubscription and Update-AzureRmEventGridSubscription cmdlets.
105+
* Show warning message if creating or updating the event subscription is expected to entail manual action from user.
106+
107+
#### Az.IotHub
108+
* Updated to the latest version of the IotHub SDK
109+
110+
#### Az.LogicApp
111+
* Get-AzLogicApp lists all without specified Name
112+
113+
#### Az.Resources
114+
* Fix parameter set issue when providing '-ODataQuery' and '-ResourceId' parameters for 'Get-AzResource'
115+
- More information here: https://github.com/Azure/azure-powershell/issues/7875
116+
* Fix handling of the -Custom parameter in New/Set-AzPolicyDefinition
117+
* Fix typo in New-AzDeployment documentation
118+
* Made '-MailNickname' parameter mandatory for 'New-AzADUser'
119+
- More information here: https://github.com/Azure/azure-powershell/issues/8220
120+
121+
#### Az.SignalR
122+
* Fix backward compatibility issue with Az.Accounts module
123+
124+
#### Az.Sql
125+
* Converted the Storage management client dependency to the common SDK implementation.
126+
127+
#### Az.Storage
128+
* Set the StorageAccountName of Storage context as the real Storage Account Name, when it's created with Sas Token, OAuth or Anonymous
129+
- New-AzStorageContext
130+
* Create Sas Token of Blob Snapshot Object with '-FullUri' parameter, fix the returned Uri to be the sanpshot Uri
131+
- New-AzStorageBlobSASToken
132+
133+
#### Az.Websites
134+
* Fixed a date parsing bug in 'Get-AzDeletedWebApp'
135+
* Fix backward compatibility issue with Az.Accounts module
136+
1137
## Version 1.0.0 - December 2018
2138

3139
#### General
4140

5141
* General availability of `Az` module
6-
* For more information about the `Az` module, please visit the following: https://aka.ms/azps-announce
142+
* For more information about the `Az` module, please visit the following: https://aka.ms/azps-announce

CodeSign.targets

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,10 @@
1919
<Message Text="----> Dlls signing section" Importance="high"/>
2020
<!-- Azure -->
2121
<ItemGroup Condition="'$(Scope)' == 'All' or '$(Scope)' == 'Latest' or '$(Scope)' == 'Netcore'">
22-
<DelaySignedAssembliesToSign Include="$(PackageDirectory)\$(Configuration)\**\Microsoft*Azure*PowerShell*Cmdlets*.dll" />
22+
<DelaySignedAssembliesToSign Include="$(PackageDirectory)\$(Configuration)\**\Microsoft*Azure*PowerShell*Cmdlets*.dll;
23+
$(PackageDirectory)\$(Configuration)\Az.Accounts\Microsoft.Azure.PowerShell.Authentication.ResourceManager.dll;
24+
$(PackageDirectory)\$(Configuration)\**\Microsoft.Azure.PowerShell.Authenticators.dll;
25+
$(PackageDirectory)\$(Configuration)\Az.Accounts\Microsoft.Azure.PowerShell.Authentication.dll" />
2326
</ItemGroup>
2427

2528
<Message Importance="high" Text="$(PackageDirectory)\$(Configuration) does not contains any files to sign. Code sign will skip." Condition="'@(DelaySignedAssembliesToSign)' == ''" />

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: 10 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>
@@ -388,6 +394,7 @@
388394
</ModuleCsprojFilesRelative>
389395
</ItemGroup>
390396
<Exec Command="dotnet sln Azure.PowerShell.sln add @(ModuleCsprojFilesRelative->'%(RelativePath)', ' ')" />
397+
<Exec Command="dotnet sln Azure.PowerShell.sln add $(LibraryRoot)tools/ScenarioTest.ResourceManager/ScenarioTest.ResourceManager.csproj $(LibraryRoot)tools/TestFx/TestFx.csproj" />
391398
<!-- https://github.com/Microsoft/msbuild/issues/3157#issuecomment-378002971 -->
392399
<!-- https://github.com/xunit/xunit/issues/1154#issuecomment-405366373 -->
393400
<Exec Command="dotnet test Azure.PowerShell.sln --filter &quot;AcceptanceType=CheckIn%26RunType!=DesktopOnly&quot; --configuration $(Configuration) --framework netcoreapp2.0 --logger trx" />

documentation/development-docs/azure-powershell-developer-guide.md

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -174,13 +174,13 @@ After the solution file is updated, save and close it. Now, open the solution fi
174174
<PsModuleName>Cdn</PsModuleName>
175175
</PropertyGroup>
176176
```
177-
- Remove the entry:
177+
- **Remove the entry**:
178178
```xml
179179
<PropertyGroup>
180180
<RootNamespace>$(LegacyAssemblyPrefix)$(PsModuleName)</RootNamespace>
181181
</PropertyGroup>
182182
```
183-
This is not needed since this is a new project.
183+
**Note**: This is not needed since this is a new project and does not use legacy namespace conventions.
184184

185185
- Update this entry to use your SDK:
186186
```xml
@@ -244,8 +244,11 @@ Please see our guide on [Using Azure TestFramework](../testing-docs/using-azure-
244244

245245
### Adding Scenario Tests
246246

247-
- Create a new class in `Commands.<SERVICE>.Test`
248-
- Create a ps1 file in the same folder that contains the actual tests ([see sample](../../src/Media/Commands.Media.Test/ScenarioTests))
247+
- Create a new class in `<SERVICE>.Test`
248+
- Add `[Fact]` as an attribute to every test
249+
- Add `[Trait(Category.AcceptanceType, Category.CheckIn)]` as an attribute to any test that should be run during CI in Playback mode.
250+
- Add `[Trait(Category.AcceptanceType, Category.LiveOnly)]` as an attribute to any test that cannot be run in Playback mode (for example, if a test depends on a Dataplane SDK).
251+
- Create a ps1 file in the same folder that contains the actual tests ([see sample](../../src/Media/Media.Test/ScenarioTests))
249252
- Use `Assert-AreEqual x y` to verify that values are the same
250253
- Use `Assert-AreNotEqual x y` to verify that values are not the same
251254
- Use `Assert-Throws scriptblock message` to verify an exception is being thrown
@@ -256,7 +259,7 @@ Please see our guide on [Using Azure TestFramework](../testing-docs/using-azure-
256259
- Use `Assert-Null object` to verify that an object is null
257260
- Use `Assert-NotNull object` to verify that an object is not null
258261
- Use `Assert-Exists path` to verify that a file exists
259-
- Use `Assert-AreEqualArray a1 a2` to verify that arrays are the sam
262+
- Use `Assert-AreEqualArray a1 a2` to verify that arrays are the same
260263

261264
### Using Active Directory
262265

@@ -270,14 +273,8 @@ Please see our guide on [Using Azure TestFramework](../testing-docs/using-azure-
270273
271274
### AD Scenario Tests
272275

273-
Create these environment variables for the AD scenario tests:
276+
Create this environment variables for the AD scenario tests:
274277

275-
- `AZURE_LIVEID` should be UserId and Password for a valid LiveId account.
276-
- `AZURE_LIVEID=UserId=<[email protected]>;Password=<Password>`
277-
- `AZURE_ORGID_FPO` should be an orgid and password for an account that does not have any subscriptions or role assignments associated with it. It is supposed to be a foreign principal in your current tenant.
278-
- `AZURE_ORGID_FPO=UserId=<[email protected]>;Password=<Password>`
279-
- `AZURE_ORGID_ONE_TENANT_ONE_SUBSCRIPTION` should be an account that is in a single tenant and has access to the subscription managed by that AD tenant.
280-
- `AZURE_ORGID_ONE_TENANT_ONE_SUBSCRIPTION=UserId=<[email protected]>;Password=<Password>;SubscriptionId=<SubscriptionId>;AADAuthEndpoint=https://login.windows.net/`
281278
- `AZURE_SERVICE_PRINCIPAL` should be a service principal - an application defined in the subscription's tenant - that has management access to the subscription (or at least to a resource group in the tenant)
282279
- `AZURE_SERVICE_PRINCIPAL=UserId=<UserGuid>;Password=<Password>;AADTenant=<TenantGuid>;SubscriptionId=<SubscriptionId>`
283280

@@ -287,7 +284,7 @@ Create these environment variables for the AD scenario tests:
287284
- Run the test in Visual Studio in the Test Explorer window and make sure you got a generated JSON file that matches the test name in the bin folder under the `SessionRecords` folder
288285
- Copy this `SessionRecords` folder and place it inside the test project
289286
- Inside Visual Studio, add all of the generated JSON files, making sure to change the "Copy to Output Directory" property for each one to "Copy if newer"
290-
- Make sure that all of these JSON files appear in your `Commands.<SERVICE>.Test.csproj` file
287+
- Make sure that all of these JSON files appear in your `<SERVICE>.Test.csproj` file
291288

292289
# After Development
293290

documentation/testing-docs/using-azure-test-framework.md

Lines changed: 3 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,8 @@
66
- [New-TestCredential](#new-testcredential)
77
- [Create New Service Principal](#create-new-service-principal)
88
- [Use Existing Service Principal](#use-existing-service-principal)
9-
- [UserId](#userid)
109
- [Set-TestEnvironment](#set-testenvironment)
1110
- [Existing Service Principal](#existing-service-principal)
12-
- [UserId](#userid)
1311
- [Manually Set Environment Variables](#manually-set-environment-variables)
1412
- [Environment Variables](#environment-variables)
1513
- [Playback Test](#playback-test)
@@ -51,11 +49,11 @@ This cmdlet, located in the [`Repo-Tasks` module](/tools/Repo-Tasks.psd1), which
5149
Using a service principal is the preferred option for recording tests because it works with both .NET Framework and .NET Core. In order to create a new service principal, run this command with an unused service principal display name:
5250

5351
```powershell
54-
New-TestCredential -ServicePrincipalDisplayName "ScenarioTestCredentials" -ServicePrincipalSecret `
55-
"testpassword" -SubscriptionId <subscriptionId> -TenantId <tenantId> -RecordMode "Record"
52+
New-TestCredential -ServicePrincipalDisplayName "ScenarioTestCredentials" -SubscriptionId `
53+
<subscriptionId> -TenantId <tenantId> -RecordMode "Record"
5654
```
5755

58-
This command will create a new service principal, set the correct role assignment for this service principal based upon the subscription provided, and place the service principal id and secret into the credentials file.
56+
This command will create a new service principal, set the correct role assignment for this service principal based upon the subscription provided, and place the service principal id and automatically generated secret into the credentials file.
5957

6058
Alternatively, to create a service principal, follow the [Azure AD guide to create a Application Service Principal](https://docs.microsoft.com/en-us/azure/azure-resource-manager/resource-group-create-service-principal-portal#create-an-active-directory-application). The application type should be `Web app / API` and the sign-on URL value is irrelevant (you can set any value).
6159

@@ -68,15 +66,6 @@ New-TestCredential -ServicePrincipalDisplayName "Existing Service Principal" -Se
6866
"testpassword" -SubscriptionId <subscriptionId> -TenantId <tenantId> -RecordMode "Record"
6967
```
7068

71-
#### UserId
72-
73-
This is no longer the preferred option because it only works when running on .NET Framework. When running on .NET Core you may get an error like `Interactive Login is supported only in NET45 projects`. Additionally, you will have to manually log in when running the scenario tests rather than being automatically validated.
74-
75-
```powershell
76-
New-TestCredential -UserId "[email protected]" -SubscriptionId <subscriptionId> `
77-
-TenantId <tenantId> -RecordMode "Record"
78-
```
79-
8069
### Set-TestEnvironment
8170

8271
This cmdlet, located in the [`Repo-Tasks` module](/tools/Repo-Tasks.psd1), will directly set the environment variable for the session.
@@ -90,15 +79,6 @@ Set-TestEnvironment -ServicePrincipalId <servicePrincipalId> -ServicePrincipalSe
9079
"testpassword" -SubscriptionId <subscriptionId> -TenantId <tenantId> -RecordMode "Record"
9180
```
9281

93-
#### UserId
94-
95-
This is no longer the preferred option because it only works when running on .NET Framework. When running on .NET Core you may get an error like `Interactive Login is supported only in NET45 projects`.
96-
97-
```powershell
98-
Set-TestEnvironment -UserId "[email protected]" -SubscriptionId <subscriptionId> `
99-
-TenantId <tenantId> -RecordMode "Record"
100-
```
101-
10282
### Manually Set Environment Variables
10383

10484
#### Environment Variables
@@ -118,21 +98,8 @@ TEST_CSM_ORGID_AUTHENTICATION=
11898
AZURE_TEST_MODE=Playback
11999
```
120100

121-
#### Record Test with Interactive login using OrgId
122-
123-
This is no longer the preferred option because it only works when running on .NET Framework. When running on .NET Core you may get an error like `Interactive Login is supported only in NET45 projects`.
124-
125-
To use this option, set the following environment variables before starting Visual Studio:
126-
127-
```
128-
TEST_CSM_ORGID_AUTHENTICATION=SubscriptionId={SubId};UserId={orgId};AADTenant={tenantId};Environment={env};HttpRecorderMode=Record;
129-
AZURE_TEST_MODE=Record
130-
```
131-
132101
#### Record Test with service principal
133102

134-
This is the preferred option for recording tests because it works with both .NET Framework and .NET Core.
135-
136103
After the service principal is created, you will need to give it access to Azure resources. This can be done with the following PowerShell command, with the [Service Principal Application ID](https://docs.microsoft.com/en-us/azure/azure-resource-manager/resource-group-create-service-principal-portal#get-application-id-and-authentication-key) (this is a guid, not the display name of the service principal) substituted in for `{clientId}`.
137104

138105
```powershell

setup/azurecmd.wxs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<?xml version="1.0" encoding="UTF-8"?>
1+
<?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
<Product Id="*"
44
Name="$(var.productName)"

0 commit comments

Comments
 (0)