Skip to content

Commit 2424eb1

Browse files
committed
Merge pull request #183 from Azure/dev
.
2 parents 1ae306f + 2d93dcb commit 2424eb1

File tree

63 files changed

+3039
-2460
lines changed

Some content is hidden

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

63 files changed

+3039
-2460
lines changed

ChangeLog.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
## 2015.11.09 version 1.0.1
2+
* Azure Compute
3+
* Added cmdlets for managing VM DiskEncryption extension
4+
* Azure KeyVault
5+
* Added EnabledForDiskEncryption and EnabledForTemplateDeployment flags to Azure Key Vault access policy
6+
* Azure Websites
7+
* Fixed issues with website management client creation
8+
19
## 2015.11.05 version 1.0
210
* Azure Compute
311
* AzureRmVM cmdlet bug fixes

src/ResourceManager/Common/Commands.ResourceManager.Common/Properties/Resources.Designer.cs

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,10 +167,10 @@ Select Y to enable data collection [Y/N]:</value>
167167
<value>Succeeded to register resource provider '{0}'</value>
168168
</data>
169169
<data name="SubscriptionIdNotFound" xml:space="preserve">
170-
<value>The provided account {0} does not have access to subscription ID "{1}". Please try logging in with different credentials not a different subscription ID.</value>
170+
<value>The provided account {0} does not have access to subscription ID "{1}". Please try logging in with different credentials or a different subscription ID.</value>
171171
</data>
172172
<data name="SubscriptionNameNotFound" xml:space="preserve">
173-
<value>The provided account {0} does not have access to subscription name "{1}". Please try logging in with different credentials not a different subscription name.</value>
173+
<value>The provided account {0} does not have access to subscription name "{1}". Please try logging in with different credentials or a different subscription name.</value>
174174
</data>
175175
<data name="TenantNotFound" xml:space="preserve">
176176
<value>Tenant '{0}' was not found. Please verify that your account has access to this tenant.</value>

src/ResourceManager/DataFactories/Commands.DataFactories.Test/Commands.DataFactories.Test.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@
6969
</Reference>
7070
<Reference Include="Microsoft.Azure.Management.DataFactories, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
7171
<SpecificVersion>False</SpecificVersion>
72-
<HintPath>..\..\..\packages\Microsoft.Azure.Management.DataFactories.4.0.0\lib\net45\Microsoft.Azure.Management.DataFactories.dll</HintPath>
72+
<HintPath>..\..\..\packages\Microsoft.Azure.Management.DataFactories.4.1.0\lib\net45\Microsoft.Azure.Management.DataFactories.dll</HintPath>
7373
</Reference>
7474
<Reference Include="Microsoft.Azure.ResourceManager, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
7575
<SpecificVersion>False</SpecificVersion>

src/ResourceManager/DataFactories/Commands.DataFactories.Test/ScenarioTests/DataFactoryGatewayTests.ps1

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ function Test-DataFactoryGateway
5353
$actual = New-AzureRmDataFactoryGateway -ResourceGroupName $rgname -DataFactoryName $dfname -Name $gwname
5454
$expected = Get-AzureRmDataFactoryGateway -ResourceGroupName $rgname -DataFactoryName $dfname -Name $gwname
5555
Assert-AreEqual $actual.Name $expected.Name
56+
Assert-NotNull $actual.Key
5657

5758
$key = New-AzureRmDataFactoryGatewayKey -ResourceGroupName $rgname -DataFactoryName $dfname -GatewayName $gwname
5859
Assert-NotNull $key

src/ResourceManager/DataFactories/Commands.DataFactories.Test/packages.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<package id="Microsoft.Azure.Gallery" version="2.6.2-preview" targetFramework="net45" />
88
<package id="Microsoft.Azure.KeyVault.Core" version="1.0.0" targetFramework="net45" />
99
<package id="Microsoft.Azure.Management.Authorization" version="1.0.0" targetFramework="net45" />
10-
<package id="Microsoft.Azure.Management.DataFactories" version="4.0.0" targetFramework="net45" />
10+
<package id="Microsoft.Azure.Management.DataFactories" version="4.1.0" targetFramework="net45" />
1111
<package id="Microsoft.Azure.Management.Resources" version="2.18.7-preview" targetFramework="net45" />
1212
<package id="Microsoft.Azure.Test.Framework" version="1.0.5774.40163-prerelease" targetFramework="net45" />
1313
<package id="Microsoft.Azure.Test.HttpRecorder" version="1.0.5774.40163-prerelease" targetFramework="net45" />

