diff --git a/AzurePowershell.Test.targets b/AzurePowershell.Test.targets
index 93506ce9c63c..1430a7f75abc 100644
--- a/AzurePowershell.Test.targets
+++ b/AzurePowershell.Test.targets
@@ -45,10 +45,10 @@
-
+
-
-
+
+
@@ -60,12 +60,12 @@
-
-
-
-
+
+
+
+
-
+
diff --git a/build.proj b/build.proj
index 89fbadc217fc..9ec09e76f610 100644
--- a/build.proj
+++ b/build.proj
@@ -20,7 +20,8 @@
true
-
+
+
@@ -33,21 +34,31 @@
+
-
+
@@ -74,9 +85,9 @@
- $(MSBuildProjectDirectory)\src\.nuget\NuGet.exe
- $(MSBuildProjectDirectory)\restore.config
- -ConfigFile "$(NuGetRestoreConfigFile)"
+ $(MSBuildProjectDirectory)\src\.nuget\NuGet.exe
+ $(MSBuildProjectDirectory)\restore.config
+ -ConfigFile "$(NuGetRestoreConfigFile)"
+
@@ -113,17 +124,29 @@
+
@@ -136,11 +159,11 @@
Importance="high"
Text="You are required to have installed the WiX Toolset at http://wix.codeplex.com/releases/view/115492 (Wix38.msi)"
ContinueOnError="false" />
-
+ ContinueOnError="false" />-->
@@ -153,11 +176,11 @@
Importance="high"
Text="You are required to have installed the WiX Toolset at http://wix.codeplex.com/releases/view/115492 (Wix38.msi)"
ContinueOnError="false" />
-
+ ContinueOnError="false" />-->
@@ -171,22 +194,34 @@
+
+
diff --git a/src/ResourceManager.sln b/src/ResourceManager.sln
index c59461a57005..eb089ca5a29f 100644
--- a/src/ResourceManager.sln
+++ b/src/ResourceManager.sln
@@ -23,8 +23,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.ScenarioTests.Comm
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.ResourceManager.Cmdlets", "ResourceManager\ResourceManager\Commands.ResourceManager\Cmdlets\Commands.ResourceManager.Cmdlets.csproj", "{8058D403-06E3-4BED-8924-D166CE303961}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Common", "Common\Commands.Common\Commands.Common.csproj", "{5EE72C53-1720-4309-B54B-5FB79703195F}"
-EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.ApiManagement", "ResourceManager\ApiManagement\Commands.ApiManagement\Commands.ApiManagement.csproj", "{DC0A9742-DF36-48C9-BD2F-68D01AED6257}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.ResourceManagement.Automation", "ResourceManager\Automation\Commands.Automation\Commands.ResourceManagement.Automation.csproj", "{90DEF35A-F7FF-40D0-B008-F489A4C092DB}"
@@ -115,6 +113,12 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.StreamAnalytics.Te
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
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.UsageAggregates.Test", "ResourceManager\Commerce\Commands.UsageAggregates.Test\Commands.UsageAggregates.Test.csproj", "{F220C306-29A3-4511-8518-A58A55C60D07}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Websites.Test", "ResourceManager\Websites\Commands.Websites.Test\Commands.Websites.Test.csproj", "{13E031E4-8A43-4B87-9D72-D70180C31C11}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Common", "Common\Commands.Common\Commands.Common.csproj", "{5EE72C53-1720-4309-B54B-5FB79703195F}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -145,10 +149,6 @@ Global
{8058D403-06E3-4BED-8924-D166CE303961}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8058D403-06E3-4BED-8924-D166CE303961}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8058D403-06E3-4BED-8924-D166CE303961}.Release|Any CPU.Build.0 = Release|Any CPU
- {5EE72C53-1720-4309-B54B-5FB79703195F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {5EE72C53-1720-4309-B54B-5FB79703195F}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {5EE72C53-1720-4309-B54B-5FB79703195F}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {5EE72C53-1720-4309-B54B-5FB79703195F}.Release|Any CPU.Build.0 = Release|Any CPU
{DC0A9742-DF36-48C9-BD2F-68D01AED6257}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{DC0A9742-DF36-48C9-BD2F-68D01AED6257}.Debug|Any CPU.Build.0 = Debug|Any CPU
{DC0A9742-DF36-48C9-BD2F-68D01AED6257}.Release|Any CPU.ActiveCfg = Release|Any CPU
@@ -329,6 +329,18 @@ Global
{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
+ {F220C306-29A3-4511-8518-A58A55C60D07}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {F220C306-29A3-4511-8518-A58A55C60D07}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {F220C306-29A3-4511-8518-A58A55C60D07}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {F220C306-29A3-4511-8518-A58A55C60D07}.Release|Any CPU.Build.0 = Release|Any CPU
+ {13E031E4-8A43-4B87-9D72-D70180C31C11}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {13E031E4-8A43-4B87-9D72-D70180C31C11}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {13E031E4-8A43-4B87-9D72-D70180C31C11}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {13E031E4-8A43-4B87-9D72-D70180C31C11}.Release|Any CPU.Build.0 = Release|Any CPU
+ {5EE72C53-1720-4309-B54B-5FB79703195F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {5EE72C53-1720-4309-B54B-5FB79703195F}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {5EE72C53-1720-4309-B54B-5FB79703195F}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {5EE72C53-1720-4309-B54B-5FB79703195F}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -355,5 +367,7 @@ Global
{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}
+ {F220C306-29A3-4511-8518-A58A55C60D07} = {95C16AED-FD57-42A0-86C3-2CF4300A4817}
+ {13E031E4-8A43-4B87-9D72-D70180C31C11} = {95C16AED-FD57-42A0-86C3-2CF4300A4817}
EndGlobalSection
EndGlobal
diff --git a/src/ResourceManager/ApiManagement/Commands.ApiManagement.Test/Commands.ApiManagement.Test.csproj b/src/ResourceManager/ApiManagement/Commands.ApiManagement.Test/Commands.ApiManagement.Test.csproj
index ed71a604680f..7c7fd9262a44 100644
--- a/src/ResourceManager/ApiManagement/Commands.ApiManagement.Test/Commands.ApiManagement.Test.csproj
+++ b/src/ResourceManager/ApiManagement/Commands.ApiManagement.Test/Commands.ApiManagement.Test.csproj
@@ -153,10 +153,6 @@
-
- {5ee72c53-1720-4309-b54b-5fb79703195f}
- Commands.Common
-
{c1bda476-a5cc-4394-914d-48b0ec31a710}
Commands.ScenarioTests.Common
diff --git a/src/ResourceManager/ApiManagement/Commands.ApiManagement/Commands.ApiManagement.csproj b/src/ResourceManager/ApiManagement/Commands.ApiManagement/Commands.ApiManagement.csproj
index 62f41d1e52e2..50e424e1144c 100644
--- a/src/ResourceManager/ApiManagement/Commands.ApiManagement/Commands.ApiManagement.csproj
+++ b/src/ResourceManager/ApiManagement/Commands.ApiManagement/Commands.ApiManagement.csproj
@@ -202,10 +202,6 @@
{65C3A86A-716D-4E7D-AB67-1DB00B3BF72D}
Commands.Common.Storage
-
- {5EE72C53-1720-4309-B54B-5FB79703195F}
- Commands.Common
-
{3819d8a7-c62c-4c47-8ddd-0332d9ce1252}
Commands.ResourceManager.Common
diff --git a/src/ResourceManager/ApiManagement/Commands.ApiManagement/Commands/NewAzureApiManagementHostnameConfiguration.cs b/src/ResourceManager/ApiManagement/Commands.ApiManagement/Commands/NewAzureApiManagementHostnameConfiguration.cs
index 9846c8fe9873..ff4183772b10 100644
--- a/src/ResourceManager/ApiManagement/Commands.ApiManagement/Commands/NewAzureApiManagementHostnameConfiguration.cs
+++ b/src/ResourceManager/ApiManagement/Commands.ApiManagement/Commands/NewAzureApiManagementHostnameConfiguration.cs
@@ -16,10 +16,11 @@ namespace Microsoft.Azure.Commands.ApiManagement.Commands
{
using System.Management.Automation;
using Microsoft.Azure.Commands.ApiManagement.Models;
+ using ResourceManager.Common;
using Microsoft.WindowsAzure.Commands.Utilities.Common;
[Cmdlet(VerbsCommon.New, "AzureApiManagementHostnameConfiguration"), OutputType(typeof (PsApiManagementHostnameConfiguration))]
- public class NewAzureApiManagementHostnameConfiguration : AzureSMCmdlet
+ public class NewAzureApiManagementHostnameConfiguration : AzureRMCmdlet
{
[Parameter(
ValueFromPipelineByPropertyName = false,
diff --git a/src/ResourceManager/ApiManagement/Commands.ApiManagement/Commands/NewAzureApiManagementVirtualNetwork.cs b/src/ResourceManager/ApiManagement/Commands.ApiManagement/Commands/NewAzureApiManagementVirtualNetwork.cs
index c68719b69e88..8395a28ea7a0 100644
--- a/src/ResourceManager/ApiManagement/Commands.ApiManagement/Commands/NewAzureApiManagementVirtualNetwork.cs
+++ b/src/ResourceManager/ApiManagement/Commands.ApiManagement/Commands/NewAzureApiManagementVirtualNetwork.cs
@@ -18,10 +18,11 @@ namespace Microsoft.Azure.Commands.ApiManagement.Commands
using System;
using System.Management.Automation;
using Microsoft.Azure.Commands.ApiManagement.Models;
+ using ResourceManager.Common;
using Microsoft.WindowsAzure.Commands.Utilities.Common;
[Cmdlet(VerbsCommon.New, "AzureApiManagementVirtualNetwork"), OutputType(typeof(PsApiManagementVirtualNetwork))]
- public class NewAzureApiManagementVirtualNetwork : AzureSMCmdlet
+ public class NewAzureApiManagementVirtualNetwork : AzureRMCmdlet
{
[Parameter(
ValueFromPipelineByPropertyName = false,
diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/Commands.Batch.Test.csproj b/src/ResourceManager/AzureBatch/Commands.Batch.Test/Commands.Batch.Test.csproj
index 44baa7e6d4af..65cd861c6cf1 100644
--- a/src/ResourceManager/AzureBatch/Commands.Batch.Test/Commands.Batch.Test.csproj
+++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/Commands.Batch.Test.csproj
@@ -116,6 +116,18 @@
False
..\..\..\packages\WindowsAzure.Storage.4.3.0\lib\net40\Microsoft.WindowsAzure.Storage.dll
+
+ False
+ ..\..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.dll
+
+
+ False
+ ..\..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.dll
+
+
+ False
+ ..\..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.Desktop.dll
+
..\..\..\packages\Moq.4.2.1402.2112\lib\net40\Moq.dll
diff --git a/src/ResourceManager/Commerce/Commands.UsageAggregates.Test/Commands.UsageAggregates.Test.csproj b/src/ResourceManager/Commerce/Commands.UsageAggregates.Test/Commands.UsageAggregates.Test.csproj
index c6b9a59f9cbf..6a0723c7039a 100644
--- a/src/ResourceManager/Commerce/Commands.UsageAggregates.Test/Commands.UsageAggregates.Test.csproj
+++ b/src/ResourceManager/Commerce/Commands.UsageAggregates.Test/Commands.UsageAggregates.Test.csproj
@@ -109,9 +109,9 @@
-
- {3b48a77b-5956-4a62-9081-92ba04b02b27}
- Commands.Common.Test
+
+ {3819d8a7-c62c-4c47-8ddd-0332d9ce1252}
+ Commands.ResourceManager.Common
{C1BDA476-A5CC-4394-914D-48B0EC31A710}
diff --git a/src/ResourceManager/Commerce/Commands.UsageAggregates.Test/ScenarioTests/UsageAggregatesTests.cs b/src/ResourceManager/Commerce/Commands.UsageAggregates.Test/ScenarioTests/UsageAggregatesTests.cs
index eeab9bd60eeb..26a76f78be9c 100644
--- a/src/ResourceManager/Commerce/Commands.UsageAggregates.Test/ScenarioTests/UsageAggregatesTests.cs
+++ b/src/ResourceManager/Commerce/Commands.UsageAggregates.Test/ScenarioTests/UsageAggregatesTests.cs
@@ -13,11 +13,12 @@
// ----------------------------------------------------------------------------------
using Microsoft.WindowsAzure.Commands.ScenarioTest;
+using Microsoft.WindowsAzure.Commands.Test.Utilities.Common;
using Xunit;
namespace Microsoft.Azure.Commands.UsageAggregates.Test.ScenarioTests
{
- public class UsageAggregatesTests
+ public class UsageAggregatesTests : RMTestBase
{
[Fact]
[Trait(Category.AcceptanceType, Category.CheckIn)]
diff --git a/src/ResourceManager/Commerce/Commands.UsageAggregates/Commands.UsageAggregates.csproj b/src/ResourceManager/Commerce/Commands.UsageAggregates/Commands.UsageAggregates.csproj
index c1e593985d42..252f5336abb1 100644
--- a/src/ResourceManager/Commerce/Commands.UsageAggregates/Commands.UsageAggregates.csproj
+++ b/src/ResourceManager/Commerce/Commands.UsageAggregates/Commands.UsageAggregates.csproj
@@ -98,12 +98,6 @@
-
-
- {5ee72c53-1720-4309-b54b-5fb79703195f}
- Commands.Common
-
-
@@ -118,6 +112,12 @@
PreserveNewest
+
+
+ {3819d8a7-c62c-4c47-8ddd-0332d9ce1252}
+ Commands.ResourceManager.Common
+
+
diff --git a/src/ResourceManager/Commerce/Commands.UsageAggregates/GetUsageAggregatesCommand.cs b/src/ResourceManager/Commerce/Commands.UsageAggregates/GetUsageAggregatesCommand.cs
index 34017279eba4..03b17e904cc5 100644
--- a/src/ResourceManager/Commerce/Commands.UsageAggregates/GetUsageAggregatesCommand.cs
+++ b/src/ResourceManager/Commerce/Commands.UsageAggregates/GetUsageAggregatesCommand.cs
@@ -23,9 +23,10 @@ namespace Microsoft.Azure.Commands.UsageAggregates
using WindowsAzure.Commands.Utilities.Common;
using System;
using System.Management.Automation;
+ using ResourceManager.Common;
[Cmdlet(VerbsCommon.Get, "UsageAggregates"), OutputType(typeof(UsageAggregationGetResponse))]
- public class GetUsageAggregatesCommand : AzureSMCmdlet
+ public class GetUsageAggregatesCommand : AzureRMCmdlet
{
private UsageAggregationManagementClient _theClient;
private AggregationGranularity _aggregationGranularity = AggregationGranularity.Daily;
@@ -52,12 +53,12 @@ public bool ShowDetails {
[Parameter(Mandatory = false, HelpMessage = "Retrieved from previous calls, this is the bookmark used for progress when the responses are paged.")]
public string ContinuationToken { get; set; }
- public override void ExecuteCmdlet()
+ protected override void ProcessRecord()
{
if (_theClient == null)
{
- _theClient = AzureSession.ClientFactory.CreateClient(Profile,
- Profile.DefaultContext.Subscription, AzureEnvironment.Endpoint.ResourceManager);
+ _theClient = AzureSession.ClientFactory.CreateClient(DefaultProfile.DefaultContext,
+ AzureEnvironment.Endpoint.ResourceManager);
}
UsageAggregationGetResponse aggregations = _theClient.UsageAggregates.Get(ReportedStartTime,
diff --git a/src/ResourceManager/Resources/Commands.Resources.Test/Commands.Resources.Test.csproj b/src/ResourceManager/Resources/Commands.Resources.Test/Commands.Resources.Test.csproj
index 38b4efe0d881..378d9a7a4dc5 100644
--- a/src/ResourceManager/Resources/Commands.Resources.Test/Commands.Resources.Test.csproj
+++ b/src/ResourceManager/Resources/Commands.Resources.Test/Commands.Resources.Test.csproj
@@ -468,7 +468,7 @@
Always
-
+
Always
diff --git a/src/ResourceManager/Sql/Commands.Sql.Test/ScenarioTests/SqlTestsBase.cs b/src/ResourceManager/Sql/Commands.Sql.Test/ScenarioTests/SqlTestsBase.cs
index e98236200993..22060ea5e182 100644
--- a/src/ResourceManager/Sql/Commands.Sql.Test/ScenarioTests/SqlTestsBase.cs
+++ b/src/ResourceManager/Sql/Commands.Sql.Test/ScenarioTests/SqlTestsBase.cs
@@ -67,7 +67,7 @@ protected void RunPowerShellTest(params string[] scripts)
helper.SetupEnvironment();
- helper.SetupModules(AzureModule.AzureProfile, "ScenarioTests\\Common.ps1",
+ helper.SetupModules(AzureModule.AzureResourceManager, "ScenarioTests\\Common.ps1",
"ScenarioTests\\" + this.GetType().Name + ".ps1");
helper.RunPowerShellTest(scripts);
diff --git a/src/ResourceManager/Websites/Commands.Websites.Test/Commands.Websites.Test.csproj b/src/ResourceManager/Websites/Commands.Websites.Test/Commands.Websites.Test.csproj
index e68528855b35..d028238afb75 100644
--- a/src/ResourceManager/Websites/Commands.Websites.Test/Commands.Websites.Test.csproj
+++ b/src/ResourceManager/Websites/Commands.Websites.Test/Commands.Websites.Test.csproj
@@ -151,9 +151,9 @@
-
- {5ee72c53-1720-4309-b54b-5fb79703195f}
- Commands.Common
+
+ {3819d8a7-c62c-4c47-8ddd-0332d9ce1252}
+ Commands.ResourceManager.Common
{c1bda476-a5cc-4394-914d-48b0ec31a710}
diff --git a/src/ResourceManager/Websites/Commands.Websites.Test/ScenarioTests/WebAppTests.cs b/src/ResourceManager/Websites/Commands.Websites.Test/ScenarioTests/WebAppTests.cs
index a5afcd7eaea5..fee4517fd6d1 100644
--- a/src/ResourceManager/Websites/Commands.Websites.Test/ScenarioTests/WebAppTests.cs
+++ b/src/ResourceManager/Websites/Commands.Websites.Test/ScenarioTests/WebAppTests.cs
@@ -14,11 +14,12 @@
using Microsoft.WindowsAzure.Commands.ScenarioTest;
+using Microsoft.WindowsAzure.Commands.Test.Utilities.Common;
using Xunit;
namespace Microsoft.Azure.Commands.WebApp.Test.ScenarioTests
{
- public class WebAppTests
+ public class WebAppTests : RMTestBase
{
[Fact]
[Trait(Category.AcceptanceType, Category.CheckIn)]
diff --git a/src/ResourceManager/Websites/Commands.Websites/Cmdlets/AppServicePlan/GetAzureAppServicePlan.cs b/src/ResourceManager/Websites/Commands.Websites/Cmdlets/AppServicePlan/GetAzureAppServicePlan.cs
index 20054830e818..8b1cf4b2393d 100644
--- a/src/ResourceManager/Websites/Commands.Websites/Cmdlets/AppServicePlan/GetAzureAppServicePlan.cs
+++ b/src/ResourceManager/Websites/Commands.Websites/Cmdlets/AppServicePlan/GetAzureAppServicePlan.cs
@@ -13,23 +13,9 @@
// ----------------------------------------------------------------------------------
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
using System.Management.Automation;
-using Microsoft.Azure.Management.WebSites.Models;
-using Microsoft.WindowsAzure;
-using Microsoft.WindowsAzure.Commands.Utilities.CloudService;
-using Microsoft.Azure.Commands.WebApp;
-using Microsoft.Azure.Management.WebSites;
-using System.Net.Http;
-using System.Threading;
-using System.Net;
-using Microsoft.Azure;
-using Microsoft.WindowsAzure.Commands.Utilities.Common;
using Microsoft.Azure.Commands.WebApp.Utilities;
+using Microsoft.Azure.Management.WebSites.Models;
namespace Microsoft.Azure.Commands.WebApp.Cmdlets.AppServicePlan
@@ -40,7 +26,7 @@ namespace Microsoft.Azure.Commands.WebApp.Cmdlets.AppServicePlan
[Cmdlet(VerbsCommon.Get, "AzureAppServicePlan"), OutputType(typeof(WebHostingPlanGetResponse), typeof(WebHostingPlanListResponse))]
public class GetAppServicePlanCmdlet : WebHostingPlanBaseNotMandatoryCmdlet
{
- public override void ExecuteCmdlet()
+ protected override void ProcessRecord()
{
if (!string.IsNullOrEmpty(ResourceGroupName) && !string.IsNullOrEmpty(Name))
{
diff --git a/src/ResourceManager/Websites/Commands.Websites/Cmdlets/AppServicePlan/NewAzureAppServicePlan.cs b/src/ResourceManager/Websites/Commands.Websites/Cmdlets/AppServicePlan/NewAzureAppServicePlan.cs
index c501418f4709..7952dab94a5d 100644
--- a/src/ResourceManager/Websites/Commands.Websites/Cmdlets/AppServicePlan/NewAzureAppServicePlan.cs
+++ b/src/ResourceManager/Websites/Commands.Websites/Cmdlets/AppServicePlan/NewAzureAppServicePlan.cs
@@ -13,23 +13,9 @@
// ----------------------------------------------------------------------------------
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
using System.Management.Automation;
-using Microsoft.Azure.Management.WebSites.Models;
-using Microsoft.WindowsAzure;
-using Microsoft.WindowsAzure.Commands.Utilities.CloudService;
-using Microsoft.Azure.Commands.WebApp;
-using Microsoft.Azure.Management.WebSites;
-using System.Net.Http;
-using System.Threading;
-using System.Net;
-using Microsoft.Azure;
-using Microsoft.WindowsAzure.Commands.Utilities.Common;
using Microsoft.Azure.Commands.WebApp.Utilities;
+using Microsoft.Azure.Management.WebSites.Models;
namespace Microsoft.Azure.Commands.WebApp.Cmdlets.AppServicePlan
{
@@ -58,7 +44,7 @@ public class NewAzureAppServicePlanCmdlet : AppServicePlanBaseCmdlet
[ValidateSet("Small", "Medium", "Large", IgnoreCase = true)]
public string WorkerSize { get; set; }
- public override void ExecuteCmdlet()
+ protected override void ProcessRecord()
{
//for now not asking admin site name need to implement in future
string adminSiteName = null;
diff --git a/src/ResourceManager/Websites/Commands.Websites/Cmdlets/AppServicePlan/RemoveAppServicePlan.cs b/src/ResourceManager/Websites/Commands.Websites/Cmdlets/AppServicePlan/RemoveAppServicePlan.cs
index 5c7dc59885bd..7fcd1170e843 100644
--- a/src/ResourceManager/Websites/Commands.Websites/Cmdlets/AppServicePlan/RemoveAppServicePlan.cs
+++ b/src/ResourceManager/Websites/Commands.Websites/Cmdlets/AppServicePlan/RemoveAppServicePlan.cs
@@ -14,9 +14,6 @@
using System.Management.Automation;
-using Microsoft.Azure.Management.WebSites.Models;
-using Microsoft.Azure;
-using Microsoft.WindowsAzure.Commands.Utilities.Common;
using Microsoft.Azure.Commands.WebApp.Utilities;
@@ -31,7 +28,7 @@ public class RemoveAppServicePlanCmdlet : AppServicePlanBaseCmdlet
[Parameter(Mandatory = false, HelpMessage = "Do not ask for confirmation.")]
public SwitchParameter Force { get; set; }
- public override void ExecuteCmdlet()
+ protected override void ProcessRecord()
{
ConfirmAction(
Force.IsPresent,
diff --git a/src/ResourceManager/Websites/Commands.Websites/Cmdlets/AppServicePlan/SetAzureAppServicePlan.cs b/src/ResourceManager/Websites/Commands.Websites/Cmdlets/AppServicePlan/SetAzureAppServicePlan.cs
index 8ef5eb710c58..2e64ceb86d5d 100644
--- a/src/ResourceManager/Websites/Commands.Websites/Cmdlets/AppServicePlan/SetAzureAppServicePlan.cs
+++ b/src/ResourceManager/Websites/Commands.Websites/Cmdlets/AppServicePlan/SetAzureAppServicePlan.cs
@@ -13,8 +13,8 @@
// ----------------------------------------------------------------------------------
using System.Management.Automation;
-using Microsoft.Azure.Management.WebSites.Models;
using Microsoft.Azure.Commands.WebApp.Utilities;
+using Microsoft.Azure.Management.WebSites.Models;
namespace Microsoft.Azure.Commands.WebApp.Cmdlets.AppServicePlan
{
@@ -43,7 +43,7 @@ public class SetAzureAppServicePlanCmdlet : AppServicePlanBaseCmdlet
[ValidateSet("Small", "Medium", "Large", IgnoreCase = true)]
public string WorkerSize { get; set; }
- public override void ExecuteCmdlet()
+ protected override void ProcessRecord()
{
//for now not asking admin site name need to implement in future
string adminSiteName = null;
diff --git a/src/ResourceManager/Websites/Commands.Websites/Cmdlets/GetAzureWebApp.cs b/src/ResourceManager/Websites/Commands.Websites/Cmdlets/GetAzureWebApp.cs
index e4c5c03b0f6b..d447bb39043a 100644
--- a/src/ResourceManager/Websites/Commands.Websites/Cmdlets/GetAzureWebApp.cs
+++ b/src/ResourceManager/Websites/Commands.Websites/Cmdlets/GetAzureWebApp.cs
@@ -14,26 +14,9 @@
// ----------------------------------------------------------------------------------
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
using System.Management.Automation;
-using Microsoft.Azure.Management.WebSites.Models;
-using Microsoft.WindowsAzure;
-using Microsoft.WindowsAzure.Commands.Utilities.CloudService;
-using Microsoft.Azure.Commands.WebApp;
-using Microsoft.Azure.Management.WebSites;
-using System.Net.Http;
-using System.Threading;
-using System.Net;
-using Microsoft.Azure;
-using Microsoft.WindowsAzure.Commands.Utilities.Common;
using Microsoft.Azure.Commands.WebApp.Utilities;
-
-
namespace Microsoft.Azure.Commands.WebApp.Cmdlets
{
///
@@ -42,12 +25,10 @@ namespace Microsoft.Azure.Commands.WebApp.Cmdlets
[Cmdlet(VerbsCommon.Get, "AzureWebApp")]
public class GetAzureWebAppCmdlet : WebAppBaseSlotCmdlet
{
- public override void ExecuteCmdlet()
+ protected override void ProcessRecord()
{
WriteObject(WebsitesClient.GetWebsite(ResourceGroupName, Name, SlotName));
-
}
-
}
}
diff --git a/src/ResourceManager/Websites/Commands.Websites/Cmdlets/GetAzureWebAppPublishingProfile.cs b/src/ResourceManager/Websites/Commands.Websites/Cmdlets/GetAzureWebAppPublishingProfile.cs
index adbc3be4f38a..c5ddaf5d0b2d 100644
--- a/src/ResourceManager/Websites/Commands.Websites/Cmdlets/GetAzureWebAppPublishingProfile.cs
+++ b/src/ResourceManager/Websites/Commands.Websites/Cmdlets/GetAzureWebAppPublishingProfile.cs
@@ -14,22 +14,7 @@
// ----------------------------------------------------------------------------------
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
using System.Management.Automation;
-using Microsoft.Azure.Management.WebSites.Models;
-using Microsoft.WindowsAzure;
-using Microsoft.WindowsAzure.Commands.Utilities.CloudService;
-using Microsoft.Azure.Commands.WebApp;
-using Microsoft.Azure.Management.WebSites;
-using System.Net.Http;
-using System.Threading;
-using System.Net;
-using Microsoft.Azure;
-using Microsoft.WindowsAzure.Commands.Utilities.Common;
using Microsoft.Azure.Commands.WebApp.Utilities;
@@ -41,7 +26,7 @@ namespace Microsoft.Azure.Commands.WebApp.Cmdlets
[Cmdlet(VerbsCommon.Get, "AzureWebAppPublishingProfile")]
public class GetAzureWebAppPublishingProfileCmdlet : WebAppBaseSlotCmdlet
{
- public override void ExecuteCmdlet()
+ protected override void ProcessRecord()
{
WriteObject(WebsitesClient.GetWebsitePublishingProfile(ResourceGroupName, Name, SlotName));
diff --git a/src/ResourceManager/Websites/Commands.Websites/Cmdlets/NewAzureWebApp.cs b/src/ResourceManager/Websites/Commands.Websites/Cmdlets/NewAzureWebApp.cs
index 4ebcc4742440..de87a2c53118 100644
--- a/src/ResourceManager/Websites/Commands.Websites/Cmdlets/NewAzureWebApp.cs
+++ b/src/ResourceManager/Websites/Commands.Websites/Cmdlets/NewAzureWebApp.cs
@@ -13,22 +13,7 @@
// ----------------------------------------------------------------------------------
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
using System.Management.Automation;
-using Microsoft.Azure.Management.WebSites.Models;
-using Microsoft.WindowsAzure;
-using Microsoft.WindowsAzure.Commands.Utilities.CloudService;
-using Microsoft.Azure.Commands.WebApp;
-using Microsoft.Azure.Management.WebSites;
-using System.Net.Http;
-using System.Threading;
-using System.Net;
-using Microsoft.Azure;
-using Microsoft.WindowsAzure.Commands.Utilities.Common;
using Microsoft.Azure.Commands.WebApp.Utilities;
@@ -51,7 +36,7 @@ public class NewAzureWebAppCmdlet : WebAppBaseCmdlet
[Parameter(Position = 4, Mandatory = true, HelpMessage = "The name of the app service plan eg: Default1.")]
public string AppServicePlan { get; set; }
- public override void ExecuteCmdlet()
+ protected override void ProcessRecord()
{
WriteObject(WebsitesClient.CreateWebsite(ResourceGroupName, Name, SlotName, Location, AppServicePlan));
diff --git a/src/ResourceManager/Websites/Commands.Websites/Cmdlets/RemoveAzureWebApp.cs b/src/ResourceManager/Websites/Commands.Websites/Cmdlets/RemoveAzureWebApp.cs
index a498d4b4473a..eb02c9dd52ed 100644
--- a/src/ResourceManager/Websites/Commands.Websites/Cmdlets/RemoveAzureWebApp.cs
+++ b/src/ResourceManager/Websites/Commands.Websites/Cmdlets/RemoveAzureWebApp.cs
@@ -14,24 +14,9 @@
// ----------------------------------------------------------------------------------
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
using System.Management.Automation;
-using Microsoft.Azure.Management.WebSites.Models;
-using Microsoft.WindowsAzure;
-using Microsoft.WindowsAzure.Commands.Utilities.CloudService;
-using Microsoft.Azure.Commands.WebApp;
-using Microsoft.Azure.Management.WebSites;
-using System.Net.Http;
-using System.Threading;
-using System.Net;
-using Microsoft.Azure;
-using Microsoft.WindowsAzure.Commands.Utilities.Common;
-using Microsoft.Azure.Commands.WebApp.Utilities;
using Microsoft.Azure.Commands.WebApp.Properties;
+using Microsoft.Azure.Commands.WebApp.Utilities;
namespace Microsoft.Azure.Commands.WebApp.Cmdlets
{
@@ -54,7 +39,7 @@ public class RemoveAzureWebAppCmdlet : WebAppBaseNotMandatoryCmdlet
[Parameter(Mandatory = false, HelpMessage = "Do not ask for confirmation.")]
public SwitchParameter Force { get; set; }
- public override void ExecuteCmdlet()
+ protected override void ProcessRecord()
{
// Currently we delete all slots.
string slotName = null;
diff --git a/src/ResourceManager/Websites/Commands.Websites/Cmdlets/RestartAzureWebApp.cs b/src/ResourceManager/Websites/Commands.Websites/Cmdlets/RestartAzureWebApp.cs
index bff62727e435..6e8762348a7f 100644
--- a/src/ResourceManager/Websites/Commands.Websites/Cmdlets/RestartAzureWebApp.cs
+++ b/src/ResourceManager/Websites/Commands.Websites/Cmdlets/RestartAzureWebApp.cs
@@ -14,22 +14,7 @@
// ----------------------------------------------------------------------------------
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
using System.Management.Automation;
-using Microsoft.Azure.Management.WebSites.Models;
-using Microsoft.WindowsAzure;
-using Microsoft.WindowsAzure.Commands.Utilities.CloudService;
-using Microsoft.Azure.Commands.WebApp;
-using Microsoft.Azure.Management.WebSites;
-using System.Net.Http;
-using System.Threading;
-using System.Net;
-using Microsoft.Azure;
-using Microsoft.WindowsAzure.Commands.Utilities.Common;
using Microsoft.Azure.Commands.WebApp.Utilities;
@@ -46,7 +31,7 @@ public class RestartAzureWebAppCmdlet : WebAppBaseCmdlet
[ValidateNotNullOrEmptyAttribute]
public string SlotName { get; set; }
- public override void ExecuteCmdlet()
+ protected override void ProcessRecord()
{
WriteObject(WebsitesClient.RestartWebsite(ResourceGroupName, Name, SlotName));
}
diff --git a/src/ResourceManager/Websites/Commands.Websites/Cmdlets/StartAzureWebApp.cs b/src/ResourceManager/Websites/Commands.Websites/Cmdlets/StartAzureWebApp.cs
index a406b9c32e1b..027fe4944950 100644
--- a/src/ResourceManager/Websites/Commands.Websites/Cmdlets/StartAzureWebApp.cs
+++ b/src/ResourceManager/Websites/Commands.Websites/Cmdlets/StartAzureWebApp.cs
@@ -14,22 +14,7 @@
// ----------------------------------------------------------------------------------
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
using System.Management.Automation;
-using Microsoft.Azure.Management.WebSites.Models;
-using Microsoft.WindowsAzure;
-using Microsoft.WindowsAzure.Commands.Utilities.CloudService;
-using Microsoft.Azure.Commands.WebApp;
-using Microsoft.Azure.Management.WebSites;
-using System.Net.Http;
-using System.Threading;
-using System.Net;
-using Microsoft.Azure;
-using Microsoft.WindowsAzure.Commands.Utilities.Common;
using Microsoft.Azure.Commands.WebApp.Utilities;
@@ -46,7 +31,7 @@ public class StartAzureWebAppCmdlet : WebAppBaseCmdlet
[ValidateNotNullOrEmptyAttribute]
public string SlotName { get; set; }
- public override void ExecuteCmdlet()
+ protected override void ProcessRecord()
{
WriteObject(WebsitesClient.StartWebsite(ResourceGroupName, Name, SlotName));
diff --git a/src/ResourceManager/Websites/Commands.Websites/Cmdlets/StopAzureWebApp.cs b/src/ResourceManager/Websites/Commands.Websites/Cmdlets/StopAzureWebApp.cs
index 0f0f0f98ac78..e62692995d9d 100644
--- a/src/ResourceManager/Websites/Commands.Websites/Cmdlets/StopAzureWebApp.cs
+++ b/src/ResourceManager/Websites/Commands.Websites/Cmdlets/StopAzureWebApp.cs
@@ -14,22 +14,7 @@
// ----------------------------------------------------------------------------------
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
using System.Management.Automation;
-using Microsoft.Azure.Management.WebSites.Models;
-using Microsoft.WindowsAzure;
-using Microsoft.WindowsAzure.Commands.Utilities.CloudService;
-using Microsoft.Azure.Commands.WebApp;
-using Microsoft.Azure.Management.WebSites;
-using System.Net.Http;
-using System.Threading;
-using System.Net;
-using Microsoft.Azure;
-using Microsoft.WindowsAzure.Commands.Utilities.Common;
using Microsoft.Azure.Commands.WebApp.Utilities;
@@ -46,7 +31,7 @@ public class StopAzureWebAppCmdlet : WebAppBaseCmdlet
[ValidateNotNullOrEmptyAttribute]
public string SlotName { get; set; }
- public override void ExecuteCmdlet()
+ protected override void ProcessRecord()
{
WriteObject(WebsitesClient.StopWebsite(ResourceGroupName, Name, SlotName));
}
diff --git a/src/ResourceManager/Websites/Commands.Websites/Commands.Websites.csproj b/src/ResourceManager/Websites/Commands.Websites/Commands.Websites.csproj
index 555aea287676..637710bbb19e 100644
--- a/src/ResourceManager/Websites/Commands.Websites/Commands.Websites.csproj
+++ b/src/ResourceManager/Websites/Commands.Websites/Commands.Websites.csproj
@@ -186,9 +186,9 @@
-
- {5ee72c53-1720-4309-b54b-5fb79703195f}
- Commands.Common
+
+ {3819d8a7-c62c-4c47-8ddd-0332d9ce1252}
+ Commands.ResourceManager.Common
diff --git a/src/ResourceManager/Websites/Commands.Websites/Models.WebApp/AppServicePlanBaseCmdlet.cs b/src/ResourceManager/Websites/Commands.Websites/Models.WebApp/AppServicePlanBaseCmdlet.cs
index 9c7a54165a0d..b92b9ad0e3a0 100644
--- a/src/ResourceManager/Websites/Commands.Websites/Models.WebApp/AppServicePlanBaseCmdlet.cs
+++ b/src/ResourceManager/Websites/Commands.Websites/Models.WebApp/AppServicePlanBaseCmdlet.cs
@@ -12,8 +12,8 @@
// limitations under the License.
// ----------------------------------------------------------------------------------
-using Microsoft.Azure.Commands.WebApp.Models;
using System.Management.Automation;
+using Microsoft.Azure.Commands.WebApp.Models;
namespace Microsoft.Azure.Commands.WebApp
{
diff --git a/src/ResourceManager/Websites/Commands.Websites/Models.WebApp/AppServicePlanBaseNotMandatoryCmdlet.cs b/src/ResourceManager/Websites/Commands.Websites/Models.WebApp/AppServicePlanBaseNotMandatoryCmdlet.cs
index f512d4c824b0..28c921cce34d 100644
--- a/src/ResourceManager/Websites/Commands.Websites/Models.WebApp/AppServicePlanBaseNotMandatoryCmdlet.cs
+++ b/src/ResourceManager/Websites/Commands.Websites/Models.WebApp/AppServicePlanBaseNotMandatoryCmdlet.cs
@@ -12,8 +12,8 @@
// limitations under the License.
// ----------------------------------------------------------------------------------
-using Microsoft.Azure.Commands.WebApp.Models;
using System.Management.Automation;
+using Microsoft.Azure.Commands.WebApp.Models;
namespace Microsoft.Azure.Commands.WebApp
{
diff --git a/src/ResourceManager/Websites/Commands.Websites/Models.WebApp/WebAppBaseClient.cs b/src/ResourceManager/Websites/Commands.Websites/Models.WebApp/WebAppBaseClient.cs
index 479f9382e8a0..0083cdafd725 100644
--- a/src/ResourceManager/Websites/Commands.Websites/Models.WebApp/WebAppBaseClient.cs
+++ b/src/ResourceManager/Websites/Commands.Websites/Models.WebApp/WebAppBaseClient.cs
@@ -13,17 +13,12 @@
// ----------------------------------------------------------------------------------
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using Microsoft.WindowsAzure.Commands.Utilities.Common;
+using Microsoft.Azure.Commands.ResourceManager.Common;
using Microsoft.Azure.Commands.WebApp.Utilities;
namespace Microsoft.Azure.Commands.WebApp.Models
{
- public abstract class WebAppBaseClientCmdLet : AzureSMCmdlet
+ public abstract class WebAppBaseClientCmdLet : AzureRMCmdlet
{
private WebsitesClient _websitesClient;
public WebsitesClient WebsitesClient
@@ -32,7 +27,7 @@ public WebsitesClient WebsitesClient
{
if (_websitesClient == null)
{
- _websitesClient = new WebsitesClient(this.Profile.DefaultContext);
+ _websitesClient = new WebsitesClient(DefaultProfile.DefaultContext);
}
return _websitesClient;
}
diff --git a/src/ResourceManager/Websites/Commands.Websites/Models.WebApp/WebAppBaseCmdlet.cs b/src/ResourceManager/Websites/Commands.Websites/Models.WebApp/WebAppBaseCmdlet.cs
index c4be20beffc4..9d3cd7ad9f55 100644
--- a/src/ResourceManager/Websites/Commands.Websites/Models.WebApp/WebAppBaseCmdlet.cs
+++ b/src/ResourceManager/Websites/Commands.Websites/Models.WebApp/WebAppBaseCmdlet.cs
@@ -12,8 +12,8 @@
// limitations under the License.
// ----------------------------------------------------------------------------------
-using Microsoft.Azure.Commands.WebApp.Models;
using System.Management.Automation;
+using Microsoft.Azure.Commands.WebApp.Models;
namespace Microsoft.Azure.Commands.WebApp
diff --git a/src/ResourceManager/Websites/Commands.Websites/Models.WebApp/WebAppBaseNotMandatoryCmdlet.cs b/src/ResourceManager/Websites/Commands.Websites/Models.WebApp/WebAppBaseNotMandatoryCmdlet.cs
index 9ba0905e2f5d..65ed02059887 100644
--- a/src/ResourceManager/Websites/Commands.Websites/Models.WebApp/WebAppBaseNotMandatoryCmdlet.cs
+++ b/src/ResourceManager/Websites/Commands.Websites/Models.WebApp/WebAppBaseNotMandatoryCmdlet.cs
@@ -12,8 +12,8 @@
// limitations under the License.
// ----------------------------------------------------------------------------------
-using Microsoft.Azure.Commands.WebApp.Models;
using System.Management.Automation;
+using Microsoft.Azure.Commands.WebApp.Models;
namespace Microsoft.Azure.Commands.WebApp
{
diff --git a/src/ResourceManager/Websites/Commands.Websites/Models.WebApp/WebAppBaseSlotCmdlet.cs b/src/ResourceManager/Websites/Commands.Websites/Models.WebApp/WebAppBaseSlotCmdlet.cs
index b2fd98d211b9..8cca78af6ff4 100644
--- a/src/ResourceManager/Websites/Commands.Websites/Models.WebApp/WebAppBaseSlotCmdlet.cs
+++ b/src/ResourceManager/Websites/Commands.Websites/Models.WebApp/WebAppBaseSlotCmdlet.cs
@@ -12,7 +12,6 @@
// limitations under the License.
// ----------------------------------------------------------------------------------
-using Microsoft.Azure.Commands.WebApp.Models;
using System.Management.Automation;
namespace Microsoft.Azure.Commands.WebApp
diff --git a/src/ResourceManager/Websites/Commands.Websites/Properties/Resources.Designer.cs b/src/ResourceManager/Websites/Commands.Websites/Properties/Resources.Designer.cs
index 12e17e64f6ab..ff3b2efd1369 100644
--- a/src/ResourceManager/Websites/Commands.Websites/Properties/Resources.Designer.cs
+++ b/src/ResourceManager/Websites/Commands.Websites/Properties/Resources.Designer.cs
@@ -8,10 +8,10 @@
//
//------------------------------------------------------------------------------
-namespace Microsoft.Azure.Commands.WebApp.Properties {
- using System;
-
-
+namespace Microsoft.Azure.Commands.WebApp.Properties
+{
+
+
///
/// A strongly-typed resource class, for looking up localized strings, etc.
///
diff --git a/src/ResourceManager/Websites/Commands.Websites/Utilities/WebsitesClient.cs b/src/ResourceManager/Websites/Commands.Websites/Utilities/WebsitesClient.cs
index f2e880d3779a..156623b4e247 100644
--- a/src/ResourceManager/Websites/Commands.Websites/Utilities/WebsitesClient.cs
+++ b/src/ResourceManager/Websites/Commands.Websites/Utilities/WebsitesClient.cs
@@ -13,19 +13,12 @@
// ----------------------------------------------------------------------------------
using System;
-using System.Collections;
using System.Collections.Generic;
-using System.IO;
using System.Linq;
-using System.Runtime.Serialization.Formatters;
-using System.Threading;
+using Microsoft.Azure.Common.Authentication;
+using Microsoft.Azure.Common.Authentication.Models;
using Microsoft.Azure.Management.Resources;
-using Microsoft.Azure.Commands;
using Microsoft.Azure.Management.WebSites;
-using System.Net;
-using Hyak.Common;
-using Microsoft.Azure.Common.Authentication.Models;
-using Microsoft.Azure.Common.Authentication;
using Microsoft.Azure.Management.WebSites.Models;
namespace Microsoft.Azure.Commands.WebApp.Utilities