Skip to content

Commit 28c3209

Browse files
committed
Merge branch 'master' of https://github.com/Azure/azure-powershell into iot-parent-device
2 parents 5dea9b6 + 81893a2 commit 28c3209

File tree

13 files changed

+5106
-3254
lines changed

13 files changed

+5106
-3254
lines changed

src/Compute/Compute/ChangeLog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
- New-AzDiskUpdateConfig, New-AzSnapshotUpdateConfig
3131
* Add ColocationStatus parameter to Get-AzProximityPlacementGroup cmdlet.
3232
* Fix broken example code for 'Revoke-AzSnapshotAccess' and 'Grant-AzSnapshotAccess'
33+
* Fix broken example code for 'Set-AzDiskDiskEncryptionKey' and 'Set-AzDiskKeyEncryptionKey'
3334

3435
## Version 3.3.0
3536
* Fix Set-AzVMCustomScriptExtension cmdlet for a VM with managed OD disk which does not have OS profile.

src/Compute/Compute/help/Set-AzDiskDiskEncryptionKey.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ PS C:\> $keyUrl = https://myvault.vault-int.azure-int.net/keys/456;
3131
PS C:\> $keyId = '/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/ResourceGroup01/providers/Microsoft.KeyVault/vaults/TestVault456';
3232
PS C:\> $diskconfig = Set-AzDiskDiskEncryptionKey -Disk $diskconfig -SecretUrl $secretUrl -SourceVaultId $secretId;
3333
PS C:\> $diskconfig = Set-AzDiskKeyEncryptionKey -Disk $diskconfig -KeyUrl $keyUrl -SourceVaultId $keyId;
34+
PS C:\> $diskConfig.EncryptionSettingsCollection.EncryptionSettingsVersion = '1.1';
3435
PS C:\> New-AzDisk -ResourceGroupName 'ResourceGroup01' -DiskName 'Disk01' -Disk $diskconfig;
3536
```
3637

src/Compute/Compute/help/Set-AzDiskKeyEncryptionKey.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ PS C:\> $keyUrl = https://myvault.vault-int.azure-int.net/keys/456;
3131
PS C:\> $keyId = '/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/ResourceGroup01/providers/Microsoft.KeyVault/vaults/TestVault456';
3232
PS C:\> $diskconfig = Set-AzDiskDiskEncryptionKey -Disk $diskconfig -SecretUrl $secretUrl -SourceVaultId $secretId;
3333
PS C:\> $diskconfig = Set-AzDiskKeyEncryptionKey -Disk $diskconfig -KeyUrl $keyUrl -SourceVaultId $keyId;
34+
PS C:\> $diskconfig.EncryptionSettingsCollection.EncryptionSettingsVersion = '1.1';
3435
PS C:\> New-AzDisk -ResourceGroupName 'ResourceGroup01' -DiskName 'Disk01' -Disk $diskconfig;
3536
```
3637

src/CosmosDB/CosmosDB/ChangeLog.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,11 @@
1919
-->
2020

2121
## Upcoming Release
22+
* Added cmdlets for Gremlin, MongoDB, Cassandra and Table APIs.
23+
* Updated .NET SDK Version to 1.0.1
24+
- .NET SDK Version used in the CosmosDB-Account and SQL cmdlets is updated to 1.0.1
25+
* Added parameters ConflictResolutionPolicyMode, ConflictResolutionPolicyPath and ConflictResolutionPolicyPath in Set-AzCosmosDBSqlContainer.
26+
* Added new cmdlets for Sql API : New-CosmosDBSqlSpatialSpec, New-CosmosDBSqlCompositePath, New-CosmosDBSqlIncludedPathIndex, New-CosmosDBSqlIncludedPath
2227

2328
## Version 0.1.0
2429
* Preview release of `Az.CosmosDB` module