src/ResourceManager/DataFactories/Commands.DataFactories/Commands.DataFactories.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@
6767
</Reference>
6868
<Reference Include="Microsoft.Azure.Management.DataFactories, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
6969
<SpecificVersion>False</SpecificVersion>
70-
<HintPath>..\..\..\packages\Microsoft.Azure.Management.DataFactories.4.0.0\lib\net45\Microsoft.Azure.Management.DataFactories.dll</HintPath>
70+
<HintPath>..\..\..\packages\Microsoft.Azure.Management.DataFactories.4.1.0\lib\net45\Microsoft.Azure.Management.DataFactories.dll</HintPath>
7171
</Reference>
7272
<Reference Include="Microsoft.Azure.ResourceManager, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
7373
<SpecificVersion>False</SpecificVersion>

src/ResourceManager/DataFactories/Commands.DataFactories/Microsoft.Azure.Commands.DataFactories.dll-Help.xml

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2862,7 +2862,7 @@
28622862
<command:returnValues>
28632863
<command:returnValue>
28642864
<dev:type>
2865-
<maml:name>Microsoft.WindowsAzure.Commands.Utilities.PSDataFactoryGatewayKey</maml:name>
2865+
<maml:name>Microsoft.Azure.Commands.DataFactories.Models.PSDataFactoryGateway</maml:name>
28662866
<maml:uri>
28672867
</maml:uri>
28682868
<maml:description>
@@ -2884,16 +2884,18 @@
28842884
</maml:introduction>
28852885
<dev:code>
28862886
PS C:\&gt; New-AzureRmDataFactoryGateway -ResourceGroupName "ADF" -Name "ContosoGateway" -DataFactoryName "UncycloADF" -Description "my gateway"
2887-
Name : ContosoGateway
2888-
Description : my gateway
2889-
Version :
2890-
Status : NeedRegistration
2891-
VersionStatus : None
2892-
CreateTime : 8/22/2014 1:40:34 AM
2893-
RegisterTime :
2894-
LastConnectTime :
2895-
ExpiryTime :
2896-
</dev:code>
2887+
Name : ContosoGateway
2888+
Description : my gateway
2889+
Version :
2890+
Status : NeedRegistration
2891+
VersionStatus : None
2892+
CreateTime : 8/22/2014 1:40:34 AM
2893+
RegisterTime :
2894+
LastConnectTime :
2895+
ExpiryTime :
2896+
ProvisioningState : Succeeded
2897+
Key : ADF#40cbb3d9-2736-4794-a8a6-e6b839b4894f@a2d875ce-c9d7-4b8b-ad65-dd3ebbb9a940@8c0d1801-e863-44af-82e6-fb2f0c00f2ae@xz#Y9R0NhAeH3u7wgnrJyiWj4Y/QIhH4fFilIdzZgwsVQA=
2898+
</dev:code>
28972899
<dev:remarks>
28982900
<maml:para>This command creates a gateway named ContosoGateway in the data factory named UncycloADF in the resource group named ADF. </maml:para>
28992901
</dev:remarks>
@@ -3082,7 +3084,7 @@
30823084
</maml:introduction>
30833085
<dev:code>
30843086
PS C:\&gt; New-AzureRmDataFactoryGatewayKey -ResourceGroupName "ADF" -GatewayName "ContosoGateway" -DataFactoryName "UncycloADF" | Format-List
3085-
Gateway Key : ADF#40cbb3d9-2736-4794-a8a6-e6b839b4894f@a2d875ce-c9d7-4b8b-ad65-dd3ebbb9a940@8c0d1801-e863-44af-82e6-fb2f0c00f2ae@xz#Y9R0NhAeH3u7wgnrJyiWj4Y/QIhH4fFilIdzZgwsVQA=
3087+
GatewayKey : ADF#40cbb3d9-2736-4794-a8a6-e6b839b4894f@a2d875ce-c9d7-4b8b-ad65-dd3ebbb9a940@8c0d1801-e863-44af-82e6-fb2f0c00f2ae@xz#Y9R0NhAeH3u7wgnrJyiWj4Y/QIhH4fFilIdzZgwsVQA=
30863088
</dev:code>
30873089
<dev:remarks>
30883090
<maml:para>This command creates a gateway key for the data factory gateway named ContosoGateway, and then passes the gateway key to the Format-List cmdlet by using the pipeline operator. For more information, type Get-Help Format-List.</maml:para>

