Skip to content

Commit 1364ab7

Browse files
Merge pull request #36 from Azure/dev
PR from parent
2 parents ea5e7d8 + e9b4b17 commit 1364ab7

File tree

53 files changed

+55195
-5451
lines changed

Some content is hidden

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

53 files changed

+55195
-5451
lines changed

ChangeLog.md

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,23 @@
11
## 2015.09.03 version 0.9.8
22
* Azure Compute (ARM) Cmdlets
33
* Add -Launch parameter for Get-AzureRemoteDesktopFile cmdlet
4+
* Azure Backup - added the following cmdlets
5+
* Backup-AzureRMBackupItem
6+
* Register-AzureRMBackupContainer
7+
* Disable-AzureRMBackupProtection
8+
* Enable-AzureRMBackupProtection
9+
* Get-AzureRMBackupItem
10+
* Get-AzureRMBackupJob
11+
* Get-AzureRMBackupJobDetails
12+
* Stop-AzureRMBackupJob
13+
* Wait-AzureRMBackupJob
14+
* Get-AzureRMBackupProtectionPolicy
15+
* New-AzureRMBackupProtectionPolicy
16+
* New-AzureRMBackupRetentionPolicyObject
17+
* Remove-AzureRMBackupProtectionPolicy
18+
* Set-AzureRMBackupProtectionPolicy
19+
* Get-AzureRMBackupRecoveryPoint
20+
* Restore-AzureRMBackupItem
421

522
## 2015.08.17 version 0.9.7
623
* Azure Profile cmdlets
@@ -31,23 +48,6 @@
3148
* Added Restart-AzureRemoteAppVm cmdlet
3249
* Azure HDInsight cmdlets
3350
* Added cmdlet help
34-
* Azure Backup - added the following cmdlets
35-
* Backup-AzureRMBackupItem
36-
* Register-AzureRMBackupContainer
37-
* Disable-AzureRMBackupProtection
38-
* Enable-AzureRMBackupProtection
39-
* Get-AzureRMBackupItem
40-
* Get-AzureRMBackupJob
41-
* Get-AzureRMBackupJobDetails
42-
* Stop-AzureRMBackupJob
43-
* Wait-AzureRMBackupJob
44-
* Get-AzureRMBackupProtectionPolicy
45-
* New-AzureRMBackupProtectionPolicy
46-
* New-AzureRMBackupRetentionPolicyObject
47-
* Remove-AzureRMBackupProtectionPolicy
48-
* Set-AzureRMBackupProtectionPolicy
49-
* Get-AzureRMBackupRecoveryPoint
50-
* Restore-AzureRMBackupItem
5151

5252
## 2015.08.07 version 0.9.6
5353
* Azure Batch cmdlets

setup/azurecmdfiles.wxi

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2077,6 +2077,9 @@
20772077
<Component Id="cmp55FEE041CC305952FE17E655815CE51A" Guid="*">
20782078
<File Id="fil14F4B8C7E95C606DDDE47BE166D9F241" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\Sql\Microsoft.Azure.Commands.Sql.format.ps1xml" />
20792079
</Component>
2080+
<Component Id="cmpF23457BA331434DDB0815F84746FD1E7" Guid="*">
2081+
<File Id="fil1972DDA29C9A5FC7D61122B5F5E1D84B" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\Sql\Microsoft.Azure.Commands.Sql.Types.ps1xml" />
2082+
</Component>
20802083
<Component Id="cmp057F4C8C0E8E8DB3E57FD8B64885B30F" Guid="*">
20812084
<File Id="fil17C8016A3D5AA097BE35FB83C7539AB9" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\Sql\Microsoft.Azure.Commands.Tags.dll" />
20822085
</Component>
@@ -5475,6 +5478,7 @@
54755478
<ComponentRef Id="cmp56F52674BB946225BB64533814DCF37F" />
54765479
<ComponentRef Id="cmp499092B04619C0EDE4686B78E1128605" />
54775480
<ComponentRef Id="cmp55FEE041CC305952FE17E655815CE51A" />
5481+
<ComponentRef Id="cmpF23457BA331434DDB0815F84746FD1E7" />
54785482
<ComponentRef Id="cmp057F4C8C0E8E8DB3E57FD8B64885B30F" />
54795483
<ComponentRef Id="cmpC6D3C91080AD47682B7959EF9DF193D3" />
54805484
<ComponentRef Id="cmpD7CC32C127B6074C2D5CA20EAA1B14A0" />