src/Network/Network.sln

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ManagedServiceIdentity", ".
2222
EndProject
2323
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Storage", "..\Storage\Storage\Storage.csproj", "{A2591FA5-BF93-4358-9097-E6D58FE1DDC4}"
2424
EndProject
25+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Sql", "..\Sql\Sql\Sql.csproj", "{F5235941-9E3A-4C98-8D69-FBBDD0E8C6F0}"
26+
EndProject
2527
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Storage.Management", "..\Storage\Storage.Management\Storage.Management.csproj", "{3D03EFA7-4C10-480E-89E3-C2FDF0580AB5}"
2628
EndProject
2729
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Authentication", "..\Accounts\Authentication\Authentication.csproj", "{FF81DC73-B8EC-4082-8841-4FBF2B16E7CE}"
@@ -74,6 +76,10 @@ Global
7476
{A2591FA5-BF93-4358-9097-E6D58FE1DDC4}.Debug|Any CPU.Build.0 = Debug|Any CPU
7577
{A2591FA5-BF93-4358-9097-E6D58FE1DDC4}.Release|Any CPU.ActiveCfg = Release|Any CPU
7678
{A2591FA5-BF93-4358-9097-E6D58FE1DDC4}.Release|Any CPU.Build.0 = Release|Any CPU
79+
{F5235941-9E3A-4C98-8D69-FBBDD0E8C6F0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
80+
{F5235941-9E3A-4C98-8D69-FBBDD0E8C6F0}.Debug|Any CPU.Build.0 = Debug|Any CPU
81+
{F5235941-9E3A-4C98-8D69-FBBDD0E8C6F0}.Release|Any CPU.ActiveCfg = Release|Any CPU
82+
{F5235941-9E3A-4C98-8D69-FBBDD0E8C6F0}.Release|Any CPU.Build.0 = Release|Any CPU
7783
{3D03EFA7-4C10-480E-89E3-C2FDF0580AB5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
7884
{3D03EFA7-4C10-480E-89E3-C2FDF0580AB5}.Debug|Any CPU.Build.0 = Debug|Any CPU
7985
{3D03EFA7-4C10-480E-89E3-C2FDF0580AB5}.Release|Any CPU.ActiveCfg = Release|Any CPU

src/Resources/Resources.Test/ScenarioTests/RoleAssignmentTests.cs

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// ----------------------------------------------------------------------------------
1+
// ----------------------------------------------------------------------------------
22
//
33
// Copyright Microsoft Corporation
44
// Licensed under the Apache License, Version 2.0 (the "License");
@@ -131,14 +131,14 @@ public void RaDeletionByScope()
131131
TestRunner.RunTestScript("Test-RaDeletionByScope");
132132
}
133133

134-
[Fact(Skip = "Need AD team to re-record")]
134+
[Fact]
135135
[Trait(Category.AcceptanceType, Category.CheckIn)]
136136
public void RaDeletionByScopeAtRootScope()
137137
{
138138
TestRunner.RunTestScript("Test-RaDeletionByScopeAtRootScope");
139139
}
140140

141-
[Fact(Skip = "Need AD team to re-record")]
141+
[Fact]
142142
[Trait(Category.AcceptanceType, Category.CheckIn)]
143143
public void RaDelegation()
144144
{
@@ -159,6 +159,13 @@ public void RaGetByScope()
159159
TestRunner.RunTestScript("Test-RaGetByScope");
160160
}
161161

162+
[Fact]
163+
[Trait(Category.AcceptanceType, Category.CheckIn)]
164+
public void RaGetOnlyByRoleDefinitionName()
165+
{
166+
TestRunner.RunTestScript("Test-RaGetOnlyByRoleDefinitionName");
167+
}
168+
162169
[Fact]
163170
[Trait(Category.AcceptanceType, Category.CheckIn)]
164171
public void RaGetByUPNWithExpandPrincipalGroups()

src/Resources/Resources.Test/ScenarioTests/RoleAssignmentTests.ps1

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -639,6 +639,21 @@ function Test-RaGetByScope
639639
VerifyRoleAssignmentDeleted $newAssignment1
640640
}
641641

642+
<#
643+
.SYNOPSIS
644+
Tests verifies get of RoleAssignment using only the role definition name
645+
#>
646+
function Test-RaGetOnlyByRoleDefinitionName
647+
{
648+
# Setup
649+
$definitionName = 'Owner'
650+
651+
$ras = Get-AzRoleAssignment -RoleDefinitionName $definitionName
652+
653+
Assert-NotNull $ras
654+
Assert-AreEqual $definitionName $ras[0].RoleDefinitionName
655+
}
656+
642657
<#
643658
.SYNOPSIS
644659
Creates role assignment

src/Resources/Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.RoleAssignmentTests/RaDelegation.json

Lines changed: 2412 additions & 1625 deletions
Large diffs are not rendered by default.

src/Resources/Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.RoleAssignmentTests/RaDeletionByScopeAtRootScope.json

Lines changed: 2409 additions & 1625 deletions
Large diffs are not rendered by default.

src/Resources/Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.RoleAssignmentTests/RaGetOnlyByRoleDefinitionName.json

Lines changed: 239 additions & 0 deletions
Large diffs are not rendered by default.

src/Resources/Resources/ChangeLog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
- Additional information about change #1
1919
-->
2020
## Upcoming Release
21+
* Fix for null reference bug in GetAzureRoleAssignmentCommand
2122

2223
## Version 1.11.0
2324
* Refactored template deployment cmdlets

src/Resources/Resources/Models.Authorization/AuthorizationClient.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ public List<PSRoleAssignment> FilterRoleAssignments(FilterRoleAssignmentsOptions
226226

227227
if (!string.IsNullOrEmpty(options.RoleDefinitionName))
228228
{
229-
result = result.Where(r => r.RoleDefinitionName.Equals(options.RoleDefinitionName, StringComparison.OrdinalIgnoreCase)).ToList();
229+
result = result.Where(r => r.RoleDefinitionName?.Equals(options.RoleDefinitionName, StringComparison.OrdinalIgnoreCase) ?? false).ToList();
230230
}
231231

232232
if (options.IncludeClassicAdministrators)

src/Resources/Resources/RoleAssignments/GetAzureRoleAssignmentCommand.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ namespace Microsoft.Azure.Commands.Resources
2929
[Cmdlet("Get", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "RoleAssignment", DefaultParameterSetName = ParameterSet.Empty), OutputType(typeof(PSRoleAssignment))]
3030
public class GetAzureRoleAssignmentCommand : ResourcesBaseCmdlet
3131
{
32+
#region Cmdlet Parameters
33+
3234
[Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = ParameterSet.ObjectId,
3335
HelpMessage = "The user or group object id.")]
3436
[Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = ParameterSet.ResourceGroupWithObjectId,
@@ -214,6 +216,9 @@ public class GetAzureRoleAssignmentCommand : ResourcesBaseCmdlet
214216
HelpMessage = "If specified, also returns the subscription classic administrators as role assignments.")]
215217
public SwitchParameter IncludeClassicAdministrators { get; set; }
216218

219+
#endregion
220+
221+
217222
public override void ExecuteCmdlet()
218223
{
219224
FilterRoleAssignmentsOptions options = new FilterRoleAssignmentsOptions()

0 commit comments

Comments
 (0)