Skip to content

Migrate more projects to RM code #880

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Sep 9, 2015
Merged
Show file tree
Hide file tree
Changes from all 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
14 changes: 14 additions & 0 deletions src/ResourceManager.sln
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,10 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.SiteRecovery.Test"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Sql.Test", "ResourceManager\Sql\Commands.Sql.Test\Commands.Sql.Test.csproj", "{56ED8C97-53B9-4DF6-ACB5-7E6800105BF8}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.StreamAnalytics.Test", "ResourceManager\StreamAnalytics\Commands.StreamAnalytics.Test\Commands.StreamAnalytics.Test.csproj", "{7E6683BE-ECFF-4709-89EB-1325E9E70512}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.TrafficManager2.Test", "ResourceManager\TrafficManager\Commands.TrafficManager2.Test\Commands.TrafficManager2.Test.csproj", "{5764A3A4-586C-4536-8481-13007CAC111B}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -317,6 +321,14 @@ Global
{56ED8C97-53B9-4DF6-ACB5-7E6800105BF8}.Debug|Any CPU.Build.0 = Debug|Any CPU
{56ED8C97-53B9-4DF6-ACB5-7E6800105BF8}.Release|Any CPU.ActiveCfg = Release|Any CPU
{56ED8C97-53B9-4DF6-ACB5-7E6800105BF8}.Release|Any CPU.Build.0 = Release|Any CPU
{7E6683BE-ECFF-4709-89EB-1325E9E70512}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7E6683BE-ECFF-4709-89EB-1325E9E70512}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7E6683BE-ECFF-4709-89EB-1325E9E70512}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7E6683BE-ECFF-4709-89EB-1325E9E70512}.Release|Any CPU.Build.0 = Release|Any CPU
{5764A3A4-586C-4536-8481-13007CAC111B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5764A3A4-586C-4536-8481-13007CAC111B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5764A3A4-586C-4536-8481-13007CAC111B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5764A3A4-586C-4536-8481-13007CAC111B}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand All @@ -341,5 +353,7 @@ Global
{4AE5705F-62CF-461D-B72E-DD9DCD9B3609} = {95C16AED-FD57-42A0-86C3-2CF4300A4817}
{6C7D3D81-37AB-445E-8081-78A1FEC0A773} = {95C16AED-FD57-42A0-86C3-2CF4300A4817}
{56ED8C97-53B9-4DF6-ACB5-7E6800105BF8} = {95C16AED-FD57-42A0-86C3-2CF4300A4817}
{7E6683BE-ECFF-4709-89EB-1325E9E70512} = {95C16AED-FD57-42A0-86C3-2CF4300A4817}
{5764A3A4-586C-4536-8481-13007CAC111B} = {95C16AED-FD57-42A0-86C3-2CF4300A4817}
EndGlobalSection
EndGlobal
Original file line number Diff line number Diff line change
Expand Up @@ -170,18 +170,14 @@
<Project>{65c3a86a-716d-4e7d-ab67-1db00b3bf72d}</Project>
<Name>Commands.Common.Storage</Name>
</ProjectReference>
<ProjectReference Include="..\..\..\Common\Commands.Common\Commands.Common.csproj">
<Project>{5ee72c53-1720-4309-b54b-5fb79703195f}</Project>
<Name>Commands.Common</Name>
<ProjectReference Include="..\..\..\Common\Commands.ResourceManager.Common\Commands.ResourceManager.Common.csproj">
<Project>{3819d8a7-c62c-4c47-8ddd-0332d9ce1252}</Project>
<Name>Commands.ResourceManager.Common</Name>
</ProjectReference>
<ProjectReference Include="..\..\..\Common\Commands.ScenarioTests.Common\Commands.ScenarioTests.Common.csproj">
<Project>{c1bda476-a5cc-4394-914d-48b0ec31a710}</Project>
<Name>Commands.ScenarioTests.Common</Name>
</ProjectReference>
<ProjectReference Include="..\..\..\ServiceManagement\Services\Commands.Test.Utilities\Commands.Test.Utilities.csproj">
<Project>{bc420543-c04e-4bf3-96e1-cd81b823bdd7}</Project>
<Name>Commands.Test.Utilities</Name>
</ProjectReference>
<ProjectReference Include="..\..\DataFactories\Commands.DataFactories\Commands.DataFactories.csproj">
<Project>{9577252e-0a6b-4d61-86e8-95f7f309a987}</Project>
<Name>Commands.DataFactories</Name>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,11 @@
using Microsoft.WindowsAzure.Commands.Utilities.Common;
using Microsoft.WindowsAzure.Management.Storage;
using Microsoft.Azure.Test;
using Microsoft.WindowsAzure.Commands.Test.Utilities.Common;

