Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8,733 changes: 8,733 additions & 0 deletions setup/azurecmdfiles.wxi

Large diffs are not rendered by default.

19 changes: 15 additions & 4 deletions src/ResourceManager/Resources/AzureRM.Resources.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ RequiredModules = @(@{ModuleName = 'AzureRM.Profile'; ModuleVersion = '5.1.0'; }

# Assemblies that must be loaded prior to importing this module
RequiredAssemblies = '.\Microsoft.Azure.Management.ResourceManager.dll',
'.\Microsoft.Azure.Management.Authorization.dll'
'.\Microsoft.Azure.Management.Authorization.dll',
'.\Microsoft.Azure.Management.ManagementGroups.dll'

# Script files (.ps1) that are run in the caller's environment prior to importing this module.
# ScriptsToProcess = @()
Expand Down Expand Up @@ -120,7 +121,10 @@ CmdletsToExport = 'Get-AzureRmProviderOperation', 'Remove-AzureRmRoleAssignment'
'Set-AzureRmManagedApplicationDefinition',
'Remove-AzureRmManagedApplicationDefinition',
'Get-AzureRmManagedApplication', 'New-AzureRmManagedApplication',
'Set-AzureRmManagedApplication', 'Remove-AzureRmManagedApplication'
'Set-AzureRmManagedApplication', 'Remove-AzureRmManagedApplication',
'Get-AzureRmManagementGroup', 'New-AzureRmManagementGroup',
'Update-AzureRmManagementGroup', 'Remove-AzureRmManagementGroup',
'New-AzureRmManagementGroupSubscription', 'Remove-AzureRmManagementGroupSubscription'

# Variables to export from this module
# VariablesToExport = @()
Expand Down Expand Up @@ -148,7 +152,7 @@ PrivateData = @{
PSData = @{

# Tags applied to this module. These help with module discovery in online galleries.
Tags = 'Azure','ResourceManager','ARM','Provider','ResourceGroup','Deployment','ActiveDirectory','Authorization'
Tags = 'Azure','ResourceManager','ARM','Provider','ResourceGroup','Deployment','ActiveDirectory','Authorization', 'Management','ManagementGroups'

# A URL to the license for this module.
LicenseUri = 'https://aka.ms/azps-license'
Expand All @@ -160,7 +164,14 @@ PrivateData = @{
# IconUri = ''

# ReleaseNotes of this module
ReleaseNotes = '* Set minimum dependency of module to PowerShell 5.0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please revert changes to the release notes, we will do this update when releasing the module.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done. Thanks.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see this reverted

ReleaseNotes = '* Add ManagementGroups Cmdlets:
- Get-AzureRmManagementGroup
- New-AzureRmManagementGroup
- Update-AzureRmManagementGroup
- Remove-AzureRmManagementGroup
- New-AzureRmManagementGroupSubscription
- Remove-AzureRmManagementGroupSubscription
* Set minimum dependency of module to PowerShell 5.0
* Remove obsolete parameter -AtScopeAndBelow from Get-AzureRmRoledefinition call
* Include assignments to deleted Users/Groups/ServicePrincipals in Get-AzureRmRoleAssignment result
* Add convenience cmdlet for creating ServicePrincipals
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,9 @@
<Reference Include="Microsoft.Azure.Insights">
<HintPath>..\..\..\packages\Microsoft.Azure.Insights.0.10.0-preview\lib\net45\Microsoft.Azure.Insights.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Azure.Management.ManagementGroups, Version=1.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\Microsoft.Azure.Management.ManagementGroups.1.2.0-preview\lib\net452\Microsoft.Azure.Management.ManagementGroups.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Azure.Management.ResourceManager, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\packages\Microsoft.Azure.Management.ResourceManager.1.6.0-preview\lib\net452\Microsoft.Azure.Management.ResourceManager.dll</HintPath>
Expand All @@ -90,6 +93,8 @@
<HintPath>..\..\..\packages\Microsoft.IdentityModel.Clients.ActiveDirectory.2.28.3\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.WindowsForms.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.Rest.ClientRuntime, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" />
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove these two packages, as they are automatically imported with common dependencies.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done. Thanks.

<Reference Include="Microsoft.Rest.ClientRuntime.Azure, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" />
<Reference Include="Microsoft.Rest.ClientRuntime.Azure.Authentication, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\Microsoft.Rest.ClientRuntime.Azure.Authentication.2.2.9-preview\lib\net45\Microsoft.Rest.ClientRuntime.Azure.Authentication.dll</HintPath>
<Private>True</Private>
Expand Down Expand Up @@ -173,6 +178,7 @@
</Content>
<Compile Include="ScenarioTests\LocationTests.cs" />
<Compile Include="ScenarioTests\ManagedApplicationTests.cs" />
<Compile Include="ScenarioTests\ManagementGroupsTests.cs" />
<Compile Include="ScenarioTests\MoveResourceTest.cs" />
<Compile Include="ScenarioTests\ManagedApplicationDefinitionTests.cs" />
<Compile Include="ScenarioTests\ProviderFeatureTests.cs" />
Expand Down Expand Up @@ -320,6 +326,9 @@
<None Include="ScenarioTests\ManagedApplicationTests.ps1">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="ScenarioTests\ManagementGroupsTests.ps1">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="ScenarioTests\MoveResourceTest.ps1">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
Expand Down Expand Up @@ -398,6 +407,18 @@
<None Include="SessionRecords\Microsoft.Azure.Commands.Resources.Test.ScenarioTests.ManagedApplicationTests\TestManagedApplicationCRUD.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="SessionRecords\Microsoft.Azure.Commands.Resources.Test.ScenarioTests.ManagementGroupsTests\TestGetManagementGroup.json" />
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You will need to add Always to each of these.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done. Thanks.

<None Include="SessionRecords\Microsoft.Azure.Commands.Resources.Test.ScenarioTests.ManagementGroupsTests\TestGetManagementGroupWithExpand.json" />
<None Include="SessionRecords\Microsoft.Azure.Commands.Resources.Test.ScenarioTests.ManagementGroupsTests\TestGetManagementGroupWithExpandAndRecurse.json" />
<None Include="SessionRecords\Microsoft.Azure.Commands.Resources.Test.ScenarioTests.ManagementGroupsTests\TestNewManagementGroup.json" />
<None Include="SessionRecords\Microsoft.Azure.Commands.Resources.Test.ScenarioTests.ManagementGroupsTests\TestNewManagementGroupWithDisplayName.json" />
<None Include="SessionRecords\Microsoft.Azure.Commands.Resources.Test.ScenarioTests.ManagementGroupsTests\TestNewManagementGroupWithDisplayNameAndParentId.json" />
<None Include="SessionRecords\Microsoft.Azure.Commands.Resources.Test.ScenarioTests.ManagementGroupsTests\TestNewManagementGroupWithParentId.json" />
<None Include="SessionRecords\Microsoft.Azure.Commands.Resources.Test.ScenarioTests.ManagementGroupsTests\TestNewRemoveManagementGroupSubscription.json" />
<None Include="SessionRecords\Microsoft.Azure.Commands.Resources.Test.ScenarioTests.ManagementGroupsTests\TestRemoveManagementGroup.json" />
<None Include="SessionRecords\Microsoft.Azure.Commands.Resources.Test.ScenarioTests.ManagementGroupsTests\TestUpdateManagementGroupWithDisplayName.json" />
<None Include="SessionRecords\Microsoft.Azure.Commands.Resources.Test.ScenarioTests.ManagementGroupsTests\TestUpdateManagementGroupWithDisplayNameAndParentId.json" />
<None Include="SessionRecords\Microsoft.Azure.Commands.Resources.Test.ScenarioTests.ManagementGroupsTests\TestUpdateManagementGroupWithParentId.json" />
<None Include="SessionRecords\Microsoft.Azure.Commands.Resources.Test.ScenarioTests.MoveResourceTest\TestMoveAzureResource.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
// ----------------------------------------------------------------------------------
//
// Copyright Microsoft Corporation
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// ----------------------------------------------------------------------------------

using Microsoft.Azure.ServiceManagemenet.Common.Models;
using Microsoft.WindowsAzure.Commands.ScenarioTest;
using Microsoft.WindowsAzure.Commands.Test.Utilities.Common;
using Xunit;

namespace Microsoft.Azure.Commands.Resources.Test.ScenarioTests
{
public class ManagementGroupsTests
{
public ManagementGroupsTests(Xunit.Abstractions.ITestOutputHelper output)
{
XunitTracingInterceptor.AddToContext(new XunitTracingInterceptor(output));
}

[Fact]
[Trait(Category.AcceptanceType, Category.CheckIn)]
public void TestGetManagementGroup()
{
ResourcesController.NewInstance.RunPsTest("Test-GetManagementGroup");
}

[Fact]
[Trait(Category.AcceptanceType, Category.CheckIn)]
public void TestGetManagementGroupWithExpand()
{
ResourcesController.NewInstance.RunPsTest("Test-GetManagementGroupWithExpand");
}

[Fact]
[Trait(Category.AcceptanceType, Category.CheckIn)]
public void TestGetManagementGroupWithExpandAndRecurse()
{
ResourcesController.NewInstance.RunPsTest("Test-GetManagementGroupWithExpandAndRecurse");
}

[Fact]
[Trait(Category.AcceptanceType, Category.CheckIn)]
public void TestNewManagementGroup()
{
ResourcesController.NewInstance.RunPsTest("Test-NewManagementGroup");
}

[Fact]
[Trait(Category.AcceptanceType, Category.CheckIn)]
public void TestNewManagementGroupWithDisplayName()
{
ResourcesController.NewInstance.RunPsTest("Test-NewManagementGroupWithDisplayName");
}

[Fact]
[Trait(Category.AcceptanceType, Category.CheckIn)]
public void TestNewManagementGroupWithParentId()
{
ResourcesController.NewInstance.RunPsTest("Test-NewManagementGroupWithParentId");
}

[Fact]
[Trait(Category.AcceptanceType, Category.CheckIn)]
public void TestNewManagementGroupWithDisplayNameAndParentId()
{
ResourcesController.NewInstance.RunPsTest("Test-NewManagementGroupWithDisplayNameAndParentId");
}

[Fact]
[Trait(Category.AcceptanceType, Category.CheckIn)]
public void TestUpdateManagementGroupWithDisplayName()
{
ResourcesController.NewInstance.RunPsTest("Test-UpdateManagementGroupWithDisplayName");
}

[Fact]
[Trait(Category.AcceptanceType, Category.CheckIn)]
public void TestUpdateManagementGroupWithParentId()
{
ResourcesController.NewInstance.RunPsTest("Test-UpdateManagementGroupWithParentId");
}

[Fact]
[Trait(Category.AcceptanceType, Category.CheckIn)]
public void TestUpdateManagementGroupWithDisplayNameAndParentId()
{
ResourcesController.NewInstance.RunPsTest("Test-UpdateManagementGroupWithDisplayNameAndParentId");
}

[Fact]
[Trait(Category.AcceptanceType, Category.CheckIn)]
public void TestRemoveManagementGroup()
{
ResourcesController.NewInstance.RunPsTest("Test-RemoveManagementGroup");
}

[Fact]
[Trait(Category.AcceptanceType, Category.CheckIn)]
public void TestNewRemoveManagementGroupSubscription()
{
ResourcesController.NewInstance.RunPsTest("Test-NewRemoveManagementGroupSubscription");
}
}
}
Loading