src/ResourceManager/DataFactories/Commands.DataFactories/Models/PSDataFactoryGateway.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ public string ProvisioningState
9595
get { return _gateway.Properties == null ? string.Empty : _gateway.Properties.ProvisioningState; }
9696
}
9797

98-
internal string Key
98+
public string Key
9999
{
100100
get { return _gateway.Properties.Key; }
101101
set { _gateway.Properties.Key = value; }

src/ResourceManager/DataFactories/Commands.DataFactories/packages.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<package id="Microsoft.Azure.Common.Authentication" version="1.4.0-preview" targetFramework="net45" />
66
<package id="Microsoft.Azure.Common.Dependencies" version="1.0.0" targetFramework="net45" />
77
<package id="Microsoft.Azure.KeyVault.Core" version="1.0.0" targetFramework="net45" />
8-
<package id="Microsoft.Azure.Management.DataFactories" version="4.0.0" targetFramework="net45" />
8+
<package id="Microsoft.Azure.Management.DataFactories" version="4.1.0" targetFramework="net45" />
99
<package id="Microsoft.Azure.Management.Resources" version="2.18.7-preview" targetFramework="net45" />
1010
<package id="Microsoft.Bcl" version="1.1.9" targetFramework="net45" />
1111
<package id="Microsoft.Bcl.Async" version="1.0.168" targetFramework="net45" />

src/ResourceManager/KeyVault/AzureRM.KeyVault.psd1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
@{
1010

1111
# Version number of this module.
12-
ModuleVersion = '1.0.1'
12+
ModuleVersion = '1.1.0'
1313

1414
# ID used to uniquely identify this module
1515
GUID = 'fa236c1f-6464-4d6a-a48d-db47c0e7923d'

src/ResourceManager/KeyVault/Commands.KeyVault.Test/Commands.KeyVault.Test.csproj

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,13 +74,13 @@
7474
<Reference Include="Microsoft.Azure.Management.Authorization">
7575
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Authorization.1.0.0\lib\net40\Microsoft.Azure.Management.Authorization.dll</HintPath>
7676
</Reference>
77-
<Reference Include="Microsoft.Azure.Management.KeyVault, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
78-
<SpecificVersion>False</SpecificVersion>
79-
<HintPath>..\..\..\packages\Microsoft.Azure.Management.KeyVault.1.0.0\lib\net40\Microsoft.Azure.Management.KeyVault.dll</HintPath>
80-
</Reference>
8177
<Reference Include="Microsoft.Azure.Common.NetFramework">
8278
<HintPath>..\..\..\packages\Microsoft.Azure.Common.2.1.0\lib\net45\Microsoft.Azure.Common.NetFramework.dll</HintPath>
8379
</Reference>
80+
<Reference Include="Microsoft.Azure.Management.KeyVault, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
81+
<HintPath>..\..\..\packages\Microsoft.Azure.Management.KeyVault.1.0.1\lib\net40\Microsoft.Azure.Management.KeyVault.dll</HintPath>
82+
<Private>True</Private>
83+
</Reference>
8484
<Reference Include="Microsoft.Azure.ResourceManager, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
8585
<SpecificVersion>False</SpecificVersion>
8686
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Resources.2.18.7-preview\lib\net40\Microsoft.Azure.ResourceManager.dll</HintPath>
@@ -257,6 +257,12 @@
257257
<None Include="SessionRecords\Microsoft.Azure.Commands.KeyVault.Test.ScenarioTests.KeyVaultManagementTests\TestModifyAccessPolicyEnabledForDeployment.json">
258258
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
259259
</None>
260+
<None Include="SessionRecords\Microsoft.Azure.Commands.KeyVault.Test.ScenarioTests.KeyVaultManagementTests\TestModifyAccessPolicyEnabledForDiskEncryption.json">
261+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
262+
</None>
263+
<None Include="SessionRecords\Microsoft.Azure.Commands.KeyVault.Test.ScenarioTests.KeyVaultManagementTests\TestModifyAccessPolicyEnabledForTemplateDeployment.json">
264+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
265+
</None>
260266
<None Include="SessionRecords\Microsoft.Azure.Commands.KeyVault.Test.ScenarioTests.KeyVaultManagementTests\TestRecreateVaultFails.json">
261267
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
262268
</None>

src/ResourceManager/KeyVault/Commands.KeyVault.Test/ScenarioTests/KeyVaultManagementTests.cs

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -484,6 +484,54 @@ public void TestModifyAccessPolicyEnabledForDeployment()
484484
}
485485

486486

487+
[Fact]
488+
[Trait(Category.AcceptanceType, Category.CheckIn)]
489+
public void TestModifyAccessPolicyEnabledForTemplateDeployment()
490+
{
491+
string upn = "";
492+
493+
_data.ResetPreCreatedVault();
494+
KeyVaultManagementController.NewInstance.RunPsTestWorkflow(
495+
() =>
496+
{
497+
return new[] { string.Format("{0} {1} {2} {3}", "Test-ModifyAccessPolicyEnabledForTemplateDeployment", _data.preCreatedVault, _data.resourceGroupName, upn) };
498+
},
499+
(env) =>
500+
{
501+
Initialize();
502+
upn = GetUser(env.GetTestEnvironment());
503+
},
504+
null,
505+
TestUtilities.GetCallingClass(),
506+
TestUtilities.GetCurrentMethodName()
507+
);
508+
}
509+
510+
511+
[Fact]
512+
[Trait(Category.AcceptanceType, Category.CheckIn)]
513+
public void TestModifyAccessPolicyEnabledForDiskEncryption()
514+
{
515+
string upn = "";
516+
517+
_data.ResetPreCreatedVault();
518+
KeyVaultManagementController.NewInstance.RunPsTestWorkflow(
519+
() =>
520+
{
521+
return new[] { string.Format("{0} {1} {2} {3}", "Test-ModifyAccessPolicyEnabledForDiskEncryption", _data.preCreatedVault, _data.resourceGroupName, upn) };
522+
},
523+
(env) =>
524+
{
525+
Initialize();
526+
upn = GetUser(env.GetTestEnvironment());
527+
},
528+
null,
529+
TestUtilities.GetCallingClass(),
530+
TestUtilities.GetCurrentMethodName()
531+
);
532+
}
533+
534+
487535
[Fact]
488536
[Trait(Category.AcceptanceType, Category.CheckIn)]
489537
public void TestModifyAccessPolicyNegativeCases()

src/ResourceManager/KeyVault/Commands.KeyVault.Test/Scripts/ControlPlane/KeyVaultManagementTests.ps1

Lines changed: 44 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,7 @@ function Test-ModifyAccessPolicyEnabledForDeployment
439439
Assert-AreEqual 0 $vault.AccessPolicies.Count
440440
Assert-AreEqual $false $vault.EnabledForDeployment
441441

442-
# Set and Remove EnabledForDeployment, without any other permissions
442+
# Set and Remove EnabledForDeployment
443443
$vault = Set-AzureRmKeyVaultAccessPolicy -VaultName $existingVaultName -ResourceGroupName $rgName -EnabledForDeployment -PassThru
444444
Assert-NotNull $vault
445445
Assert-AreEqual 0 $vault.AccessPolicies.Count
@@ -449,17 +449,52 @@ function Test-ModifyAccessPolicyEnabledForDeployment
449449
Assert-NotNull $vault
450450
Assert-AreEqual 0 $vault.AccessPolicies.Count
451451
Assert-AreEqual $false $vault.EnabledForDeployment
452+
}
452453