namespace Microsoft.Azure.Commands.StreamAnalytics.Test
{
public abstract class StreamAnalyticsScenarioTestsBase
public abstract class StreamAnalyticsScenarioTestsBase : RMTestBase
{
private EnvironmentSetupHelper helper;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -204,9 +204,9 @@
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\Common\Commands.Common\Commands.Common.csproj">
<Project>{5ee72c53-1720-4309-b54b-5fb79703195f}</Project>
<Name>Commands.Common</Name>
<ProjectReference Include="..\..\..\Common\Commands.ResourceManager.Common\Commands.ResourceManager.Common.csproj">
<Project>{3819d8a7-c62c-4c47-8ddd-0332d9ce1252}</Project>
<Name>Commands.ResourceManager.Common</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public class GetAzureStreamAnalyticsInputCommand : StreamAnalyticsResourceProvid
public string Name { get; set; }

[EnvironmentPermission(SecurityAction.Demand, Unrestricted = true)]
public override void ExecuteCmdlet()
protected override void ProcessRecord()
{
if (ResourceGroupName != null && string.IsNullOrWhiteSpace(ResourceGroupName))
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public class NewAzureStreamAnalyticsInputCommand : StreamAnalyticsResourceProvid
public SwitchParameter Force { get; set; }

[EnvironmentPermission(SecurityAction.Demand, Unrestricted = true)]
public override void ExecuteCmdlet()
protected override void ProcessRecord()
{
if (ResourceGroupName != null && string.IsNullOrWhiteSpace(ResourceGroupName))
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public class RemoveAzureStreamAnalyticsInputCommand : StreamAnalyticsResourcePro
public SwitchParameter Force { get; set; }

[EnvironmentPermission(SecurityAction.Demand, Unrestricted = true)]
public override void ExecuteCmdlet()
protected override void ProcessRecord()
{
if (ResourceGroupName != null && string.IsNullOrWhiteSpace(ResourceGroupName))
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public class TestAzureStreamAnalyticsInputCommand : StreamAnalyticsResourceProvi
public string Name { get; set; }

[EnvironmentPermission(SecurityAction.Demand, Unrestricted = true)]
public override void ExecuteCmdlet()
protected override void ProcessRecord()
{
if (ResourceGroupName != null && string.IsNullOrWhiteSpace(ResourceGroupName))
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public class GetAzureStreamAnalyticsJobCommand : StreamAnalyticsBaseCmdlet
public SwitchParameter NoExpand { get; set; }

[EnvironmentPermission(SecurityAction.Demand, Unrestricted = true)]
public override void ExecuteCmdlet()
protected override void ProcessRecord()
{
if (ParameterSetName == StreamAnalyticsObjectsInResourceGroup)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public class NewAzureStreamAnalyticsJobCommand : StreamAnalyticsResourceProvider
public SwitchParameter Force { get; set; }

[EnvironmentPermission(SecurityAction.Demand, Unrestricted = true)]
public override void ExecuteCmdlet()
protected override void ProcessRecord()
{
string rawJsonContent = StreamAnalyticsClient.ReadJsonFileContent(this.TryResolvePath(File));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public class RemoveAzureStreamAnalyticsJobCommand : StreamAnalyticsResourceProvi
public SwitchParameter Force { get; set; }

[EnvironmentPermission(SecurityAction.Demand, Unrestricted = true)]
public override void ExecuteCmdlet()
protected override void ProcessRecord()
{
if (ResourceGroupName != null && string.IsNullOrWhiteSpace(ResourceGroupName))
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public class StartAzureStreamAnalyticsJobCommand : StreamAnalyticsResourceProvid
public DateTime? OutputStartTime { get; set; }

[EnvironmentPermission(SecurityAction.Demand, Unrestricted = true)]
public override void ExecuteCmdlet()
protected override void ProcessRecord()
{
if (ResourceGroupName != null && string.IsNullOrWhiteSpace(ResourceGroupName))
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public class StopAzureStreamAnalyticsJobCommand : StreamAnalyticsResourceProvide
public string Name { get; set; }

[EnvironmentPermission(SecurityAction.Demand, Unrestricted = true)]
public override void ExecuteCmdlet()
protected override void ProcessRecord()
{
if (ResourceGroupName != null && string.IsNullOrWhiteSpace(ResourceGroupName))
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public class GetAzureStreamAnalyticsOutputCommand : StreamAnalyticsResourceProvi
public string Name { get; set; }

[EnvironmentPermission(SecurityAction.Demand, Unrestricted = true)]
public override void ExecuteCmdlet()
protected override void ProcessRecord()
{
if (ResourceGroupName != null && string.IsNullOrWhiteSpace(ResourceGroupName))
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public class NewAzureStreamAnalyticsOutputCommand : StreamAnalyticsResourceProvi
public SwitchParameter Force { get; set; }

[EnvironmentPermission(SecurityAction.Demand, Unrestricted = true)]
public override void ExecuteCmdlet()
protected override void ProcessRecord()
{
string rawJsonContent = StreamAnalyticsClient.ReadJsonFileContent(this.TryResolvePath(File));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public class RemoveAzureStreamAnalyticsOutputCommand : StreamAnalyticsResourcePr
public SwitchParameter Force { get; set; }

[EnvironmentPermission(SecurityAction.Demand, Unrestricted = true)]
public override void ExecuteCmdlet()
protected override void ProcessRecord()
{
if (ResourceGroupName != null && string.IsNullOrWhiteSpace(ResourceGroupName))
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public class TestAzureStreamAnalyticsOutputCommand : StreamAnalyticsResourceProv
public string Name { get; set; }

[EnvironmentPermission(SecurityAction.Demand, Unrestricted = true)]
public override void ExecuteCmdlet()
protected override void ProcessRecord()
{
if (ResourceGroupName != null && string.IsNullOrWhiteSpace(ResourceGroupName))
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,11 @@
using Microsoft.WindowsAzure;
using Microsoft.WindowsAzure.Commands.Utilities.Common;
using Hyak.Common;
using Microsoft.Azure.Commands.ResourceManager.Common;

namespace Microsoft.Azure.Commands.StreamAnalytics
{
public abstract class StreamAnalyticsBaseCmdlet : AzureSMCmdlet
public abstract class StreamAnalyticsBaseCmdlet : AzureRMCmdlet
{
private StreamAnalyticsClient streamAnalyticsClient;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public class GetAzureStreamAnalyticsQuotasCommand : StreamAnalyticsBaseCmdlet
public string Location { get; set; }

[EnvironmentPermission(SecurityAction.Demand, Unrestricted = true)]
public override void ExecuteCmdlet()
protected override void ProcessRecord()
{
if (Location != null && string.IsNullOrWhiteSpace(Location))
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public class GetAzureStreamAnalyticsTransformationCommand : StreamAnalyticsResou
public string Name { get; set; }

[EnvironmentPermission(SecurityAction.Demand, Unrestricted = true)]
public override void ExecuteCmdlet()
protected override void ProcessRecord()
{
if (ResourceGroupName != null && string.IsNullOrWhiteSpace(ResourceGroupName))
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public class NewAzureStreamAnalyticsTransformationCommand : StreamAnalyticsResou
public SwitchParameter Force { get; set; }

[EnvironmentPermission(SecurityAction.Demand, Unrestricted = true)]
public override void ExecuteCmdlet()
protected override void ProcessRecord()
{
string rawJsonContent = StreamAnalyticsClient.ReadJsonFileContent(this.TryResolvePath(File));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,9 @@
</None>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\Common\Commands.Common\Commands.Common.csproj">
<Project>{5ee72c53-1720-4309-b54b-5fb79703195f}</Project>
<Name>Commands.Common</Name>
<ProjectReference Include="..\..\..\Common\Commands.ResourceManager.Common\Commands.ResourceManager.Common.csproj">
<Project>{3819d8a7-c62c-4c47-8ddd-0332d9ce1252}</Project>
<Name>Commands.ResourceManager.Common</Name>
</ProjectReference>
<ProjectReference Include="..\..\..\Common\Commands.ScenarioTests.Common\Commands.ScenarioTests.Common.csproj">
<Project>{c1bda476-a5cc-4394-914d-48b0ec31a710}</Project>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,13 @@ namespace Microsoft.Azure.Commands.TrafficManager.Test.ScenarioTests
using Microsoft.Azure.Management.Authorization;
using Microsoft.Azure.Management.Resources;
using Microsoft.Azure.Management.TrafficManager;

using Microsoft.Azure.Test;
using Microsoft.WindowsAzure.Commands.ScenarioTest;
using Microsoft.Azure.Subscriptions;
using WindowsAzure.Commands.Test.Utilities.Common;

public class TestController
public class TestController : RMTestBase
{
private CSMTestEnvironmentFactory csmTestFactory;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,10 @@ namespace Microsoft.Azure.Commands.TrafficManager.Test.UnitTests
using System.Management.Automation;
using Microsoft.Azure.Commands.TrafficManager.Models;
using Microsoft.WindowsAzure.Commands.ScenarioTest;
using WindowsAzure.Commands.Test.Utilities.Common;
using Xunit;

public class AddAzureTrafficManagerEndpointConfigTests
public class AddAzureTrafficManagerEndpointConfigTests : RMTestBase
{
[Fact]
[Trait(Category.AcceptanceType, Category.CheckIn)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,10 @@ namespace Microsoft.Azure.Commands.TrafficManager.Test.UnitTests
using Microsoft.Azure.Commands.TrafficManager;
using Microsoft.Azure.Commands.TrafficManager.Models;
using Microsoft.WindowsAzure.Commands.ScenarioTest;
using WindowsAzure.Commands.Test.Utilities.Common;
using Xunit;

public class RemoveAzureTrafficManagerEndpointConfigTests
public class RemoveAzureTrafficManagerEndpointConfigTests : RMTestBase
{
[Fact]
[Trait(Category.AcceptanceType, Category.CheckIn)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,9 @@
</Content>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\Common\Commands.Common\Commands.Common.csproj">
<Project>{5ee72c53-1720-4309-b54b-5fb79703195f}</Project>
<Name>Commands.Common</Name>
<ProjectReference Include="..\..\..\Common\Commands.ResourceManager.Common\Commands.ResourceManager.Common.csproj">
<Project>{3819d8a7-c62c-4c47-8ddd-0332d9ce1252}</Project>
<Name>Commands.ResourceManager.Common</Name>
</ProjectReference>
<ProjectReference Include="..\..\Tags\Commands.Tags\Commands.Tags.csproj">
<Project>{2493A8F7-1949-4F29-8D53-9D459046C3B8}</Project>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public class AddAzureTrafficManagerEndpointConfig : TrafficManagerBaseCmdlet
[ValidateNotNullOrEmpty]
public string EndpointLocation { get; set; }

public override void ExecuteCmdlet()
protected override void ProcessRecord()
{
if (this.TrafficManagerProfile.Endpoints == null)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public class DisableAzureTrafficManagerEndpoint : TrafficManagerBaseCmdlet
[Parameter(Mandatory = false, HelpMessage = "Do not ask for confirmation.")]
public SwitchParameter Force { get; set; }

public override void ExecuteCmdlet()
protected override void ProcessRecord()
{
var disabled = false;
TrafficManagerEndpoint endpointToDisable = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public class EnableAzureTrafficManagerEndpoint : TrafficManagerBaseCmdlet
[ValidateNotNullOrEmpty]
public TrafficManagerEndpoint TrafficManagerEndpoint { get; set; }

public override void ExecuteCmdlet()
protected override void ProcessRecord()
{
TrafficManagerEndpoint endpointToEnable = null;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public class GetAzureTrafficManagerEndpoint : TrafficManagerBaseCmdlet
[ValidateNotNullOrEmpty]
public TrafficManagerEndpoint TrafficManagerEndpoint { get; set; }

public override void ExecuteCmdlet()
protected override void ProcessRecord()
{
TrafficManagerEndpoint trafficManagerEndpoint = null;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public class NewAzureTrafficManagerEndpoint : TrafficManagerBaseCmdlet
[ValidateNotNullOrEmpty]
public string EndpointLocation { get; set; }

public override void ExecuteCmdlet()
protected override void ProcessRecord()
{
// We are not supporting etags yet, NewAzureTrafficManagerEndpoint should not overwrite any existing endpoint.
// Since our create operation is implemented using PUT, it will overwrite by default.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public class RemoveAzureTrafficManagerEndpoint : TrafficManagerBaseCmdlet
[Parameter(Mandatory = false, HelpMessage = "Do not ask for confirmation.")]
public SwitchParameter Force { get; set; }

public override void ExecuteCmdlet()
protected override void ProcessRecord()
{
var deleted = false;
TrafficManagerEndpoint trafficManagerEndpointToDelete = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public class RemoveAzureTrafficManagerEndpointConfig : TrafficManagerBaseCmdlet
[ValidateNotNullOrEmpty]
public TrafficManagerProfile TrafficManagerProfile { get; set; }

public override void ExecuteCmdlet()
protected override void ProcessRecord()
{
if (this.TrafficManagerProfile.Endpoints == null)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public class SetAzureTrafficManagerEndpoint : TrafficManagerBaseCmdlet
[ValidateNotNullOrEmpty]
public TrafficManagerEndpoint TrafficManagerEndpoint { get; set; }

public override void ExecuteCmdlet()
protected override void ProcessRecord()
{
TrafficManagerEndpoint trafficManagerEndpoint = this.TrafficManagerClient.SetTrafficManagerEndpoint(this.TrafficManagerEndpoint);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public class DisableAzureTrafficManagerProfile : TrafficManagerBaseCmdlet
[Parameter(Mandatory = false, HelpMessage = "Do not ask for confirmation.")]
public SwitchParameter Force { get; set; }

public override void ExecuteCmdlet()
protected override void ProcessRecord()
{
var disabled = false;
TrafficManagerProfile profileToDisable = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public class EnableAzureTrafficManagerProfile : TrafficManagerBaseCmdlet
[ValidateNotNullOrEmpty]
public TrafficManagerProfile TrafficManagerProfile { get; set; }

public override void ExecuteCmdlet()
protected override void ProcessRecord()
{
TrafficManagerProfile profileToEnable = null;

Expand Down
Loading