src/ResourceManager/Resources/Commands.Resources.Test/Commands.Resources.Test.csproj

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,12 @@
6464
<SpecificVersion>False</SpecificVersion>
6565
<HintPath>..\..\..\packages\Microsoft.Azure.Graph.RBAC.1.7.0-preview\lib\net40\Microsoft.Azure.Graph.RBAC.dll</HintPath>
6666
</Reference>
67+
<Reference Include="Microsoft.Azure.Insights">
68+
<HintPath>..\..\..\packages\Microsoft.Azure.Insights.0.7.7-preview\lib\net45\Microsoft.Azure.Insights.dll</HintPath>
69+
</Reference>
70+
<Reference Include="Microsoft.Azure.KeyVault.Core">
71+
<HintPath>..\..\..\packages\Microsoft.Azure.KeyVault.Core.1.0.0\lib\net40\Microsoft.Azure.KeyVault.Core.dll</HintPath>
72+
</Reference>
6773
<Reference Include="Microsoft.Azure.Management.Authorization, Version=0.9.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
6874
<SpecificVersion>False</SpecificVersion>
6975
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Authorization.0.19.2-preview\lib\net40\Microsoft.Azure.Management.Authorization.dll</HintPath>
@@ -467,6 +473,9 @@
467473
</None>
468474
<None Include="SessionRecords\Microsoft.Azure.Commands.Resources.Test.ScenarioTests.ResourceTests\TestSetAResourceTest.json">
469475
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
476+
</None>
477+
<None Include="SessionRecords\Microsoft.Azure.Commands.Resources.Test.ScenarioTests.RoleAssignmentTests\RaAuthorizationChangeLog.json">
478+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
470479
</None>
471480
<None Include="SessionRecords\Microsoft.Azure.Commands.Resources.Test.ScenarioTests.RoleAssignmentTests\RaByResource.json">
472481
<CopyToOutputDirectory>Always</CopyToOutputDirectory>

src/ResourceManager/Resources/Commands.Resources.Test/ScenarioTests/ResourcesController.cs

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
using Microsoft.Azure.Common.Authentication;
2323
using Microsoft.Azure.Gallery;
2424
using Microsoft.Azure.Graph.RBAC;
25+
using Microsoft.Azure.Insights;
2526
using Microsoft.Azure.Management.Authorization;
2627
using Microsoft.Azure.Management.Resources;
2728
using Microsoft.Azure.Subscriptions;
@@ -47,6 +48,8 @@ public sealed class ResourcesController
4748
public SubscriptionClient SubscriptionClient { get; private set; }
4849

4950
public GalleryClient GalleryClient { get; private set; }
51+
52+
public InsightsClient InsightsClient { get; private set; }
5053

5154
// TODO: http://vstfrd:8080/Azure/RD/_workitems#_a=edit&id=3247094
5255
//public EventsClient EventsClient { get; private set; }
@@ -111,7 +114,8 @@ public void RunPsTestWorkflow(
111114
helper.SetupModules(
112115
AzureModule.AzureResourceManager,
113116
"ScenarioTests\\Common.ps1",
114-
"ScenarioTests\\" + callingClassName + ".ps1");
117+
"ScenarioTests\\" + callingClassName + ".ps1",
118+
"ResourceManagerStartup.ps1");
115119

116120
try
117121
{
@@ -142,6 +146,7 @@ private void SetupManagementClients()
142146
GalleryClient = GetGalleryClient();
143147
AuthorizationManagementClient = GetAuthorizationManagementClient();
144148
GraphClient = GetGraphClient();
149+
InsightsClient = GetInsightsClient();
145150
this.FeatureClient = this.GetFeatureClient();
146151
HttpClientHelperFactory.Instance = new TestHttpClientHelperFactory(this.csmTestFactory.GetTestEnvironment().Credentials as SubscriptionCloudCredentials);
147152

@@ -150,6 +155,7 @@ private void SetupManagementClients()
150155
GalleryClient,
151156
AuthorizationManagementClient,
152157
GraphClient,
158+
InsightsClient,
153159
this.FeatureClient);
154160
}
155161