453-
# Set and Remove EnabledForDeployment, with other permissions
454-
$PermToKeys = @("encrypt", "decrypt", "unwrapKey", "wrapKey", "verify", "sign", "get", "list", "update", "create", "import", "delete", "backup", "restore")
455-
$PermToSecrets = @("get", "list", "set", "delete")
456-
$vault = Set-AzureRmKeyVaultAccessPolicy -VaultName $existingVaultName -ResourceGroupName $rgName -EnabledForDeployment -UPN $upn -PermissionsToKeys $PermToKeys -PermissionsToSecrets $PermToSecrets -PassThru
457-
CheckVaultAccessPolicy $vault $PermToKeys $PermToSecrets
458-
Assert-AreEqual $true $vault.EnabledForDeployment
454+
function Test-ModifyAccessPolicyEnabledForTemplateDeployment
455+
{
456+
Param($existingVaultName, $rgName, $upn)
457+
$vault = Get-AzureRmKeyVault -VaultName $existingVaultName -ResourceGroupName $rgName
458+
Assert-NotNull $vault
459+
Assert-AreEqual 0 $vault.AccessPolicies.Count
460+
if ($vault.EnabledForTemplateDeployment -ne $null)
461+
{
462+
Assert-AreEqual $false $vault.EnabledForTemplateDeployment
463+
}
459464

460-
$vault = Remove-AzureRmKeyVaultAccessPolicy -VaultName $existingVaultName -ResourceGroupName $rgName -EnabledForDeployment -ObjectId $vault.AccessPolicies[0].ObjectId -PassThru
465+
# Set and Remove EnabledForTemplateDeployment
466+
$vault = Set-AzureRmKeyVaultAccessPolicy -VaultName $existingVaultName -ResourceGroupName $rgName -EnabledForTemplateDeployment -PassThru
467+
Assert-NotNull $vault
461468
Assert-AreEqual 0 $vault.AccessPolicies.Count
462-
Assert-AreEqual $false $vault.EnabledForDeployment
469+
Assert-AreEqual $true $vault.EnabledForTemplateDeployment
470+
471+
$vault = Remove-AzureRmKeyVaultAccessPolicy -VaultName $existingVaultName -ResourceGroupName $rgName -EnabledForTemplateDeployment -PassThru
472+
Assert-NotNull $vault
473+
Assert-AreEqual 0 $vault.AccessPolicies.Count
474+
Assert-AreEqual $false $vault.EnabledForTemplateDeployment
475+
}
476+
477+
function Test-ModifyAccessPolicyEnabledForDiskEncryption
478+
{
479+
Param($existingVaultName, $rgName, $upn)
480+
$vault = Get-AzureRmKeyVault -VaultName $existingVaultName -ResourceGroupName $rgName
481+
Assert-NotNull $vault
482+
Assert-AreEqual 0 $vault.AccessPolicies.Count
483+
if ($vault.EnabledForDiskEncryption -ne $null)
484+
{
485+
Assert-AreEqual $false $vault.EnabledForDiskEncryption
486+
}
487+
488+
# Set and Remove EnabledForDiskEncryption
489+
$vault = Set-AzureRmKeyVaultAccessPolicy -VaultName $existingVaultName -ResourceGroupName $rgName -EnabledForDiskEncryption -PassThru
490+
Assert-NotNull $vault
491+
Assert-AreEqual 0 $vault.AccessPolicies.Count
492+
Assert-AreEqual $true $vault.EnabledForDiskEncryption
493+
494+
$vault = Remove-AzureRmKeyVaultAccessPolicy -VaultName $existingVaultName -ResourceGroupName $rgName -EnabledForDiskEncryption -PassThru
495+
Assert-NotNull $vault
496+
Assert-AreEqual 0 $vault.AccessPolicies.Count
497+
Assert-AreEqual $false $vault.EnabledForDiskEncryption
463498
}
464499