@@ -206,6 +212,11 @@ private GalleryClient GetGalleryClient()
206212
return TestBase.GetServiceClient<GalleryClient>(this.csmTestFactory);
207213
}
208214

215+
private InsightsClient GetInsightsClient()
216+
{
217+
return TestBase.GetServiceClient<InsightsClient>(this.csmTestFactory);
218+
}
219+
209220
/// <summary>
210221
/// The test http client helper factory.
211222
/// </summary>

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

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,22 +16,26 @@
1616
using Microsoft.Azure.Graph.RBAC;
1717
using Microsoft.Azure.Graph.RBAC.Models;
1818
using Microsoft.Azure.Management.Authorization;
19-
using Microsoft.Azure.Management.Authorization.Models;
2019
using Microsoft.Azure.Management.Resources;
2120
using Microsoft.Azure.Management.Resources.Models;
22-
using Microsoft.Azure.Test.HttpRecorder;
2321
using Microsoft.WindowsAzure.Commands.ScenarioTest;
2422
using Microsoft.Azure.Test;
2523
using System;
2624
using System.Linq;
27-
using System.Threading;
2825
using Microsoft.WindowsAzure.Commands.Utilities.Common;
2926
using Xunit;
3027

3128
namespace Microsoft.Azure.Commands.Resources.Test.ScenarioTests
3229
{
3330
public class RoleAssignmentTests
3431
{
32+
[Fact]
33+
[Trait(Category.AcceptanceType, Category.CheckIn)]
34+
public void RaAuthorizationChangeLog()
35+
{
36+
ResourcesController.NewInstance.RunPsTest("Test-RaAuthorizationChangeLog");
37+
}
38+
3539
[Fact]
3640
[Trait(Category.AcceptanceType, Category.CheckIn)]
3741
public void RaNegativeScenarios()

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

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,20 @@ function Test-RaUserPermissions
232232
Assert-AreEqual $action $permissions.Permissions[0].Actions[0] "Permission action mismatch."
233233
}
234234

235+
<#
236+
.SYNOPSIS
237+
Tests verifies Get-AzureAuthorizationChangeLog
238+
#>
239+
function Test-RaAuthorizationChangeLog
240+
{
241+
$log1 = Get-AzureAuthorizationChangeLog -startTime 2015-08-27 -EndTime 2015-08-27T22:30:00Z
242+
243+
# Assert
244+
Assert-True { $log1.Count -ge 1 } "At least one record should be returned for the user"
245+
}
246+
247+
248+
235249
<#
236250
.SYNOPSIS
237251
Creates role assignment

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

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

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
<package id="Microsoft.Azure.Common.Dependencies" version="1.0.0" targetFramework="net45" />
77
<package id="Microsoft.Azure.Gallery" version="2.6.2-preview" targetFramework="net45" />
88
<package id="Microsoft.Azure.Graph.RBAC" version="1.7.0-preview" targetFramework="net45" />
9+
<package id="Microsoft.Azure.Insights" version="0.7.7-preview" targetFramework="net45" />
10+
<package id="Microsoft.Azure.KeyVault.Core" version="1.0.0" targetFramework="net45" />
911
<package id="Microsoft.Azure.Management.Authorization" version="0.19.2-preview" targetFramework="net45" />
1012
<package id="Microsoft.Azure.Management.Resources" version="2.18.7-preview" targetFramework="net45" />
1113
<package id="Microsoft.Azure.Test.Framework" version="1.0.5687.28567-prerelease" targetFramework="net45" />

src/ResourceManager/Resources/Commands.Resources/AzureResourceManager.psd1

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,8 @@ ScriptsToProcess = @()
5555

5656
# Type files (.ps1xml) to be loaded when importing this module
5757
TypesToProcess = @(
58-
'.\Compute\Microsoft.Azure.Commands.Compute.Types.ps1xml'
58+
'.\Compute\Microsoft.Azure.Commands.Compute.Types.ps1xml',
59+
'.\Sql\Microsoft.Azure.Commands.Sql.Types.ps1xml'
5960
)
6061

6162
# Format files (.ps1xml) to be loaded when importing this module

0 commit comments

Comments
 (0)