465500
function Test-ModifyAccessPolicyNegativeCases

src/ResourceManager/KeyVault/Commands.KeyVault.Test/Scripts/VaultManagementTests.ps1

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,20 @@ function Test_ModifyAccessPolicyEnabledForDeployment
170170
Test-ModifyAccessPolicyEnabledForDeployment $global:precreatedVaultName $global:resourceGroupName $user
171171
}
172172

173+
function Test_ModifyAccessPolicyEnabledForTemplateDeployment
174+
{
175+
$user = (Get-AzureRmSubscription -Current).DefaultAccount
176+
Reset-PreCreatedVault
177+
Test-ModifyAccessPolicyEnabledForTemplateDeployment $global:precreatedVaultName $global:resourceGroupName $user
178+
}
179+
180+
function Test_ModifyAccessPolicyEnabledForDiskEncryption
181+
{
182+
$user = (Get-AzureRmSubscription -Current).DefaultAccount
183+
Reset-PreCreatedVault
184+
Test-ModifyAccessPolicyEnabledForDiskEncryption $global:precreatedVaultName $global:resourceGroupName $user
185+
}
186+
173187
function Test_ModifyAccessPolicyNegativeCases
174188
{
175189
$user = (Get-AzureRmSubscription -Current).DefaultAccount

0 commit comments

Comments
 (0)