diff --git a/setup/azurecmdfiles.wxi b/setup/azurecmdfiles.wxi
index bb751da17f58..3bcc9e71e4e9 100644
--- a/setup/azurecmdfiles.wxi
+++ b/setup/azurecmdfiles.wxi
@@ -8,6 +8,9 @@
+
+
+
@@ -17,9 +20,15 @@
+
+
+
+
+
+
@@ -29,6 +38,9 @@
+
+
+
@@ -41,12 +53,6 @@
-
-
-
-
-
-
@@ -64,6 +70,9 @@
+
+
+
@@ -73,9 +82,15 @@
+
+
+
+
+
+
@@ -100,6 +115,9 @@
+
+
+
@@ -124,12 +142,6 @@
-
-
-
-
-
-
@@ -156,6 +168,9 @@
+
+
+
@@ -165,9 +180,15 @@
+
+
+
+
+
+
@@ -183,6 +204,9 @@
+
+
+
@@ -195,12 +219,6 @@
-
-
-
-
-
-
@@ -221,6 +239,9 @@
+
+
+
@@ -230,9 +251,15 @@
+
+
+
+
+
+
@@ -266,12 +293,6 @@
-
-
-
-
-
-
@@ -289,6 +310,9 @@
+
+
+
@@ -349,9 +373,15 @@
+
+
+
+
+
+
@@ -373,9 +403,6 @@
-
-
-
@@ -406,12 +433,6 @@
-
-
-
-
-
-
@@ -432,15 +453,24 @@
+
+
+
+
+
+
+
+
+
@@ -459,18 +489,15 @@
+
+
+
-
-
-
-
-
-
@@ -500,6 +527,9 @@
+
+
+
@@ -509,9 +539,15 @@
+
+
+
+
+
+
@@ -530,6 +566,9 @@
+
+
+
@@ -548,12 +587,6 @@
-
-
-
-
-
-
@@ -580,6 +613,9 @@
+
+
+
@@ -589,9 +625,15 @@
+
+
+
+
+
+
@@ -634,12 +676,6 @@
-
-
-
-
-
-
@@ -673,15 +709,24 @@
+
+
+
+
+
+
+
+
+
@@ -691,6 +736,9 @@
+
+
+
@@ -703,12 +751,6 @@
-
-
-
-
-
-
@@ -741,6 +783,9 @@
+
+
+
@@ -786,9 +831,15 @@
+
+
+
+
+
+
@@ -804,6 +855,9 @@
+
+
+
@@ -882,12 +936,6 @@
-
-
-
-
-
-
@@ -950,15 +998,27 @@
+
+
+
+
+
+
+
+
+
+
+
+
@@ -980,12 +1040,6 @@
-
-
-
-
-
-
@@ -1006,9 +1060,18 @@
+
+
+
+
+
+
+
+
+
@@ -1030,6 +1093,9 @@
+
+
+
@@ -1048,12 +1114,6 @@
-
-
-
-
-
-
@@ -1104,6 +1164,9 @@
+
+
+
@@ -1149,9 +1212,15 @@
+
+
+
+
+
+
@@ -1167,6 +1236,9 @@
+
+
+
@@ -1218,12 +1290,6 @@
-
-
-
-
-
-
@@ -1286,15 +1352,24 @@
+
+
+
+
+
+
+
+
+
@@ -1310,6 +1385,9 @@
+
+
+
@@ -1319,12 +1397,6 @@
-
-
-
-
-
-
@@ -1357,21 +1429,33 @@
+
+
+
+
+
+
+
+
+
+
+
+
@@ -1384,12 +1468,6 @@
-
-
-
-
-
-
@@ -1422,6 +1500,9 @@
+
+
+
@@ -1461,9 +1542,15 @@
+
+
+
+
+
+
@@ -1536,12 +1623,6 @@
-
-
-
-
-
-
@@ -1898,6 +1979,9 @@
+
+
+
@@ -1937,9 +2021,15 @@
+
+
+
+
+
+
@@ -1955,6 +2045,9 @@
+
+
+
@@ -2027,12 +2120,6 @@
-
-
-
-
-
-
@@ -2095,9 +2182,18 @@
+
+
+
+
+
+
+
+
+
@@ -2113,6 +2209,9 @@
+
+
+
@@ -2140,12 +2239,6 @@
-
-
-
-
-
-
@@ -2178,9 +2271,18 @@
+
+
+
+
+
+
+
+
+
@@ -2196,6 +2298,9 @@
+
+
+
@@ -2214,12 +2319,6 @@
-
-
-
-
-
-
@@ -2252,28 +2351,33 @@
+
+
+
+
-
-
+
+
+
@@ -2282,6 +2386,7 @@
+
@@ -2290,8 +2395,6 @@
-
-
@@ -2300,31 +2403,36 @@
+
+
+
+
-
-
+
+
+
@@ -2336,13 +2444,12 @@
-
-
+
@@ -2363,7 +2470,9 @@
+
+
@@ -2371,7 +2480,6 @@
-
@@ -2382,27 +2490,27 @@
-
-
+
+
+
+
-
-
@@ -2412,24 +2520,26 @@
+
+
+
+
-
-
@@ -2438,10 +2548,13 @@
+
+
+
@@ -2456,8 +2569,6 @@
-
-
@@ -2467,18 +2578,20 @@
+
+
+
+
-
-
@@ -2489,6 +2602,7 @@
+
@@ -2504,12 +2618,15 @@
+
+
+
@@ -2536,8 +2653,6 @@
-
-
@@ -2558,9 +2673,13 @@
+
+
+
+
@@ -2568,15 +2687,16 @@
-
-
+
+
+
@@ -2584,14 +2704,13 @@
+
-
-
@@ -2608,6 +2727,7 @@
+
@@ -2623,12 +2743,15 @@
+
+
+
@@ -2646,8 +2769,6 @@
-
-
@@ -2668,19 +2789,21 @@
+
+
+
+
-
-
@@ -2691,17 +2814,19 @@
+
+
+
+
-
-
@@ -2712,6 +2837,7 @@
+
@@ -2725,7 +2851,9 @@
+
+
@@ -2750,8 +2878,6 @@
-
-
@@ -2856,6 +2982,7 @@
+
@@ -2869,12 +2996,15 @@
+
+
+
@@ -2899,8 +3029,6 @@
-
-
@@ -2921,12 +3049,16 @@
+
+
+
+
@@ -2936,8 +3068,6 @@
-
-
@@ -2948,20 +3078,22 @@
+
+
+
+
-
-
diff --git a/src/AzurePowershell.sln b/src/AzurePowershell.sln
index 8b680bdf26d1..b6bafadf97b1 100644
--- a/src/AzurePowershell.sln
+++ b/src/AzurePowershell.sln
@@ -155,8 +155,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.StreamAnalytics",
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}") = "Common.Extensions", "Common\Azure.Common.Extensions\Common.Extensions.csproj", "{B95C489C-8CB7-4DCF-8D5F-B9AEBDBBAF89}"
-EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -355,6 +353,10 @@ Global
{9FFC40CC-A341-4D0C-A25D-DC6B78EF6C94}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9FFC40CC-A341-4D0C-A25D-DC6B78EF6C94}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9FFC40CC-A341-4D0C-A25D-DC6B78EF6C94}.Release|Any CPU.Build.0 = Release|Any CPU
+ {080B0477-7E52-4455-90AB-23BD13D1B1CE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {080B0477-7E52-4455-90AB-23BD13D1B1CE}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {080B0477-7E52-4455-90AB-23BD13D1B1CE}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {080B0477-7E52-4455-90AB-23BD13D1B1CE}.Release|Any CPU.Build.0 = Release|Any CPU
{98B10548-DF97-4FB1-8D82-2A12945D4F21}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{98B10548-DF97-4FB1-8D82-2A12945D4F21}.Debug|Any CPU.Build.0 = Debug|Any CPU
{98B10548-DF97-4FB1-8D82-2A12945D4F21}.Release|Any CPU.ActiveCfg = Release|Any CPU
@@ -363,10 +365,6 @@ Global
{A415F75B-EB6A-49A6-934E-5BA71B83D6EB}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A415F75B-EB6A-49A6-934E-5BA71B83D6EB}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A415F75B-EB6A-49A6-934E-5BA71B83D6EB}.Release|Any CPU.Build.0 = Release|Any CPU
- {080B0477-7E52-4455-90AB-23BD13D1B1CE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {080B0477-7E52-4455-90AB-23BD13D1B1CE}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {080B0477-7E52-4455-90AB-23BD13D1B1CE}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {080B0477-7E52-4455-90AB-23BD13D1B1CE}.Release|Any CPU.Build.0 = Release|Any CPU
{F49A314A-A235-47D3-A654-1EC19ACA366C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F49A314A-A235-47D3-A654-1EC19ACA366C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F49A314A-A235-47D3-A654-1EC19ACA366C}.Release|Any CPU.ActiveCfg = Release|Any CPU
@@ -375,10 +373,6 @@ Global
{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
- {B95C489C-8CB7-4DCF-8D5F-B9AEBDBBAF89}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {B95C489C-8CB7-4DCF-8D5F-B9AEBDBBAF89}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {B95C489C-8CB7-4DCF-8D5F-B9AEBDBBAF89}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {B95C489C-8CB7-4DCF-8D5F-B9AEBDBBAF89}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -407,8 +401,8 @@ Global
{4AE5705F-62CF-461D-B72E-DD9DCD9B3609} = {95C16AED-FD57-42A0-86C3-2CF4300A4817}
{F4ABAD68-64A5-4B23-B09C-42559A7524DE} = {95C16AED-FD57-42A0-86C3-2CF4300A4817}
{FDB897BD-FCB4-44A1-8D66-AC99F22EC737} = {95C16AED-FD57-42A0-86C3-2CF4300A4817}
- {A415F75B-EB6A-49A6-934E-5BA71B83D6EB} = {95C16AED-FD57-42A0-86C3-2CF4300A4817}
{080B0477-7E52-4455-90AB-23BD13D1B1CE} = {95C16AED-FD57-42A0-86C3-2CF4300A4817}
+ {A415F75B-EB6A-49A6-934E-5BA71B83D6EB} = {95C16AED-FD57-42A0-86C3-2CF4300A4817}
{7E6683BE-ECFF-4709-89EB-1325E9E70512} = {95C16AED-FD57-42A0-86C3-2CF4300A4817}
EndGlobalSection
EndGlobal
diff --git a/src/Common/Commands.Common.Storage/Commands.Common.Storage.csproj b/src/Common/Commands.Common.Storage/Commands.Common.Storage.csproj
index 8c32acd701c8..89eb2b979a81 100644
--- a/src/Common/Commands.Common.Storage/Commands.Common.Storage.csproj
+++ b/src/Common/Commands.Common.Storage/Commands.Common.Storage.csproj
@@ -48,6 +48,26 @@
false
+
+ False
+ ..\..\packages\Hyak.Common.1.0.1\lib\portable-net403+win+wpa81\Hyak.Common.dll
+
+
+ False
+ ..\..\packages\Microsoft.Azure.Common.2.0.1\lib\net45\Microsoft.Azure.Common.dll
+
+
+ False
+ ..\..\packages\Microsoft.Azure.Common.Extensions.0.13.0-preview\lib\net45\Microsoft.Azure.Common.Extensions.dll
+
+
+ False
+ ..\..\packages\Microsoft.Azure.Common.2.0.1\lib\net45\Microsoft.Azure.Common.NetFramework.dll
+
+
+ False
+ ..\..\packages\Microsoft.Azure.Management.Resources.2.12.0-preview\lib\net40\Microsoft.Azure.ResourceManager.dll
+
..\..\packages\Microsoft.Data.Edm.5.6.0\lib\net40\Microsoft.Data.Edm.dll
@@ -57,6 +77,13 @@
..\..\packages\Microsoft.Data.Services.Client.5.6.0\lib\net40\Microsoft.Data.Services.Client.dll
+
+ False
+ ..\..\packages\Microsoft.IdentityModel.Clients.ActiveDirectory.2.11.10918.1222\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.dll
+
+
+ ..\..\packages\Microsoft.IdentityModel.Clients.ActiveDirectory.2.11.10918.1222\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.WindowsForms.dll
+
False
..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.dll
@@ -69,20 +96,16 @@
False
..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.Desktop.dll
-
- False
- ..\..\packages\Microsoft.WindowsAzure.Common.1.4.1\lib\net45\Microsoft.WindowsAzure.Common.dll
-
-
- False
- ..\..\packages\Microsoft.WindowsAzure.Common.1.4.1\lib\net45\Microsoft.WindowsAzure.Common.NetFramework.dll
-
..\..\packages\Microsoft.WindowsAzure.ConfigurationManager.2.0.3\lib\net40\Microsoft.WindowsAzure.Configuration.dll
-
+
False
- ..\..\packages\Microsoft.WindowsAzure.Management.Storage.3.1.0\lib\net40\Microsoft.WindowsAzure.Management.Storage.dll
+ ..\..\packages\Microsoft.WindowsAzure.Management.4.0.0\lib\net40\Microsoft.WindowsAzure.Management.dll
+
+
+ False
+ ..\..\packages\Microsoft.WindowsAzure.Management.Storage.5.0.0\lib\net40\Microsoft.WindowsAzure.Management.Storage.dll
False
@@ -131,10 +154,6 @@
-
- {b95c489c-8cb7-4dcf-8d5f-b9aebdbbaf89}
- Common.Extensions
-
{5ee72c53-1720-4309-b54b-5fb79703195f}
Commands.Common
diff --git a/src/Common/Commands.Common.Storage/packages.config b/src/Common/Commands.Common.Storage/packages.config
index 1b2aa2e6cb32..e4506f130cef 100644
--- a/src/Common/Commands.Common.Storage/packages.config
+++ b/src/Common/Commands.Common.Storage/packages.config
@@ -1,16 +1,21 @@
+
+
+
+
+
+
-
-
-
+
+
diff --git a/src/Common/Commands.Common.Test/Commands.Common.Test.csproj b/src/Common/Commands.Common.Test/Commands.Common.Test.csproj
index 052b5d184fa0..e03df699a4ab 100644
--- a/src/Common/Commands.Common.Test/Commands.Common.Test.csproj
+++ b/src/Common/Commands.Common.Test/Commands.Common.Test.csproj
@@ -48,14 +48,25 @@
false
-
+
+ ..\..\packages\Hyak.Common.1.0.1\lib\portable-net403+win+wpa81\Hyak.Common.dll
+
+
+ ..\..\packages\Microsoft.Azure.Common.2.0.1\lib\net45\Microsoft.Azure.Common.dll
+
+
False
- ..\..\packages\Microsoft.Azure.Management.Resources.2.7.0-preview\lib\net40\Microsoft.Azure.ResourceManager.dll
- True
+ ..\..\packages\Microsoft.Azure.Common.Extensions.0.13.0-preview\lib\net45\Microsoft.Azure.Common.Extensions.dll
+
+
+ ..\..\packages\Microsoft.Azure.Common.2.0.1\lib\net45\Microsoft.Azure.Common.NetFramework.dll
+
+
+ ..\..\packages\Microsoft.Azure.Management.Resources.2.12.0-preview\lib\net40\Microsoft.Azure.ResourceManager.dll
-
+
False
- ..\..\packages\Hydra.HttpRecorder.1.0.5417.13285-prerelease\lib\net45\Microsoft.Azure.Utilities.HttpRecorder.dll
+ ..\..\packages\Microsoft.Azure.Test.HttpRecorder.1.0.5486.28526-prerelease\lib\net45\Microsoft.Azure.Test.HttpRecorder.dll
..\..\packages\Microsoft.Data.Edm.5.6.0\lib\net40\Microsoft.Data.Edm.dll
@@ -87,28 +98,17 @@
..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.Desktop.dll
-
- False
- ..\..\packages\Microsoft.WindowsAzure.Common.1.4.1\lib\net45\Microsoft.WindowsAzure.Common.dll
-
-
- False
- ..\..\packages\Microsoft.WindowsAzure.Common.1.4.1\lib\net45\Microsoft.WindowsAzure.Common.NetFramework.dll
-
..\..\packages\Microsoft.WindowsAzure.ConfigurationManager.2.0.3\lib\net40\Microsoft.WindowsAzure.Configuration.dll
-
- False
- ..\..\packages\Microsoft.WindowsAzure.Management.2.1.0\lib\net40\Microsoft.WindowsAzure.Management.dll
+
+ ..\..\packages\Microsoft.WindowsAzure.Management.4.0.0\lib\net40\Microsoft.WindowsAzure.Management.dll
-
- False
- ..\..\packages\Microsoft.WindowsAzure.Management.Compute.6.1.2\lib\net40\Microsoft.WindowsAzure.Management.Compute.dll
+
+ ..\..\packages\Microsoft.WindowsAzure.Management.Compute.8.0.0\lib\net40\Microsoft.WindowsAzure.Management.Compute.dll
-
- False
- ..\..\packages\Microsoft.WindowsAzure.Management.Storage.3.1.0\lib\net40\Microsoft.WindowsAzure.Management.Storage.dll
+
+ ..\..\packages\Microsoft.WindowsAzure.Management.Storage.5.0.0\lib\net40\Microsoft.WindowsAzure.Management.Storage.dll
False
@@ -156,10 +156,6 @@
-
-
-
-
@@ -167,10 +163,12 @@
-
-
-
+
+
+
+
+
@@ -178,6 +176,8 @@
+
+
True
@@ -187,10 +187,6 @@
-
- {b95c489c-8cb7-4dcf-8d5f-b9aebdbbaf89}
- Common.Extensions
-
{65c3a86a-716d-4e7d-ab67-1db00b3bf72d}
Commands.Common.Storage
diff --git a/src/Common/Commands.Common.Test/Common/TestingTracingInterceptor.cs b/src/Common/Commands.Common.Test/Common/TestingTracingInterceptor.cs
index a8ca9cace755..a928026e562d 100644
--- a/src/Common/Commands.Common.Test/Common/TestingTracingInterceptor.cs
+++ b/src/Common/Commands.Common.Test/Common/TestingTracingInterceptor.cs
@@ -17,8 +17,10 @@
using System.Collections.Generic;
using System.Diagnostics;
using System.Net.Http;
-using Microsoft.WindowsAzure.Common;
-using Microsoft.WindowsAzure.Common.Internals;
+using Microsoft.Azure.Common;
+using Microsoft.Azure.Common.Internals;
+using Hyak.Common;
+using Hyak.Common.Internals;
namespace Microsoft.WindowsAzure.Commands.Common.Test.Common
{
@@ -97,12 +99,12 @@ public static void AddToContext()
{
try
{
- CloudContext.Configuration.Tracing.RemoveTracingInterceptor(TestingTracingInterceptor.Singleton);
+ TracingAdapter.RemoveTracingInterceptor(TestingTracingInterceptor.Singleton);
}
catch
{
}
- CloudContext.Configuration.Tracing.AddTracingInterceptor(TestingTracingInterceptor.Singleton);
+ TracingAdapter.AddTracingInterceptor(TestingTracingInterceptor.Singleton);
}
static TestingTracingInterceptor Singleton
diff --git a/src/Common/Commands.Common.Test/Mocks/ClientMocks.cs b/src/Common/Commands.Common.Test/Mocks/ClientMocks.cs
index 23adacee0364..8ccb064b633c 100644
--- a/src/Common/Commands.Common.Test/Mocks/ClientMocks.cs
+++ b/src/Common/Commands.Common.Test/Mocks/ClientMocks.cs
@@ -20,6 +20,8 @@
using System.Threading;
using System.Threading.Tasks;
using Moq;
+using Microsoft.Azure;
+using Hyak.Common;
namespace Microsoft.WindowsAzure.Commands.Common.Test.Mocks
{
diff --git a/src/Common/Commands.Common.Test/Mocks/MockCertificateAuthenticationFactory.cs b/src/Common/Commands.Common.Test/Mocks/MockCertificateAuthenticationFactory.cs
index 792e281095a5..03b03e09fa52 100644
--- a/src/Common/Commands.Common.Test/Mocks/MockCertificateAuthenticationFactory.cs
+++ b/src/Common/Commands.Common.Test/Mocks/MockCertificateAuthenticationFactory.cs
@@ -12,11 +12,12 @@
// limitations under the License.
// ----------------------------------------------------------------------------------
+using Microsoft.Azure;
+using Microsoft.Azure.Common.Extensions;
+using Microsoft.Azure.Common.Extensions.Authentication;
+using Microsoft.Azure.Common.Extensions.Models;
using System.Security;
using System.Security.Cryptography.X509Certificates;
-using Microsoft.Azure.Common.Extensions.Models;
-using Microsoft.Azure.Common.Extensions.Authentication;
-using Microsoft.Azure.Common.Extensions;
namespace Microsoft.WindowsAzure.Commands.Common.Test.Mocks
{
diff --git a/src/Common/Commands.Common.Test/Mocks/MockClientFactory.cs b/src/Common/Commands.Common.Test/Mocks/MockClientFactory.cs
index fca693ee7621..68b6858db97f 100644
--- a/src/Common/Commands.Common.Test/Mocks/MockClientFactory.cs
+++ b/src/Common/Commands.Common.Test/Mocks/MockClientFactory.cs
@@ -17,11 +17,12 @@
using System.Linq;
using System.Net;
using System.Net.Http;
-using Microsoft.Azure.Utilities.HttpRecorder;
-using Microsoft.WindowsAzure.Common;
+using Microsoft.Azure.Test.HttpRecorder;
+using Microsoft.Azure.Common;
using Microsoft.Azure.Common.Extensions.Factories;
using Microsoft.Azure.Common.Extensions.Models;
using Microsoft.Azure.Common.Extensions;
+using Microsoft.Azure;
namespace Microsoft.WindowsAzure.Commands.Common.Test.Mocks
{
diff --git a/src/Common/Commands.Common.Test/Mocks/MockTokenAuthenticationFactory.cs b/src/Common/Commands.Common.Test/Mocks/MockTokenAuthenticationFactory.cs
index b5925680cf8d..a6d4523c4fe9 100644
--- a/src/Common/Commands.Common.Test/Mocks/MockTokenAuthenticationFactory.cs
+++ b/src/Common/Commands.Common.Test/Mocks/MockTokenAuthenticationFactory.cs
@@ -12,12 +12,12 @@
// limitations under the License.
// ----------------------------------------------------------------------------------
+using Microsoft.Azure;
+using Microsoft.Azure.Common.Extensions;
+using Microsoft.Azure.Common.Extensions.Authentication;
+using Microsoft.Azure.Common.Extensions.Models;
using System;
using System.Security;
-using System.Security.Cryptography.X509Certificates;
-using Microsoft.Azure.Common.Extensions.Models;
-using Microsoft.Azure.Common.Extensions.Authentication;
-using Microsoft.Azure.Common.Extensions;
namespace Microsoft.WindowsAzure.Commands.Common.Test.Mocks
{
diff --git a/src/Common/Commands.Common.Test/packages.config b/src/Common/Commands.Common.Test/packages.config
index 8254c0cc0a28..37c24bf2f41f 100644
--- a/src/Common/Commands.Common.Test/packages.config
+++ b/src/Common/Commands.Common.Test/packages.config
@@ -1,7 +1,11 @@
-
-
+
+
+
+
+
+
@@ -10,12 +14,10 @@
-
-
-
-
-
+
+
+
diff --git a/src/Common/Commands.Common/Commands.Common.csproj b/src/Common/Commands.Common/Commands.Common.csproj
index 1c07ac6e9cdb..3215eca634f9 100644
--- a/src/Common/Commands.Common/Commands.Common.csproj
+++ b/src/Common/Commands.Common/Commands.Common.csproj
@@ -50,9 +50,25 @@
true
+
+ False
+ ..\..\packages\Hyak.Common.1.0.1\lib\portable-net403+win+wpa81\Hyak.Common.dll
+
+
+ False
+ ..\..\packages\Microsoft.Azure.Common.2.0.1\lib\net45\Microsoft.Azure.Common.dll
+
+
+ False
+ ..\..\packages\Microsoft.Azure.Common.Extensions.0.13.0-preview\lib\net45\Microsoft.Azure.Common.Extensions.dll
+
+
+ False
+ ..\..\packages\Microsoft.Azure.Common.2.0.1\lib\net45\Microsoft.Azure.Common.NetFramework.dll
+
False
- ..\..\packages\Microsoft.Azure.Management.Resources.2.7.0-preview\lib\net40\Microsoft.Azure.ResourceManager.dll
+ ..\..\packages\Microsoft.Azure.Management.Resources.2.12.0-preview\lib\net40\Microsoft.Azure.ResourceManager.dll
..\..\packages\Microsoft.Data.Edm.5.6.0\lib\net40\Microsoft.Data.Edm.dll
@@ -83,17 +99,9 @@
False
..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.Desktop.dll
-
- False
- ..\..\packages\Microsoft.WindowsAzure.Common.1.4.1\lib\net45\Microsoft.WindowsAzure.Common.dll
-
-
+
False
- ..\..\packages\Microsoft.WindowsAzure.Common.1.4.1\lib\net45\Microsoft.WindowsAzure.Common.NetFramework.dll
-
-
- False
- ..\..\packages\Microsoft.WindowsAzure.Management.2.1.0\lib\net40\Microsoft.WindowsAzure.Management.dll
+ ..\..\packages\Microsoft.WindowsAzure.Management.4.0.0\lib\net40\Microsoft.WindowsAzure.Management.dll
..\..\packages\Newtonsoft.Json.6.0.4\lib\net45\Newtonsoft.Json.dll
@@ -178,12 +186,6 @@
Designer
-
-
- {b95c489c-8cb7-4dcf-8d5f-b9aebdbbaf89}
- Common.Extensions
-
-
diff --git a/src/Common/Commands.Common/GeneralUtilities.cs b/src/Common/Commands.Common/GeneralUtilities.cs
index 04098501bd36..776b11817439 100644
--- a/src/Common/Commands.Common/GeneralUtilities.cs
+++ b/src/Common/Commands.Common/GeneralUtilities.cs
@@ -12,10 +12,10 @@
// limitations under the License.
// ----------------------------------------------------------------------------------
+using Hyak.Common;
using Microsoft.Azure.Common.Extensions;
using Microsoft.Azure.Common.Extensions.Properties;
using Microsoft.WindowsAzure.Commands.Common;
-using Microsoft.WindowsAzure.Common.Internals;
using System;
using System.Collections.Generic;
using System.Diagnostics;
@@ -329,11 +329,11 @@ public static string GetLog(HttpRequestMessage request)
public static string FormatString(string content)
{
- if (ParserHelper.IsXml(content))
+ if (CloudException.IsXml(content))
{
return XmlUtilities.TryFormatXml(content);
}
- else if (ParserHelper.IsJson(content))
+ else if (CloudException.IsJson(content))
{
return JsonUtilities.TryFormatJson(content);
}
diff --git a/src/Common/Commands.Common/RecordingTracingInterceptor.cs b/src/Common/Commands.Common/RecordingTracingInterceptor.cs
index 6cd9ed9406eb..6fed19616660 100644
--- a/src/Common/Commands.Common/RecordingTracingInterceptor.cs
+++ b/src/Common/Commands.Common/RecordingTracingInterceptor.cs
@@ -12,6 +12,7 @@
// limitations under the License.
// ----------------------------------------------------------------------------------
+using Hyak.Common;
using Microsoft.WindowsAzure;
using Microsoft.WindowsAzure.Commands.Utilities.Common;
using System;
@@ -21,7 +22,7 @@
namespace Microsoft.Azure.Common.Extensions.Models
{
- public class RecordingTracingInterceptor : ICloudTracingInterceptor
+ public class RecordingTracingInterceptor : Hyak.Common.ICloudTracingInterceptor
{
public RecordingTracingInterceptor()
{
@@ -80,14 +81,14 @@ public void Exit(string invocationId, object result)
public static void AddToContext(RecordingTracingInterceptor interceptor)
{
RemoveFromContext(interceptor);
- CloudContext.Configuration.Tracing.AddTracingInterceptor(interceptor);
+ TracingAdapter.AddTracingInterceptor(interceptor);
}
public static void RemoveFromContext(RecordingTracingInterceptor interceptor)
{
try
{
- CloudContext.Configuration.Tracing.RemoveTracingInterceptor(interceptor);
+ TracingAdapter.RemoveTracingInterceptor(interceptor);
}
catch
{
diff --git a/src/Common/Commands.Common/packages.config b/src/Common/Commands.Common/packages.config
index 56b52b68db88..a2d042d901c1 100644
--- a/src/Common/Commands.Common/packages.config
+++ b/src/Common/Commands.Common/packages.config
@@ -1,7 +1,11 @@
+
-
+
+
+
+
@@ -10,9 +14,7 @@
-
-
-
+
\ No newline at end of file
diff --git a/src/Common/Commands.Profile/Commands.Profile.csproj b/src/Common/Commands.Profile/Commands.Profile.csproj
index c8dfd0f6e933..42fa311e25ad 100644
--- a/src/Common/Commands.Profile/Commands.Profile.csproj
+++ b/src/Common/Commands.Profile/Commands.Profile.csproj
@@ -47,6 +47,22 @@
false
+
+ ..\..\packages\Hyak.Common.1.0.1\lib\portable-net403+win+wpa81\Hyak.Common.dll
+
+
+ ..\..\packages\Microsoft.Azure.Common.2.0.1\lib\net45\Microsoft.Azure.Common.dll
+
+
+ False
+ ..\..\packages\Microsoft.Azure.Common.Extensions.0.13.0-preview\lib\net45\Microsoft.Azure.Common.Extensions.dll
+
+
+ ..\..\packages\Microsoft.Azure.Common.2.0.1\lib\net45\Microsoft.Azure.Common.NetFramework.dll
+
+
+ ..\..\packages\Microsoft.Azure.Management.Resources.2.12.0-preview\lib\net40\Microsoft.Azure.ResourceManager.dll
+
@@ -73,17 +89,8 @@
False
..\lib\Microsoft.Web.Deployment.dll
-
- False
- ..\..\packages\Microsoft.WindowsAzure.Common.1.4.1\lib\net45\Microsoft.WindowsAzure.Common.dll
-
-
- False
- ..\..\packages\Microsoft.WindowsAzure.Common.1.4.1\lib\net45\Microsoft.WindowsAzure.Common.NetFramework.dll
-
-
- False
- ..\..\packages\Microsoft.WindowsAzure.Management.2.1.0\lib\net40\Microsoft.WindowsAzure.Management.dll
+
+ ..\..\packages\Microsoft.WindowsAzure.Management.4.0.0\lib\net40\Microsoft.WindowsAzure.Management.dll
..\..\packages\Newtonsoft.Json.6.0.4\lib\net45\Newtonsoft.Json.dll
@@ -143,10 +150,6 @@
-
- {b95c489c-8cb7-4dcf-8d5f-b9aebdbbaf89}
- Common.Extensions
-
{5ee72c53-1720-4309-b54b-5fb79703195f}
Commands.Common
diff --git a/src/Common/Commands.Profile/packages.config b/src/Common/Commands.Profile/packages.config
index c8c2784f5d51..bdde83a6dc79 100644
--- a/src/Common/Commands.Profile/packages.config
+++ b/src/Common/Commands.Profile/packages.config
@@ -1,12 +1,15 @@
+
+
+
+
+
-
-
-
+
\ No newline at end of file
diff --git a/src/Common/Commands.ScenarioTest/AutomationTests/AutomationTests.cs b/src/Common/Commands.ScenarioTest/AutomationTests/AutomationTests.cs
index e2a688844803..12f15d9dd2c2 100644
--- a/src/Common/Commands.ScenarioTest/AutomationTests/AutomationTests.cs
+++ b/src/Common/Commands.ScenarioTest/AutomationTests/AutomationTests.cs
@@ -17,7 +17,7 @@
using System.Linq;
using Microsoft.WindowsAzure.Commands.Test.Utilities.Common;
using Microsoft.WindowsAzure.Commands.Utilities.Common;
-using Microsoft.WindowsAzure.Testing;
+using Microsoft.Azure.Test;
using Xunit;
using Microsoft.Azure.Common.Extensions;
diff --git a/src/Common/Commands.ScenarioTest/Commands.ScenarioTest.csproj b/src/Common/Commands.ScenarioTest/Commands.ScenarioTest.csproj
index 3963ef572626..2e72218aa9cd 100644
--- a/src/Common/Commands.ScenarioTest/Commands.ScenarioTest.csproj
+++ b/src/Common/Commands.ScenarioTest/Commands.ScenarioTest.csproj
@@ -38,9 +38,27 @@
pdbonly
-
+
+ ..\..\packages\Hyak.Common.1.0.1\lib\portable-net403+win+wpa81\Hyak.Common.dll
+
+
+ ..\..\packages\Microsoft.Azure.Common.2.0.1\lib\net45\Microsoft.Azure.Common.dll
+
+
False
- ..\..\packages\Hydra.HttpRecorder.1.0.5417.13285-prerelease\lib\net45\Microsoft.Azure.Utilities.HttpRecorder.dll
+ ..\..\packages\Microsoft.Azure.Common.Extensions.0.13.0-preview\lib\net45\Microsoft.Azure.Common.Extensions.dll
+
+
+ ..\..\packages\Microsoft.Azure.Common.2.0.1\lib\net45\Microsoft.Azure.Common.NetFramework.dll
+
+
+ ..\..\packages\Microsoft.Azure.Management.Resources.2.12.0-preview\lib\net40\Microsoft.Azure.ResourceManager.dll
+
+
+ ..\..\packages\Microsoft.Azure.Test.Framework.1.0.5486.28526-prerelease\lib\net45\Microsoft.Azure.Test.Framework.dll
+
+
+ ..\..\packages\Microsoft.Azure.Test.HttpRecorder.1.0.5486.28526-prerelease\lib\net45\Microsoft.Azure.Test.HttpRecorder.dll
..\..\packages\Microsoft.Data.Edm.5.6.0\lib\net40\Microsoft.Data.Edm.dll
@@ -76,41 +94,25 @@
False
..\lib\Microsoft.Web.Deployment.dll
-
- False
- ..\..\packages\Microsoft.WindowsAzure.Common.1.4.1\lib\net45\Microsoft.WindowsAzure.Common.dll
-
-
- False
- ..\..\packages\Microsoft.WindowsAzure.Common.1.4.1\lib\net45\Microsoft.WindowsAzure.Common.NetFramework.dll
-
..\..\packages\Microsoft.WindowsAzure.ConfigurationManager.2.0.3\lib\net40\Microsoft.WindowsAzure.Configuration.dll
-
- False
- ..\..\packages\Microsoft.WindowsAzure.Management.2.1.0\lib\net40\Microsoft.WindowsAzure.Management.dll
+
+ ..\..\packages\Microsoft.WindowsAzure.Management.4.0.0\lib\net40\Microsoft.WindowsAzure.Management.dll
-
- False
- ..\..\packages\Microsoft.WindowsAzure.Management.Compute.6.1.2\lib\net40\Microsoft.WindowsAzure.Management.Compute.dll
+
+ ..\..\packages\Microsoft.WindowsAzure.Management.Compute.8.0.0\lib\net40\Microsoft.WindowsAzure.Management.Compute.dll
-
- False
- ..\..\packages\Microsoft.WindowsAzure.Management.Storage.3.1.0\lib\net40\Microsoft.WindowsAzure.Management.Storage.dll
+
+ ..\..\packages\Microsoft.WindowsAzure.Management.Storage.5.0.0\lib\net40\Microsoft.WindowsAzure.Management.Storage.dll
- ..\..\packages\Microsoft.WindowsAzure.Management.WebSites.4.0.1-prerelease\lib\net40\Microsoft.WindowsAzure.Management.WebSites.dll
- True
+ ..\..\packages\Microsoft.WindowsAzure.Management.WebSites.4.4.0-prerelease\lib\net40\Microsoft.WindowsAzure.Management.WebSites.dll
False
..\..\packages\WindowsAzure.Storage.4.0.0\lib\net40\Microsoft.WindowsAzure.Storage.dll
-
- False
- ..\..\packages\Hydra.SpecTestSupport.1.0.5417.13285-prerelease\lib\net45\Microsoft.WindowsAzure.Testing.dll
-
False
..\..\packages\Newtonsoft.Json.6.0.4\lib\net45\Newtonsoft.Json.dll
@@ -472,10 +474,6 @@
{cd5aa507-f5ef-473d-855b-84b91a1abe54}
Commands
-
- {b95c489c-8cb7-4dcf-8d5f-b9aebdbbaf89}
- Common.Extensions
-
{3b48a77b-5956-4a62-9081-92ba04b02b27}
Commands.Common.Test
diff --git a/src/Common/Commands.ScenarioTest/Common/ResourceManagerTestEnvironmentFactory.cs b/src/Common/Commands.ScenarioTest/Common/ResourceManagerTestEnvironmentFactory.cs
index 84c82f3d3920..d3b793602f04 100644
--- a/src/Common/Commands.ScenarioTest/Common/ResourceManagerTestEnvironmentFactory.cs
+++ b/src/Common/Commands.ScenarioTest/Common/ResourceManagerTestEnvironmentFactory.cs
@@ -13,8 +13,8 @@
// limitations under the License.
//
+using Hyak.Common;
using System;
-using Microsoft.WindowsAzure.Common.Internals;
namespace Microsoft.WindowsAzure.Commands.ScenarioTest.Common
{
@@ -57,7 +57,7 @@ protected override TestEnvironment GetTestEnvironmentFromContext()
catch (ArgumentException exception)
{
// allow running gallery tests
- Tracing.Information("Node.exe was not found on the system, please install the x86 version of node.exe to run tests, received exception {0}", exception);
+ TracingAdapter.Information("Node.exe was not found on the system, please install the x86 version of node.exe to run tests, received exception {0}", exception);
}
string galleryUri = Environment.GetEnvironmentVariable(TestCSMGalleryUri);
diff --git a/src/Common/Commands.ScenarioTest/Common/ServiceManagementTestEnvironmentFactory.cs b/src/Common/Commands.ScenarioTest/Common/ServiceManagementTestEnvironmentFactory.cs
index da5fe60bcfb1..6b9faa273a0e 100644
--- a/src/Common/Commands.ScenarioTest/Common/ServiceManagementTestEnvironmentFactory.cs
+++ b/src/Common/Commands.ScenarioTest/Common/ServiceManagementTestEnvironmentFactory.cs
@@ -21,9 +21,10 @@
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Microsoft.WindowsAzure.Commands.Utilities.Common;
using Microsoft.WindowsAzure.Commands.Utilities.Common.XmlSchema;
-using Microsoft.WindowsAzure.Common.Internals;
using Microsoft.Azure.Common.Extensions;
using Microsoft.Azure.Common.Extensions.XmlSchema;
+using Hyak.Common;
+using Microsoft.Azure;
namespace Microsoft.WindowsAzure.Commands.ScenarioTest.Common
{
@@ -75,17 +76,17 @@ protected virtual TestEnvironment GetCertificateTestEnvironment()
string defaultPublishSettingsFile = Path.Combine(Environment.CurrentDirectory, DefaultPublishsettingsFilename);
if (File.Exists(defaultPublishSettingsFile))
{
- Tracing.Information("Getting credentials from local publishsettings file: {0}", defaultPublishSettingsFile);
+ TracingAdapter.Information("Getting credentials from local publishsettings file: {0}", defaultPublishSettingsFile);
environment = GetTestEnvironmentFromPublishSettingsFile(defaultPublishSettingsFile);
}
else if (!string.IsNullOrEmpty(testPublishSettingsString))
{
- Tracing.Information("Getting credentials from publishsettings file in environment variable: {0}={1}", TestPublishSettingsFileKey, testPublishSettingsString);
+ TracingAdapter.Information("Getting credentials from publishsettings file in environment variable: {0}={1}", TestPublishSettingsFileKey, testPublishSettingsString);
environment = GetTestEnvironmentFromPublishSettingsFile(testPublishSettingsString);
}
else if (!string.IsNullOrEmpty(testConnectionString))
{
- Tracing.Information("Getting credentials from connection string in environment variable: {0}={1}", TestCertificateConnectionStringKey, testConnectionString);
+ TracingAdapter.Information("Getting credentials from connection string in environment variable: {0}={1}", TestCertificateConnectionStringKey, testConnectionString);
environment = GetCertificateTestEnvironmentFromConnectionString(testConnectionString);
}
diff --git a/src/Common/Commands.ScenarioTest/Common/TestEnvironment.cs b/src/Common/Commands.ScenarioTest/Common/TestEnvironment.cs
index 05e6907137eb..623a5886a387 100644
--- a/src/Common/Commands.ScenarioTest/Common/TestEnvironment.cs
+++ b/src/Common/Commands.ScenarioTest/Common/TestEnvironment.cs
@@ -17,6 +17,7 @@
namespace Microsoft.WindowsAzure.Commands.ScenarioTest.Common
{
+ using Hyak.Common;
using Microsoft.IdentityModel.Clients.ActiveDirectory;
using System;
public class TestEnvironment
diff --git a/src/Common/Commands.ScenarioTest/Common/TestEnvironmentFactory.cs b/src/Common/Commands.ScenarioTest/Common/TestEnvironmentFactory.cs
index a75a1e1cc978..a4cfec1b97d2 100644
--- a/src/Common/Commands.ScenarioTest/Common/TestEnvironmentFactory.cs
+++ b/src/Common/Commands.ScenarioTest/Common/TestEnvironmentFactory.cs
@@ -15,14 +15,16 @@
using System;
using System.Collections.Generic;
-using Microsoft.Azure.Utilities.HttpRecorder;
-using Microsoft.WindowsAzure.Common.Internals;
+using Microsoft.Azure.Test.HttpRecorder;
using Newtonsoft.Json.Linq;
+using System;
+using Microsoft.IdentityModel.Clients.ActiveDirectory;
+using Microsoft.Azure.Test.HttpRecorder;
+using Hyak.Common;
+using Microsoft.Azure;
namespace Microsoft.WindowsAzure.Commands.ScenarioTest.Common
{
- using System;
- using Microsoft.IdentityModel.Clients.ActiveDirectory;
public abstract class TestEnvironmentFactory
{
///
@@ -114,12 +116,12 @@ protected virtual TestEnvironment GetOrgIdTestEnvironment(string orgIdVariable)
{
string password = authSettings[AADPasswordKey];
- Tracing.Information("Using AAD auth with username and password combination");
+ TracingAdapter.Information("Using AAD auth with username and password combination");
token = TokenCloudCredentialsHelper.GetTokenFromBasicCredentials(user, password, authEndpoint, tenant);
}
else
{
- Tracing.Information("Using AAD auth with pop-up dialog");
+ TracingAdapter.Information("Using AAD auth with pop-up dialog");
string clientId = authSettings.ContainsKey(ClientID) ? authSettings[ClientID] : ClientIdDefault;
if (authSettings.ContainsKey(RawToken))
{
@@ -136,7 +138,7 @@ protected virtual TestEnvironment GetOrgIdTestEnvironment(string orgIdVariable)
if (HttpMockServer.Mode == HttpRecorderMode.Playback)
{
// playback mode but no stored credentials in mocks
- Tracing.Information("Using dummy token for playback");
+ TracingAdapter.Information("Using dummy token for playback");
token = Guid.NewGuid().ToString();
}
diff --git a/src/Common/Commands.ScenarioTest/Common/TokenCloudCredentialsHelper.cs b/src/Common/Commands.ScenarioTest/Common/TokenCloudCredentialsHelper.cs
index e3c9cc82a265..6d35bafe9d2c 100644
--- a/src/Common/Commands.ScenarioTest/Common/TokenCloudCredentialsHelper.cs
+++ b/src/Common/Commands.ScenarioTest/Common/TokenCloudCredentialsHelper.cs
@@ -22,7 +22,7 @@
using System.Threading;
using Microsoft.IdentityModel.Clients.ActiveDirectory;
using Microsoft.IdentityModel.Clients.ActiveDirectory.Internal;
-using Microsoft.WindowsAzure.Common.Internals;
+using Hyak.Common;
namespace Microsoft.WindowsAzure.Commands.ScenarioTest.Common
{
@@ -169,7 +169,7 @@ private static string GetProcessResult(string path, string arguments, Func
-
-
+
+
+
+
+
+
+
@@ -10,13 +15,11 @@
-
-
-
-
-
-
+
+
+
+
diff --git a/src/Common/Commands.ScenarioTests.Common/Commands.ScenarioTests.Common.csproj b/src/Common/Commands.ScenarioTests.Common/Commands.ScenarioTests.Common.csproj
index 2de84d0e510d..9822e8b9c83f 100644
--- a/src/Common/Commands.ScenarioTests.Common/Commands.ScenarioTests.Common.csproj
+++ b/src/Common/Commands.ScenarioTests.Common/Commands.ScenarioTests.Common.csproj
@@ -37,9 +37,27 @@
pdbonly
-
+
+ ..\..\packages\Hyak.Common.1.0.1\lib\portable-net403+win+wpa81\Hyak.Common.dll
+
+
+ ..\..\packages\Microsoft.Azure.Common.2.0.1\lib\net45\Microsoft.Azure.Common.dll
+
+
False
- ..\..\packages\Hydra.HttpRecorder.1.0.5417.13285-prerelease\lib\net45\Microsoft.Azure.Utilities.HttpRecorder.dll
+ ..\..\packages\Microsoft.Azure.Common.Extensions.0.13.0-preview\lib\net45\Microsoft.Azure.Common.Extensions.dll
+
+
+ ..\..\packages\Microsoft.Azure.Common.2.0.1\lib\net45\Microsoft.Azure.Common.NetFramework.dll
+
+
+ ..\..\packages\Microsoft.Azure.Management.Resources.2.12.0-preview\lib\net40\Microsoft.Azure.ResourceManager.dll
+
+
+ ..\..\packages\Microsoft.Azure.Test.Framework.1.0.5486.28526-prerelease\lib\net45\Microsoft.Azure.Test.Framework.dll
+
+
+ ..\..\packages\Microsoft.Azure.Test.HttpRecorder.1.0.5486.28526-prerelease\lib\net45\Microsoft.Azure.Test.HttpRecorder.dll
False
@@ -61,17 +79,8 @@
..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.Desktop.dll
-
- False
- ..\..\packages\Microsoft.WindowsAzure.Common.1.4.1\lib\net45\Microsoft.WindowsAzure.Common.dll
-
-
- False
- ..\..\packages\Microsoft.WindowsAzure.Common.1.4.1\lib\net45\Microsoft.WindowsAzure.Common.NetFramework.dll
-
-
- False
- ..\..\packages\Hydra.SpecTestSupport.1.0.5417.13285-prerelease\lib\net45\Microsoft.WindowsAzure.Testing.dll
+
+ ..\..\packages\Microsoft.WindowsAzure.Management.4.0.0\lib\net40\Microsoft.WindowsAzure.Management.dll
..\..\packages\Newtonsoft.Json.6.0.4\lib\net45\Newtonsoft.Json.dll
@@ -123,10 +132,6 @@
{bc420543-c04e-4bf3-96e1-cd81b823bdd7}
Commands.Test.Utilities
-
- {b95c489c-8cb7-4dcf-8d5f-b9aebdbbaf89}
- Common.Extensions
-
{3b48a77b-5956-4a62-9081-92ba04b02b27}
Commands.Common.Test
diff --git a/src/Common/Commands.ScenarioTests.Common/Common.ps1 b/src/Common/Commands.ScenarioTests.Common/Common.ps1
index 8cfda87c9d1d..1c3cb8780edb 100644
--- a/src/Common/Commands.ScenarioTests.Common/Common.ps1
+++ b/src/Common/Commands.ScenarioTests.Common/Common.ps1
@@ -357,7 +357,7 @@ function getAssetName
}
}
- $assetName = [Microsoft.Azure.Utilities.HttpRecorder.HttpMockServer]::GetAssetName($testName, "onesdk")
+ $assetName = [Microsoft.Azure.Test.HttpRecorder.HttpMockServer]::GetAssetName($testName, "onesdk")
return $assetName
}
\ No newline at end of file
diff --git a/src/Common/Commands.ScenarioTests.Common/EnvironmentSetupHelper.cs b/src/Common/Commands.ScenarioTests.Common/EnvironmentSetupHelper.cs
index 09186ab53cf9..00a1a65b9cf5 100644
--- a/src/Common/Commands.ScenarioTests.Common/EnvironmentSetupHelper.cs
+++ b/src/Common/Commands.ScenarioTests.Common/EnvironmentSetupHelper.cs
@@ -17,14 +17,15 @@
using System.Collections.ObjectModel;
using System.Management.Automation;
using System.Security.Cryptography.X509Certificates;
-using Microsoft.Azure.Utilities.HttpRecorder;
using Microsoft.WindowsAzure.Commands.Common;
using Microsoft.Azure.Common.Extensions.Models;
using Microsoft.WindowsAzure.Commands.Common.Test.Mocks;
using Microsoft.WindowsAzure.Commands.Utilities.Common;
-using Microsoft.WindowsAzure.Testing;
using System.Diagnostics;
using Microsoft.Azure.Common.Extensions;
+using Microsoft.Azure.Test;
+using Microsoft.Azure.Test.HttpRecorder;
+using Microsoft.Azure;
namespace Microsoft.WindowsAzure.Commands.ScenarioTest
{
diff --git a/src/Common/Commands.ScenarioTests.Common/packages.config b/src/Common/Commands.ScenarioTests.Common/packages.config
index 0b670568f39a..924f1c43ed10 100644
--- a/src/Common/Commands.ScenarioTests.Common/packages.config
+++ b/src/Common/Commands.ScenarioTests.Common/packages.config
@@ -1,14 +1,18 @@
-
-
+
+
+
+
+
+
+
-
-
+
\ No newline at end of file
diff --git a/src/ResourceManager/Batch/Commands.Batch.Test/Accounts/RemoveBatchAccountCommandTests.cs b/src/ResourceManager/Batch/Commands.Batch.Test/Accounts/RemoveBatchAccountCommandTests.cs
index 85c40610b5d9..67a45117e89e 100644
--- a/src/ResourceManager/Batch/Commands.Batch.Test/Accounts/RemoveBatchAccountCommandTests.cs
+++ b/src/ResourceManager/Batch/Commands.Batch.Test/Accounts/RemoveBatchAccountCommandTests.cs
@@ -44,7 +44,7 @@ public void RemoveBatchAccountTest()
string accountName = "account01";
string resourceGroup = "resourceGroup";
- OperationResponse deleteResponse = new OperationResponse();
+ AzureOperationResponse deleteResponse = new AzureOperationResponse();
batchClientMock.Setup(b => b.DeleteAccount(resourceGroup, accountName)).Returns(deleteResponse);
cmdlet.AccountName = accountName;
diff --git a/src/ResourceManager/Batch/Commands.Batch.Test/Commands.Batch.Test.csproj b/src/ResourceManager/Batch/Commands.Batch.Test/Commands.Batch.Test.csproj
index 39fc0f191441..0b9a7c54d6e6 100644
--- a/src/ResourceManager/Batch/Commands.Batch.Test/Commands.Batch.Test.csproj
+++ b/src/ResourceManager/Batch/Commands.Batch.Test/Commands.Batch.Test.csproj
@@ -38,28 +38,38 @@
false
+
+ ..\..\..\packages\Hyak.Common.1.0.1\lib\portable-net403+win+wpa81\Hyak.Common.dll
+
+
+ ..\..\..\packages\Microsoft.Azure.Common.2.0.1\lib\net45\Microsoft.Azure.Common.dll
+
+
+ False
+ ..\..\..\packages\Microsoft.Azure.Common.Extensions.0.13.0-preview\lib\net45\Microsoft.Azure.Common.Extensions.dll
+
+
+ ..\..\..\packages\Microsoft.Azure.Common.2.0.1\lib\net45\Microsoft.Azure.Common.NetFramework.dll
+
- ..\..\..\packages\Microsoft.Azure.Gallery.2.2.0-preview\lib\net40\Microsoft.Azure.Gallery.dll
+ ..\..\..\packages\Microsoft.Azure.Gallery.2.6.0-preview\lib\net40\Microsoft.Azure.Gallery.dll
- False
- ..\..\..\packages\Microsoft.Azure.Management.Authorization.0.11.0-preview\lib\net40\Microsoft.Azure.Management.Authorization.dll
+ ..\..\..\packages\Microsoft.Azure.Management.Authorization.0.16.0-preview\lib\net40\Microsoft.Azure.Management.Authorization.dll
-
- False
- ..\..\..\packages\Microsoft.Azure.Management.Batch.1.1.6-preview\lib\net40\Microsoft.Azure.Management.Batch.dll
+
+ ..\..\..\packages\Microsoft.Azure.Management.Batch.1.3.0-preview\lib\net40\Microsoft.Azure.Management.Batch.dll
-
- False
- ..\..\..\packages\Microsoft.Azure.Monitoring.2.2.0-preview\lib\net40\Microsoft.Azure.Monitoring.dll
+
+ ..\..\..\packages\Microsoft.Azure.Management.Resources.2.12.0-preview\lib\net40\Microsoft.Azure.ResourceManager.dll
-
+
False
- ..\..\..\packages\Microsoft.Azure.Management.Resources.2.7.0-preview\lib\net40\Microsoft.Azure.ResourceManager.dll
+ ..\..\..\packages\Microsoft.Azure.Test.Framework.1.0.5486.28526-prerelease\lib\net45\Microsoft.Azure.Test.Framework.dll
-
+
False
- ..\..\..\packages\Hydra.HttpRecorder.1.0.5417.13285-prerelease\lib\net45\Microsoft.Azure.Utilities.HttpRecorder.dll
+ ..\..\..\packages\Microsoft.Azure.Test.HttpRecorder.1.0.5486.28526-prerelease\lib\net45\Microsoft.Azure.Test.HttpRecorder.dll
False
@@ -69,9 +79,8 @@
False
..\..\..\packages\Microsoft.IdentityModel.Clients.ActiveDirectory.2.11.10918.1222\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.WindowsForms.dll
-
- False
- ..\..\..\packages\Hydra.SpecTestSupport.1.0.5417.13285-prerelease\lib\net45\Microsoft.WindowsAzure.Testing.dll
+
+ ..\..\..\packages\Microsoft.WindowsAzure.Management.4.0.0\lib\net40\Microsoft.WindowsAzure.Management.dll
..\..\..\packages\Moq.4.2.1402.2112\lib\net40\Moq.dll
@@ -97,14 +106,6 @@
..\..\..\packages\xunit.1.9.2\lib\net20\xunit.dll
-
- False
- ..\..\..\packages\Microsoft.WindowsAzure.Common.1.4.1\lib\net45\Microsoft.WindowsAzure.Common.dll
-
-
- False
- ..\..\..\packages\Microsoft.WindowsAzure.Common.1.4.1\lib\net45\Microsoft.WindowsAzure.Common.NetFramework.dll
-
False
..\..\..\packages\Newtonsoft.Json.6.0.4\lib\net45\Newtonsoft.Json.dll
@@ -157,10 +158,6 @@
-
- {b95c489c-8cb7-4dcf-8d5f-b9aebdbbaf89}
- Common.Extensions
-
{3b48a77b-5956-4a62-9081-92ba04b02b27}
Commands.Common.Test
diff --git a/src/ResourceManager/Batch/Commands.Batch.Test/ScenarioTests/BatchController.cs b/src/ResourceManager/Batch/Commands.Batch.Test/ScenarioTests/BatchController.cs
index 80d7419bd882..fb3848dee18d 100644
--- a/src/ResourceManager/Batch/Commands.Batch.Test/ScenarioTests/BatchController.cs
+++ b/src/ResourceManager/Batch/Commands.Batch.Test/ScenarioTests/BatchController.cs
@@ -17,10 +17,10 @@
using Microsoft.Azure.Management.Authorization;
using Microsoft.Azure.Management.Batch;
using Microsoft.Azure.Management.Resources;
+using Microsoft.Azure.Test;
using Microsoft.WindowsAzure.Commands.ScenarioTest;
using Microsoft.WindowsAzure.Commands.Utilities.Common;
-using Microsoft.WindowsAzure.Management.Monitoring.Events;
-using Microsoft.WindowsAzure.Testing;
+using Microsoft.Azure.Test;
using System;
using System.Linq;
@@ -37,8 +37,6 @@ public class BatchController
public GalleryClient GalleryClient { get; private set; }
- public EventsClient EventsClient { get; private set; }
-
public ResourceManagementClient ResourceManagementClient { get; private set; }
public BatchManagementClient BatchManagementClient { get; private set; }
@@ -136,13 +134,11 @@ private void SetupManagementClients()
{
AuthorizationManagementClient = GetAuthorizationManagementClient();
GalleryClient = GetGalleryClient();
- EventsClient = GetEventsClient();
ResourceManagementClient = GetResourceManagementClient();
BatchManagementClient = GetBatchManagementClient();
helper.SetupManagementClients(AuthorizationManagementClient,
GalleryClient,
- EventsClient,
ResourceManagementClient,
BatchManagementClient);
}
@@ -157,11 +153,6 @@ private GalleryClient GetGalleryClient()
return TestBase.GetServiceClient(this.csmTestFactory);
}
- private EventsClient GetEventsClient()
- {
- return TestBase.GetServiceClient(this.csmTestFactory);
- }
-
private ResourceManagementClient GetResourceManagementClient()
{
return TestBase.GetServiceClient(this.csmTestFactory);
diff --git a/src/ResourceManager/Batch/Commands.Batch.Test/ScenarioTests/Common.ps1 b/src/ResourceManager/Batch/Commands.Batch.Test/ScenarioTests/Common.ps1
index 73e2eb12b1f2..70f34b54ef07 100644
--- a/src/ResourceManager/Batch/Commands.Batch.Test/ScenarioTests/Common.ps1
+++ b/src/ResourceManager/Batch/Commands.Batch.Test/ScenarioTests/Common.ps1
@@ -63,7 +63,7 @@ Cleans the created Batch account
#>
function Clean-BatchAccount($accountName,$resourceGroup)
{
- if ([Microsoft.Azure.Utilities.HttpRecorder.HttpMockServer]::Mode -ne [Microsoft.Azure.Utilities.HttpRecorder.HttpRecorderMode]::Playback)
+ if ([Microsoft.Azure.Test.HttpRecorder.HttpMockServer]::Mode -ne [Microsoft.Azure.Test.HttpRecorder.HttpRecorderMode]::Playback)
{
Remove-AzureBatchAccount -Name $accountName -ResourceGroupName $resourceGroup -Force
}
@@ -75,7 +75,7 @@ Cleans the created resource group
#>
function Clean-ResourceGroup($resourceGroup)
{
- if ([Microsoft.Azure.Utilities.HttpRecorder.HttpMockServer]::Mode -ne [Microsoft.Azure.Utilities.HttpRecorder.HttpRecorderMode]::Playback)
+ if ([Microsoft.Azure.Test.HttpRecorder.HttpMockServer]::Mode -ne [Microsoft.Azure.Test.HttpRecorder.HttpRecorderMode]::Playback)
{
Remove-AzureResourceGroup -Name $resourceGroup -Force
}
diff --git a/src/ResourceManager/Batch/Commands.Batch.Test/packages.config b/src/ResourceManager/Batch/Commands.Batch.Test/packages.config
index 36f4b333b3be..cb353aab22e0 100644
--- a/src/ResourceManager/Batch/Commands.Batch.Test/packages.config
+++ b/src/ResourceManager/Batch/Commands.Batch.Test/packages.config
@@ -1,19 +1,21 @@
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
-
-
+
diff --git a/src/ResourceManager/Batch/Commands.Batch/BatchClient.cs b/src/ResourceManager/Batch/Commands.Batch/BatchClient.cs
index 7bd6e73ee855..3173556916de 100644
--- a/src/ResourceManager/Batch/Commands.Batch/BatchClient.cs
+++ b/src/ResourceManager/Batch/Commands.Batch/BatchClient.cs
@@ -12,6 +12,7 @@
// limitations under the License.
// ----------------------------------------------------------------------------------
+using Hyak.Common;
using Microsoft.Azure.Commands.Batch.Properties;
using Microsoft.Azure.Common.Extensions;
using Microsoft.Azure.Common.Extensions.Models;
@@ -242,7 +243,7 @@ public virtual BatchAccountContext RegenerateKeys(string resourceGroupName, stri
/// The name of the resource group the account is under. If unspecified, it will be looked up.
/// The account name
/// The status of delete account operation
- public virtual OperationResponse DeleteAccount(string resourceGroupName, string accountName)
+ public virtual AzureOperationResponse DeleteAccount(string resourceGroupName, string accountName)
{
if (string.IsNullOrEmpty(resourceGroupName))
{
diff --git a/src/ResourceManager/Batch/Commands.Batch/BatchCmdletBase.cs b/src/ResourceManager/Batch/Commands.Batch/BatchCmdletBase.cs
index 74c6e56c1634..9b63bdca19a8 100644
--- a/src/ResourceManager/Batch/Commands.Batch/BatchCmdletBase.cs
+++ b/src/ResourceManager/Batch/Commands.Batch/BatchCmdletBase.cs
@@ -12,10 +12,10 @@
// limitations under the License.
// ----------------------------------------------------------------------------------
+using Hyak.Common;
using Microsoft.Azure.Common.Extensions;
using Microsoft.WindowsAzure;
using Microsoft.WindowsAzure.Commands.Utilities.Common;
-using Microsoft.WindowsAzure.Common.Internals;
using Newtonsoft.Json.Linq;
using System;
@@ -84,7 +84,7 @@ internal static string FindDetailedMessage(string content)
{
string message = null;
- if (ParserHelper.IsJson(content))
+ if (CloudException.IsJson(content))
{
var response = JObject.Parse(content);
diff --git a/src/ResourceManager/Batch/Commands.Batch/Commands.Batch.csproj b/src/ResourceManager/Batch/Commands.Batch/Commands.Batch.csproj
index 049c1f1e4d3b..77a2bc161da2 100644
--- a/src/ResourceManager/Batch/Commands.Batch/Commands.Batch.csproj
+++ b/src/ResourceManager/Batch/Commands.Batch/Commands.Batch.csproj
@@ -41,13 +41,33 @@
false
+
+ ..\..\..\packages\Hyak.Common.1.0.1\lib\portable-net403+win+wpa81\Hyak.Common.dll
+
+
+ ..\..\..\packages\Microsoft.Azure.Common.2.0.1\lib\net45\Microsoft.Azure.Common.dll
+
+
+ False
+ ..\..\..\packages\Microsoft.Azure.Common.Extensions.0.13.0-preview\lib\net45\Microsoft.Azure.Common.Extensions.dll
+
+
+ ..\..\..\packages\Microsoft.Azure.Common.2.0.1\lib\net45\Microsoft.Azure.Common.NetFramework.dll
+
False
- ..\..\..\packages\Microsoft.Azure.Management.Batch.1.1.6-preview\lib\net40\Microsoft.Azure.Management.Batch.dll
+ ..\..\..\packages\Microsoft.Azure.Management.Batch.1.3.0-preview\lib\net40\Microsoft.Azure.Management.Batch.dll
False
- ..\..\..\packages\Microsoft.Azure.Management.Resources.2.7.0-preview\lib\net40\Microsoft.Azure.ResourceManager.dll
+ ..\..\..\packages\Microsoft.Azure.Management.Resources.2.12.0-preview\lib\net40\Microsoft.Azure.ResourceManager.dll
+
+
+ False
+ ..\..\..\packages\Microsoft.IdentityModel.Clients.ActiveDirectory.2.11.10918.1222\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.dll
+
+
+ ..\..\..\packages\Microsoft.IdentityModel.Clients.ActiveDirectory.2.11.10918.1222\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.WindowsForms.dll
False
@@ -61,13 +81,9 @@
False
..\..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.Desktop.dll
-
+
False
- ..\..\..\packages\Microsoft.WindowsAzure.Common.1.4.1\lib\net45\Microsoft.WindowsAzure.Common.dll
-
-
- False
- ..\..\..\packages\Microsoft.WindowsAzure.Common.1.4.1\lib\net45\Microsoft.WindowsAzure.Common.NetFramework.dll
+ ..\..\..\packages\Microsoft.WindowsAzure.Management.4.0.0\lib\net40\Microsoft.WindowsAzure.Management.dll
False
@@ -130,10 +146,6 @@
-
- {b95c489c-8cb7-4dcf-8d5f-b9aebdbbaf89}
- Common.Extensions
-
{5ee72c53-1720-4309-b54b-5fb79703195f}
Commands.Common
diff --git a/src/ResourceManager/Batch/Commands.Batch/packages.config b/src/ResourceManager/Batch/Commands.Batch/packages.config
index fc23e5fd4cc1..cc8fad4873ab 100644
--- a/src/ResourceManager/Batch/Commands.Batch/packages.config
+++ b/src/ResourceManager/Batch/Commands.Batch/packages.config
@@ -1,12 +1,16 @@
-
-
+
+
+
+
+
+
+
-
-
+
\ No newline at end of file
diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories.Test/Commands.DataFactories.Test.csproj b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/Commands.DataFactories.Test.csproj
index a56c340f32ee..13314fee1b14 100644
--- a/src/ResourceManager/DataFactories/Commands.DataFactories.Test/Commands.DataFactories.Test.csproj
+++ b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/Commands.DataFactories.Test.csproj
@@ -41,27 +41,38 @@
false
+
+ ..\..\..\packages\Hyak.Common.1.0.1\lib\portable-net403+win+wpa81\Hyak.Common.dll
+
+
+ ..\..\..\packages\Microsoft.Azure.Common.2.0.1\lib\net45\Microsoft.Azure.Common.dll
+
+
+ False
+ ..\..\..\packages\Microsoft.Azure.Common.Extensions.0.13.0-preview\lib\net45\Microsoft.Azure.Common.Extensions.dll
+
+
+ ..\..\..\packages\Microsoft.Azure.Common.2.0.1\lib\net45\Microsoft.Azure.Common.NetFramework.dll
+
- ..\..\..\packages\Microsoft.Azure.Gallery.2.2.0-preview\lib\net40\Microsoft.Azure.Gallery.dll
- True
+ ..\..\..\packages\Microsoft.Azure.Gallery.2.6.0-preview\lib\net40\Microsoft.Azure.Gallery.dll
- ..\..\..\packages\Microsoft.Azure.Management.Authorization.0.11.0-preview\lib\net40\Microsoft.Azure.Management.Authorization.dll
+ ..\..\..\packages\Microsoft.Azure.Management.Authorization.0.16.0-preview\lib\net40\Microsoft.Azure.Management.Authorization.dll
- ..\..\..\packages\Microsoft.Azure.Management.DataFactories.0.12.0-preview\lib\net40\Microsoft.Azure.Management.DataFactories.dll
-
-
- ..\..\..\packages\Microsoft.Azure.Monitoring.2.2.0-preview\lib\net40\Microsoft.Azure.Monitoring.dll
- True
+ ..\..\..\packages\Microsoft.Azure.Management.DataFactories.0.14.0-preview\lib\net40\Microsoft.Azure.Management.DataFactories.dll
- ..\..\..\packages\Microsoft.Azure.Management.Resources.2.7.0-preview\lib\net40\Microsoft.Azure.ResourceManager.dll
- True
+ ..\..\..\packages\Microsoft.Azure.Management.Resources.2.12.0-preview\lib\net40\Microsoft.Azure.ResourceManager.dll
-
+
False
- ..\..\..\packages\Hydra.HttpRecorder.1.0.5417.13285-prerelease\lib\net45\Microsoft.Azure.Utilities.HttpRecorder.dll
+ ..\..\..\packages\Microsoft.Azure.Test.Framework.1.0.5486.28526-prerelease\lib\net45\Microsoft.Azure.Test.Framework.dll
+
+
+ False
+ ..\..\..\packages\Microsoft.Azure.Test.HttpRecorder.1.0.5486.28526-prerelease\lib\net45\Microsoft.Azure.Test.HttpRecorder.dll
..\..\..\packages\Microsoft.DataFactories.Runtime.0.11.1-preview\lib\net45\Microsoft.DataFactories.Runtime.dll
@@ -85,26 +96,16 @@
False
..\..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.Desktop.dll
-
- False
- ..\..\..\packages\Microsoft.WindowsAzure.Common.1.4.1\lib\net45\Microsoft.WindowsAzure.Common.dll
+
+ ..\..\..\packages\Microsoft.WindowsAzure.Management.4.0.0\lib\net40\Microsoft.WindowsAzure.Management.dll
-
- ..\..\..\packages\Microsoft.WindowsAzure.Common.1.4.1\lib\net45\Microsoft.WindowsAzure.Common.NetFramework.dll
- True
-
-
- False
- ..\..\..\packages\Microsoft.WindowsAzure.Management.Storage.3.1.0\lib\net40\Microsoft.WindowsAzure.Management.Storage.dll
+
+ ..\..\..\packages\Microsoft.WindowsAzure.Management.Storage.5.0.0\lib\net40\Microsoft.WindowsAzure.Management.Storage.dll
False
..\..\..\packages\WindowsAzure.Storage.4.0.0\lib\net40\Microsoft.WindowsAzure.Storage.dll
-
- False
- ..\..\..\packages\Hydra.SpecTestSupport.1.0.5417.13285-prerelease\lib\net45\Microsoft.WindowsAzure.Testing.dll
-
False
..\..\..\packages\Moq.4.2.1402.2112\lib\net40\Moq.dll
@@ -275,10 +276,6 @@
-
- {b95c489c-8cb7-4dcf-8d5f-b9aebdbbaf89}
- Common.Extensions
-
{c1bda476-a5cc-4394-914d-48b0ec31a710}
Commands.ScenarioTests.Common
diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories.Test/ScenarioTests/Common.ps1 b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/ScenarioTests/Common.ps1
index bd2adaf4dd13..bf1223bb8438 100644
--- a/src/ResourceManager/DataFactories/Commands.DataFactories.Test/ScenarioTests/Common.ps1
+++ b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/ScenarioTests/Common.ps1
@@ -50,7 +50,7 @@ Cleans the created data factory
#>
function Clean-DataFactory($rgname, $dfname)
{
- if ([Microsoft.Azure.Utilities.HttpRecorder.HttpMockServer]::Mode -ne [Microsoft.Azure.Utilities.HttpRecorder.HttpRecorderMode]::Playback) {
+ if ([Microsoft.Azure.Test.HttpRecorder.HttpMockServer]::Mode -ne [Microsoft.Azure.Test.HttpRecorder.HttpRecorderMode]::Playback) {
Remove-AzureDataFactory -ResourceGroupName $rgname -Name $dfname -Force
}
}
diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories.Test/ScenarioTests/DataFactoriesScenarioTestsBase.cs b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/ScenarioTests/DataFactoriesScenarioTestsBase.cs
index 55684c826064..54c1a39cfbd8 100644
--- a/src/ResourceManager/DataFactories/Commands.DataFactories.Test/ScenarioTests/DataFactoriesScenarioTestsBase.cs
+++ b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/ScenarioTests/DataFactoriesScenarioTestsBase.cs
@@ -20,9 +20,8 @@
using Microsoft.Azure.Subscriptions;
using Microsoft.WindowsAzure.Commands.ScenarioTest;
using Microsoft.WindowsAzure.Commands.Utilities.Common;
-using Microsoft.WindowsAzure.Management.Monitoring.Events;
using Microsoft.WindowsAzure.Management.Storage;
-using Microsoft.WindowsAzure.Testing;
+using Microsoft.Azure.Test;
namespace Microsoft.Azure.Commands.DataFactories.Test
{
@@ -41,14 +40,12 @@ protected void SetupManagementClients()
var resourceManagementClient = GetResourceManagementClient();
var subscriptionsClient = GetSubscriptionClient();
var galleryClient = GetGalleryClient();
- var eventsClient = GetEventsClient();
var authorizationManagementClient = GetAuthorizationManagementClient();
helper.SetupManagementClients(dataPipelineManagementClient,
resourceManagementClient,
subscriptionsClient,
galleryClient,
- eventsClient,
authorizationManagementClient);
}
@@ -93,11 +90,6 @@ protected GalleryClient GetGalleryClient()
return TestBase.GetServiceClient(new CSMTestEnvironmentFactory());
}
- protected EventsClient GetEventsClient()
- {
- return TestBase.GetServiceClient(new CSMTestEnvironmentFactory());
- }
-
protected AuthorizationManagementClient GetAuthorizationManagementClient()
{
return TestBase.GetServiceClient(new CSMTestEnvironmentFactory());
diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories.Test/UnitTests/NewDataFactoryGatewayKeyTests.cs b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/UnitTests/NewDataFactoryGatewayKeyTests.cs
index b920504edd40..4e862d8e416d 100644
--- a/src/ResourceManager/DataFactories/Commands.DataFactories.Test/UnitTests/NewDataFactoryGatewayKeyTests.cs
+++ b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/UnitTests/NewDataFactoryGatewayKeyTests.cs
@@ -24,6 +24,7 @@
using Microsoft.WindowsAzure.Commands.ScenarioTest;
using Moq;
using Xunit;
+using Hyak.Common;
namespace Microsoft.WindowsAzure.Commands.Test.Gateway
diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories.Test/UnitTests/NewDataFactoryGatewayTests.cs b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/UnitTests/NewDataFactoryGatewayTests.cs
index 0daf7e18e34e..4ec6da3a6577 100644
--- a/src/ResourceManager/DataFactories/Commands.DataFactories.Test/UnitTests/NewDataFactoryGatewayTests.cs
+++ b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/UnitTests/NewDataFactoryGatewayTests.cs
@@ -23,6 +23,7 @@
using Microsoft.WindowsAzure.Commands.ScenarioTest;
using Moq;
using Xunit;
+using Hyak.Common;
namespace Microsoft.WindowsAzure.Commands.Test.Gateway
{
diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories.Test/packages.config b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/packages.config
index ad0862583e9a..bb2cc303940c 100644
--- a/src/ResourceManager/DataFactories/Commands.DataFactories.Test/packages.config
+++ b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/packages.config
@@ -1,21 +1,23 @@
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
-
-
-
+
+
diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories/CloudExceptionExtensions.cs b/src/ResourceManager/DataFactories/Commands.DataFactories/CloudExceptionExtensions.cs
index 1addf9260ae3..1e9354a64d3e 100644
--- a/src/ResourceManager/DataFactories/Commands.DataFactories/CloudExceptionExtensions.cs
+++ b/src/ResourceManager/DataFactories/Commands.DataFactories/CloudExceptionExtensions.cs
@@ -18,6 +18,7 @@
using Microsoft.Azure.Commands.DataFactories.Properties;
using Microsoft.WindowsAzure;
+using Hyak.Common;
namespace Microsoft.Azure.Commands.DataFactories
{
@@ -30,8 +31,8 @@ public static CloudException CreateFormattedException(this CloudException cloudE
CultureInfo.InvariantCulture,
Resources.FormattedCloudExceptionMessageTemplate,
cloudException.Response.StatusCode,
- cloudException.ErrorCode,
- cloudException.ErrorMessage,
+ cloudException.Error.Code,
+ cloudException.Error.Message,
cloudException.GetRequestId(),
DateTime.UtcNow));
}
diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories/Commands.DataFactories.csproj b/src/ResourceManager/DataFactories/Commands.DataFactories/Commands.DataFactories.csproj
index e5f9759f391c..96f255bbd317 100644
--- a/src/ResourceManager/DataFactories/Commands.DataFactories/Commands.DataFactories.csproj
+++ b/src/ResourceManager/DataFactories/Commands.DataFactories/Commands.DataFactories.csproj
@@ -48,8 +48,26 @@
false
-
- ..\..\..\packages\Microsoft.Azure.Management.DataFactories.0.12.0-preview\lib\net40\Microsoft.Azure.Management.DataFactories.dll
+
+ ..\..\..\packages\Hyak.Common.1.0.1\lib\portable-net403+win+wpa81\Hyak.Common.dll
+
+
+ ..\..\..\packages\Microsoft.Azure.Common.2.0.1\lib\net45\Microsoft.Azure.Common.dll
+
+
+ False
+ ..\..\..\packages\Microsoft.Azure.Common.Extensions.0.13.0-preview\lib\net45\Microsoft.Azure.Common.Extensions.dll
+
+
+ ..\..\..\packages\Microsoft.Azure.Common.2.0.1\lib\net45\Microsoft.Azure.Common.NetFramework.dll
+
+
+ False
+ ..\..\..\packages\Microsoft.Azure.Management.DataFactories.0.14.0-preview\lib\net40\Microsoft.Azure.Management.DataFactories.dll
+
+
+ False
+ ..\..\..\packages\Microsoft.Azure.Management.Resources.2.12.0-preview\lib\net40\Microsoft.Azure.ResourceManager.dll
..\..\..\packages\Microsoft.DataFactories.Runtime.0.11.1-preview\lib\net45\Microsoft.DataFactories.Runtime.dll
@@ -57,6 +75,13 @@
..\..\..\packages\Microsoft.DataTransfer.Gateway.Encryption.1.1.0-preview\lib\net45\Microsoft.DataTransfer.Gateway.Encryption.dll
+
+ False
+ ..\..\..\packages\Microsoft.IdentityModel.Clients.ActiveDirectory.2.11.10918.1222\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.dll
+
+
+ ..\..\..\packages\Microsoft.IdentityModel.Clients.ActiveDirectory.2.11.10918.1222\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.WindowsForms.dll
+
False
..\..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.dll
@@ -69,13 +94,9 @@
False
..\..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.Desktop.dll
-
+
False
- ..\..\..\packages\Microsoft.WindowsAzure.Common.1.4.1\lib\net45\Microsoft.WindowsAzure.Common.dll
-
-
- False
- ..\..\..\packages\Microsoft.WindowsAzure.Common.1.4.1\lib\net45\Microsoft.WindowsAzure.Common.NetFramework.dll
+ ..\..\..\packages\Microsoft.WindowsAzure.Management.4.0.0\lib\net40\Microsoft.WindowsAzure.Management.dll
False
@@ -189,10 +210,6 @@
-
- {b95c489c-8cb7-4dcf-8d5f-b9aebdbbaf89}
- Common.Extensions
-
{65c3a86a-716d-4e7d-ab67-1db00b3bf72d}
Commands.Common.Storage
diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories/DataFactoryBaseCmdlet.cs b/src/ResourceManager/DataFactories/Commands.DataFactories/DataFactoryBaseCmdlet.cs
index 163d33796f04..8c52342a64ab 100644
--- a/src/ResourceManager/DataFactories/Commands.DataFactories/DataFactoryBaseCmdlet.cs
+++ b/src/ResourceManager/DataFactories/Commands.DataFactories/DataFactoryBaseCmdlet.cs
@@ -18,6 +18,7 @@
using Microsoft.Azure.Commands.DataFactories.Properties;
using Microsoft.WindowsAzure;
using Microsoft.WindowsAzure.Commands.Utilities.Common;
+using Hyak.Common;
namespace Microsoft.Azure.Commands.DataFactories
{
diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories/Gateway/NewAzureDataFactoryGatewayCommand.cs b/src/ResourceManager/DataFactories/Commands.DataFactories/Gateway/NewAzureDataFactoryGatewayCommand.cs
index bac0979a10ba..c3291f14b3c4 100644
--- a/src/ResourceManager/DataFactories/Commands.DataFactories/Gateway/NewAzureDataFactoryGatewayCommand.cs
+++ b/src/ResourceManager/DataFactories/Commands.DataFactories/Gateway/NewAzureDataFactoryGatewayCommand.cs
@@ -19,6 +19,7 @@
using Microsoft.Azure.Commands.DataFactories.Models;
using Microsoft.Azure.Commands.DataFactories.Properties;
using Microsoft.WindowsAzure;
+using Hyak.Common;
namespace Microsoft.Azure.Commands.DataFactories
{
diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories/Models/DataFactoryClient.DataFactories.cs b/src/ResourceManager/DataFactories/Commands.DataFactories/Models/DataFactoryClient.DataFactories.cs
index f4d883f2d773..232572eead28 100644
--- a/src/ResourceManager/DataFactories/Commands.DataFactories/Models/DataFactoryClient.DataFactories.cs
+++ b/src/ResourceManager/DataFactories/Commands.DataFactories/Models/DataFactoryClient.DataFactories.cs
@@ -22,6 +22,7 @@
using Microsoft.Azure.Management.DataFactories;
using Microsoft.WindowsAzure;
using Microsoft.WindowsAzure.Commands.Utilities.Common;
+using Hyak.Common;
namespace Microsoft.Azure.Commands.DataFactories
{
@@ -172,7 +173,7 @@ private bool CheckDataFactoryExists(string resourceGroupName, string dataFactory
public virtual HttpStatusCode DeleteDataFactory(string resourceGroupName, string dataFactoryName)
{
- OperationResponse response = DataPipelineManagementClient.DataFactories.Delete(resourceGroupName,
+ AzureOperationResponse response = DataPipelineManagementClient.DataFactories.Delete(resourceGroupName,
dataFactoryName);
return response.StatusCode;
}
diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories/Models/DataFactoryClient.Hubs.cs b/src/ResourceManager/DataFactories/Commands.DataFactories/Models/DataFactoryClient.Hubs.cs
index 9b5950798bcf..136f5fe6cff9 100644
--- a/src/ResourceManager/DataFactories/Commands.DataFactories/Models/DataFactoryClient.Hubs.cs
+++ b/src/ResourceManager/DataFactories/Commands.DataFactories/Models/DataFactoryClient.Hubs.cs
@@ -21,6 +21,7 @@
using Microsoft.Azure.Management.DataFactories;
using Microsoft.Azure.Management.DataFactories.Models;
using Microsoft.WindowsAzure;
+using Hyak.Common;
namespace Microsoft.Azure.Commands.DataFactories
{
@@ -137,7 +138,7 @@ public virtual List ListHubs(string resourceGroupName, string dataFactory
public virtual HttpStatusCode DeleteHub(string resourceGroupName, string dataFactoryName, string hubName)
{
- OperationResponse response = DataPipelineManagementClient.Hubs.Delete(
+ AzureOperationResponse response = DataPipelineManagementClient.Hubs.Delete(
resourceGroupName,
dataFactoryName,
hubName);
diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories/Models/DataFactoryClient.LinkedServices.cs b/src/ResourceManager/DataFactories/Commands.DataFactories/Models/DataFactoryClient.LinkedServices.cs
index 2ad1072c0d04..39bc8403022e 100644
--- a/src/ResourceManager/DataFactories/Commands.DataFactories/Models/DataFactoryClient.LinkedServices.cs
+++ b/src/ResourceManager/DataFactories/Commands.DataFactories/Models/DataFactoryClient.LinkedServices.cs
@@ -21,6 +21,7 @@
using Microsoft.Azure.Management.DataFactories;
using Microsoft.Azure.Management.DataFactories.Models;
using Microsoft.WindowsAzure;
+using Hyak.Common;
namespace Microsoft.Azure.Commands.DataFactories
{
@@ -81,7 +82,7 @@ public virtual List ListLinkedServices(string resourceGroupName
public virtual HttpStatusCode DeleteLinkedService(string resourceGroupName, string dataFactoryName, string linkedServiceName)
{
- OperationResponse response = DataPipelineManagementClient.LinkedServices.Delete(resourceGroupName,
+ AzureOperationResponse response = DataPipelineManagementClient.LinkedServices.Delete(resourceGroupName,
dataFactoryName, linkedServiceName);
return response.StatusCode;
diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories/Models/DataFactoryClient.Pipelines.cs b/src/ResourceManager/DataFactories/Commands.DataFactories/Models/DataFactoryClient.Pipelines.cs
index 6edf114b396b..11ab9636fe36 100644
--- a/src/ResourceManager/DataFactories/Commands.DataFactories/Models/DataFactoryClient.Pipelines.cs
+++ b/src/ResourceManager/DataFactories/Commands.DataFactories/Models/DataFactoryClient.Pipelines.cs
@@ -21,6 +21,7 @@
using Microsoft.Azure.Management.DataFactories;
using Microsoft.Azure.Management.DataFactories.Models;
using Microsoft.WindowsAzure;
+using Hyak.Common;
namespace Microsoft.Azure.Commands.DataFactories
{
@@ -47,7 +48,7 @@ public virtual Pipeline CreateOrUpdatePipeline(string resourceGroupName, string
public virtual HttpStatusCode DeletePipeline(string resourceGroupName, string dataFactoryName, string pipelineName)
{
- OperationResponse response = DataPipelineManagementClient.Pipelines.Delete(
+ AzureOperationResponse response = DataPipelineManagementClient.Pipelines.Delete(
resourceGroupName, dataFactoryName, pipelineName);
return response.StatusCode;
diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories/Models/DataFactoryClient.Tables.cs b/src/ResourceManager/DataFactories/Commands.DataFactories/Models/DataFactoryClient.Tables.cs
index d50a2d1efac8..504ce3daf71e 100644
--- a/src/ResourceManager/DataFactories/Commands.DataFactories/Models/DataFactoryClient.Tables.cs
+++ b/src/ResourceManager/DataFactories/Commands.DataFactories/Models/DataFactoryClient.Tables.cs
@@ -21,6 +21,7 @@
using Microsoft.Azure.Management.DataFactories;
using Microsoft.Azure.Management.DataFactories.Models;
using Microsoft.WindowsAzure;
+using Hyak.Common;
namespace Microsoft.Azure.Commands.DataFactories
{
@@ -79,7 +80,7 @@ public virtual List ListTables(string resourceGroupName, string dataFac
public virtual HttpStatusCode DeleteTable(string resourceGroupName, string dataFactoryName, string tableName)
{
- OperationResponse response = DataPipelineManagementClient.Tables.Delete(resourceGroupName, dataFactoryName, tableName);
+ AzureOperationResponse response = DataPipelineManagementClient.Tables.Delete(resourceGroupName, dataFactoryName, tableName);
return response.StatusCode;
}
diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories/packages.config b/src/ResourceManager/DataFactories/Commands.DataFactories/packages.config
index 404260a2d015..e63f930ccd5e 100644
--- a/src/ResourceManager/DataFactories/Commands.DataFactories/packages.config
+++ b/src/ResourceManager/DataFactories/Commands.DataFactories/packages.config
@@ -1,13 +1,18 @@
-
+
+
+
+
+
+
+
-
-
+
\ No newline at end of file
diff --git a/src/ResourceManager/KeyVault/Commands.KeyVault.Test/Commands.KeyVault.Test.csproj b/src/ResourceManager/KeyVault/Commands.KeyVault.Test/Commands.KeyVault.Test.csproj
index 2371d5c7366c..9f1989140747 100644
--- a/src/ResourceManager/KeyVault/Commands.KeyVault.Test/Commands.KeyVault.Test.csproj
+++ b/src/ResourceManager/KeyVault/Commands.KeyVault.Test/Commands.KeyVault.Test.csproj
@@ -48,8 +48,29 @@
false
-
- ..\..\..\packages\Hydra.HttpRecorder.1.0.5406.28672-prerelease\lib\net45\Microsoft.Azure.Utilities.HttpRecorder.dll
+
+ ..\..\..\packages\Hyak.Common.1.0.1\lib\portable-net403+win+wpa81\Hyak.Common.dll
+
+
+ ..\..\..\packages\Microsoft.Azure.Common.2.0.1\lib\net45\Microsoft.Azure.Common.dll
+
+
+ False
+ ..\..\..\packages\Microsoft.Azure.Common.Extensions.0.13.0-preview\lib\net45\Microsoft.Azure.Common.Extensions.dll
+
+
+ ..\..\..\packages\Microsoft.Azure.Common.2.0.1\lib\net45\Microsoft.Azure.Common.NetFramework.dll
+
+
+ ..\..\..\packages\Microsoft.Azure.Management.Resources.2.12.0-preview\lib\net40\Microsoft.Azure.ResourceManager.dll
+
+
+ False
+ ..\..\..\packages\Microsoft.Azure.Test.Framework.1.0.5486.28526-prerelease\lib\net45\Microsoft.Azure.Test.Framework.dll
+
+
+ False
+ ..\..\..\packages\Microsoft.Azure.Test.HttpRecorder.1.0.5486.28526-prerelease\lib\net45\Microsoft.Azure.Test.HttpRecorder.dll
False
@@ -65,20 +86,12 @@
..\..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.Desktop.dll
-
- False
- ..\..\..\packages\Microsoft.WindowsAzure.Common.1.4.0\lib\net45\Microsoft.WindowsAzure.Common.dll
-
-
- False
- ..\..\..\packages\Microsoft.WindowsAzure.Common.1.4.0\lib\net45\Microsoft.WindowsAzure.Common.NetFramework.dll
-
-
- ..\..\..\packages\Hydra.SpecTestSupport.1.0.5406.28672-prerelease\lib\net45\Microsoft.WindowsAzure.Testing.dll
+
+ ..\..\..\packages\Microsoft.WindowsAzure.Management.4.0.0\lib\net40\Microsoft.WindowsAzure.Management.dll
-
+
False
- ..\..\..\packages\Moq.4.2.1409.1722\lib\net40\Moq.dll
+ ..\..\..\packages\Moq.4.2.1402.2112\lib\net40\Moq.dll
False
diff --git a/src/ResourceManager/KeyVault/Commands.KeyVault.Test/packages.config b/src/ResourceManager/KeyVault/Commands.KeyVault.Test/packages.config
index eaefc95c996e..bea4bcaf95a9 100644
--- a/src/ResourceManager/KeyVault/Commands.KeyVault.Test/packages.config
+++ b/src/ResourceManager/KeyVault/Commands.KeyVault.Test/packages.config
@@ -1,15 +1,19 @@
-
-
+
+
+
+
+
+
+
-
-
-
+
+
\ No newline at end of file
diff --git a/src/ResourceManager/KeyVault/Commands.KeyVault/Commands.KeyVault.csproj b/src/ResourceManager/KeyVault/Commands.KeyVault/Commands.KeyVault.csproj
index f96838b049d0..d2496788efdb 100644
--- a/src/ResourceManager/KeyVault/Commands.KeyVault/Commands.KeyVault.csproj
+++ b/src/ResourceManager/KeyVault/Commands.KeyVault/Commands.KeyVault.csproj
@@ -108,9 +108,22 @@
+
+ ..\..\..\packages\Hyak.Common.1.0.1\lib\portable-net403+win+wpa81\Hyak.Common.dll
+
+
+ ..\..\..\packages\Microsoft.Azure.Common.2.0.1\lib\net45\Microsoft.Azure.Common.dll
+
+
+ False
+ ..\..\..\packages\Microsoft.Azure.Common.Extensions.0.13.0-preview\lib\net45\Microsoft.Azure.Common.Extensions.dll
+
+
+ ..\..\..\packages\Microsoft.Azure.Common.2.0.1\lib\net45\Microsoft.Azure.Common.NetFramework.dll
+
False
- ..\..\..\packages\Microsoft.Azure.Management.Resources.2.7.0-preview\lib\net40\Microsoft.Azure.ResourceManager.dll
+ ..\..\..\packages\Microsoft.Azure.Management.Resources.2.12.0-preview\lib\net40\Microsoft.Azure.ResourceManager.dll
..\..\..\packages\Microsoft.Data.Edm.5.6.0\lib\net40\Microsoft.Data.Edm.dll
@@ -121,6 +134,13 @@
..\..\..\packages\Microsoft.Data.Services.Client.5.6.0\lib\net40\Microsoft.Data.Services.Client.dll
+
+ False
+ ..\..\..\packages\Microsoft.IdentityModel.Clients.ActiveDirectory.2.11.10918.1222\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.dll
+
+
+ ..\..\..\packages\Microsoft.IdentityModel.Clients.ActiveDirectory.2.11.10918.1222\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.WindowsForms.dll
+
False
..\..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.dll
@@ -129,13 +149,9 @@
False
..\..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.Desktop.dll
-
+
False
- ..\..\..\packages\Microsoft.WindowsAzure.Common.1.4.0\lib\net45\Microsoft.WindowsAzure.Common.dll
-
-
- False
- ..\..\..\packages\Microsoft.WindowsAzure.Common.1.4.0\lib\net45\Microsoft.WindowsAzure.Common.NetFramework.dll
+ ..\..\..\packages\Microsoft.WindowsAzure.Management.4.0.0\lib\net40\Microsoft.WindowsAzure.Management.dll
False
@@ -157,10 +173,6 @@
-
- {b95c489c-8cb7-4dcf-8d5f-b9aebdbbaf89}
- Common.Extensions
-
{5ee72c53-1720-4309-b54b-5fb79703195f}
Commands.Common
diff --git a/src/ResourceManager/KeyVault/Commands.KeyVault/Models/KeyVaultDataServiceClient.cs b/src/ResourceManager/KeyVault/Commands.KeyVault/Models/KeyVaultDataServiceClient.cs
index a59940bde5d2..25fc99a3200c 100644
--- a/src/ResourceManager/KeyVault/Commands.KeyVault/Models/KeyVaultDataServiceClient.cs
+++ b/src/ResourceManager/KeyVault/Commands.KeyVault/Models/KeyVaultDataServiceClient.cs
@@ -12,12 +12,12 @@
// limitations under the License.
// ----------------------------------------------------------------------------------
+using Hyak.Common;
using Microsoft.Azure.Commands.KeyVault.Properties;
using Microsoft.Azure.Commands.KeyVault.WebKey;
using Microsoft.Azure.Common.Extensions;
using Microsoft.Azure.Common.Extensions.Models;
using Microsoft.WindowsAzure;
-using Microsoft.WindowsAzure.Common.Internals;
using System;
using System.Collections.Generic;
using System.IO;
@@ -322,17 +322,17 @@ public KeyBundle RestoreKey(string vaultName, string inputBlobPath)
private void SendRequestCallback(string correlationId, HttpRequestMessage request)
{
- if (CloudContext.Configuration.Tracing.IsEnabled)
+ if (TracingAdapter.IsEnabled)
{
- Tracing.SendRequest(correlationId, request);
+ TracingAdapter.SendRequest(correlationId, request);
}
}
private void ReceiveResponseCallback(string correlationId, HttpResponseMessage response)
{
- if (CloudContext.Configuration.Tracing.IsEnabled)
+ if (TracingAdapter.IsEnabled)
{
- Tracing.ReceiveResponse(correlationId, response);
+ TracingAdapter.ReceiveResponse(correlationId, response);
}
}
diff --git a/src/ResourceManager/KeyVault/Commands.KeyVault/packages.config b/src/ResourceManager/KeyVault/Commands.KeyVault/packages.config
index 219ecbb28323..bdde83a6dc79 100644
--- a/src/ResourceManager/KeyVault/Commands.KeyVault/packages.config
+++ b/src/ResourceManager/KeyVault/Commands.KeyVault/packages.config
@@ -1,10 +1,15 @@
+
+
+
+
+
+
-
-
+
\ No newline at end of file
diff --git a/src/ResourceManager/RedisCache/Commands.RedisCache.Test/Commands.RedisCache.Test.csproj b/src/ResourceManager/RedisCache/Commands.RedisCache.Test/Commands.RedisCache.Test.csproj
index 9d97b35690d5..81c12f4c1222 100644
--- a/src/ResourceManager/RedisCache/Commands.RedisCache.Test/Commands.RedisCache.Test.csproj
+++ b/src/ResourceManager/RedisCache/Commands.RedisCache.Test/Commands.RedisCache.Test.csproj
@@ -41,12 +41,32 @@
false
+
+ ..\..\..\packages\Hyak.Common.1.0.1\lib\portable-net403+win+wpa81\Hyak.Common.dll
+
+
+ ..\..\..\packages\Microsoft.Azure.Common.2.0.1\lib\net45\Microsoft.Azure.Common.dll
+
+
+ False
+ ..\..\..\packages\Microsoft.Azure.Common.Extensions.0.13.0-preview\lib\net45\Microsoft.Azure.Common.Extensions.dll
+
+
+ ..\..\..\packages\Microsoft.Azure.Common.2.0.1\lib\net45\Microsoft.Azure.Common.NetFramework.dll
+
- ..\..\..\packages\Microsoft.Azure.Management.Redis.0.12.0-preview\lib\net40\Microsoft.Azure.Management.Redis.dll
+ ..\..\..\packages\Microsoft.Azure.Management.Redis.0.14.0-preview\lib\net40\Microsoft.Azure.Management.Redis.dll
+
+
+ ..\..\..\packages\Microsoft.Azure.Management.Resources.2.12.0-preview\lib\net40\Microsoft.Azure.ResourceManager.dll
+
+
+ False
+ ..\..\..\packages\Microsoft.Azure.Test.Framework.1.0.5486.28526-prerelease\lib\net45\Microsoft.Azure.Test.Framework.dll
-
+
False
- ..\..\..\packages\Hydra.HttpRecorder.1.0.5417.13285-prerelease\lib\net45\Microsoft.Azure.Utilities.HttpRecorder.dll
+ ..\..\..\packages\Microsoft.Azure.Test.HttpRecorder.1.0.5486.28526-prerelease\lib\net45\Microsoft.Azure.Test.HttpRecorder.dll
False
@@ -68,17 +88,8 @@
False
..\..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.Desktop.dll
-
- False
- ..\..\..\packages\Microsoft.WindowsAzure.Common.1.4.1\lib\net45\Microsoft.WindowsAzure.Common.dll
-
-
- False
- ..\..\..\packages\Microsoft.WindowsAzure.Common.1.4.1\lib\net45\Microsoft.WindowsAzure.Common.NetFramework.dll
-
-
- False
- ..\..\..\packages\Hydra.SpecTestSupport.1.0.5417.13285-prerelease\lib\net45\Microsoft.WindowsAzure.Testing.dll
+
+ ..\..\..\packages\Microsoft.WindowsAzure.Management.4.0.0\lib\net40\Microsoft.WindowsAzure.Management.dll
False
@@ -125,10 +136,6 @@
-
- {b95c489c-8cb7-4dcf-8d5f-b9aebdbbaf89}
- Common.Extensions
-
{c1bda476-a5cc-4394-914d-48b0ec31a710}
Commands.ScenarioTests.Common
diff --git a/src/ResourceManager/RedisCache/Commands.RedisCache.Test/ScenarioTests/RedisCacheTests.cs b/src/ResourceManager/RedisCache/Commands.RedisCache.Test/ScenarioTests/RedisCacheTests.cs
index f08f81cb980d..921c9151905b 100644
--- a/src/ResourceManager/RedisCache/Commands.RedisCache.Test/ScenarioTests/RedisCacheTests.cs
+++ b/src/ResourceManager/RedisCache/Commands.RedisCache.Test/ScenarioTests/RedisCacheTests.cs
@@ -15,7 +15,7 @@
namespace Microsoft.Azure.Commands.RedisCache.Test.ScenarioTests
{
using Microsoft.WindowsAzure.Commands.ScenarioTest;
- using Microsoft.WindowsAzure.Testing;
+ using Microsoft.Azure.Test;
using Xunit;
public class RedisCacheTests : RedisCacheTestsBase
diff --git a/src/ResourceManager/RedisCache/Commands.RedisCache.Test/ScenarioTests/RedisCacheTestsBase.cs b/src/ResourceManager/RedisCache/Commands.RedisCache.Test/ScenarioTests/RedisCacheTestsBase.cs
index c6519b8ab712..7925889e9557 100644
--- a/src/ResourceManager/RedisCache/Commands.RedisCache.Test/ScenarioTests/RedisCacheTestsBase.cs
+++ b/src/ResourceManager/RedisCache/Commands.RedisCache.Test/ScenarioTests/RedisCacheTestsBase.cs
@@ -17,7 +17,7 @@ namespace Microsoft.Azure.Commands.RedisCache.Test.ScenarioTests
using System;
using Microsoft.WindowsAzure.Commands.ScenarioTest;
using Microsoft.WindowsAzure.Commands.Utilities.Common;
- using Microsoft.WindowsAzure.Testing;
+ using Microsoft.Azure.Test;
using Microsoft.Azure.Management.Redis;
using Microsoft.Azure.Common.Extensions;
diff --git a/src/ResourceManager/RedisCache/Commands.RedisCache.Test/packages.config b/src/ResourceManager/RedisCache/Commands.RedisCache.Test/packages.config
index df002d1bddd5..6a593376f14f 100644
--- a/src/ResourceManager/RedisCache/Commands.RedisCache.Test/packages.config
+++ b/src/ResourceManager/RedisCache/Commands.RedisCache.Test/packages.config
@@ -1,15 +1,19 @@
-
-
-
+
+
+
+
+
+
+
+
-
-
+
diff --git a/src/ResourceManager/RedisCache/Commands.RedisCache/Commands.RedisCache.csproj b/src/ResourceManager/RedisCache/Commands.RedisCache/Commands.RedisCache.csproj
index 49d934539a72..e754d5f89adc 100644
--- a/src/ResourceManager/RedisCache/Commands.RedisCache/Commands.RedisCache.csproj
+++ b/src/ResourceManager/RedisCache/Commands.RedisCache/Commands.RedisCache.csproj
@@ -46,9 +46,26 @@
false
+
+ ..\..\..\packages\Hyak.Common.1.0.1\lib\portable-net403+win+wpa81\Hyak.Common.dll
+
+
+ ..\..\..\packages\Microsoft.Azure.Common.2.0.1\lib\net45\Microsoft.Azure.Common.dll
+
+
+ False
+ ..\..\..\packages\Microsoft.Azure.Common.Extensions.0.13.0-preview\lib\net45\Microsoft.Azure.Common.Extensions.dll
+
+
+ ..\..\..\packages\Microsoft.Azure.Common.2.0.1\lib\net45\Microsoft.Azure.Common.NetFramework.dll
+
False
- ..\..\..\packages\Microsoft.Azure.Management.Redis.0.12.0-preview\lib\net40\Microsoft.Azure.Management.Redis.dll
+ ..\..\..\packages\Microsoft.Azure.Management.Redis.0.14.0-preview\lib\net40\Microsoft.Azure.Management.Redis.dll
+
+
+ False
+ ..\..\..\packages\Microsoft.Azure.Management.Resources.2.12.0-preview\lib\net40\Microsoft.Azure.ResourceManager.dll
False
@@ -70,13 +87,9 @@
False
..\..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.Desktop.dll
-
+
False
- ..\..\..\packages\Microsoft.WindowsAzure.Common.1.4.1\lib\net45\Microsoft.WindowsAzure.Common.dll
-
-
- False
- ..\..\..\packages\Microsoft.WindowsAzure.Common.1.4.1\lib\net45\Microsoft.WindowsAzure.Common.NetFramework.dll
+ ..\..\..\packages\Microsoft.WindowsAzure.Management.4.0.0\lib\net40\Microsoft.WindowsAzure.Management.dll
False
@@ -123,10 +136,6 @@
-
- {b95c489c-8cb7-4dcf-8d5f-b9aebdbbaf89}
- Common.Extensions
-
{5ee72c53-1720-4309-b54b-5fb79703195f}
Commands.Common
diff --git a/src/ResourceManager/RedisCache/Commands.RedisCache/Commands/NewAzureRedisCache.cs b/src/ResourceManager/RedisCache/Commands.RedisCache/Commands/NewAzureRedisCache.cs
index a12ae8c25e3e..0b2b0b6a8628 100644
--- a/src/ResourceManager/RedisCache/Commands.RedisCache/Commands/NewAzureRedisCache.cs
+++ b/src/ResourceManager/RedisCache/Commands.RedisCache/Commands/NewAzureRedisCache.cs
@@ -21,6 +21,7 @@ namespace Microsoft.Azure.Commands.RedisCache
using System.Management.Automation;
using SkuStrings = Microsoft.Azure.Management.Redis.Models.SkuName;
using MaxMemoryPolicyStrings = Microsoft.Azure.Management.Redis.Models.MaxMemoryPolicy;
+ using Hyak.Common;
[Cmdlet(VerbsCommon.New, "AzureRedisCache"), OutputType(typeof(RedisCacheAttributesWithAccessKeys))]
public class NewAzureRedisCache : RedisCacheCmdletBase
@@ -101,11 +102,11 @@ public override void ExecuteCmdlet()
}
catch (CloudException ex)
{
- if (ex.ErrorCode == "ResourceNotFound" || ex.Message.Contains("ResourceNotFound"))
+ if (ex.Error.Code == "ResourceNotFound" || ex.Message.Contains("ResourceNotFound"))
{
// cache does not exists so go ahead and create one
}
- else if (ex.ErrorCode == "ResourceGroupNotFound" || ex.Message.Contains("ResourceGroupNotFound"))
+ else if (ex.Error.Code == "ResourceGroupNotFound" || ex.Message.Contains("ResourceGroupNotFound"))
{
// resource group not found, let create throw error don't throw from here
}
diff --git a/src/ResourceManager/RedisCache/Commands.RedisCache/Models/RedisCacheClient.cs b/src/ResourceManager/RedisCache/Commands.RedisCache/Models/RedisCacheClient.cs
index 5260bdc592be..fe0241307c05 100644
--- a/src/ResourceManager/RedisCache/Commands.RedisCache/Models/RedisCacheClient.cs
+++ b/src/ResourceManager/RedisCache/Commands.RedisCache/Models/RedisCacheClient.cs
@@ -59,7 +59,7 @@ public RedisCreateOrUpdateResponse CreateOrUpdateCache(string resourceGroupName,
return response;
}
- public OperationResponse DeleteCache(string resourceGroupName, string cacheName)
+ public AzureOperationResponse DeleteCache(string resourceGroupName, string cacheName)
{
return _client.Redis.Delete(resourceGroupName: resourceGroupName, name: cacheName);
}
@@ -86,7 +86,7 @@ public RedisListResponse ListCachesUsingNextLink(string nextLink)
return _client.Redis.ListNext(nextLink: nextLink);
}
- public OperationResponse RegenerateAccessKeys(string resourceGroupName, string cacheName, RedisKeyType keyType)
+ public AzureOperationResponse RegenerateAccessKeys(string resourceGroupName, string cacheName, RedisKeyType keyType)
{
return _client.Redis.RegenerateKey(resourceGroupName: resourceGroupName, name: cacheName, parameters: new RedisRegenerateKeyParameters() { KeyType = keyType });
}
diff --git a/src/ResourceManager/RedisCache/Commands.RedisCache/packages.config b/src/ResourceManager/RedisCache/Commands.RedisCache/packages.config
index 305c15591e8b..7020401c726a 100644
--- a/src/ResourceManager/RedisCache/Commands.RedisCache/packages.config
+++ b/src/ResourceManager/RedisCache/Commands.RedisCache/packages.config
@@ -1,12 +1,16 @@
-
+
+
+
+
+
+
-
-
+
\ No newline at end of file
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 960fccd5f28c..1f6a1b2cf3c8 100644
--- a/src/ResourceManager/Resources/Commands.Resources.Test/Commands.Resources.Test.csproj
+++ b/src/ResourceManager/Resources/Commands.Resources.Test/Commands.Resources.Test.csproj
@@ -42,28 +42,36 @@
false
+
+ ..\..\..\packages\Hyak.Common.1.0.1\lib\portable-net403+win+wpa81\Hyak.Common.dll
+
+
+ ..\..\..\packages\Microsoft.Azure.Common.2.0.1\lib\net45\Microsoft.Azure.Common.dll
+
+
+ ..\..\..\packages\Microsoft.Azure.Common.Extensions.0.13.0-preview\lib\net45\Microsoft.Azure.Common.Extensions.dll
+
+
+ ..\..\..\packages\Microsoft.Azure.Common.2.0.1\lib\net45\Microsoft.Azure.Common.NetFramework.dll
+
- ..\..\..\packages\Microsoft.Azure.Gallery.2.2.0-preview\lib\net40\Microsoft.Azure.Gallery.dll
+ ..\..\..\packages\Microsoft.Azure.Gallery.2.6.0-preview\lib\net40\Microsoft.Azure.Gallery.dll
False
- ..\..\..\packages\Microsoft.Azure.Graph.RBAC.1.4.0-preview\lib\net40\Microsoft.Azure.Graph.RBAC.dll
+ ..\..\..\packages\Microsoft.Azure.Graph.RBAC.1.6.0-preview\lib\net40\Microsoft.Azure.Graph.RBAC.dll
- False
- ..\..\..\packages\Microsoft.Azure.Management.Authorization.0.11.0-preview\lib\net40\Microsoft.Azure.Management.Authorization.dll
-
-
- False
- ..\..\..\packages\Microsoft.Azure.Monitoring.2.2.0-preview\lib\net40\Microsoft.Azure.Monitoring.dll
+ ..\..\..\packages\Microsoft.Azure.Management.Authorization.0.16.0-preview\lib\net40\Microsoft.Azure.Management.Authorization.dll
- False
- ..\..\..\packages\Microsoft.Azure.Management.Resources.2.7.0-preview\lib\net40\Microsoft.Azure.ResourceManager.dll
+ ..\..\..\packages\Microsoft.Azure.Management.Resources.2.12.0-preview\lib\net40\Microsoft.Azure.ResourceManager.dll
-
- False
- ..\..\..\packages\Hydra.HttpRecorder.1.0.5417.13285-prerelease\lib\net45\Microsoft.Azure.Utilities.HttpRecorder.dll
+
+ ..\..\..\packages\Microsoft.Azure.Test.Framework.1.0.5486.28526-prerelease\lib\net45\Microsoft.Azure.Test.Framework.dll
+
+
+ ..\..\..\packages\Microsoft.Azure.Test.HttpRecorder.1.0.5486.28526-prerelease\lib\net45\Microsoft.Azure.Test.HttpRecorder.dll
False
@@ -85,21 +93,11 @@
False
..\..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.Desktop.dll
-
- False
- ..\..\..\packages\Microsoft.WindowsAzure.Common.1.4.1\lib\net45\Microsoft.WindowsAzure.Common.dll
-
-
- False
- ..\..\..\packages\Microsoft.WindowsAzure.Common.1.4.1\lib\net45\Microsoft.WindowsAzure.Common.NetFramework.dll
-
-
- False
- ..\..\..\packages\Microsoft.WindowsAzure.Management.Storage.3.1.0\lib\net40\Microsoft.WindowsAzure.Management.Storage.dll
+
+ ..\..\..\packages\Microsoft.WindowsAzure.Management.4.0.0\lib\net40\Microsoft.WindowsAzure.Management.dll
-
- False
- ..\..\..\packages\Hydra.SpecTestSupport.1.0.5417.13285-prerelease\lib\net45\Microsoft.WindowsAzure.Testing.dll
+
+ ..\..\..\packages\Microsoft.WindowsAzure.Management.Storage.5.0.0\lib\net40\Microsoft.WindowsAzure.Management.Storage.dll
False
@@ -176,10 +174,6 @@
-
- {b95c489c-8cb7-4dcf-8d5f-b9aebdbbaf89}
- Common.Extensions
-
{c1bda476-a5cc-4394-914d-48b0ec31a710}
Commands.ScenarioTests.Common
diff --git a/src/ResourceManager/Resources/Commands.Resources.Test/Models.ResourceGroups/GalleryTemplatesClientTests.cs b/src/ResourceManager/Resources/Commands.Resources.Test/Models.ResourceGroups/GalleryTemplatesClientTests.cs
index 9f05a40e5d10..2b0c8a69bf83 100644
--- a/src/ResourceManager/Resources/Commands.Resources.Test/Models.ResourceGroups/GalleryTemplatesClientTests.cs
+++ b/src/ResourceManager/Resources/Commands.Resources.Test/Models.ResourceGroups/GalleryTemplatesClientTests.cs
@@ -25,9 +25,9 @@
using Microsoft.Azure.Gallery.Models;
using Microsoft.WindowsAzure.Commands.ScenarioTest;
using Microsoft.WindowsAzure.Commands.Test.Utilities.Common;
-using Microsoft.WindowsAzure.Common.OData;
using Moq;
using Xunit;
+using Microsoft.Azure.Common.OData;
namespace Microsoft.Azure.Commands.Resources.Test.Models
{
diff --git a/src/ResourceManager/Resources/Commands.Resources.Test/Models.ResourceGroups/ResourceClientTests.cs b/src/ResourceManager/Resources/Commands.Resources.Test/Models.ResourceGroups/ResourceClientTests.cs
index 24d28101b7ce..03e0f5af5044 100644
--- a/src/ResourceManager/Resources/Commands.Resources.Test/Models.ResourceGroups/ResourceClientTests.cs
+++ b/src/ResourceManager/Resources/Commands.Resources.Test/Models.ResourceGroups/ResourceClientTests.cs
@@ -31,9 +31,6 @@
using Microsoft.WindowsAzure.Commands.ScenarioTest;
using Microsoft.WindowsAzure.Commands.Test.Utilities.Common;
using Microsoft.WindowsAzure.Commands.Utilities.Common;
-using Microsoft.WindowsAzure.Management.Monitoring.Events;
-using Microsoft.WindowsAzure.Management.Monitoring.Events.Models;
-using Microsoft.WindowsAzure.Management.Monitoring.Models;
using Moq;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
@@ -41,6 +38,7 @@
using Xunit.Extensions;
using System.Diagnostics;
using Microsoft.Azure.Common.Extensions;
+using Hyak.Common;
namespace Microsoft.Azure.Commands.Resources.Test.Models
{
@@ -58,11 +56,13 @@ public class ResourceClientTests : TestBase
private Mock galleryTemplatesClientMock;
- private Mock eventsClientMock;
+ // TODO: http://vstfrd:8080/Azure/RD/_workitems#_a=edit&id=3247094
+ //private Mock eventsClientMock;
private Mock deploymentOperationsMock;
- private Mock eventDataOperationsMock;
+ // TODO: http://vstfrd:8080/Azure/RD/_workitems#_a=edit&id=3247094
+ //private Mock eventDataOperationsMock;
private Mock providersMock;
@@ -94,7 +94,8 @@ public class ResourceClientTests : TestBase
private string serializedProperties;
- private List sampleEvents;
+ // TODO: http://vstfrd:8080/Azure/RD/_workitems#_a=edit&id=3247094
+ //private List sampleEvents;
private int ConfirmActionCounter = 0;
@@ -140,9 +141,9 @@ public ResourceClientTests()
resourceGroupMock = new Mock();
resourceOperationsMock = new Mock();
galleryTemplatesClientMock = new Mock();
- eventsClientMock = new Mock();
+ //eventsClientMock = new Mock();
deploymentOperationsMock = new Mock();
- eventDataOperationsMock = new Mock();
+ //eventDataOperationsMock = new Mock();
providersMock = new Mock();
providersMock.Setup(f => f.ListAsync(null, new CancellationToken()))
.Returns(Task.Factory.StartNew(() => new ProviderListResult
@@ -157,12 +158,14 @@ public ResourceClientTests()
resourceManagementClientMock.Setup(f => f.Resources).Returns(resourceOperationsMock.Object);
resourceManagementClientMock.Setup(f => f.DeploymentOperations).Returns(deploymentOperationsMock.Object);
resourceManagementClientMock.Setup(f => f.Providers).Returns(providersMock.Object);
- eventsClientMock.Setup(f => f.EventData).Returns(eventDataOperationsMock.Object);
+ // TODO: http://vstfrd:8080/Azure/RD/_workitems#_a=edit&id=3247094
+ //eventsClientMock.Setup(f => f.EventData).Returns(eventDataOperationsMock.Object);
authorizationManagementClientMock.Setup(f => f.Permissions).Returns(permissionOperationsMock.Object);
resourcesClient = new ResourcesClient(
resourceManagementClientMock.Object,
galleryTemplatesClientMock.Object,
- eventsClientMock.Object,
+ // TODO: http://vstfrd:8080/Azure/RD/_workitems#_a=edit&id=3247094
+ //eventsClientMock.Object,
authorizationManagementClientMock.Object)
{
VerboseLogger = progressLoggerMock.Object,
@@ -193,96 +196,97 @@ public ResourceClientTests()
TypeNameHandling = TypeNameHandling.None
});
- sampleEvents = new List();
- sampleEvents.Add(new EventData
- {
- EventDataId = "ac7d2ab5-698a-4c33-9c19-0a93d3d7f527",
- EventName = new LocalizableString { LocalizedValue = "Start request" },
- EventSource = new LocalizableString { LocalizedValue = "Microsoft Resources" },
- EventChannels = EventChannels.Operation,
- Level = EventLevel.Informational,
- EventTimestamp = DateTime.Now,
- OperationId = "c0f2e85f-efb0-47d0-bf90-f983ec8be91d",
- SubscriptionId = "c0f2e85f-efb0-47d0-bf90-f983ec8be91d",
- CorrelationId = "c0f2e85f-efb0-47d0-bf90-f983ec8be91d",
- OperationName =
- new LocalizableString
- {
- LocalizedValue = "Microsoft.Resources/subscriptions/resourcegroups/deployments/write"
- },
- Status = new LocalizableString { LocalizedValue = "Succeeded" },
- SubStatus = new LocalizableString { LocalizedValue = "Created" },
- ResourceGroupName = "foo",
- ResourceProviderName = new LocalizableString { LocalizedValue = "Microsoft Resources" },
- ResourceUri =
- "/subscriptions/ffce8037-a374-48bf-901d-dac4e3ea8c09/resourcegroups/foo/deployments/testdeploy",
- HttpRequest = new HttpRequestInfo
- {
- Uri =
- "http://path/subscriptions/ffce8037-a374-48bf-901d-dac4e3ea8c09/resourcegroups/foo/deployments/testdeploy",
- Method = "PUT",
- ClientRequestId = "1234",
- ClientIpAddress = "123.123.123.123"
- },
- Authorization = new SenderAuthorization
- {
- Action = "PUT",
- Condition = "",
- Role = "Sender",
- Scope = "None"
- },
- Claims = new Dictionary
- {
- {"aud", "https://management.core.windows.net/"},
- {"iss", "https://sts.windows.net/123456/"},
- {"iat", "h123445"},
- {"http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name", "info@mail.com"}
- },
- Properties = new Dictionary()
- });
- sampleEvents.Add(new EventData
- {
- EventDataId = "ac7d2ab5-698a-4c33-9c19-0sdfsdf34r54",
- EventName = new LocalizableString { LocalizedValue = "End request" },
- EventSource = new LocalizableString { LocalizedValue = "Microsoft Resources" },
- EventChannels = EventChannels.Operation,
- Level = EventLevel.Informational,
- EventTimestamp = DateTime.Now,
- OperationId = "c0f2e85f-efb0-47d0-bf90-f983ec8be91d",
- OperationName =
- new LocalizableString
- {
- LocalizedValue = "Microsoft.Resources/subscriptions/resourcegroups/deployments/write"
- },
- Status = new LocalizableString { LocalizedValue = "Succeeded" },
- SubStatus = new LocalizableString { LocalizedValue = "Created" },
- ResourceGroupName = "foo",
- ResourceProviderName = new LocalizableString { LocalizedValue = "Microsoft Resources" },
- ResourceUri =
- "/subscriptions/ffce8037-a374-48bf-901d-dac4e3ea8c09/resourcegroups/foo/deployments/testdeploy",
- HttpRequest = new HttpRequestInfo
- {
- Uri =
- "http://path/subscriptions/ffce8037-a374-48bf-901d-dac4e3ea8c09/resourcegroups/foo/deployments/testdeploy",
- Method = "PUT",
- ClientRequestId = "1234",
- ClientIpAddress = "123.123.123.123"
- },
- Authorization = new SenderAuthorization
- {
- Action = "PUT",
- Condition = "",
- Role = "Sender",
- Scope = "None"
- },
- Claims = new Dictionary
- {
- {"aud", "https://management.core.windows.net/"},
- {"iss", "https://sts.windows.net/123456/"},
- {"iat", "h123445"}
- },
- Properties = new Dictionary()
- });
+ // TODO: http://vstfrd:8080/Azure/RD/_workitems#_a=edit&id=3247094
+ //sampleEvents = new List();
+ //sampleEvents.Add(new EventData
+ // {
+ // EventDataId = "ac7d2ab5-698a-4c33-9c19-0a93d3d7f527",
+ // EventName = new LocalizableString { LocalizedValue = "Start request" },
+ // EventSource = new LocalizableString { LocalizedValue = "Microsoft Resources" },
+ // EventChannels = EventChannels.Operation,
+ // Level = EventLevel.Informational,
+ // EventTimestamp = DateTime.Now,
+ // OperationId = "c0f2e85f-efb0-47d0-bf90-f983ec8be91d",
+ // SubscriptionId = "c0f2e85f-efb0-47d0-bf90-f983ec8be91d",
+ // CorrelationId = "c0f2e85f-efb0-47d0-bf90-f983ec8be91d",
+ // OperationName =
+ // new LocalizableString
+ // {
+ // LocalizedValue = "Microsoft.Resources/subscriptions/resourcegroups/deployments/write"
+ // },
+ // Status = new LocalizableString { LocalizedValue = "Succeeded" },
+ // SubStatus = new LocalizableString { LocalizedValue = "Created" },
+ // ResourceGroupName = "foo",
+ // ResourceProviderName = new LocalizableString { LocalizedValue = "Microsoft Resources" },
+ // ResourceUri =
+ // "/subscriptions/ffce8037-a374-48bf-901d-dac4e3ea8c09/resourcegroups/foo/deployments/testdeploy",
+ // HttpRequest = new HttpRequestInfo
+ // {
+ // Uri =
+ // "http://path/subscriptions/ffce8037-a374-48bf-901d-dac4e3ea8c09/resourcegroups/foo/deployments/testdeploy",
+ // Method = "PUT",
+ // ClientRequestId = "1234",
+ // ClientIpAddress = "123.123.123.123"
+ // },
+ // Authorization = new SenderAuthorization
+ // {
+ // Action = "PUT",
+ // Condition = "",
+ // Role = "Sender",
+ // Scope = "None"
+ // },
+ // Claims = new Dictionary
+ // {
+ // {"aud", "https://management.core.windows.net/"},
+ // {"iss", "https://sts.windows.net/123456/"},
+ // {"iat", "h123445"},
+ // {"http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name", "info@mail.com"}
+ // },
+ // Properties = new Dictionary()
+ // });
+ //sampleEvents.Add(new EventData
+ //{
+ // EventDataId = "ac7d2ab5-698a-4c33-9c19-0sdfsdf34r54",
+ // EventName = new LocalizableString { LocalizedValue = "End request" },
+ // EventSource = new LocalizableString { LocalizedValue = "Microsoft Resources" },
+ // EventChannels = EventChannels.Operation,
+ // Level = EventLevel.Informational,
+ // EventTimestamp = DateTime.Now,
+ // OperationId = "c0f2e85f-efb0-47d0-bf90-f983ec8be91d",
+ // OperationName =
+ // new LocalizableString
+ // {
+ // LocalizedValue = "Microsoft.Resources/subscriptions/resourcegroups/deployments/write"
+ // },
+ // Status = new LocalizableString { LocalizedValue = "Succeeded" },
+ // SubStatus = new LocalizableString { LocalizedValue = "Created" },
+ // ResourceGroupName = "foo",
+ // ResourceProviderName = new LocalizableString { LocalizedValue = "Microsoft Resources" },
+ // ResourceUri =
+ // "/subscriptions/ffce8037-a374-48bf-901d-dac4e3ea8c09/resourcegroups/foo/deployments/testdeploy",
+ // HttpRequest = new HttpRequestInfo
+ // {
+ // Uri =
+ // "http://path/subscriptions/ffce8037-a374-48bf-901d-dac4e3ea8c09/resourcegroups/foo/deployments/testdeploy",
+ // Method = "PUT",
+ // ClientRequestId = "1234",
+ // ClientIpAddress = "123.123.123.123"
+ // },
+ // Authorization = new SenderAuthorization
+ // {
+ // Action = "PUT",
+ // Condition = "",
+ // Role = "Sender",
+ // Scope = "None"
+ // },
+ // Claims = new Dictionary
+ // {
+ // {"aud", "https://management.core.windows.net/"},
+ // {"iss", "https://sts.windows.net/123456/"},
+ // {"iat", "h123445"}
+ // },
+ // Properties = new Dictionary()
+ //});
}
[Fact]
@@ -771,7 +775,7 @@ public void RemoveResourceWithAllParametersSucceeds()
));
resourceOperationsMock.Setup(f => f.DeleteAsync(resourceGroupName, It.IsAny(), It.IsAny()))
- .Returns(Task.Factory.StartNew(() => new OperationResponse
+ .Returns(Task.Factory.StartNew(() => new AzureOperationResponse
{
RequestId = "123",
StatusCode = HttpStatusCode.OK
@@ -1915,155 +1919,159 @@ public void GetsResourceGroupsFilteredByTagsWithDetails()
Assert.Equal(1, groups4[0].Resources.Count());
}
- [Fact]
- [Trait(Category.AcceptanceType, Category.CheckIn)]
- public void GetAzureResourceGroupLogWithAllCallsListEventsForResourceGroup()
- {
- eventDataOperationsMock.Setup(f => f.ListEventsForResourceGroupAsync(It.IsAny(), new CancellationToken()))
- .Returns(Task.Factory.StartNew(() => new EventDataListResponse
- {
- EventDataCollection = new EventDataCollection
- {
- Value = sampleEvents
- }
- }));
-
- IEnumerable results = resourcesClient.GetResourceGroupLogs(new GetPSResourceGroupLogParameters
- {
- Name = "foo",
- All = true
- });
-
- Assert.Equal(2, results.Count());
- eventDataOperationsMock.Verify(f => f.ListEventsForResourceGroupAsync(It.IsAny(), It.IsAny()), Times.Once());
- }
-
- [Fact]
- [Trait(Category.AcceptanceType, Category.CheckIn)]
- public void GetAzureResourceGroupLogWithDeploymentCallsListEventsForCorrelationId()
- {
- deploymentsMock.Setup(
- f => f.GetAsync(resourceGroupName, deploymentName, new CancellationToken()))
- .Returns(Task.Factory.StartNew(() => new DeploymentGetResult
- {
- Deployment = new Deployment()
- {
- Name = deploymentName + 1,
- Properties = new DeploymentProperties()
- {
- Mode = DeploymentMode.Incremental,
- CorrelationId = "123",
- TemplateLink = new TemplateLink()
- {
- Uri = new Uri("http://microsoft1.com")
- }
- }
- }
- }));
-
- eventDataOperationsMock.Setup(f => f.ListEventsForCorrelationIdAsync(It.IsAny(), new CancellationToken()))
- .Returns(Task.Factory.StartNew(() => new EventDataListResponse
- {
- EventDataCollection = new EventDataCollection
- {
- Value = sampleEvents
- }
- }));
-
- IEnumerable results = resourcesClient.GetResourceGroupLogs(new GetPSResourceGroupLogParameters
- {
- Name = resourceGroupName,
- DeploymentName = deploymentName
- });
-
- Assert.Equal(2, results.Count());
- deploymentsMock.Verify(f => f.GetAsync(resourceGroupName, deploymentName, It.IsAny()), Times.Once());
- eventDataOperationsMock.Verify(f => f.ListEventsForCorrelationIdAsync(It.IsAny(), It.IsAny()), Times.Once());
- }
-
- [Fact]
- [Trait(Category.AcceptanceType, Category.CheckIn)]
- public void GetAzureResourceGroupLogWithLastDeploymentCallsListEventsForCorrelationId()
- {
- deploymentsMock.Setup(
- f => f.ListAsync(resourceGroupName, It.IsAny(), new CancellationToken()))
- .Returns(Task.Factory.StartNew(() => new DeploymentListResult
- {
- Deployments = new List()
- {
- new Deployment()
- {
- Name = deploymentName + 1,
- Properties = new DeploymentProperties()
- {
- Mode = DeploymentMode.Incremental,
- CorrelationId = "123",
- TemplateLink = new TemplateLink()
- {
- Uri = new Uri("http://microsoft1.com")
- }
- }
- }
- }
- }));
-
- eventDataOperationsMock.Setup(f => f.ListEventsForCorrelationIdAsync(It.IsAny(), new CancellationToken()))
- .Returns(Task.Factory.StartNew(() => new EventDataListResponse
- {
- EventDataCollection = new EventDataCollection
- {
- Value = sampleEvents
- }
- }));
-
- IEnumerable results = resourcesClient.GetResourceGroupLogs(new GetPSResourceGroupLogParameters
- {
- Name = resourceGroupName
- });
-
- Assert.Equal(2, results.Count());
- deploymentsMock.Verify(f => f.ListAsync(resourceGroupName, It.IsAny(), It.IsAny()), Times.Once());
- eventDataOperationsMock.Verify(f => f.ListEventsForCorrelationIdAsync(It.IsAny(), It.IsAny()), Times.Once());
- }
-
- [Fact]
- [Trait(Category.AcceptanceType, Category.CheckIn)]
- public void GetAzureResourceGroupLogReturnsAllRequiredFields()
- {
- eventDataOperationsMock.Setup(f => f.ListEventsForResourceGroupAsync(It.IsAny(), new CancellationToken()))
- .Returns(Task.Factory.StartNew(() => new EventDataListResponse
- {
- EventDataCollection = new EventDataCollection
- {
- Value = sampleEvents
- }
- }));
-
- IEnumerable results = resourcesClient.GetResourceGroupLogs(new GetPSResourceGroupLogParameters
- {
- Name = "foo",
- All = true
- });
-
- Assert.Equal(2, results.Count());
- var first = results.First();
- Assert.NotNull(first.Authorization);
- Assert.NotNull(first.ResourceUri);
- Assert.NotNull(first.SubscriptionId);
- Assert.NotNull(first.Timestamp);
- Assert.NotNull(first.OperationName);
- Assert.NotNull(first.OperationId);
- Assert.NotNull(first.Status);
- Assert.NotNull(first.SubStatus);
- Assert.NotNull(first.Caller);
- Assert.NotNull(first.CorrelationId);
- Assert.NotNull(first.HttpRequest);
- Assert.NotNull(first.Level);
- Assert.NotNull(first.ResourceGroupName);
- Assert.NotNull(first.ResourceProvider);
- Assert.NotNull(first.EventSource);
- Assert.NotNull(first.PropertiesText);
- }
+ // TODO: http://vstfrd:8080/Azure/RD/_workitems#_a=edit&id=3247094
+ //[Fact]
+ //[Trait(Category.AcceptanceType, Category.CheckIn)]
+ //public void GetAzureResourceGroupLogWithAllCallsListEventsForResourceGroup()
+ //{
+ // eventDataOperationsMock.Setup(f => f.ListEventsForResourceGroupAsync(It.IsAny(), new CancellationToken()))
+ // .Returns(Task.Factory.StartNew(() => new EventDataListResponse
+ // {
+ // EventDataCollection = new EventDataCollection
+ // {
+ // Value = sampleEvents
+ // }
+ // }));
+
+ // IEnumerable results = resourcesClient.GetResourceGroupLogs(new GetPSResourceGroupLogParameters
+ // {
+ // Name = "foo",
+ // All = true
+ // });
+
+ // Assert.Equal(2, results.Count());
+ // eventDataOperationsMock.Verify(f => f.ListEventsForResourceGroupAsync(It.IsAny(), It.IsAny()), Times.Once());
+ //}
+
+ // TODO: http://vstfrd:8080/Azure/RD/_workitems#_a=edit&id=3247094
+ //[Fact]
+ //[Trait(Category.AcceptanceType, Category.CheckIn)]
+ //public void GetAzureResourceGroupLogWithDeploymentCallsListEventsForCorrelationId()
+ //{
+ // deploymentsMock.Setup(
+ // f => f.GetAsync(resourceGroupName, deploymentName, new CancellationToken()))
+ // .Returns(Task.Factory.StartNew(() => new DeploymentGetResult
+ // {
+ // Deployment = new Deployment()
+ // {
+ // Name = deploymentName + 1,
+ // Properties = new DeploymentProperties()
+ // {
+ // Mode = DeploymentMode.Incremental,
+ // CorrelationId = "123",
+ // TemplateLink = new TemplateLink()
+ // {
+ // Uri = new Uri("http://microsoft1.com")
+ // }
+ // }
+ // }
+ // }));
+
+ // eventDataOperationsMock.Setup(f => f.ListEventsForCorrelationIdAsync(It.IsAny(), new CancellationToken()))
+ // .Returns(Task.Factory.StartNew(() => new EventDataListResponse
+ // {
+ // EventDataCollection = new EventDataCollection
+ // {
+ // Value = sampleEvents
+ // }
+ // }));
+
+ // IEnumerable results = resourcesClient.GetResourceGroupLogs(new GetPSResourceGroupLogParameters
+ // {
+ // Name = resourceGroupName,
+ // DeploymentName = deploymentName
+ // });
+
+ // Assert.Equal(2, results.Count());
+ // deploymentsMock.Verify(f => f.GetAsync(resourceGroupName, deploymentName, It.IsAny()), Times.Once());
+ // eventDataOperationsMock.Verify(f => f.ListEventsForCorrelationIdAsync(It.IsAny(), It.IsAny()), Times.Once());
+ //}
+
+ // TODO: http://vstfrd:8080/Azure/RD/_workitems#_a=edit&id=3247094
+ //[Fact]
+ //[Trait(Category.AcceptanceType, Category.CheckIn)]
+ //public void GetAzureResourceGroupLogWithLastDeploymentCallsListEventsForCorrelationId()
+ //{
+ // deploymentsMock.Setup(
+ // f => f.ListAsync(resourceGroupName, It.IsAny(), new CancellationToken()))
+ // .Returns(Task.Factory.StartNew(() => new DeploymentListResult
+ // {
+ // Deployments = new List()
+ // {
+ // new Deployment()
+ // {
+ // Name = deploymentName + 1,
+ // Properties = new DeploymentProperties()
+ // {
+ // Mode = DeploymentMode.Incremental,
+ // CorrelationId = "123",
+ // TemplateLink = new TemplateLink()
+ // {
+ // Uri = new Uri("http://microsoft1.com")
+ // }
+ // }
+ // }
+ // }
+ // }));
+
+ // eventDataOperationsMock.Setup(f => f.ListEventsForCorrelationIdAsync(It.IsAny(), new CancellationToken()))
+ // .Returns(Task.Factory.StartNew(() => new EventDataListResponse
+ // {
+ // EventDataCollection = new EventDataCollection
+ // {
+ // Value = sampleEvents
+ // }
+ // }));
+
+ // IEnumerable results = resourcesClient.GetResourceGroupLogs(new GetPSResourceGroupLogParameters
+ // {
+ // Name = resourceGroupName
+ // });
+
+ // Assert.Equal(2, results.Count());
+ // deploymentsMock.Verify(f => f.ListAsync(resourceGroupName, It.IsAny(), It.IsAny()), Times.Once());
+ // eventDataOperationsMock.Verify(f => f.ListEventsForCorrelationIdAsync(It.IsAny(), It.IsAny()), Times.Once());
+ //}
+
+ // TODO: http://vstfrd:8080/Azure/RD/_workitems#_a=edit&id=3247094
+ //[Fact]
+ //[Trait(Category.AcceptanceType, Category.CheckIn)]
+ //public void GetAzureResourceGroupLogReturnsAllRequiredFields()
+ //{
+ // eventDataOperationsMock.Setup(f => f.ListEventsForResourceGroupAsync(It.IsAny(), new CancellationToken()))
+ // .Returns(Task.Factory.StartNew(() => new EventDataListResponse
+ // {
+ // EventDataCollection = new EventDataCollection
+ // {
+ // Value = sampleEvents
+ // }
+ // }));
+
+ // IEnumerable results = resourcesClient.GetResourceGroupLogs(new GetPSResourceGroupLogParameters
+ // {
+ // Name = "foo",
+ // All = true
+ // });
+
+ // Assert.Equal(2, results.Count());
+ // var first = results.First();
+ // Assert.NotNull(first.Authorization);
+ // Assert.NotNull(first.ResourceUri);
+ // Assert.NotNull(first.SubscriptionId);
+ // Assert.NotNull(first.Timestamp);
+ // Assert.NotNull(first.OperationName);
+ // Assert.NotNull(first.OperationId);
+ // Assert.NotNull(first.Status);
+ // Assert.NotNull(first.SubStatus);
+ // Assert.NotNull(first.Caller);
+ // Assert.NotNull(first.CorrelationId);
+ // Assert.NotNull(first.HttpRequest);
+ // Assert.NotNull(first.Level);
+ // Assert.NotNull(first.ResourceGroupName);
+ // Assert.NotNull(first.ResourceProvider);
+ // Assert.NotNull(first.EventSource);
+ // Assert.NotNull(first.PropertiesText);
+ //}
[Fact]
[Trait(Category.AcceptanceType, Category.CheckIn)]
diff --git a/src/ResourceManager/Resources/Commands.Resources.Test/ResourceGroups/GetAzureResourceGroupLogCommandTests.cs b/src/ResourceManager/Resources/Commands.Resources.Test/ResourceGroups/GetAzureResourceGroupLogCommandTests.cs
index dd459b316374..9428c416b372 100644
--- a/src/ResourceManager/Resources/Commands.Resources.Test/ResourceGroups/GetAzureResourceGroupLogCommandTests.cs
+++ b/src/ResourceManager/Resources/Commands.Resources.Test/ResourceGroups/GetAzureResourceGroupLogCommandTests.cs
@@ -42,62 +42,63 @@ public GetAzureResourceGroupLogCommandTests()
};
}
- [Fact]
- [Trait(Category.AcceptanceType, Category.CheckIn)]
- public void GetAzureResourceGroupLogOutputsProperties()
- {
- List result = new List();
- result.Add(new PSDeploymentEventData
- {
- EventId = "ac7d2ab5-698a-4c33-9c19-0a93d3d7f527",
- EventName = "Start request",
- EventSource = "Microsoft Resources",
- Channels = "Operation",
- Level = "Informational",
- Timestamp = DateTime.Now,
- OperationId = "c0f2e85f-efb0-47d0-bf90-f983ec8be91d",
- OperationName = "Microsoft.Resources/subscriptions/resourcegroups/deployments/write",
- Status = "Succeeded",
- SubStatus = "Created",
- ResourceGroupName = "foo",
- ResourceProvider = "Microsoft Resources",
- ResourceUri =
- "/subscriptions/ffce8037-a374-48bf-901d-dac4e3ea8c09/resourcegroups/foo/deployments/testdeploy",
- HttpRequest = new PSDeploymentEventDataHttpRequest
- {
- Url = "http://path/subscriptions/ffce8037-a374-48bf-901d-dac4e3ea8c09/resourcegroups/foo/deployments/testdeploy",
- Method = "PUT",
- ClientId = "1234",
- ClientIpAddress = "123.123.123.123"
- },
- Authorization = new PSDeploymentEventDataAuthorization
- {
- Action = "PUT",
- Condition = "",
- Role = "Sender",
- Scope = "None"
- },
- Claims = new Dictionary
- {
- {"aud", "https://management.core.windows.net/"},
- {"iss", "https://sts.windows.net/123456/"},
- {"iat", "h123445"}
- },
- Properties = new Dictionary()
- });
+ // TODO: http://vstfrd:8080/Azure/RD/_workitems#_a=edit&id=3247094
+ //[Fact]
+ //[Trait(Category.AcceptanceType, Category.CheckIn)]
+ //public void GetAzureResourceGroupLogOutputsProperties()
+ //{
+ // List result = new List();
+ // result.Add(new PSDeploymentEventData
+ // {
+ // EventId = "ac7d2ab5-698a-4c33-9c19-0a93d3d7f527",
+ // EventName = "Start request",
+ // EventSource = "Microsoft Resources",
+ // Channels = "Operation",
+ // Level = "Informational",
+ // Timestamp = DateTime.Now,
+ // OperationId = "c0f2e85f-efb0-47d0-bf90-f983ec8be91d",
+ // OperationName = "Microsoft.Resources/subscriptions/resourcegroups/deployments/write",
+ // Status = "Succeeded",
+ // SubStatus = "Created",
+ // ResourceGroupName = "foo",
+ // ResourceProvider = "Microsoft Resources",
+ // ResourceUri =
+ // "/subscriptions/ffce8037-a374-48bf-901d-dac4e3ea8c09/resourcegroups/foo/deployments/testdeploy",
+ // HttpRequest = new PSDeploymentEventDataHttpRequest
+ // {
+ // Url = "http://path/subscriptions/ffce8037-a374-48bf-901d-dac4e3ea8c09/resourcegroups/foo/deployments/testdeploy",
+ // Method = "PUT",
+ // ClientId = "1234",
+ // ClientIpAddress = "123.123.123.123"
+ // },
+ // Authorization = new PSDeploymentEventDataAuthorization
+ // {
+ // Action = "PUT",
+ // Condition = "",
+ // Role = "Sender",
+ // Scope = "None"
+ // },
+ // Claims = new Dictionary
+ // {
+ // {"aud", "https://management.core.windows.net/"},
+ // {"iss", "https://sts.windows.net/123456/"},
+ // {"iat", "h123445"}
+ // },
+ // Properties = new Dictionary()
+ // });
- GetPSResourceGroupLogParameters expected = new GetPSResourceGroupLogParameters();
+ // GetPSResourceGroupLogParameters expected = new GetPSResourceGroupLogParameters();
- resourcesClientMock.Setup(f => f.GetResourceGroupLogs(It.IsAny()))
- .Returns(result)
- .Callback((GetPSResourceGroupLogParameters r) => expected = r);
+ // resourcesClientMock.Setup(f => f.GetResourceGroupLogs(It.IsAny()))
+ // .Returns(result)
+ // .Callback((GetPSResourceGroupLogParameters r) => expected = r);
- cmdlet.Name = "foo";
+ // cmdlet.Name = "foo";
- cmdlet.ExecuteCmdlet();
+ // cmdlet.ExecuteCmdlet();
- Assert.Equal(1, result.Count());
- Assert.Equal("foo", expected.Name);
- }
+ // Assert.Equal(1, result.Count());
+ // Assert.Equal("foo", expected.Name);
+ //}
}
}
diff --git a/src/ResourceManager/Resources/Commands.Resources.Test/ScenarioTests/ActiveDirectoryTests.cs b/src/ResourceManager/Resources/Commands.Resources.Test/ScenarioTests/ActiveDirectoryTests.cs
index a338336cb3ec..a61ecdc754da 100644
--- a/src/ResourceManager/Resources/Commands.Resources.Test/ScenarioTests/ActiveDirectoryTests.cs
+++ b/src/ResourceManager/Resources/Commands.Resources.Test/ScenarioTests/ActiveDirectoryTests.cs
@@ -15,7 +15,7 @@
using Microsoft.Azure.Graph.RBAC;
using Microsoft.Azure.Graph.RBAC.Models;
using Microsoft.WindowsAzure.Commands.ScenarioTest;
-using Microsoft.WindowsAzure.Testing;
+using Microsoft.Azure.Test;
using System.Linq;
using Xunit;
diff --git a/src/ResourceManager/Resources/Commands.Resources.Test/ScenarioTests/Common.ps1 b/src/ResourceManager/Resources/Commands.Resources.Test/ScenarioTests/Common.ps1
index 674f8e1cf9d9..14b012f54a5c 100644
--- a/src/ResourceManager/Resources/Commands.Resources.Test/ScenarioTests/Common.ps1
+++ b/src/ResourceManager/Resources/Commands.Resources.Test/ScenarioTests/Common.ps1
@@ -50,7 +50,7 @@ Cleans the created resource groups
#>
function Clean-ResourceGroup($rgname)
{
- if ([Microsoft.Azure.Utilities.HttpRecorder.HttpMockServer]::Mode -ne [Microsoft.Azure.Utilities.HttpRecorder.HttpRecorderMode]::Playback) {
+ if ([Microsoft.Azure.Test.HttpRecorder.HttpMockServer]::Mode -ne [Microsoft.Azure.Test.HttpRecorder.HttpRecorderMode]::Playback) {
Remove-AzureResourceGroup -Name $rgname -Force
}
}
\ No newline at end of file
diff --git a/src/ResourceManager/Resources/Commands.Resources.Test/ScenarioTests/ResourcesController.cs b/src/ResourceManager/Resources/Commands.Resources.Test/ScenarioTests/ResourcesController.cs
index 3174a07ce596..d1cb7415a4f6 100644
--- a/src/ResourceManager/Resources/Commands.Resources.Test/ScenarioTests/ResourcesController.cs
+++ b/src/ResourceManager/Resources/Commands.Resources.Test/ScenarioTests/ResourcesController.cs
@@ -18,11 +18,10 @@
using Microsoft.Azure.Management.Authorization;
using Microsoft.Azure.Management.Resources;
using Microsoft.Azure.Subscriptions;
-using Microsoft.Azure.Utilities.HttpRecorder;
+using Microsoft.Azure.Test.HttpRecorder;
using Microsoft.WindowsAzure.Commands.ScenarioTest;
using Microsoft.WindowsAzure.Commands.Utilities.Common;
-using Microsoft.WindowsAzure.Management.Monitoring.Events;
-using Microsoft.WindowsAzure.Testing;
+using Microsoft.Azure.Test;
using System;
using System.Linq;
@@ -43,7 +42,8 @@ public sealed class ResourcesController
public GalleryClient GalleryClient { get; private set; }
- public EventsClient EventsClient { get; private set; }
+ // TODO: http://vstfrd:8080/Azure/RD/_workitems#_a=edit&id=3247094
+ //public EventsClient EventsClient { get; private set; }
public AuthorizationManagementClient AuthorizationManagementClient { get; private set; }
@@ -134,14 +134,12 @@ private void SetupManagementClients()
ResourceManagementClient = GetResourceManagementClient();
SubscriptionClient = GetSubscriptionClient();
GalleryClient = GetGalleryClient();
- EventsClient = GetEventsClient();
AuthorizationManagementClient = GetAuthorizationManagementClient();
GraphClient = GetGraphClient();
helper.SetupManagementClients(ResourceManagementClient,
SubscriptionClient,
GalleryClient,
- EventsClient,
AuthorizationManagementClient,
GraphClient);
}
@@ -194,10 +192,5 @@ private GalleryClient GetGalleryClient()
return TestBase.GetServiceClient(this.csmTestFactory);
}
- private EventsClient GetEventsClient()
- {
- return TestBase.GetServiceClient(this.csmTestFactory);
- }
-
}
}
diff --git a/src/ResourceManager/Resources/Commands.Resources.Test/ScenarioTests/RoleAssignmentTests.cs b/src/ResourceManager/Resources/Commands.Resources.Test/ScenarioTests/RoleAssignmentTests.cs
index 0b0fa4aa676c..6f9470f7193d 100644
--- a/src/ResourceManager/Resources/Commands.Resources.Test/ScenarioTests/RoleAssignmentTests.cs
+++ b/src/ResourceManager/Resources/Commands.Resources.Test/ScenarioTests/RoleAssignmentTests.cs
@@ -19,10 +19,9 @@
using Microsoft.Azure.Management.Authorization.Models;
using Microsoft.Azure.Management.Resources;
using Microsoft.Azure.Management.Resources.Models;
-using Microsoft.Azure.Utilities.HttpRecorder;
+using Microsoft.Azure.Test.HttpRecorder;
using Microsoft.WindowsAzure.Commands.ScenarioTest;
-using Microsoft.WindowsAzure.Testing;
-using Microsoft.WindowsAzure.Testing.TestCategories;
+using Microsoft.Azure.Test;
using System;
using System.Linq;
using Xunit;
diff --git a/src/ResourceManager/Resources/Commands.Resources.Test/packages.config b/src/ResourceManager/Resources/Commands.Resources.Test/packages.config
index 39350fefc378..375cb21be8bf 100644
--- a/src/ResourceManager/Resources/Commands.Resources.Test/packages.config
+++ b/src/ResourceManager/Resources/Commands.Resources.Test/packages.config
@@ -1,20 +1,22 @@
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
-
-
-
+
+
diff --git a/src/ResourceManager/Resources/Commands.Resources/Commands.Resources.csproj b/src/ResourceManager/Resources/Commands.Resources/Commands.Resources.csproj
index fa7b88269758..d5d8b4229fc8 100644
--- a/src/ResourceManager/Resources/Commands.Resources/Commands.Resources.csproj
+++ b/src/ResourceManager/Resources/Commands.Resources/Commands.Resources.csproj
@@ -48,25 +48,34 @@
false
-
+
+ ..\..\..\packages\Hyak.Common.1.0.1\lib\portable-net403+win+wpa81\Hyak.Common.dll
+
+
+ ..\..\..\packages\Microsoft.Azure.Common.2.0.1\lib\net45\Microsoft.Azure.Common.dll
+
+
False
- ..\..\..\packages\Microsoft.Azure.Gallery.2.2.0-preview\lib\net40\Microsoft.Azure.Gallery.dll
+ ..\..\..\packages\Microsoft.Azure.Common.Extensions.0.13.0-preview\lib\net45\Microsoft.Azure.Common.Extensions.dll
-
+
+ ..\..\..\packages\Microsoft.Azure.Common.2.0.1\lib\net45\Microsoft.Azure.Common.NetFramework.dll
+
+
False
- ..\..\..\packages\Microsoft.Azure.Graph.RBAC.1.4.0-preview\lib\net40\Microsoft.Azure.Graph.RBAC.dll
+ ..\..\..\packages\Microsoft.Azure.Gallery.2.6.0-preview\lib\net40\Microsoft.Azure.Gallery.dll
-
+
False
- ..\..\..\packages\Microsoft.Azure.Management.Authorization.0.11.0-preview\lib\net40\Microsoft.Azure.Management.Authorization.dll
+ ..\..\..\packages\Microsoft.Azure.Graph.RBAC.1.6.0-preview\lib\net40\Microsoft.Azure.Graph.RBAC.dll
-
+
False
- ..\..\..\packages\Microsoft.Azure.Monitoring.2.2.0-preview\lib\net40\Microsoft.Azure.Monitoring.dll
+ ..\..\..\packages\Microsoft.Azure.Management.Authorization.0.16.0-preview\lib\net40\Microsoft.Azure.Management.Authorization.dll
False
- ..\..\..\packages\Microsoft.Azure.Management.Resources.2.7.0-preview\lib\net40\Microsoft.Azure.ResourceManager.dll
+ ..\..\..\packages\Microsoft.Azure.Management.Resources.2.12.0-preview\lib\net40\Microsoft.Azure.ResourceManager.dll
False
@@ -88,13 +97,9 @@
False
..\..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.Desktop.dll
-
+
False
- ..\..\..\packages\Microsoft.WindowsAzure.Common.1.4.1\lib\net45\Microsoft.WindowsAzure.Common.dll
-
-
- False
- ..\..\..\packages\Microsoft.WindowsAzure.Common.1.4.1\lib\net45\Microsoft.WindowsAzure.Common.NetFramework.dll
+ ..\..\..\packages\Microsoft.WindowsAzure.Management.4.0.0\lib\net40\Microsoft.WindowsAzure.Management.dll
..\..\..\packages\Newtonsoft.Json.6.0.4\lib\net45\Newtonsoft.Json.dll
@@ -210,10 +215,6 @@
-
- {b95c489c-8cb7-4dcf-8d5f-b9aebdbbaf89}
- Common.Extensions
-
{5ee72c53-1720-4309-b54b-5fb79703195f}
Commands.Common
diff --git a/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/GalleryTemplatesClient.cs b/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/GalleryTemplatesClient.cs
index 8b887a0e560b..d1946901f9b6 100644
--- a/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/GalleryTemplatesClient.cs
+++ b/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/GalleryTemplatesClient.cs
@@ -22,17 +22,17 @@
using System.Security;
using System.Text;
using System.Text.RegularExpressions;
-
using Microsoft.Azure.Gallery;
using Microsoft.Azure.Gallery.Models;
using Microsoft.WindowsAzure;
using Microsoft.WindowsAzure.Commands.Common;
using Microsoft.Azure.Common.Extensions.Models;
using Microsoft.WindowsAzure.Commands.Utilities.Common;
-using Microsoft.WindowsAzure.Common.OData;
using Newtonsoft.Json;
using ProjectResources = Microsoft.Azure.Commands.Resources.Properties.Resources;
using Microsoft.Azure.Common.Extensions;
+using Hyak.Common;
+using Microsoft.Azure.Common.OData;
namespace Microsoft.Azure.Commands.Resources.Models
{
diff --git a/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/ResourceClient.Events.cs b/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/ResourceClient.Events.cs
index dd7ff94dbb7c..32ef8ae93f8d 100644
--- a/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/ResourceClient.Events.cs
+++ b/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/ResourceClient.Events.cs
@@ -12,92 +12,93 @@
// limitations under the License.
// ----------------------------------------------------------------------------------
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using Microsoft.Azure.Management.Resources;
-using Microsoft.Azure.Management.Resources.Models;
-using Microsoft.WindowsAzure.Management.Monitoring.Events;
-using Microsoft.WindowsAzure.Management.Monitoring.Events.Models;
-using ProjectResources = Microsoft.Azure.Commands.Resources.Properties.Resources;
+// TODO: http://vstfrd:8080/Azure/RD/_workitems#_a=edit&id=3247094
+//using System;
+//using System.Collections.Generic;
+//using System.Linq;
+//using Microsoft.Azure.Management.Resources;
+//using Microsoft.Azure.Management.Resources.Models;
+//using ProjectResources = Microsoft.Azure.Commands.Resources.Properties.Resources;
+//using Microsoft.Azure.Insights.Models;
+//using Microsoft.Azure.Insights;
-namespace Microsoft.Azure.Commands.Resources.Models
-{
- public partial class ResourcesClient
- {
- private const int EventRetentionPeriod = 89;
+//namespace Microsoft.Azure.Commands.Resources.Models
+//{
+// public partial class ResourcesClient
+// {
+// private const int EventRetentionPeriod = 89;
- ///
- /// Gets event logs.
- ///
- /// Input parameters
- /// Logs.
- public virtual IEnumerable GetResourceGroupLogs(GetPSResourceGroupLogParameters parameters)
- {
- if (parameters.All)
- {
- EventDataListResponse listOfEvents =
- EventsClient.EventData.ListEventsForResourceGroup(new ListEventsForResourceGroupParameters
- {
- ResourceGroupName = parameters.Name,
- StartTime = DateTime.UtcNow - TimeSpan.FromDays(EventRetentionPeriod),
- EndTime = DateTime.UtcNow
- });
- return listOfEvents.EventDataCollection.Value.Select(e => e.ToPSDeploymentEventData());
- }
- else if (!string.IsNullOrEmpty(parameters.DeploymentName))
- {
- DeploymentGetResult deploymentGetResult;
- try
- {
- deploymentGetResult = ResourceManagementClient.Deployments.Get(parameters.Name,
- parameters.DeploymentName);
- }
- catch
- {
- throw new ArgumentException(string.Format(ProjectResources.DeploymentWithNameNotFound, parameters.DeploymentName));
- }
+// ///
+// /// Gets event logs.
+// ///
+// /// Input parameters
+// /// Logs.
+// public virtual IEnumerable GetResourceGroupLogs(GetPSResourceGroupLogParameters parameters)
+// {
+// if (parameters.All)
+// {
+// EventDataListResponse listOfEvents =
+// EventsClient.EventData.ListEventsForResourceGroup(new ListEventsForResourceGroupParameters
+// {
+// ResourceGroupName = parameters.Name,
+// StartTime = DateTime.UtcNow - TimeSpan.FromDays(EventRetentionPeriod),
+// EndTime = DateTime.UtcNow
+// });
+// return listOfEvents.EventDataCollection.Value.Select(e => e.ToPSDeploymentEventData());
+// }
+// else if (!string.IsNullOrEmpty(parameters.DeploymentName))
+// {
+// DeploymentGetResult deploymentGetResult;
+// try
+// {
+// deploymentGetResult = ResourceManagementClient.Deployments.Get(parameters.Name,
+// parameters.DeploymentName);
+// }
+// catch
+// {
+// throw new ArgumentException(string.Format(ProjectResources.DeploymentWithNameNotFound, parameters.DeploymentName));
+// }
- return GetDeploymentLogs(deploymentGetResult.Deployment.Properties.CorrelationId);
- }
- else
- {
- DeploymentListResult deploymentListResult;
- try
- {
- deploymentListResult = ResourceManagementClient.Deployments.List(parameters.Name,
- new DeploymentListParameters
- {
- Top = 1
- });
- if (deploymentListResult.Deployments.Count == 0)
- {
- throw new ArgumentException(string.Format(ProjectResources.NoDeploymentWereFound, parameters.Name));
- }
- }
- catch
- {
- throw new ArgumentException(string.Format(ProjectResources.NoDeploymentWereFound, parameters.Name));
- }
+// return GetDeploymentLogs(deploymentGetResult.Deployment.Properties.CorrelationId);
+// }
+// else
+// {
+// DeploymentListResult deploymentListResult;
+// try
+// {
+// deploymentListResult = ResourceManagementClient.Deployments.List(parameters.Name,
+// new DeploymentListParameters
+// {
+// Top = 1
+// });
+// if (deploymentListResult.Deployments.Count == 0)
+// {
+// throw new ArgumentException(string.Format(ProjectResources.NoDeploymentWereFound, parameters.Name));
+// }
+// }
+// catch
+// {
+// throw new ArgumentException(string.Format(ProjectResources.NoDeploymentWereFound, parameters.Name));
+// }
- return GetDeploymentLogs(deploymentListResult.Deployments[0].Properties.CorrelationId);
- }
- }
+// return GetDeploymentLogs(deploymentListResult.Deployments[0].Properties.CorrelationId);
+// }
+// }
- ///
- /// Gets event logs by tracking Id.
- ///
- /// CorrelationId Id of the deployment
- /// Logs.
- public virtual IEnumerable GetDeploymentLogs(string correlationId)
- {
- EventDataListResponse listOfEvents = EventsClient.EventData.ListEventsForCorrelationId(new ListEventsForCorrelationIdParameters
- {
- CorrelationId = correlationId,
- StartTime = DateTime.UtcNow - TimeSpan.FromDays(EventRetentionPeriod),
- EndTime = DateTime.UtcNow
- });
- return listOfEvents.EventDataCollection.Value.Select(e => e.ToPSDeploymentEventData());
- }
- }
-}
\ No newline at end of file
+// ///
+// /// Gets event logs by tracking Id.
+// ///
+// /// CorrelationId Id of the deployment
+// /// Logs.
+// public virtual IEnumerable GetDeploymentLogs(string correlationId)
+// {
+// EventDataListResponse listOfEvents = EventsClient.EventData.ListEventsForCorrelationId(new ListEventsForCorrelationIdParameters
+// {
+// CorrelationId = correlationId,
+// StartTime = DateTime.UtcNow - TimeSpan.FromDays(EventRetentionPeriod),
+// EndTime = DateTime.UtcNow
+// });
+// return listOfEvents.EventDataCollection.Value.Select(e => e.ToPSDeploymentEventData());
+// }
+// }
+//}
\ No newline at end of file
diff --git a/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/ResourceClient.ResourceManager.cs b/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/ResourceClient.ResourceManager.cs
index 999112c845b5..be43aa799efa 100644
--- a/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/ResourceClient.ResourceManager.cs
+++ b/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/ResourceClient.ResourceManager.cs
@@ -22,6 +22,7 @@
using Microsoft.Azure.Management.Resources.Models;
using Microsoft.WindowsAzure;
using ProjectResources = Microsoft.Azure.Commands.Resources.Properties.Resources;
+using Hyak.Common;
namespace Microsoft.Azure.Commands.Resources.Models
{
diff --git a/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/ResourceClient.cs b/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/ResourceClient.cs
index 6d93e9741201..68228bb5b593 100644
--- a/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/ResourceClient.cs
+++ b/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/ResourceClient.cs
@@ -26,7 +26,6 @@
using Microsoft.WindowsAzure.Commands.Common;
using Microsoft.Azure.Common.Extensions.Models;
using Microsoft.WindowsAzure.Commands.Utilities.Common;
-using Microsoft.WindowsAzure.Management.Monitoring.Events;
using Newtonsoft.Json;
using ProjectResources = Microsoft.Azure.Commands.Resources.Properties.Resources;
using Microsoft.Azure.Management.Authorization;
@@ -34,6 +33,7 @@
using Microsoft.Azure.Commands.Resources.Models.Authorization;
using System.Diagnostics;
using Microsoft.Azure.Common.Extensions;
+using Hyak.Common;
namespace Microsoft.Azure.Commands.Resources.Models
{
@@ -50,7 +50,8 @@ public partial class ResourcesClient
public GalleryTemplatesClient GalleryTemplatesClient { get; set; }
- public IEventsClient EventsClient { get; set; }
+ // TODO: http://vstfrd:8080/Azure/RD/_workitems#_a=edit&id=3247094
+ //public IEventsClient EventsClient { get; set; }
public Action VerboseLogger { get; set; }
@@ -66,7 +67,8 @@ public ResourcesClient(AzureContext context)
: this(
AzureSession.ClientFactory.CreateClient(context, AzureEnvironment.Endpoint.ResourceManager),
new GalleryTemplatesClient(context),
- AzureSession.ClientFactory.CreateClient(context, AzureEnvironment.Endpoint.ResourceManager),
+ // TODO: http://vstfrd:8080/Azure/RD/_workitems#_a=edit&id=3247094
+ //AzureSession.ClientFactory.CreateClient(context, AzureEnvironment.Endpoint.ResourceManager),
AzureSession.ClientFactory.CreateClient(context, AzureEnvironment.Endpoint.ResourceManager))
{
@@ -81,12 +83,15 @@ public ResourcesClient(AzureContext context)
public ResourcesClient(
IResourceManagementClient resourceManagementClient,
GalleryTemplatesClient galleryTemplatesClient,
- IEventsClient eventsClient,
+ // TODO: http://vstfrd:8080/Azure/RD/_workitems#_a=edit&id=3247094
+ //IEventsClient eventsClient,
IAuthorizationManagementClient authorizationManagementClient)
{
ResourceManagementClient = resourceManagementClient;
GalleryTemplatesClient = galleryTemplatesClient;
- EventsClient = eventsClient;
+
+ // TODO: http://vstfrd:8080/Azure/RD/_workitems#_a=edit&id=3247094
+ //EventsClient = eventsClient;
AuthorizationManagementClient = authorizationManagementClient;
}
diff --git a/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/ResourceIdentifier.cs b/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/ResourceIdentifier.cs
index a54c06a88290..37c761b2511c 100644
--- a/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/ResourceIdentifier.cs
+++ b/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/ResourceIdentifier.cs
@@ -15,9 +15,9 @@
using System;
using System.Collections.Generic;
using System.Text;
-using AuthorizationResourceIdentity = Microsoft.Azure.Management.Authorization.Models.ResourceIdentity;
+using AuthorizationResourceIdentity = Microsoft.Azure.ResourceIdentity;
using ProjectResources = Microsoft.Azure.Commands.Resources.Properties.Resources;
-using ResourcesResourceIdentity = Microsoft.Azure.Management.Resources.Models.ResourceIdentity;
+using ResourcesResourceIdentity = Microsoft.Azure.ResourceIdentity;
namespace Microsoft.Azure.Commands.Resources.Models
{
diff --git a/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/ResourceWithParameterBaseCmdlet.cs b/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/ResourceWithParameterBaseCmdlet.cs
index bba855dffd90..bed68542d78a 100644
--- a/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/ResourceWithParameterBaseCmdlet.cs
+++ b/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/ResourceWithParameterBaseCmdlet.cs
@@ -23,6 +23,7 @@
using Microsoft.WindowsAzure.Commands.Utilities.Common;
using Microsoft.Azure.Commands.Resources.Models;
using Microsoft.Azure.Common.Extensions;
+using Hyak.Common;
namespace Microsoft.Azure.Commands.Resources
{
diff --git a/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/ResourcesExtensions.cs b/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/ResourcesExtensions.cs
index 2624717f4f1b..1d8f98b411f2 100644
--- a/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/ResourcesExtensions.cs
+++ b/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/ResourcesExtensions.cs
@@ -22,7 +22,6 @@
using Microsoft.Azure.Gallery;
using Microsoft.Azure.Management.Resources.Models;
using Microsoft.WindowsAzure.Commands.Utilities.Common;
-using Microsoft.WindowsAzure.Management.Monitoring.Events.Models;
using Newtonsoft.Json;
using Microsoft.Azure.Commands.Resources.Models.Authorization;
using Microsoft.Azure.Management.Authorization.Models;
@@ -137,70 +136,73 @@ public static PSGalleryItem ToPSGalleryItem(this GalleryItem gallery)
return psGalleryItem;
}
- public static PSDeploymentEventData ToPSDeploymentEventData(this EventData eventData)
- {
- if (eventData == null)
- {
- return null;
- }
- PSDeploymentEventData psObject = new PSDeploymentEventData
- {
- Authorization = eventData.Authorization.ToPSDeploymentEventDataAuthorization(),
- ResourceUri = eventData.ResourceUri,
- SubscriptionId = eventData.SubscriptionId,
- EventId = eventData.EventDataId,
- EventName = eventData.EventName.LocalizedValue,
- EventSource = eventData.EventSource.LocalizedValue,
- Channels = eventData.EventChannels.ToString(),
- Level = eventData.Level.ToString(),
- Description = eventData.Description,
- Timestamp = eventData.EventTimestamp,
- OperationId = eventData.OperationId,
- OperationName = eventData.OperationName.LocalizedValue,
- Status = eventData.Status.LocalizedValue,
- SubStatus = eventData.SubStatus.LocalizedValue,
- Caller = GetEventDataCaller(eventData.Claims),
- CorrelationId = eventData.CorrelationId,
- ResourceGroupName = eventData.ResourceGroupName,
- ResourceProvider = eventData.ResourceProviderName.LocalizedValue,
- HttpRequest = eventData.HttpRequest.ToPSDeploymentEventDataHttpRequest(),
- Claims = eventData.Claims,
- Properties = eventData.Properties
- };
- return psObject;
- }
-
- public static PSDeploymentEventDataHttpRequest ToPSDeploymentEventDataHttpRequest(this HttpRequestInfo httpRequest)
- {
- if (httpRequest == null)
- {
- return null;
- }
- PSDeploymentEventDataHttpRequest psObject = new PSDeploymentEventDataHttpRequest
- {
- ClientId = httpRequest.ClientRequestId,
- Method = httpRequest.Method,
- Url = httpRequest.Uri,
- ClientIpAddress = httpRequest.ClientIpAddress
- };
- return psObject;
- }
-
- public static PSDeploymentEventDataAuthorization ToPSDeploymentEventDataAuthorization(this SenderAuthorization authorization)
- {
- if (authorization == null)
- {
- return null;
- }
- PSDeploymentEventDataAuthorization psObject = new PSDeploymentEventDataAuthorization
- {
- Action = authorization.Action,
- Role = authorization.Role,
- Scope = authorization.Scope,
- Condition = authorization.Condition
- };
- return psObject;
- }
+ // TODO: http://vstfrd:8080/Azure/RD/_workitems#_a=edit&id=3247094
+ //public static PSDeploymentEventData ToPSDeploymentEventData(this EventData eventData)
+ //{
+ // if (eventData == null)
+ // {
+ // return null;
+ // }
+ // PSDeploymentEventData psObject = new PSDeploymentEventData
+ // {
+ // Authorization = eventData.Authorization.ToPSDeploymentEventDataAuthorization(),
+ // ResourceUri = eventData.ResourceUri,
+ // SubscriptionId = eventData.SubscriptionId,
+ // EventId = eventData.EventDataId,
+ // EventName = eventData.EventName.LocalizedValue,
+ // EventSource = eventData.EventSource.LocalizedValue,
+ // Channels = eventData.EventChannels.ToString(),
+ // Level = eventData.Level.ToString(),
+ // Description = eventData.Description,
+ // Timestamp = eventData.EventTimestamp,
+ // OperationId = eventData.OperationId,
+ // OperationName = eventData.OperationName.LocalizedValue,
+ // Status = eventData.Status.LocalizedValue,
+ // SubStatus = eventData.SubStatus.LocalizedValue,
+ // Caller = GetEventDataCaller(eventData.Claims),
+ // CorrelationId = eventData.CorrelationId,
+ // ResourceGroupName = eventData.ResourceGroupName,
+ // ResourceProvider = eventData.ResourceProviderName.LocalizedValue,
+ // HttpRequest = eventData.HttpRequest.ToPSDeploymentEventDataHttpRequest(),
+ // Claims = eventData.Claims,
+ // Properties = eventData.Properties
+ // };
+ // return psObject;
+ //}
+
+ // TODO: http://vstfrd:8080/Azure/RD/_workitems#_a=edit&id=3247094
+ //public static PSDeploymentEventDataHttpRequest ToPSDeploymentEventDataHttpRequest(this HttpRequestInfo httpRequest)
+ //{
+ // if (httpRequest == null)
+ // {
+ // return null;
+ // }
+ // PSDeploymentEventDataHttpRequest psObject = new PSDeploymentEventDataHttpRequest
+ // {
+ // ClientId = httpRequest.ClientRequestId,
+ // Method = httpRequest.Method,
+ // Url = httpRequest.Uri,
+ // ClientIpAddress = httpRequest.ClientIpAddress
+ // };
+ // return psObject;
+ //}
+
+ // TODO: http://vstfrd:8080/Azure/RD/_workitems#_a=edit&id=3247094
+ //public static PSDeploymentEventDataAuthorization ToPSDeploymentEventDataAuthorization(this SenderAuthorization authorization)
+ //{
+ // if (authorization == null)
+ // {
+ // return null;
+ // }
+ // PSDeploymentEventDataAuthorization psObject = new PSDeploymentEventDataAuthorization
+ // {
+ // Action = authorization.Action,
+ // Role = authorization.Role,
+ // Scope = authorization.Scope,
+ // Condition = authorization.Condition
+ // };
+ // return psObject;
+ //}
public static string ConstructResourcesTable(List resources)
{
diff --git a/src/ResourceManager/Resources/Commands.Resources/ResourceGroups/GetAzureResourceGroupLogCommand.cs b/src/ResourceManager/Resources/Commands.Resources/ResourceGroups/GetAzureResourceGroupLogCommand.cs
index 227b4bfa8a78..d8572700da5c 100644
--- a/src/ResourceManager/Resources/Commands.Resources/ResourceGroups/GetAzureResourceGroupLogCommand.cs
+++ b/src/ResourceManager/Resources/Commands.Resources/ResourceGroups/GetAzureResourceGroupLogCommand.cs
@@ -21,7 +21,8 @@ namespace Microsoft.Azure.Commands.Resources
///
/// Get the list of events for a deployment.
///
- [Cmdlet(VerbsCommon.Get, "AzureResourceGroupLog", DefaultParameterSetName = LastDeploymentSetName), OutputType(typeof(List))]
+ // TODO: http://vstfrd:8080/Azure/RD/_workitems#_a=edit&id=3247094
+ //[Cmdlet(VerbsCommon.Get, "AzureResourceGroupLog", DefaultParameterSetName = LastDeploymentSetName), OutputType(typeof(List))]
public class GetAzureResourceGroupLogCommand : ResourcesBaseCmdlet
{
internal const string AllSetName = "All";
@@ -50,7 +51,9 @@ public override void ExecuteCmdlet()
DeploymentName = DeploymentName,
All = All.IsPresent
};
- WriteObject(ResourcesClient.GetResourceGroupLogs(parameters), true);
+
+ // TODO: http://vstfrd:8080/Azure/RD/_workitems#_a=edit&id=3247094
+ //WriteObject(ResourcesClient.GetResourceGroupLogs(parameters), true);
}
}
}
\ No newline at end of file
diff --git a/src/ResourceManager/Resources/Commands.Resources/packages.config b/src/ResourceManager/Resources/Commands.Resources/packages.config
index ed9cd2079ea5..20bd02c78906 100644
--- a/src/ResourceManager/Resources/Commands.Resources/packages.config
+++ b/src/ResourceManager/Resources/Commands.Resources/packages.config
@@ -1,16 +1,18 @@
-
-
-
-
-
+
+
+
+
+
+
+
+
-
-
+
\ No newline at end of file
diff --git a/src/ResourceManager/Sql/Commands.Sql.Test/Commands.Sql.Test.csproj b/src/ResourceManager/Sql/Commands.Sql.Test/Commands.Sql.Test.csproj
index 0cd13b1779c8..dfda4645758f 100644
--- a/src/ResourceManager/Sql/Commands.Sql.Test/Commands.Sql.Test.csproj
+++ b/src/ResourceManager/Sql/Commands.Sql.Test/Commands.Sql.Test.csproj
@@ -42,25 +42,32 @@
false
-
- False
- ..\..\..\packages\Microsoft.Azure.Gallery.2.2.0-preview\lib\net40\Microsoft.Azure.Gallery.dll
+
+ ..\..\..\packages\Hyak.Common.1.0.1\lib\portable-net403+win+wpa81\Hyak.Common.dll
-
- False
- ..\..\..\packages\Microsoft.Azure.Management.Sql.0.14.3-prerelease\lib\net40\Microsoft.Azure.Management.Sql.dll
+
+ ..\..\..\packages\Microsoft.Azure.Common.2.0.1\lib\net45\Microsoft.Azure.Common.dll
-
- False
- ..\..\..\packages\Microsoft.Azure.Monitoring.2.2.0-preview\lib\net40\Microsoft.Azure.Monitoring.dll
+
+ ..\..\..\packages\Microsoft.Azure.Common.Extensions.0.13.0-preview\lib\net45\Microsoft.Azure.Common.Extensions.dll
-
- False
- ..\..\..\packages\Microsoft.Azure.Management.Resources.2.7.0-preview\lib\net40\Microsoft.Azure.ResourceManager.dll
+
+ ..\..\..\packages\Microsoft.Azure.Common.2.0.1\lib\net45\Microsoft.Azure.Common.NetFramework.dll
-
- False
- ..\..\..\packages\Hydra.HttpRecorder.1.0.5417.13285-prerelease\lib\net45\Microsoft.Azure.Utilities.HttpRecorder.dll
+
+ ..\..\..\packages\Microsoft.Azure.Gallery.2.6.0-preview\lib\net40\Microsoft.Azure.Gallery.dll
+
+
+ ..\..\..\packages\Microsoft.Azure.Management.Sql.0.16.0-prerelease\lib\net40\Microsoft.Azure.Management.Sql.dll
+
+
+ ..\..\..\packages\Microsoft.Azure.Management.Resources.2.12.0-preview\lib\net40\Microsoft.Azure.ResourceManager.dll
+
+
+ ..\..\..\packages\Microsoft.Azure.Test.Framework.1.0.5486.28526-prerelease\lib\net45\Microsoft.Azure.Test.Framework.dll
+
+
+ ..\..\..\packages\Microsoft.Azure.Test.HttpRecorder.1.0.5486.28526-prerelease\lib\net45\Microsoft.Azure.Test.HttpRecorder.dll
False
@@ -82,19 +89,11 @@
False
..\..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.Desktop.dll
-
- False
- ..\..\..\packages\Microsoft.WindowsAzure.Common.1.4.1\lib\net45\Microsoft.WindowsAzure.Common.dll
-
-
- ..\..\..\packages\Microsoft.WindowsAzure.Common.1.4.1\lib\net45\Microsoft.WindowsAzure.Common.NetFramework.dll
+
+ ..\..\..\packages\Microsoft.WindowsAzure.Management.4.0.0\lib\net40\Microsoft.WindowsAzure.Management.dll
-
- ..\..\..\packages\Microsoft.WindowsAzure.Management.Storage.3.1.0\lib\net40\Microsoft.WindowsAzure.Management.Storage.dll
-
-
- False
- ..\..\..\packages\Hydra.SpecTestSupport.1.0.5417.13285-prerelease\lib\net45\Microsoft.WindowsAzure.Testing.dll
+
+ ..\..\..\packages\Microsoft.WindowsAzure.Management.Storage.5.0.0\lib\net40\Microsoft.WindowsAzure.Management.Storage.dll
False
@@ -146,10 +145,6 @@
-
- {b95c489c-8cb7-4dcf-8d5f-b9aebdbbaf89}
- Common.Extensions
-
{c1bda476-a5cc-4394-914d-48b0ec31a710}
Commands.ScenarioTests.Common
diff --git a/src/ResourceManager/Sql/Commands.Sql.Test/ScenarioTests/SqlTestsBase.cs b/src/ResourceManager/Sql/Commands.Sql.Test/ScenarioTests/SqlTestsBase.cs
index de54e30bd5f6..f36e67e07d08 100644
--- a/src/ResourceManager/Sql/Commands.Sql.Test/ScenarioTests/SqlTestsBase.cs
+++ b/src/ResourceManager/Sql/Commands.Sql.Test/ScenarioTests/SqlTestsBase.cs
@@ -17,7 +17,7 @@
using Microsoft.WindowsAzure.Commands.ScenarioTest;
using Microsoft.WindowsAzure.Commands.Utilities.Common;
using Microsoft.WindowsAzure.Management.Storage;
-using Microsoft.WindowsAzure.Testing;
+using Microsoft.Azure.Test;
using Microsoft.Azure.Common.Extensions;
namespace Microsoft.Azure.Commands.ScenarioTest.SqlTests
diff --git a/src/ResourceManager/Sql/Commands.Sql.Test/packages.config b/src/ResourceManager/Sql/Commands.Sql.Test/packages.config
index e071300410fb..42d2cb91ae76 100644
--- a/src/ResourceManager/Sql/Commands.Sql.Test/packages.config
+++ b/src/ResourceManager/Sql/Commands.Sql.Test/packages.config
@@ -1,19 +1,21 @@
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
-
-
-
+
+
diff --git a/src/ResourceManager/Sql/Commands.Sql/Commands.Sql.csproj b/src/ResourceManager/Sql/Commands.Sql/Commands.Sql.csproj
index 5197bce544c7..ee3d99a36601 100644
--- a/src/ResourceManager/Sql/Commands.Sql/Commands.Sql.csproj
+++ b/src/ResourceManager/Sql/Commands.Sql/Commands.Sql.csproj
@@ -87,13 +87,29 @@
+
+ False
+ ..\..\..\packages\Hyak.Common.1.0.1\lib\portable-net403+win+wpa81\Hyak.Common.dll
+
+
+ False
+ ..\..\..\packages\Microsoft.Azure.Common.2.0.1\lib\net45\Microsoft.Azure.Common.dll
+
+
+ False
+ ..\..\..\packages\Microsoft.Azure.Common.Extensions.0.13.0-preview\lib\net45\Microsoft.Azure.Common.Extensions.dll
+
+
+ False
+ ..\..\..\packages\Microsoft.Azure.Common.2.0.1\lib\net45\Microsoft.Azure.Common.NetFramework.dll
+
False
- ..\..\..\packages\Microsoft.Azure.Management.Sql.0.14.3-prerelease\lib\net40\Microsoft.Azure.Management.Sql.dll
+ ..\..\..\packages\Microsoft.Azure.Management.Sql.0.16.0-prerelease\lib\net40\Microsoft.Azure.Management.Sql.dll
False
- ..\..\..\packages\Microsoft.Azure.Management.Resources.2.7.0-preview\lib\net40\Microsoft.Azure.ResourceManager.dll
+ ..\..\..\packages\Microsoft.Azure.Management.Resources.2.12.0-preview\lib\net40\Microsoft.Azure.ResourceManager.dll
..\..\..\packages\Microsoft.Data.Edm.5.6.0\lib\net40\Microsoft.Data.Edm.dll
@@ -104,29 +120,28 @@
..\..\..\packages\Microsoft.Data.Services.Client.5.6.0\lib\net40\Microsoft.Data.Services.Client.dll
-
+
False
- ..\..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.dll
+ ..\..\..\packages\Microsoft.IdentityModel.Clients.ActiveDirectory.2.11.10918.1222\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.dll
-
- False
- ..\..\..\packages\Microsoft.WindowsAzure.Common.1.4.1\lib\net45\Microsoft.WindowsAzure.Common.dll
+
+ ..\..\..\packages\Microsoft.IdentityModel.Clients.ActiveDirectory.2.11.10918.1222\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.WindowsForms.dll
-
+
False
- ..\..\..\packages\Microsoft.WindowsAzure.Common.1.4.1\lib\net45\Microsoft.WindowsAzure.Common.NetFramework.dll
+ ..\..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.dll
False
..\..\..\packages\Microsoft.WindowsAzure.ConfigurationManager.1.8.0.0\lib\net35-full\Microsoft.WindowsAzure.Configuration.dll
-
+
False
- ..\..\..\packages\Microsoft.WindowsAzure.Management.2.1.0\lib\net40\Microsoft.WindowsAzure.Management.dll
+ ..\..\..\packages\Microsoft.WindowsAzure.Management.4.0.0\lib\net40\Microsoft.WindowsAzure.Management.dll
-
+
False
- ..\..\..\packages\Microsoft.WindowsAzure.Management.Storage.3.1.0\lib\net40\Microsoft.WindowsAzure.Management.Storage.dll
+ ..\..\..\packages\Microsoft.WindowsAzure.Management.Storage.5.0.0\lib\net40\Microsoft.WindowsAzure.Management.Storage.dll
False
@@ -161,10 +176,6 @@
-
- {b95c489c-8cb7-4dcf-8d5f-b9aebdbbaf89}
- Common.Extensions
-
{5ee72c53-1720-4309-b54b-5fb79703195f}
Commands.Common
diff --git a/src/ResourceManager/Sql/Commands.Sql/packages.config b/src/ResourceManager/Sql/Commands.Sql/packages.config
index bec74499d637..2f6f80a9e08f 100644
--- a/src/ResourceManager/Sql/Commands.Sql/packages.config
+++ b/src/ResourceManager/Sql/Commands.Sql/packages.config
@@ -1,19 +1,22 @@
-
-
+
+
+
+
+
+
+
-
-
-
-
+
+
diff --git a/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics.Test/Commands.StreamAnalytics.Test.csproj b/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics.Test/Commands.StreamAnalytics.Test.csproj
index c6695d4763fd..27ae7dc6ccdc 100644
--- a/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics.Test/Commands.StreamAnalytics.Test.csproj
+++ b/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics.Test/Commands.StreamAnalytics.Test.csproj
@@ -39,27 +39,38 @@
false
+
+ ..\..\..\packages\Hyak.Common.1.0.1\lib\portable-net403+win+wpa81\Hyak.Common.dll
+
+
+ ..\..\..\packages\Microsoft.Azure.Common.2.0.1\lib\net45\Microsoft.Azure.Common.dll
+
+
+ False
+ ..\..\..\packages\Microsoft.Azure.Common.Extensions.0.13.0-preview\lib\net45\Microsoft.Azure.Common.Extensions.dll
+
+
+ ..\..\..\packages\Microsoft.Azure.Common.2.0.1\lib\net45\Microsoft.Azure.Common.NetFramework.dll
+
- ..\..\..\packages\Microsoft.Azure.Gallery.2.2.0-preview\lib\net40\Microsoft.Azure.Gallery.dll
- True
+ ..\..\..\packages\Microsoft.Azure.Gallery.2.6.0-preview\lib\net40\Microsoft.Azure.Gallery.dll
- ..\..\..\packages\Microsoft.Azure.Management.Authorization.0.11.0-preview\lib\net40\Microsoft.Azure.Management.Authorization.dll
+ ..\..\..\packages\Microsoft.Azure.Management.Authorization.0.16.0-preview\lib\net40\Microsoft.Azure.Management.Authorization.dll
- ..\..\..\packages\Microsoft.Azure.Management.StreamAnalytics.0.12.1-preview\lib\net40\Microsoft.Azure.Management.StreamAnalytics.dll
-
-
- ..\..\..\packages\Microsoft.Azure.Monitoring.2.2.0-preview\lib\net40\Microsoft.Azure.Monitoring.dll
- True
+ ..\..\..\packages\Microsoft.Azure.Management.StreamAnalytics.0.14.0-preview\lib\net40\Microsoft.Azure.Management.StreamAnalytics.dll
- ..\..\..\packages\Microsoft.Azure.Management.Resources.2.7.0-preview\lib\net40\Microsoft.Azure.ResourceManager.dll
- True
+ ..\..\..\packages\Microsoft.Azure.Management.Resources.2.12.0-preview\lib\net40\Microsoft.Azure.ResourceManager.dll
-
+
False
- ..\..\..\packages\Hydra.HttpRecorder.1.0.5417.13285-prerelease\lib\net45\Microsoft.Azure.Utilities.HttpRecorder.dll
+ ..\..\..\packages\Microsoft.Azure.Test.Framework.1.0.5486.28526-prerelease\lib\net45\Microsoft.Azure.Test.Framework.dll
+
+
+ False
+ ..\..\..\packages\Microsoft.Azure.Test.HttpRecorder.1.0.5486.28526-prerelease\lib\net45\Microsoft.Azure.Test.HttpRecorder.dll
..\..\..\packages\Microsoft.IdentityModel.Clients.ActiveDirectory.2.11.10918.1222\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.dll
@@ -80,26 +91,16 @@
False
..\..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.Desktop.dll
-
- False
- ..\..\..\packages\Microsoft.WindowsAzure.Common.1.4.1\lib\net45\Microsoft.WindowsAzure.Common.dll
+
+ ..\..\..\packages\Microsoft.WindowsAzure.Management.4.0.0\lib\net40\Microsoft.WindowsAzure.Management.dll
-
- ..\..\..\packages\Microsoft.WindowsAzure.Common.1.4.1\lib\net45\Microsoft.WindowsAzure.Common.NetFramework.dll
- True
-
-
- False
- ..\..\..\packages\Microsoft.WindowsAzure.Management.Storage.3.1.0\lib\net40\Microsoft.WindowsAzure.Management.Storage.dll
+
+ ..\..\..\packages\Microsoft.WindowsAzure.Management.Storage.5.0.0\lib\net40\Microsoft.WindowsAzure.Management.Storage.dll
False
..\..\..\packages\WindowsAzure.Storage.4.0.0\lib\net40\Microsoft.WindowsAzure.Storage.dll
-
- False
- ..\..\..\packages\Hydra.SpecTestSupport.1.0.5417.13285-prerelease\lib\net45\Microsoft.WindowsAzure.Testing.dll
-
False
..\..\..\packages\Moq.4.2.1402.2112\lib\net40\Moq.dll
@@ -134,10 +135,6 @@
-
- {b95c489c-8cb7-4dcf-8d5f-b9aebdbbaf89}
- Common.Extensions
-
{c1bda476-a5cc-4394-914d-48b0ec31a710}
Commands.ScenarioTests.Common
diff --git a/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics.Test/ScenarioTests/StreamAnalyticsScenarioTestsBase.cs b/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics.Test/ScenarioTests/StreamAnalyticsScenarioTestsBase.cs
index 174343bac5e7..e2f357412b54 100644
--- a/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics.Test/ScenarioTests/StreamAnalyticsScenarioTestsBase.cs
+++ b/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics.Test/ScenarioTests/StreamAnalyticsScenarioTestsBase.cs
@@ -20,9 +20,8 @@
using Microsoft.Azure.Subscriptions;
using Microsoft.WindowsAzure.Commands.ScenarioTest;
using Microsoft.WindowsAzure.Commands.Utilities.Common;
-using Microsoft.WindowsAzure.Management.Monitoring.Events;
using Microsoft.WindowsAzure.Management.Storage;
-using Microsoft.WindowsAzure.Testing;
+using Microsoft.Azure.Test;
namespace Microsoft.Azure.Commands.StreamAnalytics.Test
{
@@ -41,14 +40,12 @@ protected void SetupManagementClients()
var resourceManagementClient = GetResourceManagementClient();
var subscriptionsClient = GetSubscriptionClient();
var galleryClient = GetGalleryClient();
- var eventsClient = GetEventsClient();
var authorizationManagementClient = GetAuthorizationManagementClient();
helper.SetupManagementClients(dataPipelineManagementClient,
resourceManagementClient,
subscriptionsClient,
galleryClient,
- eventsClient,
authorizationManagementClient);
}
@@ -92,11 +89,6 @@ protected GalleryClient GetGalleryClient()
return TestBase.GetServiceClient(new CSMTestEnvironmentFactory());
}
- protected EventsClient GetEventsClient()
- {
- return TestBase.GetServiceClient(new CSMTestEnvironmentFactory());
- }
-
protected AuthorizationManagementClient GetAuthorizationManagementClient()
{
return TestBase.GetServiceClient(new CSMTestEnvironmentFactory());
diff --git a/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics.Test/packages.config b/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics.Test/packages.config
index 7f6f7c83d4f1..aa6737e3b631 100644
--- a/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics.Test/packages.config
+++ b/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics.Test/packages.config
@@ -1,20 +1,22 @@
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
-
-
-
+
+
diff --git a/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/CloudExceptionExtensions.cs b/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/CloudExceptionExtensions.cs
index d34a67ae7da5..256703e89a7a 100644
--- a/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/CloudExceptionExtensions.cs
+++ b/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/CloudExceptionExtensions.cs
@@ -17,6 +17,7 @@
using System.Globalization;
using Microsoft.Azure.Commands.StreamAnalytics.Properties;
using Microsoft.WindowsAzure;
+using Hyak.Common;
namespace Microsoft.Azure.Commands.StreamAnalytics
{
@@ -29,8 +30,8 @@ public static CloudException CreateFormattedException(this CloudException cloudE
CultureInfo.InvariantCulture,
Resources.FormattedCloudExceptionMessageTemplate,
cloudException.Response.StatusCode,
- cloudException.ErrorCode,
- cloudException.ErrorMessage,
+ cloudException.Error.Code,
+ cloudException.Error.Message,
cloudException.GetRequestId(),
DateTime.UtcNow));
}
diff --git a/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Commands.StreamAnalytics.csproj b/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Commands.StreamAnalytics.csproj
index 78b4c1b06911..ad7ec1ae6c11 100644
--- a/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Commands.StreamAnalytics.csproj
+++ b/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Commands.StreamAnalytics.csproj
@@ -48,17 +48,37 @@
false
+
+ ..\..\..\packages\Hyak.Common.1.0.1\lib\portable-net403+win+wpa81\Hyak.Common.dll
+
+
+ ..\..\..\packages\Microsoft.Azure.Common.2.0.1\lib\net45\Microsoft.Azure.Common.dll
+
+
+ False
+ ..\..\..\packages\Microsoft.Azure.Common.Extensions.0.13.0-preview\lib\net45\Microsoft.Azure.Common.Extensions.dll
+
+
+ ..\..\..\packages\Microsoft.Azure.Common.2.0.1\lib\net45\Microsoft.Azure.Common.NetFramework.dll
+
False
- ..\..\..\packages\Microsoft.Azure.Management.StreamAnalytics.0.12.1-preview\lib\net40\Microsoft.Azure.Management.StreamAnalytics.dll
+ ..\..\..\packages\Microsoft.Azure.Management.StreamAnalytics.0.14.0-preview\lib\net40\Microsoft.Azure.Management.StreamAnalytics.dll
-
+
False
- ..\..\..\packages\Microsoft.WindowsAzure.Common.1.4.1\lib\net45\Microsoft.WindowsAzure.Common.dll
+ ..\..\..\packages\Microsoft.Azure.Management.Resources.2.12.0-preview\lib\net40\Microsoft.Azure.ResourceManager.dll
-
+
False
- ..\..\..\packages\Microsoft.WindowsAzure.Common.1.4.1\lib\net45\Microsoft.WindowsAzure.Common.NetFramework.dll
+ ..\..\..\packages\Microsoft.IdentityModel.Clients.ActiveDirectory.2.11.10918.1222\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.dll
+
+
+ ..\..\..\packages\Microsoft.IdentityModel.Clients.ActiveDirectory.2.11.10918.1222\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.WindowsForms.dll
+
+
+ False
+ ..\..\..\packages\Microsoft.WindowsAzure.Management.4.0.0\lib\net40\Microsoft.WindowsAzure.Management.dll
@@ -89,10 +109,6 @@
-
- {b95c489c-8cb7-4dcf-8d5f-b9aebdbbaf89}
- Common.Extensions
-
{65c3a86a-716d-4e7d-ab67-1db00b3bf72d}
Commands.Common.Storage
diff --git a/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Models/StreamAnalyticsClient.Inputs.cs b/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Models/StreamAnalyticsClient.Inputs.cs
index 0796045e8575..db9e55cf7ee9 100644
--- a/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Models/StreamAnalyticsClient.Inputs.cs
+++ b/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Models/StreamAnalyticsClient.Inputs.cs
@@ -20,6 +20,7 @@
using Microsoft.Azure.Management.StreamAnalytics;
using Microsoft.Azure.Management.StreamAnalytics.Models;
using Microsoft.WindowsAzure;
+using Hyak.Common;
namespace Microsoft.Azure.Commands.StreamAnalytics.Models
{
@@ -159,7 +160,7 @@ public virtual PSInput CreatePSInput(CreatePSInputParameter parameter)
public virtual HttpStatusCode RemovePSInput(string resourceGroupName, string jobName, string inputName)
{
- OperationResponse response = StreamAnalyticsManagementClient.Inputs.Delete(resourceGroupName, jobName, inputName);
+ AzureOperationResponse response = StreamAnalyticsManagementClient.Inputs.Delete(resourceGroupName, jobName, inputName);
return response.StatusCode;
}
diff --git a/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Models/StreamAnalyticsClient.Jobs.cs b/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Models/StreamAnalyticsClient.Jobs.cs
index 28b59993a17e..37eb2b969f2a 100644
--- a/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Models/StreamAnalyticsClient.Jobs.cs
+++ b/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Models/StreamAnalyticsClient.Jobs.cs
@@ -20,6 +20,7 @@
using Microsoft.Azure.Management.StreamAnalytics;
using Microsoft.Azure.Management.StreamAnalytics.Models;
using Microsoft.WindowsAzure;
+using Hyak.Common;
namespace Microsoft.Azure.Commands.StreamAnalytics.Models
{
@@ -172,7 +173,7 @@ public virtual PSJob CreatePSJob(CreatePSJobParameter parameter)
public virtual HttpStatusCode StartPSJob(string resourceGroupName, string jobName)
{
- OperationResponse response = StreamAnalyticsManagementClient.StreamingJobs.Start(resourceGroupName, jobName);
+ AzureOperationResponse response = StreamAnalyticsManagementClient.StreamingJobs.Start(resourceGroupName, jobName);
return response.StatusCode;
}
@@ -189,7 +190,7 @@ public virtual HttpStatusCode StartPSJob(JobParametersBase parameter)
public virtual HttpStatusCode StopPSJob(string resourceGroupName, string jobName)
{
- OperationResponse response = StreamAnalyticsManagementClient.StreamingJobs.Stop(resourceGroupName, jobName);
+ AzureOperationResponse response = StreamAnalyticsManagementClient.StreamingJobs.Stop(resourceGroupName, jobName);
return response.StatusCode;
}
@@ -206,7 +207,7 @@ public virtual HttpStatusCode StopPSJob(JobParametersBase parameter)
public virtual HttpStatusCode RemovePSJob(string resourceGroupName, string jobName)
{
- OperationResponse response = StreamAnalyticsManagementClient.StreamingJobs.Delete(resourceGroupName, jobName);
+ AzureOperationResponse response = StreamAnalyticsManagementClient.StreamingJobs.Delete(resourceGroupName, jobName);
return response.StatusCode;
}
diff --git a/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Models/StreamAnalyticsClient.Outputs.cs b/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Models/StreamAnalyticsClient.Outputs.cs
index e313e21254cc..2309239354ce 100644
--- a/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Models/StreamAnalyticsClient.Outputs.cs
+++ b/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Models/StreamAnalyticsClient.Outputs.cs
@@ -20,6 +20,7 @@
using Microsoft.Azure.Management.StreamAnalytics;
using Microsoft.Azure.Management.StreamAnalytics.Models;
using Microsoft.WindowsAzure;
+using Hyak.Common;
namespace Microsoft.Azure.Commands.StreamAnalytics.Models
{
@@ -159,7 +160,7 @@ public virtual PSOutput CreatePSOutput(CreatePSOutputParameter parameter)
public virtual HttpStatusCode RemovePSOutput(string resourceGroupName, string jobName, string outputName)
{
- OperationResponse response = StreamAnalyticsManagementClient.Outputs.Delete(resourceGroupName, jobName, outputName);
+ AzureOperationResponse response = StreamAnalyticsManagementClient.Outputs.Delete(resourceGroupName, jobName, outputName);
return response.StatusCode;
}
diff --git a/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Models/StreamAnalyticsClient.Transformation.cs b/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Models/StreamAnalyticsClient.Transformation.cs
index ce08eca5de0d..8db917d86a42 100644
--- a/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Models/StreamAnalyticsClient.Transformation.cs
+++ b/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Models/StreamAnalyticsClient.Transformation.cs
@@ -19,6 +19,7 @@
using Microsoft.Azure.Management.StreamAnalytics;
using Microsoft.Azure.Management.StreamAnalytics.Models;
using Microsoft.WindowsAzure;
+using Hyak.Common;
namespace Microsoft.Azure.Commands.StreamAnalytics.Models
{
diff --git a/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/StreamAnalyticsBaseCmdlet.cs b/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/StreamAnalyticsBaseCmdlet.cs
index 74691bf92359..d120a9543c23 100644
--- a/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/StreamAnalyticsBaseCmdlet.cs
+++ b/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/StreamAnalyticsBaseCmdlet.cs
@@ -18,6 +18,7 @@
using Microsoft.Azure.Commands.StreamAnalytics.Properties;
using Microsoft.WindowsAzure;
using Microsoft.WindowsAzure.Commands.Utilities.Common;
+using Hyak.Common;
namespace Microsoft.Azure.Commands.StreamAnalytics
{
diff --git a/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/packages.config b/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/packages.config
index 13f6d3867e27..85d8cae6409d 100644
--- a/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/packages.config
+++ b/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/packages.config
@@ -1,11 +1,16 @@
-
+
+
+
+
+
+
+
-
-
+
\ No newline at end of file
diff --git a/src/ResourceManager/Tags/Commands.Tags/Commands.Tags.csproj b/src/ResourceManager/Tags/Commands.Tags/Commands.Tags.csproj
index 7b4da8b9743b..9706839753af 100644
--- a/src/ResourceManager/Tags/Commands.Tags/Commands.Tags.csproj
+++ b/src/ResourceManager/Tags/Commands.Tags/Commands.Tags.csproj
@@ -48,9 +48,22 @@
false
+
+ ..\..\..\packages\Hyak.Common.1.0.1\lib\portable-net403+win+wpa81\Hyak.Common.dll
+
+
+ ..\..\..\packages\Microsoft.Azure.Common.2.0.1\lib\net45\Microsoft.Azure.Common.dll
+
+
+ False
+ ..\..\..\packages\Microsoft.Azure.Common.Extensions.0.13.0-preview\lib\net45\Microsoft.Azure.Common.Extensions.dll
+
+
+ ..\..\..\packages\Microsoft.Azure.Common.2.0.1\lib\net45\Microsoft.Azure.Common.NetFramework.dll
+
False
- ..\..\..\packages\Microsoft.Azure.Management.Resources.2.7.0-preview\lib\net40\Microsoft.Azure.ResourceManager.dll
+ ..\..\..\packages\Microsoft.Azure.Management.Resources.2.12.0-preview\lib\net40\Microsoft.Azure.ResourceManager.dll
False
@@ -72,13 +85,9 @@
..\..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.Desktop.dll
True
-
- False
- ..\..\..\packages\Microsoft.WindowsAzure.Common.1.4.1\lib\net45\Microsoft.WindowsAzure.Common.dll
-
-
+
False
- ..\..\..\packages\Microsoft.WindowsAzure.Common.1.4.1\lib\net45\Microsoft.WindowsAzure.Common.NetFramework.dll
+ ..\..\..\packages\Microsoft.WindowsAzure.Management.4.0.0\lib\net40\Microsoft.WindowsAzure.Management.dll
..\..\..\packages\Newtonsoft.Json.6.0.4\lib\net45\Newtonsoft.Json.dll
@@ -106,10 +115,6 @@
-
- {b95c489c-8cb7-4dcf-8d5f-b9aebdbbaf89}
- Common.Extensions
-
{65c3a86a-716d-4e7d-ab67-1db00b3bf72d}
Commands.Common.Storage
diff --git a/src/ResourceManager/Tags/Commands.Tags/packages.config b/src/ResourceManager/Tags/Commands.Tags/packages.config
index cf130c809bb4..bdde83a6dc79 100644
--- a/src/ResourceManager/Tags/Commands.Tags/packages.config
+++ b/src/ResourceManager/Tags/Commands.Tags/packages.config
@@ -1,12 +1,15 @@
-
+
+
+
+
+
-
-
+
\ No newline at end of file
diff --git a/src/ServiceManagement/Automation/Commands.Automation.Test/Commands.Automation.Test.csproj b/src/ServiceManagement/Automation/Commands.Automation.Test/Commands.Automation.Test.csproj
index cfd74729dd00..4451ed842965 100644
--- a/src/ServiceManagement/Automation/Commands.Automation.Test/Commands.Automation.Test.csproj
+++ b/src/ServiceManagement/Automation/Commands.Automation.Test/Commands.Automation.Test.csproj
@@ -47,6 +47,29 @@
false
+
+ ..\..\..\packages\Hyak.Common.1.0.1\lib\portable-net403+win+wpa81\Hyak.Common.dll
+
+
+ ..\..\..\packages\Microsoft.Azure.Common.2.0.1\lib\net45\Microsoft.Azure.Common.dll
+
+
+ False
+ ..\..\..\packages\Microsoft.Azure.Common.Extensions.0.13.0-preview\lib\net45\Microsoft.Azure.Common.Extensions.dll
+
+
+ ..\..\..\packages\Microsoft.Azure.Common.2.0.1\lib\net45\Microsoft.Azure.Common.NetFramework.dll
+
+
+ ..\..\..\packages\Microsoft.Azure.Management.Resources.2.12.0-preview\lib\net40\Microsoft.Azure.ResourceManager.dll
+
+
+ False
+ ..\..\..\packages\Microsoft.IdentityModel.Clients.ActiveDirectory.2.11.10918.1222\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.dll
+
+
+ ..\..\..\packages\Microsoft.IdentityModel.Clients.ActiveDirectory.2.11.10918.1222\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.WindowsForms.dll
+
False
..\..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.dll
@@ -60,13 +83,8 @@
..\..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.Desktop.dll
-
- False
- ..\..\..\packages\Microsoft.WindowsAzure.Common.1.4.1\lib\net45\Microsoft.WindowsAzure.Common.dll
-
-
- False
- ..\..\..\packages\Microsoft.WindowsAzure.Common.1.4.1\lib\net45\Microsoft.WindowsAzure.Common.NetFramework.dll
+
+ ..\..\..\packages\Microsoft.WindowsAzure.Management.4.0.0\lib\net40\Microsoft.WindowsAzure.Management.dll
False
diff --git a/src/ServiceManagement/Automation/Commands.Automation.Test/packages.config b/src/ServiceManagement/Automation/Commands.Automation.Test/packages.config
index 493c62373189..1f37d4eeeaf3 100644
--- a/src/ServiceManagement/Automation/Commands.Automation.Test/packages.config
+++ b/src/ServiceManagement/Automation/Commands.Automation.Test/packages.config
@@ -1,11 +1,16 @@
+
+
+
+
+
+
-
-
+
\ No newline at end of file
diff --git a/src/ServiceManagement/Automation/Commands.Automation/Cmdlet/AzureAutomationBaseCmdlet.cs b/src/ServiceManagement/Automation/Commands.Automation/Cmdlet/AzureAutomationBaseCmdlet.cs
index dae2c24f9c99..915e5347b8b1 100644
--- a/src/ServiceManagement/Automation/Commands.Automation/Cmdlet/AzureAutomationBaseCmdlet.cs
+++ b/src/ServiceManagement/Automation/Commands.Automation/Cmdlet/AzureAutomationBaseCmdlet.cs
@@ -25,6 +25,7 @@
using Microsoft.Azure.Commands.Automation.Properties;
using Microsoft.WindowsAzure;
using Microsoft.WindowsAzure.Commands.Utilities.Common;
+using Hyak.Common;
namespace Microsoft.Azure.Commands.Automation.Cmdlet
{
@@ -75,7 +76,7 @@ public override void ExecuteCmdlet()
}
catch (CloudException cloudException)
{
- if (string.IsNullOrEmpty(cloudException.ErrorCode) && string.IsNullOrEmpty(cloudException.ErrorMessage))
+ if (string.IsNullOrEmpty(cloudException.Error.Code) && string.IsNullOrEmpty(cloudException.Error.Message))
{
string message = this.ParseErrorMessage(cloudException.Response.Content);
if (!string.IsNullOrEmpty(message))
diff --git a/src/ServiceManagement/Automation/Commands.Automation/Commands.Automation.csproj b/src/ServiceManagement/Automation/Commands.Automation/Commands.Automation.csproj
index 76b33eb455a6..98665dcee4d1 100644
--- a/src/ServiceManagement/Automation/Commands.Automation/Commands.Automation.csproj
+++ b/src/ServiceManagement/Automation/Commands.Automation/Commands.Automation.csproj
@@ -52,9 +52,33 @@
false
+
+ ..\..\..\packages\Hyak.Common.1.0.1\lib\portable-net403+win+wpa81\Hyak.Common.dll
+
+
+ ..\..\..\packages\Microsoft.Azure.Common.2.0.1\lib\net45\Microsoft.Azure.Common.dll
+
+
+ False
+ ..\..\..\packages\Microsoft.Azure.Common.Extensions.0.13.0-preview\lib\net45\Microsoft.Azure.Common.Extensions.dll
+
+
+ ..\..\..\packages\Microsoft.Azure.Common.2.0.1\lib\net45\Microsoft.Azure.Common.NetFramework.dll
+
False
- ..\..\..\packages\Microsoft.Azure.Management.Automation.0.12.1-preview\lib\net40\Microsoft.Azure.Management.Automation.dll
+ ..\..\..\packages\Microsoft.Azure.Management.Automation.0.15.0-preview\lib\net40\Microsoft.Azure.Management.Automation.dll
+
+
+ False
+ ..\..\..\packages\Microsoft.Azure.Management.Resources.2.12.0-preview\lib\net40\Microsoft.Azure.ResourceManager.dll
+
+
+ False
+ ..\..\..\packages\Microsoft.IdentityModel.Clients.ActiveDirectory.2.11.10918.1222\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.dll
+
+
+ ..\..\..\packages\Microsoft.IdentityModel.Clients.ActiveDirectory.2.11.10918.1222\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.WindowsForms.dll
False
@@ -68,13 +92,9 @@
False
..\..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.Desktop.dll
-
+
False
- ..\..\..\packages\Microsoft.WindowsAzure.Common.1.4.1\lib\net45\Microsoft.WindowsAzure.Common.dll
-
-
- False
- ..\..\..\packages\Microsoft.WindowsAzure.Common.1.4.1\lib\net45\Microsoft.WindowsAzure.Common.NetFramework.dll
+ ..\..\..\packages\Microsoft.WindowsAzure.Management.4.0.0\lib\net40\Microsoft.WindowsAzure.Management.dll
..\..\..\packages\Newtonsoft.Json.6.0.4\lib\net45\Newtonsoft.Json.dll
@@ -159,10 +179,6 @@
-
- {b95c489c-8cb7-4dcf-8d5f-b9aebdbbaf89}
- Common.Extensions
-
{5ee72c53-1720-4309-b54b-5fb79703195f}
Commands.Common
diff --git a/src/ServiceManagement/Automation/Commands.Automation/packages.config b/src/ServiceManagement/Automation/Commands.Automation/packages.config
index c597ef88a040..0438ff07580b 100644
--- a/src/ServiceManagement/Automation/Commands.Automation/packages.config
+++ b/src/ServiceManagement/Automation/Commands.Automation/packages.config
@@ -1,11 +1,16 @@
-
+
+
+
+
+
+
+
-
-
+
\ No newline at end of file
diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Extensions.Test/Commands.ServiceManagement.Extensions.Test.csproj b/src/ServiceManagement/Compute/Commands.ServiceManagement.Extensions.Test/Commands.ServiceManagement.Extensions.Test.csproj
index 6ddaa7a52ccc..46dd90cd9d83 100644
--- a/src/ServiceManagement/Compute/Commands.ServiceManagement.Extensions.Test/Commands.ServiceManagement.Extensions.Test.csproj
+++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Extensions.Test/Commands.ServiceManagement.Extensions.Test.csproj
@@ -37,6 +37,29 @@
4
+
+ ..\..\..\packages\Hyak.Common.1.0.1\lib\portable-net403+win+wpa81\Hyak.Common.dll
+
+
+ ..\..\..\packages\Microsoft.Azure.Common.2.0.1\lib\net45\Microsoft.Azure.Common.dll
+
+
+ False
+ ..\..\..\packages\Microsoft.Azure.Common.Extensions.0.13.0-preview\lib\net45\Microsoft.Azure.Common.Extensions.dll
+
+
+ ..\..\..\packages\Microsoft.Azure.Common.2.0.1\lib\net45\Microsoft.Azure.Common.NetFramework.dll
+
+
+ ..\..\..\packages\Microsoft.Azure.Management.Resources.2.12.0-preview\lib\net40\Microsoft.Azure.ResourceManager.dll
+
+
+ False
+ ..\..\..\packages\Microsoft.IdentityModel.Clients.ActiveDirectory.2.11.10918.1222\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.dll
+
+
+ ..\..\..\packages\Microsoft.IdentityModel.Clients.ActiveDirectory.2.11.10918.1222\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.WindowsForms.dll
+
False
..\..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.dll
@@ -47,13 +70,16 @@
..\..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.Desktop.dll
+
+ ..\..\..\packages\Microsoft.WindowsAzure.Management.4.0.0\lib\net40\Microsoft.WindowsAzure.Management.dll
+
+
+ False
+ ..\..\..\packages\Newtonsoft.Json.6.0.4\lib\net45\Newtonsoft.Json.dll
+
-
- ..\..\..\packages\Newtonsoft.Json.6.0.4\lib\net45\Newtonsoft.Json.dll
- True
-
diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Extensions.Test/packages.config b/src/ServiceManagement/Compute/Commands.ServiceManagement.Extensions.Test/packages.config
index e8c5131c0544..bdde83a6dc79 100644
--- a/src/ServiceManagement/Compute/Commands.ServiceManagement.Extensions.Test/packages.config
+++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Extensions.Test/packages.config
@@ -1,7 +1,15 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.PlatformImageRepository/Commands.ServiceManagement.PlatformImageRepository.csproj b/src/ServiceManagement/Compute/Commands.ServiceManagement.PlatformImageRepository/Commands.ServiceManagement.PlatformImageRepository.csproj
index bc6bc775eec0..e0f0df052783 100644
--- a/src/ServiceManagement/Compute/Commands.ServiceManagement.PlatformImageRepository/Commands.ServiceManagement.PlatformImageRepository.csproj
+++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.PlatformImageRepository/Commands.ServiceManagement.PlatformImageRepository.csproj
@@ -59,6 +59,23 @@
False
..\..\..\packages\AutoMapper.3.1.1\lib\net40\AutoMapper.Net4.dll
+
+ ..\..\..\packages\Hyak.Common.1.0.1\lib\portable-net403+win+wpa81\Hyak.Common.dll
+
+
+ ..\..\..\packages\Microsoft.Azure.Common.2.0.1\lib\net45\Microsoft.Azure.Common.dll
+
+
+ False
+ ..\..\..\packages\Microsoft.Azure.Common.Extensions.0.13.0-preview\lib\net45\Microsoft.Azure.Common.Extensions.dll
+
+
+ ..\..\..\packages\Microsoft.Azure.Common.2.0.1\lib\net45\Microsoft.Azure.Common.NetFramework.dll
+
+
+ False
+ ..\..\..\packages\Microsoft.Azure.Management.Resources.2.12.0-preview\lib\net40\Microsoft.Azure.ResourceManager.dll
+
..\..\..\packages\Microsoft.Data.Edm.5.6.0\lib\net40\Microsoft.Data.Edm.dll
@@ -68,6 +85,13 @@
..\..\..\packages\Microsoft.Data.Services.Client.5.6.0\lib\net40\Microsoft.Data.Services.Client.dll
+
+ False
+ ..\..\..\packages\Microsoft.IdentityModel.Clients.ActiveDirectory.2.11.10918.1222\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.dll
+
+
+ ..\..\..\packages\Microsoft.IdentityModel.Clients.ActiveDirectory.2.11.10918.1222\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.WindowsForms.dll
+
False
..\..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.dll
@@ -80,28 +104,20 @@
False
..\..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.Desktop.dll
-
- False
- ..\..\..\packages\Microsoft.WindowsAzure.Common.1.4.1\lib\net45\Microsoft.WindowsAzure.Common.dll
-
-
- False
- ..\..\..\packages\Microsoft.WindowsAzure.Common.1.4.1\lib\net45\Microsoft.WindowsAzure.Common.NetFramework.dll
-
..\..\..\packages\Microsoft.WindowsAzure.ConfigurationManager.2.0.3\lib\net40\Microsoft.WindowsAzure.Configuration.dll
-
+
False
- ..\..\..\packages\Microsoft.WindowsAzure.Management.2.1.0\lib\net40\Microsoft.WindowsAzure.Management.dll
+ ..\..\..\packages\Microsoft.WindowsAzure.Management.4.0.0\lib\net40\Microsoft.WindowsAzure.Management.dll
-
+
False
- ..\..\..\packages\Microsoft.WindowsAzure.Management.Compute.6.1.2\lib\net40\Microsoft.WindowsAzure.Management.Compute.dll
+ ..\..\..\packages\Microsoft.WindowsAzure.Management.Compute.8.0.0\lib\net40\Microsoft.WindowsAzure.Management.Compute.dll
-
+
False
- ..\..\..\packages\Microsoft.WindowsAzure.Management.Storage.3.1.0\lib\net40\Microsoft.WindowsAzure.Management.Storage.dll
+ ..\..\..\packages\Microsoft.WindowsAzure.Management.Storage.5.0.0\lib\net40\Microsoft.WindowsAzure.Management.Storage.dll
False
diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.PlatformImageRepository/ExtensionPublishing/PublishAzurePlatformExtension.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.PlatformImageRepository/ExtensionPublishing/PublishAzurePlatformExtension.cs
index 0bc44bfc161e..5b60d6069921 100644
--- a/src/ServiceManagement/Compute/Commands.ServiceManagement.PlatformImageRepository/ExtensionPublishing/PublishAzurePlatformExtension.cs
+++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.PlatformImageRepository/ExtensionPublishing/PublishAzurePlatformExtension.cs
@@ -20,6 +20,8 @@
using Microsoft.WindowsAzure.Commands.ServiceManagement.PlatformImageRepository.Properties;
using Microsoft.WindowsAzure.Commands.Utilities.Common;
using Microsoft.WindowsAzure.Management.Compute.Models;
+using Microsoft.WindowsAzure.Management.Compute;
+using Microsoft.Azure;
namespace Microsoft.WindowsAzure.Commands.ServiceManagement.PlatformImageRepository.ExtensionPublishing
{
diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.PlatformImageRepository/ExtensionPublishing/SetAzurePlatformExtension.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.PlatformImageRepository/ExtensionPublishing/SetAzurePlatformExtension.cs
index 0e84dbb19824..8c34d7efcefb 100644
--- a/src/ServiceManagement/Compute/Commands.ServiceManagement.PlatformImageRepository/ExtensionPublishing/SetAzurePlatformExtension.cs
+++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.PlatformImageRepository/ExtensionPublishing/SetAzurePlatformExtension.cs
@@ -18,6 +18,7 @@
using AutoMapper;
using Microsoft.WindowsAzure.Commands.Utilities.Common;
using Microsoft.WindowsAzure.Management.Compute.Models;
+using Microsoft.WindowsAzure.Management.Compute;
namespace Microsoft.WindowsAzure.Commands.ServiceManagement.PlatformImageRepository.ExtensionPublishing
{
diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.PlatformImageRepository/ExtensionPublishing/UnpublishAzurePlatformExtension.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.PlatformImageRepository/ExtensionPublishing/UnpublishAzurePlatformExtension.cs
index 703e769e0851..3be1a61c6f2b 100644
--- a/src/ServiceManagement/Compute/Commands.ServiceManagement.PlatformImageRepository/ExtensionPublishing/UnpublishAzurePlatformExtension.cs
+++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.PlatformImageRepository/ExtensionPublishing/UnpublishAzurePlatformExtension.cs
@@ -15,6 +15,7 @@
using System.Management.Automation;
using Microsoft.WindowsAzure.Commands.ServiceManagement.PlatformImageRepository.Properties;
using Microsoft.WindowsAzure.Commands.Utilities.Common;
+using Microsoft.WindowsAzure.Management.Compute;
namespace Microsoft.WindowsAzure.Commands.ServiceManagement.PlatformImageRepository.ExtensionPublishing
{
diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.PlatformImageRepository/ImagePublishing/GetAzurePlatformVMImage.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.PlatformImageRepository/ImagePublishing/GetAzurePlatformVMImage.cs
index 644c634fef0b..3f2cfc6245f2 100644
--- a/src/ServiceManagement/Compute/Commands.ServiceManagement.PlatformImageRepository/ImagePublishing/GetAzurePlatformVMImage.cs
+++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.PlatformImageRepository/ImagePublishing/GetAzurePlatformVMImage.cs
@@ -18,6 +18,7 @@
using Microsoft.WindowsAzure.Commands.ServiceManagement.Model;
using Microsoft.WindowsAzure.Commands.ServiceManagement.PlatformImageRepository.Model;
using Microsoft.WindowsAzure.Commands.Utilities.Common;
+using Microsoft.WindowsAzure.Management.Compute;
namespace Microsoft.WindowsAzure.Commands.ServiceManagement.PlatformImageRepository.ImagePublishing
{
diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.PlatformImageRepository/ImagePublishing/RemoveAzurePlatformVMImage.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.PlatformImageRepository/ImagePublishing/RemoveAzurePlatformVMImage.cs
index 67f7e05d8968..5fcbb1a52b6c 100644
--- a/src/ServiceManagement/Compute/Commands.ServiceManagement.PlatformImageRepository/ImagePublishing/RemoveAzurePlatformVMImage.cs
+++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.PlatformImageRepository/ImagePublishing/RemoveAzurePlatformVMImage.cs
@@ -17,6 +17,7 @@
using Microsoft.WindowsAzure.Commands.ServiceManagement.Model;
using Microsoft.WindowsAzure.Commands.ServiceManagement.Properties;
using Microsoft.WindowsAzure.Commands.Utilities.Common;
+using Microsoft.WindowsAzure.Management.Compute;
namespace Microsoft.WindowsAzure.Commands.ServiceManagement.PlatformImageRepository.ImagePublishing
{
diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.PlatformImageRepository/ImagePublishing/SetAzurePlatformVMImage.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.PlatformImageRepository/ImagePublishing/SetAzurePlatformVMImage.cs
index 119c44148cdc..d22a336311cb 100644
--- a/src/ServiceManagement/Compute/Commands.ServiceManagement.PlatformImageRepository/ImagePublishing/SetAzurePlatformVMImage.cs
+++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.PlatformImageRepository/ImagePublishing/SetAzurePlatformVMImage.cs
@@ -19,6 +19,8 @@
using Microsoft.WindowsAzure.Commands.ServiceManagement.Model;
using Microsoft.WindowsAzure.Commands.ServiceManagement.PlatformImageRepository.Properties;
using Microsoft.WindowsAzure.Commands.Utilities.Common;
+using Microsoft.WindowsAzure.Management;
+using Microsoft.WindowsAzure.Management.Compute;
namespace Microsoft.WindowsAzure.Commands.ServiceManagement.PlatformImageRepository.ImagePublishing
{
diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.PlatformImageRepository/packages.config b/src/ServiceManagement/Compute/Commands.ServiceManagement.PlatformImageRepository/packages.config
index c2db1baba761..2e1cd5f32f8f 100644
--- a/src/ServiceManagement/Compute/Commands.ServiceManagement.PlatformImageRepository/packages.config
+++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.PlatformImageRepository/packages.config
@@ -1,19 +1,23 @@
+
+
+
+
+
+
-
-
-
-
-
+
+
+
diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Preview/Commands.ServiceManagement.Preview.csproj b/src/ServiceManagement/Compute/Commands.ServiceManagement.Preview/Commands.ServiceManagement.Preview.csproj
index 7b8829ed0f50..2a595f90105a 100644
--- a/src/ServiceManagement/Compute/Commands.ServiceManagement.Preview/Commands.ServiceManagement.Preview.csproj
+++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Preview/Commands.ServiceManagement.Preview.csproj
@@ -59,6 +59,23 @@
False
..\..\..\packages\AutoMapper.3.1.1\lib\net40\AutoMapper.Net4.dll
+
+ ..\..\..\packages\Hyak.Common.1.0.1\lib\portable-net403+win+wpa81\Hyak.Common.dll
+
+
+ ..\..\..\packages\Microsoft.Azure.Common.2.0.1\lib\net45\Microsoft.Azure.Common.dll
+
+
+ False
+ ..\..\..\packages\Microsoft.Azure.Common.Extensions.0.13.0-preview\lib\net45\Microsoft.Azure.Common.Extensions.dll
+
+
+ ..\..\..\packages\Microsoft.Azure.Common.2.0.1\lib\net45\Microsoft.Azure.Common.NetFramework.dll
+
+
+ False
+ ..\..\..\packages\Microsoft.Azure.Management.Resources.2.12.0-preview\lib\net40\Microsoft.Azure.ResourceManager.dll
+
..\..\..\packages\Microsoft.Data.Edm.5.6.0\lib\net40\Microsoft.Data.Edm.dll
@@ -68,6 +85,13 @@
..\..\..\packages\Microsoft.Data.Services.Client.5.6.0\lib\net40\Microsoft.Data.Services.Client.dll
+
+ False
+ ..\..\..\packages\Microsoft.IdentityModel.Clients.ActiveDirectory.2.11.10918.1222\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.dll
+
+
+ ..\..\..\packages\Microsoft.IdentityModel.Clients.ActiveDirectory.2.11.10918.1222\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.WindowsForms.dll
+
False
..\..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.dll
@@ -80,32 +104,24 @@
False
..\..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.Desktop.dll
-
- False
- ..\..\..\packages\Microsoft.WindowsAzure.Common.1.4.1\lib\net45\Microsoft.WindowsAzure.Common.dll
-
-
- False
- ..\..\..\packages\Microsoft.WindowsAzure.Common.1.4.1\lib\net45\Microsoft.WindowsAzure.Common.NetFramework.dll
-
..\..\..\packages\Microsoft.WindowsAzure.ConfigurationManager.2.0.3\lib\net40\Microsoft.WindowsAzure.Configuration.dll
-
+
False
- ..\..\..\packages\Microsoft.WindowsAzure.Management.2.1.0\lib\net40\Microsoft.WindowsAzure.Management.dll
+ ..\..\..\packages\Microsoft.WindowsAzure.Management.4.0.0\lib\net40\Microsoft.WindowsAzure.Management.dll
-
+
False
- ..\..\..\packages\Microsoft.WindowsAzure.Management.Compute.6.1.2\lib\net40\Microsoft.WindowsAzure.Management.Compute.dll
+ ..\..\..\packages\Microsoft.WindowsAzure.Management.Compute.8.0.0\lib\net40\Microsoft.WindowsAzure.Management.Compute.dll
-
+
False
- ..\..\..\packages\Microsoft.WindowsAzure.Management.Network.4.3.0\lib\net40\Microsoft.WindowsAzure.Management.Network.dll
+ ..\..\..\packages\Microsoft.WindowsAzure.Management.Network.6.0.0\lib\net40\Microsoft.WindowsAzure.Management.Network.dll
-
+
False
- ..\..\..\packages\Microsoft.WindowsAzure.Management.Storage.3.1.0\lib\net40\Microsoft.WindowsAzure.Management.Storage.dll
+ ..\..\..\packages\Microsoft.WindowsAzure.Management.Storage.5.0.0\lib\net40\Microsoft.WindowsAzure.Management.Storage.dll
False
diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Preview/packages.config b/src/ServiceManagement/Compute/Commands.ServiceManagement.Preview/packages.config
index 9ac585e925be..ce92088d8fe7 100644
--- a/src/ServiceManagement/Compute/Commands.ServiceManagement.Preview/packages.config
+++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Preview/packages.config
@@ -1,20 +1,24 @@
+
+
+
+
+
+
-
-
-
-
-
-
+
+
+
+
diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/Commands.ServiceManagement.Test.csproj b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/Commands.ServiceManagement.Test.csproj
index af6bed8d34bd..ba19d707f6bf 100644
--- a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/Commands.ServiceManagement.Test.csproj
+++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/Commands.ServiceManagement.Test.csproj
@@ -53,6 +53,22 @@
False
..\..\..\packages\AutoMapper.3.1.1\lib\net40\AutoMapper.Net4.dll
+
+ ..\..\..\packages\Hyak.Common.1.0.1\lib\portable-net403+win+wpa81\Hyak.Common.dll
+
+
+ ..\..\..\packages\Microsoft.Azure.Common.2.0.1\lib\net45\Microsoft.Azure.Common.dll
+
+
+ False
+ ..\..\..\packages\Microsoft.Azure.Common.Extensions.0.13.0-preview\lib\net45\Microsoft.Azure.Common.Extensions.dll
+
+
+ ..\..\..\packages\Microsoft.Azure.Common.2.0.1\lib\net45\Microsoft.Azure.Common.NetFramework.dll
+
+
+ ..\..\..\packages\Microsoft.Azure.Management.Resources.2.12.0-preview\lib\net40\Microsoft.Azure.ResourceManager.dll
+
..\..\..\packages\Microsoft.Data.Edm.5.6.0\lib\net40\Microsoft.Data.Edm.dll
@@ -82,31 +98,20 @@
False
..\..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.Desktop.dll
-
- False
- ..\..\..\packages\Microsoft.WindowsAzure.Common.1.4.1\lib\net45\Microsoft.WindowsAzure.Common.dll
-
-
- False
- ..\..\..\packages\Microsoft.WindowsAzure.Common.1.4.1\lib\net45\Microsoft.WindowsAzure.Common.NetFramework.dll
-
..\..\..\packages\Microsoft.WindowsAzure.ConfigurationManager.2.0.3\lib\net40\Microsoft.WindowsAzure.Configuration.dll
-
- False
- ..\..\..\packages\Microsoft.WindowsAzure.Management.2.1.0\lib\net40\Microsoft.WindowsAzure.Management.dll
+
+ ..\..\..\packages\Microsoft.WindowsAzure.Management.4.0.0\lib\net40\Microsoft.WindowsAzure.Management.dll
-
- False
- ..\..\..\packages\Microsoft.WindowsAzure.Management.Compute.6.1.2\lib\net40\Microsoft.WindowsAzure.Management.Compute.dll
+
+ ..\..\..\packages\Microsoft.WindowsAzure.Management.Compute.8.0.0\lib\net40\Microsoft.WindowsAzure.Management.Compute.dll
- ..\..\..\packages\Microsoft.WindowsAzure.Management.Network.4.3.0\lib\net40\Microsoft.WindowsAzure.Management.Network.dll
+ ..\..\..\packages\Microsoft.WindowsAzure.Management.Network.6.0.0\lib\net40\Microsoft.WindowsAzure.Management.Network.dll
-
- False
- ..\..\..\packages\Microsoft.WindowsAzure.Management.Storage.3.1.0\lib\net40\Microsoft.WindowsAzure.Management.Storage.dll
+
+ ..\..\..\packages\Microsoft.WindowsAzure.Management.Storage.5.0.0\lib\net40\Microsoft.WindowsAzure.Management.Storage.dll
False
@@ -476,10 +481,6 @@
-
- {b95c489c-8cb7-4dcf-8d5f-b9aebdbbaf89}
- Common.Extensions
-
{65c3a86a-716d-4e7d-ab67-1db00b3bf72d}
Commands.Common.Storage
diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/FunctionalTest.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/FunctionalTest.cs
index 0d9d3c02922f..728b2b2104a5 100644
--- a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/FunctionalTest.cs
+++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/FunctionalTest.cs
@@ -28,6 +28,7 @@
using Microsoft.WindowsAzure.Commands.ServiceManagement.Extensions;
using Microsoft.WindowsAzure.Commands.ServiceManagement.Model;
using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.ConfigDataInfo;
+using Hyak.Common;
namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests
{
diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/packages.config b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/packages.config
index 0a7ec7bb6770..a7b8f0f1819b 100644
--- a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/packages.config
+++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/packages.config
@@ -1,6 +1,11 @@
+
+
+
+
+
@@ -9,13 +14,11 @@
-
-
-
-
-
-
+
+
+
+
diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/AffinityGroups/GetAzureAffinityGroup.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/AffinityGroups/GetAzureAffinityGroup.cs
index 6a29b89d92d7..038163369a8b 100644
--- a/src/ServiceManagement/Compute/Commands.ServiceManagement/AffinityGroups/GetAzureAffinityGroup.cs
+++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/AffinityGroups/GetAzureAffinityGroup.cs
@@ -17,6 +17,7 @@
using Microsoft.WindowsAzure.Commands.ServiceManagement.Model;
using Microsoft.WindowsAzure.Commands.Utilities.Common;
using Microsoft.WindowsAzure.Management.Models;
+using Microsoft.WindowsAzure.Management;
namespace Microsoft.WindowsAzure.Commands.ServiceManagement.AffinityGroups
{
diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/AffinityGroups/NewAzureAffinityGroup.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/AffinityGroups/NewAzureAffinityGroup.cs
index dad4f06d3115..158efa3de0e5 100644
--- a/src/ServiceManagement/Compute/Commands.ServiceManagement/AffinityGroups/NewAzureAffinityGroup.cs
+++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/AffinityGroups/NewAzureAffinityGroup.cs
@@ -14,6 +14,7 @@
using System.Management.Automation;
using Microsoft.WindowsAzure.Commands.Utilities.Common;
+using Microsoft.WindowsAzure.Management;
using Microsoft.WindowsAzure.Management.Models;
namespace Microsoft.WindowsAzure.Commands.ServiceManagement.AffinityGroups
diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/AffinityGroups/RemoveAzureAffinityGroup.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/AffinityGroups/RemoveAzureAffinityGroup.cs
index c0b81b546976..aabda9f32e14 100644
--- a/src/ServiceManagement/Compute/Commands.ServiceManagement/AffinityGroups/RemoveAzureAffinityGroup.cs
+++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/AffinityGroups/RemoveAzureAffinityGroup.cs
@@ -14,6 +14,7 @@
using System.Management.Automation;
using Microsoft.WindowsAzure.Commands.Utilities.Common;
+using Microsoft.WindowsAzure.Management;
namespace Microsoft.WindowsAzure.Commands.ServiceManagement.AffinityGroups
{
diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/AffinityGroups/SetAzureAffinityGroup.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/AffinityGroups/SetAzureAffinityGroup.cs
index 867e6e9ab66c..f25990392975 100644
--- a/src/ServiceManagement/Compute/Commands.ServiceManagement/AffinityGroups/SetAzureAffinityGroup.cs
+++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/AffinityGroups/SetAzureAffinityGroup.cs
@@ -15,6 +15,7 @@
using System.Management.Automation;
using Microsoft.WindowsAzure.Commands.Utilities.Common;
using Microsoft.WindowsAzure.Management.Models;
+using Microsoft.WindowsAzure.Management;
namespace Microsoft.WindowsAzure.Commands.ServiceManagement.AffinityGroups
{
diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/Certificates/AddAzureCertificate.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/Certificates/AddAzureCertificate.cs
index 3ce2f72ec8ef..8a33d14170b3 100644
--- a/src/ServiceManagement/Compute/Commands.ServiceManagement/Certificates/AddAzureCertificate.cs
+++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/Certificates/AddAzureCertificate.cs
@@ -17,6 +17,7 @@
using System.Security.Permissions;
using Microsoft.WindowsAzure.Commands.ServiceManagement.Helpers;
using Microsoft.WindowsAzure.Commands.Utilities.Common;
+using Microsoft.WindowsAzure.Management.Compute;
using Microsoft.WindowsAzure.Management.Compute.Models;
namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Certificates
diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/Certificates/GetAzureCertificate.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/Certificates/GetAzureCertificate.cs
index c4ecb0c24c3a..43d16624c613 100644
--- a/src/ServiceManagement/Compute/Commands.ServiceManagement/Certificates/GetAzureCertificate.cs
+++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/Certificates/GetAzureCertificate.cs
@@ -19,6 +19,7 @@
using Microsoft.WindowsAzure.Commands.ServiceManagement.Properties;
using Microsoft.WindowsAzure.Commands.Utilities.Common;
using Microsoft.WindowsAzure.Management.Compute.Models;
+using Microsoft.WindowsAzure.Management.Compute;
namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Certificates
{
diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/Certificates/RemoveAzureCertificate.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/Certificates/RemoveAzureCertificate.cs
index 0005061093db..5a016055def9 100644
--- a/src/ServiceManagement/Compute/Commands.ServiceManagement/Certificates/RemoveAzureCertificate.cs
+++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/Certificates/RemoveAzureCertificate.cs
@@ -14,6 +14,7 @@
using System.Management.Automation;
using Microsoft.WindowsAzure.Commands.Utilities.Common;
+using Microsoft.WindowsAzure.Management.Compute;
using Microsoft.WindowsAzure.Management.Compute.Models;
namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Certificates
diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/Commands.ServiceManagement.csproj b/src/ServiceManagement/Compute/Commands.ServiceManagement/Commands.ServiceManagement.csproj
index 6dd3df82b68a..edf24aebccc9 100644
--- a/src/ServiceManagement/Compute/Commands.ServiceManagement/Commands.ServiceManagement.csproj
+++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/Commands.ServiceManagement.csproj
@@ -61,6 +61,23 @@
False
..\..\..\packages\AutoMapper.3.1.1\lib\net40\AutoMapper.Net4.dll
+
+ ..\..\..\packages\Hyak.Common.1.0.1\lib\portable-net403+win+wpa81\Hyak.Common.dll
+
+
+ ..\..\..\packages\Microsoft.Azure.Common.2.0.1\lib\net45\Microsoft.Azure.Common.dll
+
+
+ False
+ ..\..\..\packages\Microsoft.Azure.Common.Extensions.0.13.0-preview\lib\net45\Microsoft.Azure.Common.Extensions.dll
+
+
+ ..\..\..\packages\Microsoft.Azure.Common.2.0.1\lib\net45\Microsoft.Azure.Common.NetFramework.dll
+
+
+ False
+ ..\..\..\packages\Microsoft.Azure.Management.Resources.2.12.0-preview\lib\net40\Microsoft.Azure.ResourceManager.dll
+
..\..\..\packages\Microsoft.Data.Edm.5.6.0\lib\net40\Microsoft.Data.Edm.dll
@@ -70,6 +87,13 @@
..\..\..\packages\Microsoft.Data.Services.Client.5.6.0\lib\net40\Microsoft.Data.Services.Client.dll
+
+ False
+ ..\..\..\packages\Microsoft.IdentityModel.Clients.ActiveDirectory.2.11.10918.1222\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.dll
+
+
+ ..\..\..\packages\Microsoft.IdentityModel.Clients.ActiveDirectory.2.11.10918.1222\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.WindowsForms.dll
+
False
..\..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.dll
@@ -82,31 +106,24 @@
False
..\..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.Desktop.dll
-
- False
- ..\..\..\packages\Microsoft.WindowsAzure.Common.1.4.1\lib\net45\Microsoft.WindowsAzure.Common.dll
-
-
- False
- ..\..\..\packages\Microsoft.WindowsAzure.Common.1.4.1\lib\net45\Microsoft.WindowsAzure.Common.NetFramework.dll
-
..\..\..\packages\Microsoft.WindowsAzure.ConfigurationManager.2.0.3\lib\net40\Microsoft.WindowsAzure.Configuration.dll
-
+
False
- ..\..\..\packages\Microsoft.WindowsAzure.Management.2.1.0\lib\net40\Microsoft.WindowsAzure.Management.dll
+ ..\..\..\packages\Microsoft.WindowsAzure.Management.4.0.0\lib\net40\Microsoft.WindowsAzure.Management.dll
-
+
False
- ..\..\..\packages\Microsoft.WindowsAzure.Management.Compute.6.1.2\lib\net40\Microsoft.WindowsAzure.Management.Compute.dll
+ ..\..\..\packages\Microsoft.WindowsAzure.Management.Compute.8.0.0\lib\net40\Microsoft.WindowsAzure.Management.Compute.dll
-
- ..\..\..\packages\Microsoft.WindowsAzure.Management.Network.4.3.0\lib\net40\Microsoft.WindowsAzure.Management.Network.dll
+
+ False
+ ..\..\..\packages\Microsoft.WindowsAzure.Management.Network.6.0.0\lib\net40\Microsoft.WindowsAzure.Management.Network.dll
-
+
False
- ..\..\..\packages\Microsoft.WindowsAzure.Management.Storage.3.1.0\lib\net40\Microsoft.WindowsAzure.Management.Storage.dll
+ ..\..\..\packages\Microsoft.WindowsAzure.Management.Storage.5.0.0\lib\net40\Microsoft.WindowsAzure.Management.Storage.dll
False
@@ -500,10 +517,6 @@
-
- {b95c489c-8cb7-4dcf-8d5f-b9aebdbbaf89}
- Common.Extensions
-
{65c3a86a-716d-4e7d-ab67-1db00b3bf72d}
Commands.Common.Storage
diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/ADDomain/BaseAzureServiceADDomainExtension.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/ADDomain/BaseAzureServiceADDomainExtension.cs
index c7ec65afff17..df3eb288dcdb 100644
--- a/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/ADDomain/BaseAzureServiceADDomainExtension.cs
+++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/ADDomain/BaseAzureServiceADDomainExtension.cs
@@ -13,6 +13,7 @@
using Microsoft.WindowsAzure.Commands.ServiceManagement.Extensions.ADDomain;
using Microsoft.WindowsAzure.Commands.Utilities.Websites.Services;
using Microsoft.WindowsAzure.Management.Compute.Models;
+using Microsoft.Azure;
namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Extensions
{
diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/ADDomain/GetAzureServiceADDomainExtension.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/ADDomain/GetAzureServiceADDomainExtension.cs
index b8ce0481d04d..b87fb316d6f9 100644
--- a/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/ADDomain/GetAzureServiceADDomainExtension.cs
+++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/ADDomain/GetAzureServiceADDomainExtension.cs
@@ -15,6 +15,7 @@
using System.Linq;
using System.Management.Automation;
using Microsoft.WindowsAzure.Commands.ServiceManagement.Model;
+using Microsoft.WindowsAzure.Management.Compute;
namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Extensions
{
diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/Common/BaseAzureServiceExtensionCmdlet.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/Common/BaseAzureServiceExtensionCmdlet.cs
index 6ade3a1399b2..597f18fb8096 100644
--- a/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/Common/BaseAzureServiceExtensionCmdlet.cs
+++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/Common/BaseAzureServiceExtensionCmdlet.cs
@@ -23,7 +23,10 @@
using Microsoft.WindowsAzure.Commands.ServiceManagement.Properties;
using Microsoft.WindowsAzure.Commands.Utilities.CloudService;
using Microsoft.WindowsAzure.Commands.Utilities.Common;
+using Microsoft.WindowsAzure.Management.Compute;
using Microsoft.WindowsAzure.Management.Compute.Models;
+using Microsoft.Azure;
+using Hyak.Common;
namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Extensions
{
diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/Common/ExtensionManager.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/Common/ExtensionManager.cs
index e0434bd4c65d..48cd05446b6a 100644
--- a/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/Common/ExtensionManager.cs
+++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/Common/ExtensionManager.cs
@@ -19,6 +19,7 @@
using System.Security.Cryptography.X509Certificates;
using Microsoft.WindowsAzure.Commands.ServiceManagement.Properties;
using Microsoft.WindowsAzure.Commands.Utilities.Common;
+using Microsoft.WindowsAzure.Management.Compute;
using Microsoft.WindowsAzure.Management.Compute.Models;
namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Extensions
diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/Common/GetAzureServiceAvailableExtension.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/Common/GetAzureServiceAvailableExtension.cs
index 3caa7d119023..8ce2180944fb 100644
--- a/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/Common/GetAzureServiceAvailableExtension.cs
+++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/Common/GetAzureServiceAvailableExtension.cs
@@ -16,6 +16,7 @@
using System.Linq;
using System.Management.Automation;
using Microsoft.WindowsAzure.Commands.Utilities.Common;
+using Microsoft.WindowsAzure.Management.Compute;
using Microsoft.WindowsAzure.Management.Compute.Models;
namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Extensions
diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/Common/GetAzureServiceExtension.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/Common/GetAzureServiceExtension.cs
index 429e8908a7cf..b753b061a10a 100644
--- a/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/Common/GetAzureServiceExtension.cs
+++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/Common/GetAzureServiceExtension.cs
@@ -15,6 +15,7 @@
using System.Linq;
using System.Management.Automation;
using Microsoft.WindowsAzure.Commands.ServiceManagement.Model;
+using Microsoft.WindowsAzure.Management.Compute;
namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Extensions
{
diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/Diagnostics/BaseAzureServiceDiagnosticsExtension.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/Diagnostics/BaseAzureServiceDiagnosticsExtension.cs
index ec7e39873270..ebcbea4ef755 100644
--- a/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/Diagnostics/BaseAzureServiceDiagnosticsExtension.cs
+++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/Diagnostics/BaseAzureServiceDiagnosticsExtension.cs
@@ -14,7 +14,9 @@
using System.Xml;
using System.Xml.Linq;
using Microsoft.WindowsAzure.Commands.Common.Storage;
+using Microsoft.WindowsAzure.Commands.ServiceManagement;
using Microsoft.WindowsAzure.Commands.ServiceManagement.Properties;
+using Microsoft.WindowsAzure.Management.Storage;
namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Extensions
{
diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/Diagnostics/GetAzureServiceDiagnosticsExtension.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/Diagnostics/GetAzureServiceDiagnosticsExtension.cs
index 816f45611189..5a5989171958 100644
--- a/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/Diagnostics/GetAzureServiceDiagnosticsExtension.cs
+++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/Diagnostics/GetAzureServiceDiagnosticsExtension.cs
@@ -15,6 +15,7 @@
using System.Linq;
using System.Management.Automation;
using Microsoft.WindowsAzure.Commands.ServiceManagement.Model;
+using Microsoft.WindowsAzure.Management.Compute;
namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Extensions
{
diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/MicrosoftAntimalware/BaseAzureServiceAntimalwareExtension.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/MicrosoftAntimalware/BaseAzureServiceAntimalwareExtension.cs
index 87a78212edfe..17bac8c18e11 100644
--- a/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/MicrosoftAntimalware/BaseAzureServiceAntimalwareExtension.cs
+++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/MicrosoftAntimalware/BaseAzureServiceAntimalwareExtension.cs
@@ -19,9 +19,11 @@
using System.Xml.Linq;
using Microsoft.WindowsAzure.Commands.Common.Storage;
using Microsoft.WindowsAzure.Commands.ServiceManagement.Properties;
+using Microsoft.WindowsAzure.Management.Compute;
using Microsoft.WindowsAzure.Management.Compute.Models;
using Microsoft.WindowsAzure.Storage;
using Microsoft.WindowsAzure.Storage.Auth;
+using Microsoft.WindowsAzure.Management.Storage;
namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Extensions
{
@@ -43,79 +45,79 @@ public abstract class BaseAzureServiceAntimalwareExtensionCmdlet : BaseAzureServ
protected const string AntimalwareConfigurationXsd =
@"
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
";
// diagnostics
diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/MicrosoftAntimalware/GetAzureServiceAntimalwareExtension.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/MicrosoftAntimalware/GetAzureServiceAntimalwareExtension.cs
index 640334859975..a65eda483b12 100644
--- a/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/MicrosoftAntimalware/GetAzureServiceAntimalwareExtension.cs
+++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/MicrosoftAntimalware/GetAzureServiceAntimalwareExtension.cs
@@ -16,6 +16,7 @@
using System.Linq;
using System.Management.Automation;
using Microsoft.WindowsAzure.Commands.ServiceManagement.Model;
+using Microsoft.WindowsAzure.Management.Compute;
namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Extensions
{
diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/RDP/GetAzureServiceRemoteDesktopExtension.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/RDP/GetAzureServiceRemoteDesktopExtension.cs
index 4c1cd0aef63f..e41c17bc5ca2 100644
--- a/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/RDP/GetAzureServiceRemoteDesktopExtension.cs
+++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/RDP/GetAzureServiceRemoteDesktopExtension.cs
@@ -12,9 +12,10 @@
// limitations under the License.
// ----------------------------------------------------------------------------------
+using Microsoft.WindowsAzure.Commands.ServiceManagement.Model;
using System.Linq;
using System.Management.Automation;
-using Microsoft.WindowsAzure.Commands.ServiceManagement.Model;
+using Microsoft.WindowsAzure.Management.Compute;
namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Extensions
{
diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/Helpers/VirtualMachineImageHelper.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/Helpers/VirtualMachineImageHelper.cs
index 89eb27f3fa99..5a1072fcb8f9 100644
--- a/src/ServiceManagement/Compute/Commands.ServiceManagement/Helpers/VirtualMachineImageHelper.cs
+++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/Helpers/VirtualMachineImageHelper.cs
@@ -17,6 +17,7 @@
using System.Net;
using Microsoft.WindowsAzure.Commands.ServiceManagement.Model;
using Microsoft.WindowsAzure.Management.Compute;
+using Hyak.Common;
namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Helpers
{
diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/HostedServices/GetAzureDeployment.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/HostedServices/GetAzureDeployment.cs
index 6ab5a6734609..3a1ab23369f4 100644
--- a/src/ServiceManagement/Compute/Commands.ServiceManagement/HostedServices/GetAzureDeployment.cs
+++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/HostedServices/GetAzureDeployment.cs
@@ -16,6 +16,7 @@
using System.Management.Automation;
using Microsoft.WindowsAzure.Commands.ServiceManagement.Model;
using Microsoft.WindowsAzure.Commands.Utilities.Common;
+using Microsoft.WindowsAzure.Management.Compute;
using Microsoft.WindowsAzure.Management.Compute.Models;
namespace Microsoft.WindowsAzure.Commands.ServiceManagement.HostedServices
diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/HostedServices/GetAzureDeploymentEvent.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/HostedServices/GetAzureDeploymentEvent.cs
index 647bb12acf0f..479128d1f758 100644
--- a/src/ServiceManagement/Compute/Commands.ServiceManagement/HostedServices/GetAzureDeploymentEvent.cs
+++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/HostedServices/GetAzureDeploymentEvent.cs
@@ -18,6 +18,7 @@
using Microsoft.WindowsAzure.Commands.ServiceManagement.Model;
using Microsoft.WindowsAzure.Commands.Utilities.Common;
using Microsoft.WindowsAzure.Management.Compute.Models;
+using Microsoft.WindowsAzure.Management.Compute;
namespace Microsoft.WindowsAzure.Commands.ServiceManagement.HostedServices
{
diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/HostedServices/GetAzureLocation.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/HostedServices/GetAzureLocation.cs
index 2a48d1952df0..b95fa6461fb8 100644
--- a/src/ServiceManagement/Compute/Commands.ServiceManagement/HostedServices/GetAzureLocation.cs
+++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/HostedServices/GetAzureLocation.cs
@@ -17,6 +17,7 @@
using Microsoft.WindowsAzure.Commands.ServiceManagement.Model;
using Microsoft.WindowsAzure.Commands.Utilities.Common;
using Microsoft.WindowsAzure.Management.Models;
+using Microsoft.WindowsAzure.Management;
namespace Microsoft.WindowsAzure.Commands.ServiceManagement.HostedServices
{
diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/HostedServices/GetAzureOSVersion.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/HostedServices/GetAzureOSVersion.cs
index 9df4b4a037c7..36a42b98dfe3 100644
--- a/src/ServiceManagement/Compute/Commands.ServiceManagement/HostedServices/GetAzureOSVersion.cs
+++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/HostedServices/GetAzureOSVersion.cs
@@ -18,6 +18,7 @@
using Microsoft.WindowsAzure.Commands.ServiceManagement.Model;
using Microsoft.WindowsAzure.Commands.Utilities.Common;
using Microsoft.WindowsAzure.Management.Compute.Models;
+using Microsoft.WindowsAzure.Management.Compute;
namespace Microsoft.WindowsAzure.Commands.ServiceManagement.HostedServices
{
diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/HostedServices/GetAzureRole.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/HostedServices/GetAzureRole.cs
index 5f85385cd553..ffcba8579954 100644
--- a/src/ServiceManagement/Compute/Commands.ServiceManagement/HostedServices/GetAzureRole.cs
+++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/HostedServices/GetAzureRole.cs
@@ -21,11 +21,13 @@
using Microsoft.WindowsAzure.Commands.ServiceManagement.Helpers;
using Microsoft.WindowsAzure.Commands.ServiceManagement.Properties;
using Microsoft.WindowsAzure.Commands.Utilities.Common;
+using Microsoft.WindowsAzure.Management.Compute;
using Microsoft.WindowsAzure.Management.Compute.Models;
namespace Microsoft.WindowsAzure.Commands.ServiceManagement.HostedServices
{
using PVM = Model;
+ using Microsoft.Azure;
[Cmdlet(VerbsCommon.Get, "AzureRole"), OutputType(typeof(PVM.RoleContext), typeof(PVM.RoleInstanceContext))]
public class GetAzureRoleCommand : ServiceManagementBaseCmdlet
diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/HostedServices/GetAzureService.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/HostedServices/GetAzureService.cs
index f43d6de3f0e2..c00b1ebc3e36 100644
--- a/src/ServiceManagement/Compute/Commands.ServiceManagement/HostedServices/GetAzureService.cs
+++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/HostedServices/GetAzureService.cs
@@ -18,6 +18,7 @@
using Microsoft.WindowsAzure.Commands.ServiceManagement.Model;
using Microsoft.WindowsAzure.Commands.Utilities.Common;
using Microsoft.WindowsAzure.Management.Compute.Models;
+using Microsoft.WindowsAzure.Management.Compute;
namespace Microsoft.WindowsAzure.Commands.ServiceManagement.HostedServices
{
diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/HostedServices/MoveAzureDeployment.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/HostedServices/MoveAzureDeployment.cs
index 82be87f60022..b01da3dfcb3b 100644
--- a/src/ServiceManagement/Compute/Commands.ServiceManagement/HostedServices/MoveAzureDeployment.cs
+++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/HostedServices/MoveAzureDeployment.cs
@@ -17,7 +17,9 @@
using Microsoft.WindowsAzure.Commands.ServiceManagement.Model;
using Microsoft.WindowsAzure.Commands.ServiceManagement.Properties;
using Microsoft.WindowsAzure.Commands.Utilities.Common;
+using Microsoft.WindowsAzure.Management.Compute;
using Microsoft.WindowsAzure.Management.Compute.Models;
+using Hyak.Common;
namespace Microsoft.WindowsAzure.Commands.ServiceManagement.HostedServices
{
diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/HostedServices/NewAzureDeployment.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/HostedServices/NewAzureDeployment.cs
index a87cf667d1e7..9dce70e2c3ac 100644
--- a/src/ServiceManagement/Compute/Commands.ServiceManagement/HostedServices/NewAzureDeployment.cs
+++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/HostedServices/NewAzureDeployment.cs
@@ -22,10 +22,12 @@
using Microsoft.WindowsAzure.Commands.ServiceManagement.Properties;
using Microsoft.WindowsAzure.Commands.Utilities.Common;
using Microsoft.WindowsAzure.Management.Compute.Models;
+using Microsoft.WindowsAzure.Management.Compute;
namespace Microsoft.WindowsAzure.Commands.ServiceManagement.HostedServices
{
using PVM = Model;
+ using Hyak.Common;
///
/// Create a new deployment. Note that there shouldn't be a deployment
diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/HostedServices/NewAzureService.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/HostedServices/NewAzureService.cs
index a7c12cf9c5f1..3f5edeb979a4 100644
--- a/src/ServiceManagement/Compute/Commands.ServiceManagement/HostedServices/NewAzureService.cs
+++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/HostedServices/NewAzureService.cs
@@ -14,6 +14,7 @@
using System.Management.Automation;
using Microsoft.WindowsAzure.Commands.Utilities.Common;
+using Microsoft.WindowsAzure.Management.Compute;
using Microsoft.WindowsAzure.Management.Compute.Models;
namespace Microsoft.WindowsAzure.Commands.ServiceManagement.HostedServices
diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/HostedServices/RemoveAzureDeployment.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/HostedServices/RemoveAzureDeployment.cs
index 5d56ce3a484b..893db19a6af8 100644
--- a/src/ServiceManagement/Compute/Commands.ServiceManagement/HostedServices/RemoveAzureDeployment.cs
+++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/HostedServices/RemoveAzureDeployment.cs
@@ -17,6 +17,7 @@
using Microsoft.WindowsAzure.Commands.ServiceManagement.Model;
using Microsoft.WindowsAzure.Commands.ServiceManagement.Properties;
using Microsoft.WindowsAzure.Commands.Utilities.Common;
+using Microsoft.WindowsAzure.Management.Compute;
using Microsoft.WindowsAzure.Management.Compute.Models;
namespace Microsoft.WindowsAzure.Commands.ServiceManagement.HostedServices
diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/HostedServices/ResetAzureRoleInstance.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/HostedServices/ResetAzureRoleInstance.cs
index 3396b8d7be74..1db59aa2dd07 100644
--- a/src/ServiceManagement/Compute/Commands.ServiceManagement/HostedServices/ResetAzureRoleInstance.cs
+++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/HostedServices/ResetAzureRoleInstance.cs
@@ -18,6 +18,7 @@
using Microsoft.WindowsAzure.Commands.ServiceManagement.Model;
using Microsoft.WindowsAzure.Commands.ServiceManagement.Properties;
using Microsoft.WindowsAzure.Commands.Utilities.Common;
+using Microsoft.WindowsAzure.Management.Compute;
using Microsoft.WindowsAzure.Management.Compute.Models;
namespace Microsoft.WindowsAzure.Commands.ServiceManagement.HostedServices
diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/HostedServices/SetAzureDeployment.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/HostedServices/SetAzureDeployment.cs
index 4fdc9c4c49fc..fa2b277cbc8e 100644
--- a/src/ServiceManagement/Compute/Commands.ServiceManagement/HostedServices/SetAzureDeployment.cs
+++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/HostedServices/SetAzureDeployment.cs
@@ -21,6 +21,8 @@
using Microsoft.WindowsAzure.Commands.ServiceManagement.Properties;
using Microsoft.WindowsAzure.Commands.Utilities.Common;
using Microsoft.WindowsAzure.Management.Compute.Models;
+using Microsoft.WindowsAzure.Management.Compute;
+using Hyak.Common;
namespace Microsoft.WindowsAzure.Commands.ServiceManagement.HostedServices
{
diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/HostedServices/SetAzureRole.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/HostedServices/SetAzureRole.cs
index a21137275f0a..ba7bdb099e74 100644
--- a/src/ServiceManagement/Compute/Commands.ServiceManagement/HostedServices/SetAzureRole.cs
+++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/HostedServices/SetAzureRole.cs
@@ -19,7 +19,9 @@
using Microsoft.WindowsAzure.Commands.ServiceManagement.Model;
using Microsoft.WindowsAzure.Commands.ServiceManagement.Properties;
using Microsoft.WindowsAzure.Commands.Utilities.Common;
+using Microsoft.WindowsAzure.Management.Compute;
using Microsoft.WindowsAzure.Management.Compute.Models;
+using Microsoft.Azure;
namespace Microsoft.WindowsAzure.Commands.ServiceManagement.HostedServices
{
diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/HostedServices/SetAzureService.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/HostedServices/SetAzureService.cs
index c9f35ba29c15..4af7c54f77d3 100644
--- a/src/ServiceManagement/Compute/Commands.ServiceManagement/HostedServices/SetAzureService.cs
+++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/HostedServices/SetAzureService.cs
@@ -16,6 +16,7 @@
using System.Management.Automation;
using Microsoft.WindowsAzure.Commands.ServiceManagement.Properties;
using Microsoft.WindowsAzure.Commands.Utilities.Common;
+using Microsoft.WindowsAzure.Management.Compute;
using Microsoft.WindowsAzure.Management.Compute.Models;
namespace Microsoft.WindowsAzure.Commands.ServiceManagement.HostedServices
diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/HostedServices/SetAzureWalkUpgradeDomain.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/HostedServices/SetAzureWalkUpgradeDomain.cs
index a31b17c84130..30f92877f445 100644
--- a/src/ServiceManagement/Compute/Commands.ServiceManagement/HostedServices/SetAzureWalkUpgradeDomain.cs
+++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/HostedServices/SetAzureWalkUpgradeDomain.cs
@@ -16,6 +16,7 @@
using System.Management.Automation;
using Microsoft.WindowsAzure.Commands.ServiceManagement.Model;
using Microsoft.WindowsAzure.Commands.Utilities.Common;
+using Microsoft.WindowsAzure.Management.Compute;
using Microsoft.WindowsAzure.Management.Compute.Models;
namespace Microsoft.WindowsAzure.Commands.ServiceManagement.HostedServices
diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/DiskRepository/AddAzureDisk.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/DiskRepository/AddAzureDisk.cs
index ba81494c4bd7..414967f68808 100644
--- a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/DiskRepository/AddAzureDisk.cs
+++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/DiskRepository/AddAzureDisk.cs
@@ -16,6 +16,7 @@
using System.Management.Automation;
using Microsoft.WindowsAzure.Commands.ServiceManagement.Model;
using Microsoft.WindowsAzure.Commands.Utilities.Common;
+using Microsoft.WindowsAzure.Management.Compute;
using Microsoft.WindowsAzure.Management.Compute.Models;
namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS
diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/DiskRepository/AddAzureVMImage.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/DiskRepository/AddAzureVMImage.cs
index 33ec1435b200..44dd6713f78e 100644
--- a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/DiskRepository/AddAzureVMImage.cs
+++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/DiskRepository/AddAzureVMImage.cs
@@ -19,6 +19,7 @@
using Microsoft.WindowsAzure.Commands.ServiceManagement.Model;
using Microsoft.WindowsAzure.Commands.ServiceManagement.Properties;
using Microsoft.WindowsAzure.Commands.Utilities.Common;
+using Microsoft.WindowsAzure.Management.Compute;
using Microsoft.WindowsAzure.Management.Compute.Models;
namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.DiskRepository
diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/DiskRepository/GetAzureDisk.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/DiskRepository/GetAzureDisk.cs
index 7587f0bcb043..2940e676d8b6 100644
--- a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/DiskRepository/GetAzureDisk.cs
+++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/DiskRepository/GetAzureDisk.cs
@@ -17,6 +17,7 @@
using Microsoft.WindowsAzure.Commands.ServiceManagement.Model;
using Microsoft.WindowsAzure.Commands.Utilities.Common;
using Microsoft.WindowsAzure.Management.Compute.Models;
+using Microsoft.WindowsAzure.Management.Compute;
namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS
{
diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/DiskRepository/GetAzureVMImage.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/DiskRepository/GetAzureVMImage.cs
index 4df01afc0a97..557e0b9f56ce 100644
--- a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/DiskRepository/GetAzureVMImage.cs
+++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/DiskRepository/GetAzureVMImage.cs
@@ -19,6 +19,7 @@
using Microsoft.WindowsAzure.Commands.ServiceManagement.Model;
using Microsoft.WindowsAzure.Commands.Utilities.Common;
using Microsoft.WindowsAzure.Management.Compute.Models;
+using Microsoft.WindowsAzure.Management.Compute;
namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.DiskRepository
{
diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/DiskRepository/RemoveAzureDisk.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/DiskRepository/RemoveAzureDisk.cs
index ae72aacb89bc..40756f84c43a 100644
--- a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/DiskRepository/RemoveAzureDisk.cs
+++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/DiskRepository/RemoveAzureDisk.cs
@@ -14,6 +14,7 @@
using System.Management.Automation;
using Microsoft.WindowsAzure.Commands.Utilities.Common;
+using Microsoft.WindowsAzure.Management.Compute;
namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS
{
diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/DiskRepository/RemoveAzureVMImage.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/DiskRepository/RemoveAzureVMImage.cs
index 43a90b9838bf..09724353b4d5 100644
--- a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/DiskRepository/RemoveAzureVMImage.cs
+++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/DiskRepository/RemoveAzureVMImage.cs
@@ -17,6 +17,8 @@
using Microsoft.WindowsAzure.Commands.ServiceManagement.Model;
using Microsoft.WindowsAzure.Commands.ServiceManagement.Properties;
using Microsoft.WindowsAzure.Commands.Utilities.Common;
+using Microsoft.Azure;
+using Microsoft.WindowsAzure.Management.Compute;
namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.DiskRepository
{
@@ -51,7 +53,7 @@ protected override void OnProcessRecord()
this.CommandRuntime.ToString(),
() =>
{
- OperationResponse op = null;
+ AzureOperationResponse op = null;
var imageType = new VirtualMachineImageHelper(this.ComputeClient).GetImageType(this.ImageName);
bool isOSImage = imageType.HasFlag(VirtualMachineImageType.OSImage);
diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/DiskRepository/UpdateAzureDisk.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/DiskRepository/UpdateAzureDisk.cs
index a4df2ab42c07..d6858b714571 100644
--- a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/DiskRepository/UpdateAzureDisk.cs
+++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/DiskRepository/UpdateAzureDisk.cs
@@ -15,6 +15,8 @@
using System.Management.Automation;
using Microsoft.WindowsAzure.Commands.ServiceManagement.Model;
using Microsoft.WindowsAzure.Commands.Utilities.Common;
+using Microsoft.WindowsAzure.Management.Storage.Models;
+using Microsoft.WindowsAzure.Management.Compute;
using Microsoft.WindowsAzure.Management.Compute.Models;
namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS
diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/DiskRepository/UpdateAzureVMImage.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/DiskRepository/UpdateAzureVMImage.cs
index 070848441ba9..1b40f28d6355 100644
--- a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/DiskRepository/UpdateAzureVMImage.cs
+++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/DiskRepository/UpdateAzureVMImage.cs
@@ -20,6 +20,7 @@
using Microsoft.WindowsAzure.Commands.ServiceManagement.Model;
using Microsoft.WindowsAzure.Commands.ServiceManagement.Properties;
using Microsoft.WindowsAzure.Commands.Utilities.Common;
+using Microsoft.WindowsAzure.Management.Compute;
using Microsoft.WindowsAzure.Management.Compute.Models;
namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.DiskRepository
diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Endpoints/SetAzureLoadBalancedEndpoint.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Endpoints/SetAzureLoadBalancedEndpoint.cs
index 5a91e86b088e..689b59c196c1 100644
--- a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Endpoints/SetAzureLoadBalancedEndpoint.cs
+++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Endpoints/SetAzureLoadBalancedEndpoint.cs
@@ -17,8 +17,10 @@
using System.Linq;
using System.Management.Automation;
using AutoMapper;
+using Microsoft.WindowsAzure.Commands.ServiceManagement;
using Microsoft.WindowsAzure.Commands.ServiceManagement.Properties;
using Microsoft.WindowsAzure.Commands.Utilities.Common;
+using Microsoft.WindowsAzure.Management.Compute;
namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.Endpoints
{
diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/Chef/SetAzureVMChefExtension.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/Chef/SetAzureVMChefExtension.cs
index 246196cfa6f9..f3ad201b4a80 100644
--- a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/Chef/SetAzureVMChefExtension.cs
+++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/Chef/SetAzureVMChefExtension.cs
@@ -16,8 +16,10 @@
using System;
using System.IO;
using System.Text.RegularExpressions;
+using Microsoft.WindowsAzure.Commands.ServiceManagement;
using Microsoft.WindowsAzure.Commands.ServiceManagement.Model;
using Microsoft.WindowsAzure.Commands.ServiceManagement.Helpers;
+using Microsoft.WindowsAzure.Management.Compute;
namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.Extensions
{
diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/Common/GetAzureVMAvailableExtension.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/Common/GetAzureVMAvailableExtension.cs
index 4a296001a587..be39aba0932c 100644
--- a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/Common/GetAzureVMAvailableExtension.cs
+++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/Common/GetAzureVMAvailableExtension.cs
@@ -16,6 +16,7 @@
using System.Linq;
using System.Management.Automation;
using Microsoft.WindowsAzure.Commands.Utilities.Common;
+using Microsoft.WindowsAzure.Management.Compute;
using Microsoft.WindowsAzure.Management.Compute.Models;
namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.Extensions
diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/CustomScript/SetAzureVMCustomScriptExtension.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/CustomScript/SetAzureVMCustomScriptExtension.cs
index 23167af9a292..c39ca7ba484b 100644
--- a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/CustomScript/SetAzureVMCustomScriptExtension.cs
+++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/CustomScript/SetAzureVMCustomScriptExtension.cs
@@ -17,12 +17,14 @@
using System.Management.Automation;
using Microsoft.WindowsAzure.Commands.Common;
using Microsoft.Azure.Common.Extensions.Models;
+using Microsoft.WindowsAzure.Commands.ServiceManagement;
using Microsoft.WindowsAzure.Commands.ServiceManagement.Model;
using Microsoft.WindowsAzure.Commands.ServiceManagement.Properties;
using Microsoft.WindowsAzure.Storage;
using Microsoft.WindowsAzure.Storage.Auth;
using Microsoft.WindowsAzure.Storage.Blob;
using Microsoft.Azure.Common.Extensions;
+using Microsoft.WindowsAzure.Management.Storage;
namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.Extensions
{
diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/DSC/ServiceManagementBaseCmdletExtentions.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/DSC/ServiceManagementBaseCmdletExtentions.cs
index 05233b2f906d..e79fd87c7d8f 100644
--- a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/DSC/ServiceManagementBaseCmdletExtentions.cs
+++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/DSC/ServiceManagementBaseCmdletExtentions.cs
@@ -20,6 +20,7 @@
using Microsoft.WindowsAzure.Commands.ServiceManagement.Properties;
using Microsoft.WindowsAzure.Commands.Utilities.Common;
using Microsoft.WindowsAzure.Storage.Auth;
+using Microsoft.WindowsAzure.Management.Storage;
namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.Extensions.DSC
{
diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/Diagnostics/SetAzureVMDiagnosticsExtension.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/Diagnostics/SetAzureVMDiagnosticsExtension.cs
index 8886bb05ada9..7d2a7fc1d621 100644
--- a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/Diagnostics/SetAzureVMDiagnosticsExtension.cs
+++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/Diagnostics/SetAzureVMDiagnosticsExtension.cs
@@ -20,6 +20,7 @@
using Microsoft.WindowsAzure.Commands.Common.Storage;
using Microsoft.WindowsAzure.Commands.ServiceManagement.Model;
using Microsoft.WindowsAzure.Commands.ServiceManagement.Properties;
+using Microsoft.WindowsAzure.Management.Storage;
namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.Extensions
{
diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/MicrosoftAntimalware/VirtualMachineMicrosoftAntimalwareExtensionCmdletBase.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/MicrosoftAntimalware/VirtualMachineMicrosoftAntimalwareExtensionCmdletBase.cs
index 31f813f229c6..81b1b92bf25b 100644
--- a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/MicrosoftAntimalware/VirtualMachineMicrosoftAntimalwareExtensionCmdletBase.cs
+++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/MicrosoftAntimalware/VirtualMachineMicrosoftAntimalwareExtensionCmdletBase.cs
@@ -25,6 +25,7 @@ namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.Extensions.Micr
using WindowsAzure.Storage.Auth;
using Newtonsoft.Json.Schema;
using Newtonsoft.Json.Linq;
+ using Microsoft.WindowsAzure.Management.Storage;
public class VirtualMachineMicrosoftAntimalwareExtensionCmdletBase : VirtualMachineExtensionCmdletBase
{
@@ -42,32 +43,32 @@ public class VirtualMachineMicrosoftAntimalwareExtensionCmdletBase : VirtualMach
""runtimeSettings"": [{
""handlerSettings"": {
""publicSettings"": {
- ""title"": ""MicrosoftAntimalwareConfig"",
+ ""title"": ""MicrosoftAntimalwareConfig"",
""description"": ""Microsoft Antimalware Configuration"",
- ""type"": ""object"",
- ""properties"": {
- ""AntimalwareEnabled"": { ""type"": ""boolean"", ""required"" : true },
- ""RealtimeProtectionEnabled"": { ""type"": ""boolean"" },
- ""ScheduledScanSettings"": {
- ""type"": ""object"",
- ""properties"": {
- ""isEnabled"": { ""type"": ""boolean""},
- ""day"": {""type"": ""integer""},
- ""time"": {""type"": ""integer""},
- ""scanType"": {""type"": ""string""}
- },
+ ""type"": ""object"",
+ ""properties"": {
+ ""AntimalwareEnabled"": { ""type"": ""boolean"", ""required"" : true },
+ ""RealtimeProtectionEnabled"": { ""type"": ""boolean"" },
+ ""ScheduledScanSettings"": {
+ ""type"": ""object"",
+ ""properties"": {
+ ""isEnabled"": { ""type"": ""boolean""},
+ ""day"": {""type"": ""integer""},
+ ""time"": {""type"": ""integer""},
+ ""scanType"": {""type"": ""string""}
+ },
""additionalProperties"": false
- },
- ""Exclusions"": {
- ""type"": ""object"",
- ""properties"": {
- ""Extensions"": {""type"": ""string""},
- ""Paths"": {""type"": ""string""},
- ""Processes"": {""type"": ""string""}
- },
+ },
+ ""Exclusions"": {
+ ""type"": ""object"",
+ ""properties"": {
+ ""Extensions"": {""type"": ""string""},
+ ""Paths"": {""type"": ""string""},
+ ""Processes"": {""type"": ""string""}
+ },
""additionalProperties"": false
- },
- },
+ },
+ },
""additionalProperties"": false
}
}
diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/SqlServer/GetAzureVMSqlServerExtension.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/SqlServer/GetAzureVMSqlServerExtension.cs
index c179bbcbd5e4..486ee3ca2f4e 100644
--- a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/SqlServer/GetAzureVMSqlServerExtension.cs
+++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/SqlServer/GetAzureVMSqlServerExtension.cs
@@ -12,18 +12,21 @@
// limitations under the License.
// ----------------------------------------------------------------------------------
+using System.Collections.Generic;
+using System.Globalization;
using System.Linq;
using System.Management.Automation;
-using Microsoft.WindowsAzure.Commands.ServiceManagement.Helpers;
+using System.Net;
using Newtonsoft.Json;
+using Microsoft.WindowsAzure.Commands.ServiceManagement;
+using Microsoft.WindowsAzure.Commands.ServiceManagement.Helpers;
using Microsoft.WindowsAzure.Commands.ServiceManagement.Model;
-using System.Collections.Generic;
-using System.Net;
-using System.Globalization;
+using Microsoft.WindowsAzure.Management.Compute;
namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.Extensions
{
using NSM = Management.Compute.Models;
+ using Hyak.Common;
///
/// Get-AzureVMSqlServerExtension implementation
diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/SqlServer/NewAzureVMSqlServerAutoBackupConfig.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/SqlServer/NewAzureVMSqlServerAutoBackupConfig.cs
index dd361d54199f..ba210d00758a 100644
--- a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/SqlServer/NewAzureVMSqlServerAutoBackupConfig.cs
+++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/SqlServer/NewAzureVMSqlServerAutoBackupConfig.cs
@@ -24,6 +24,7 @@
using Microsoft.WindowsAzure.Commands.ServiceManagement.Properties;
using Microsoft.WindowsAzure.Commands.Utilities.Common;
using Microsoft.WindowsAzure.Commands.ServiceManagement.Helpers;
+using Microsoft.WindowsAzure.Management.Storage;
namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.Extensions
{
diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/SqlServer/SetAzureVMSqlServerExtension.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/SqlServer/SetAzureVMSqlServerExtension.cs
index 42177ad9f257..fbce66eab59a 100644
--- a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/SqlServer/SetAzureVMSqlServerExtension.cs
+++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/SqlServer/SetAzureVMSqlServerExtension.cs
@@ -16,9 +16,13 @@
using System.Linq;
using System.Management.Automation;
using Microsoft.WindowsAzure.Commands.Common.Storage;
+using Microsoft.WindowsAzure.Commands.ServiceManagement;
using Microsoft.WindowsAzure.Commands.ServiceManagement.Model;
using Microsoft.WindowsAzure.Commands.ServiceManagement.Properties;
using System.Net;
+using Microsoft.WindowsAzure.Management.Compute;
+using Microsoft.WindowsAzure.Management;
+using Hyak.Common;
namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.Extensions
{
diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/IaaSDeploymentManagementCmdletBase.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/IaaSDeploymentManagementCmdletBase.cs
index 0bd748cb9a7b..7bf76be3cf08 100644
--- a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/IaaSDeploymentManagementCmdletBase.cs
+++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/IaaSDeploymentManagementCmdletBase.cs
@@ -22,6 +22,9 @@
using Microsoft.WindowsAzure.Commands.ServiceManagement.Properties;
using Microsoft.WindowsAzure.Commands.Utilities.Common;
using Microsoft.WindowsAzure.Management.Compute.Models;
+using Microsoft.Azure;
+using Microsoft.WindowsAzure.Management.Compute;
+using Hyak.Common;
namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS
{
diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Network/AddAzureDns.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Network/AddAzureDns.cs
index 868c139f6620..ee6d66bb49e2 100644
--- a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Network/AddAzureDns.cs
+++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Network/AddAzureDns.cs
@@ -15,6 +15,7 @@
using System.Management.Automation;
using Microsoft.WindowsAzure.Commands.Utilities.Common;
using Microsoft.WindowsAzure.Management.Compute.Models;
+using Microsoft.WindowsAzure.Management.Compute;
namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.Network
{
diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Network/AddAzureInternalLoadBalancer.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Network/AddAzureInternalLoadBalancer.cs
index ab56fd33c076..a00efbb15950 100644
--- a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Network/AddAzureInternalLoadBalancer.cs
+++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Network/AddAzureInternalLoadBalancer.cs
@@ -15,6 +15,7 @@
using System.Management.Automation;
using System.Net;
using Microsoft.WindowsAzure.Commands.Utilities.Common;
+using Microsoft.WindowsAzure.Management.Compute;
using Microsoft.WindowsAzure.Management.Compute.Models;
namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS
diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Network/GetAzureInternalLoadBalancer.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Network/GetAzureInternalLoadBalancer.cs
index c00e6b47cc1b..7e79378b4a3d 100644
--- a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Network/GetAzureInternalLoadBalancer.cs
+++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Network/GetAzureInternalLoadBalancer.cs
@@ -19,6 +19,7 @@
using Microsoft.WindowsAzure.Commands.ServiceManagement.Model;
using Microsoft.WindowsAzure.Commands.Utilities.Common;
using Microsoft.WindowsAzure.Management.Compute.Models;
+using Microsoft.WindowsAzure.Management.Compute;
namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS
{
diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Network/GetAzureReservedIP.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Network/GetAzureReservedIP.cs
index f268878ddddb..c3ccaf6c8060 100644
--- a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Network/GetAzureReservedIP.cs
+++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Network/GetAzureReservedIP.cs
@@ -18,6 +18,7 @@
using Microsoft.WindowsAzure.Commands.ServiceManagement.Model;
using Microsoft.WindowsAzure.Commands.Utilities.Common;
using Microsoft.WindowsAzure.Management.Network.Models;
+using Microsoft.WindowsAzure.Management.Network;
namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS
{
diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Network/GetAzureVNetConfig.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Network/GetAzureVNetConfig.cs
index b7b19458176c..02731ff680d2 100644
--- a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Network/GetAzureVNetConfig.cs
+++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Network/GetAzureVNetConfig.cs
@@ -16,9 +16,11 @@
using System.IO;
using System.Management.Automation;
using System.Net;
+using Hyak.Common;
using Microsoft.WindowsAzure.Commands.ServiceManagement.Model;
using Microsoft.WindowsAzure.Commands.ServiceManagement.Properties;
using Microsoft.WindowsAzure.Commands.Utilities.Common;
+using Microsoft.WindowsAzure.Management.Network;
namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS
{
diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Network/GetAzureVNetSite.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Network/GetAzureVNetSite.cs
index 4afc53af5276..3b665bd54e35 100644
--- a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Network/GetAzureVNetSite.cs
+++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Network/GetAzureVNetSite.cs
@@ -21,7 +21,9 @@
using Microsoft.WindowsAzure.Commands.ServiceManagement.Model;
using Microsoft.WindowsAzure.Commands.ServiceManagement.Properties;
using Microsoft.WindowsAzure.Commands.Utilities.Common;
+using Microsoft.WindowsAzure.Management.Network;
using Microsoft.WindowsAzure.Management.Network.Models;
+using Hyak.Common;
namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS
{
diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Network/NewAzureReservedIP.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Network/NewAzureReservedIP.cs
index 9806a32e84db..8f18ba394a17 100644
--- a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Network/NewAzureReservedIP.cs
+++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Network/NewAzureReservedIP.cs
@@ -16,6 +16,7 @@
using Microsoft.WindowsAzure.Commands.ServiceManagement.Model;
using Microsoft.WindowsAzure.Commands.Utilities.Common;
using Microsoft.WindowsAzure.Management.Network.Models;
+using Microsoft.WindowsAzure.Management.Network;
namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS
{
diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Network/RemoveAzureDns.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Network/RemoveAzureDns.cs
index 80c961cce520..dc6f249b129a 100644
--- a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Network/RemoveAzureDns.cs
+++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Network/RemoveAzureDns.cs
@@ -16,6 +16,7 @@
using Microsoft.WindowsAzure.Commands.ServiceManagement.Properties;
using Microsoft.WindowsAzure.Commands.Utilities.Common;
using Microsoft.WindowsAzure.Commands.Utilities.Store;
+using Microsoft.WindowsAzure.Management.Compute;
using Microsoft.WindowsAzure.Management.Compute.Models;
namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.Network
diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Network/RemoveAzureInternalLoadBalancer.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Network/RemoveAzureInternalLoadBalancer.cs
index a7fc9b7a0db6..332fd79e6b81 100644
--- a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Network/RemoveAzureInternalLoadBalancer.cs
+++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Network/RemoveAzureInternalLoadBalancer.cs
@@ -17,6 +17,8 @@
using System.Management.Automation;
using Microsoft.WindowsAzure.Commands.Utilities.Common;
using Microsoft.WindowsAzure.Management.Compute.Models;
+using Microsoft.WindowsAzure.Management.Compute;
+using Microsoft.Azure;
namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS
{
@@ -39,7 +41,7 @@ protected override void OnProcessRecord()
CommandRuntime.ToString(),
() =>
{
- OperationResponse op = null;
+ AzureOperationResponse op = null;
var deployment = this.ComputeClient.Deployments.GetBySlot(this.ServiceName, DeploymentSlot.Production);
if (deployment.LoadBalancers != null && deployment.LoadBalancers.Any())
{
diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Network/RemoveAzureReservedIP.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Network/RemoveAzureReservedIP.cs
index a15d45301c56..26d431957428 100644
--- a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Network/RemoveAzureReservedIP.cs
+++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Network/RemoveAzureReservedIP.cs
@@ -16,6 +16,7 @@
using Microsoft.WindowsAzure.Commands.ServiceManagement.Model;
using Microsoft.WindowsAzure.Commands.ServiceManagement.Properties;
using Microsoft.WindowsAzure.Commands.Utilities.Common;
+using Microsoft.WindowsAzure.Management.Network;
namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS
{
diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Network/RemoveAzureVNetConfig.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Network/RemoveAzureVNetConfig.cs
index 1b49e9f10e17..f0f13bf7d5d8 100644
--- a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Network/RemoveAzureVNetConfig.cs
+++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Network/RemoveAzureVNetConfig.cs
@@ -17,6 +17,7 @@
using System.Xml.Linq;
using Microsoft.WindowsAzure.Commands.Utilities.Common;
using Microsoft.WindowsAzure.Management.Network.Models;
+using Microsoft.WindowsAzure.Management.Network;
namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS
{
diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Network/SetAzureDns.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Network/SetAzureDns.cs
index 0a7188e9475d..6b5c63d9ff48 100644
--- a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Network/SetAzureDns.cs
+++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Network/SetAzureDns.cs
@@ -15,6 +15,7 @@
using System.Management.Automation;
using Microsoft.WindowsAzure.Commands.Utilities.Common;
using Microsoft.WindowsAzure.Management.Compute.Models;
+using Microsoft.WindowsAzure.Management.Compute;
namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.Network
{
diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Network/SetAzureInternalLoadBalancer.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Network/SetAzureInternalLoadBalancer.cs
index 5f5c40265bcc..097d2c1ee54e 100644
--- a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Network/SetAzureInternalLoadBalancer.cs
+++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Network/SetAzureInternalLoadBalancer.cs
@@ -15,6 +15,7 @@
using System.Management.Automation;
using System.Net;
using Microsoft.WindowsAzure.Commands.Utilities.Common;
+using Microsoft.WindowsAzure.Management.Compute;
using Microsoft.WindowsAzure.Management.Compute.Models;
namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS
diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Network/SetAzureVNetConfig.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Network/SetAzureVNetConfig.cs
index 83b8f5640b84..9dd88a6383d8 100644
--- a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Network/SetAzureVNetConfig.cs
+++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Network/SetAzureVNetConfig.cs
@@ -17,6 +17,7 @@
using System.Management.Automation;
using Microsoft.WindowsAzure.Commands.ServiceManagement.Properties;
using Microsoft.WindowsAzure.Commands.Utilities.Common;
+using Microsoft.WindowsAzure.Management.Network;
using Microsoft.WindowsAzure.Management.Network.Models;
namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS
diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Network/TestAzureStaticVNetIP.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Network/TestAzureStaticVNetIP.cs
index 9d6f02ab8d35..da6ee1bf3a9f 100644
--- a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Network/TestAzureStaticVNetIP.cs
+++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Network/TestAzureStaticVNetIP.cs
@@ -15,6 +15,7 @@
using System.Management.Automation;
using Microsoft.WindowsAzure.Commands.ServiceManagement.Model;
using Microsoft.WindowsAzure.Commands.Utilities.Common;
+using Microsoft.WindowsAzure.Management.Network;
using Microsoft.WindowsAzure.Management.Network.Models;
namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS
diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/PersistentVMs/GetAzureRemoteDesktopFile.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/PersistentVMs/GetAzureRemoteDesktopFile.cs
index 09cbd3754521..b026198758f9 100644
--- a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/PersistentVMs/GetAzureRemoteDesktopFile.cs
+++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/PersistentVMs/GetAzureRemoteDesktopFile.cs
@@ -20,6 +20,7 @@
using System.Security.Permissions;
using Microsoft.WindowsAzure.Commands.ServiceManagement.Properties;
using Microsoft.WindowsAzure.Commands.Utilities.Common;
+using Microsoft.WindowsAzure.Management.Compute;
namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.PersistentVMs
{
diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/PersistentVMs/GetAzureVM.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/PersistentVMs/GetAzureVM.cs
index 4ee86ed627b7..d927cd6df07a 100644
--- a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/PersistentVMs/GetAzureVM.cs
+++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/PersistentVMs/GetAzureVM.cs
@@ -20,8 +20,10 @@
using System.Management.Automation;
using System.Net;
using AutoMapper;
+using Hyak.Common;
using Microsoft.WindowsAzure.Commands.ServiceManagement.Helpers;
using Microsoft.WindowsAzure.Commands.ServiceManagement.Properties;
+using Microsoft.WindowsAzure.Management.Compute;
namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS
{
diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/PersistentVMs/NewAzureQuickVM.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/PersistentVMs/NewAzureQuickVM.cs
index fe3ff8b244fa..89547a2adc39 100644
--- a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/PersistentVMs/NewAzureQuickVM.cs
+++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/PersistentVMs/NewAzureQuickVM.cs
@@ -28,11 +28,14 @@
using Microsoft.WindowsAzure.Commands.ServiceManagement.Model;
using Microsoft.WindowsAzure.Commands.ServiceManagement.Properties;
using Microsoft.WindowsAzure.Commands.Utilities.Common;
+using Microsoft.WindowsAzure.Management.Compute;
using Microsoft.WindowsAzure.Management.Compute.Models;
using Microsoft.WindowsAzure.Storage;
using ConfigurationSet = Microsoft.WindowsAzure.Commands.ServiceManagement.Model.ConfigurationSet;
using InputEndpoint = Microsoft.WindowsAzure.Commands.ServiceManagement.Model.InputEndpoint;
using OSVirtualHardDisk = Microsoft.WindowsAzure.Commands.ServiceManagement.Model.OSVirtualHardDisk;
+using Microsoft.Azure;
+using Hyak.Common;
namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.PersistentVMs
{
diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/PersistentVMs/NewAzureVM.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/PersistentVMs/NewAzureVM.cs
index 18678c8dc634..e68837914729 100644
--- a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/PersistentVMs/NewAzureVM.cs
+++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/PersistentVMs/NewAzureVM.cs
@@ -23,7 +23,10 @@
using Microsoft.WindowsAzure.Commands.ServiceManagement.Properties;
using Microsoft.WindowsAzure.Commands.Utilities.Common;
using Microsoft.WindowsAzure.Management.Compute.Models;
+using Microsoft.WindowsAzure.Management.Compute;
using Microsoft.WindowsAzure.Storage;
+using Microsoft.Azure;
+using Hyak.Common;
namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.PersistentVMs
{
@@ -190,7 +193,7 @@ public void NewAzureVMProcess()
}
catch (CloudException ex)
{
- if (string.Equals(ex.ErrorCode, "ConflictError"))
+ if (string.Equals(ex.Error.Code, "ConflictError"))
{
HostedServiceGetResponse existingService = this.ComputeClient.HostedServices.Get(this.ServiceName);
@@ -207,7 +210,7 @@ public void NewAzureVMProcess()
{
// The same service name is already created under the same subscription,
// and its affinity group or location is matched with the given parameter.
- this.WriteWarning(ex.ErrorMessage);
+ this.WriteWarning(ex.Error.Message);
}
else
{
diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/PersistentVMs/RemoveAzureVM.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/PersistentVMs/RemoveAzureVM.cs
index a89edb11d806..5784f1d24125 100644
--- a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/PersistentVMs/RemoveAzureVM.cs
+++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/PersistentVMs/RemoveAzureVM.cs
@@ -18,6 +18,8 @@
using Microsoft.WindowsAzure.Commands.ServiceManagement.Properties;
using Microsoft.WindowsAzure.Commands.Utilities.Common;
using Microsoft.WindowsAzure.Management.Compute.Models;
+using Microsoft.WindowsAzure.Management.Compute;
+using Microsoft.Azure;
namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS
{
@@ -69,7 +71,7 @@ protected override void ExecuteCommand()
WriteVerboseWithTimestamp(string.Format(Resources.ReservedIPNameNoLongerInUseByDeletingLastVMButStillBeingReserved, deploymentGetResponse.ReservedIPName));
}
- ExecuteClientActionNewSM(
+ ExecuteClientActionNewSM(
null,
CommandRuntime.ToString(),
() => this.ComputeClient.Deployments.DeleteByName(this.ServiceName, CurrentDeploymentNewSM.Name, DeleteVHD.IsPresent));
diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/PersistentVMs/RestartAzureVM.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/PersistentVMs/RestartAzureVM.cs
index 7c4a506b3569..fcae05e2fdc1 100644
--- a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/PersistentVMs/RestartAzureVM.cs
+++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/PersistentVMs/RestartAzureVM.cs
@@ -16,6 +16,8 @@
using System.Management.Automation;
using Microsoft.WindowsAzure.Commands.ServiceManagement.Model;
using Microsoft.WindowsAzure.Commands.Utilities.Common;
+using Microsoft.WindowsAzure.Management.Compute;
+using Microsoft.Azure;
namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS
{
diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/PersistentVMs/SaveAzureVMImage.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/PersistentVMs/SaveAzureVMImage.cs
index 1b9ffbd070fe..fc413f6245f6 100644
--- a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/PersistentVMs/SaveAzureVMImage.cs
+++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/PersistentVMs/SaveAzureVMImage.cs
@@ -18,7 +18,9 @@
using Microsoft.WindowsAzure.Commands.ServiceManagement.Helpers;
using Microsoft.WindowsAzure.Commands.ServiceManagement.Properties;
using Microsoft.WindowsAzure.Commands.Utilities.Common;
+using Microsoft.WindowsAzure.Management.Compute;
using Microsoft.WindowsAzure.Management.Compute.Models;
+using Microsoft.Azure;
namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS
{
diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/PersistentVMs/StartAzureVM.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/PersistentVMs/StartAzureVM.cs
index 2ee5e199f439..4c52a43dc607 100644
--- a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/PersistentVMs/StartAzureVM.cs
+++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/PersistentVMs/StartAzureVM.cs
@@ -19,6 +19,7 @@
using Microsoft.WindowsAzure.Commands.ServiceManagement.Model;
using Microsoft.WindowsAzure.Commands.ServiceManagement.Properties;
using Microsoft.WindowsAzure.Commands.Utilities.Common;
+using Microsoft.WindowsAzure.Management.Compute;
using Microsoft.WindowsAzure.Management.Compute.Models;
namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS
diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/PersistentVMs/StopAzureVM.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/PersistentVMs/StopAzureVM.cs
index d8f41605c07a..7ffcc9074a8c 100644
--- a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/PersistentVMs/StopAzureVM.cs
+++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/PersistentVMs/StopAzureVM.cs
@@ -19,7 +19,9 @@
using Microsoft.WindowsAzure.Commands.ServiceManagement.Helpers;
using Microsoft.WindowsAzure.Commands.ServiceManagement.Properties;
using Microsoft.WindowsAzure.Commands.Utilities.Common;
+using Microsoft.WindowsAzure.Management.Compute;
using Microsoft.WindowsAzure.Management.Compute.Models;
+using Microsoft.Azure;
namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS
{
diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/PersistentVMs/UpdateAzureVM.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/PersistentVMs/UpdateAzureVM.cs
index 95f00ff5e63e..de7a15577691 100644
--- a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/PersistentVMs/UpdateAzureVM.cs
+++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/PersistentVMs/UpdateAzureVM.cs
@@ -21,8 +21,10 @@
using Microsoft.WindowsAzure.Commands.ServiceManagement.Helpers;
using Microsoft.WindowsAzure.Commands.ServiceManagement.Properties;
using Microsoft.WindowsAzure.Commands.Utilities.Common;
+using Microsoft.WindowsAzure.Management.Compute;
using Microsoft.WindowsAzure.Management.Compute.Models;
using Microsoft.WindowsAzure.Storage;
+using Hyak.Common;
namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS
{
diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/RoleSizes/GetAzureRoleSize.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/RoleSizes/GetAzureRoleSize.cs
index ccc4ece9de8a..f581fc021634 100644
--- a/src/ServiceManagement/Compute/Commands.ServiceManagement/RoleSizes/GetAzureRoleSize.cs
+++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/RoleSizes/GetAzureRoleSize.cs
@@ -17,6 +17,7 @@
using System.Management.Automation;
using Microsoft.WindowsAzure.Commands.ServiceManagement.Model;
using Microsoft.WindowsAzure.Commands.Utilities.Common;
+using Microsoft.WindowsAzure.Management;
using Microsoft.WindowsAzure.Management.Models;
namespace Microsoft.WindowsAzure.Commands.ServiceManagement.HostedServices
diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/ServiceManagementProfile.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/ServiceManagementProfile.cs
index 6a50fcb1408c..8a348ef17f8d 100644
--- a/src/ServiceManagement/Compute/Commands.ServiceManagement/ServiceManagementProfile.cs
+++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/ServiceManagementProfile.cs
@@ -31,6 +31,7 @@ namespace Microsoft.WindowsAzure.Commands.ServiceManagement
using NSM = Management.Compute.Models;
using NVM = Management.Network.Models;
using PVM = Model;
+ using Microsoft.Azure;
public static class ServiceManagementMapperExtension
{
@@ -327,7 +328,7 @@ protected override void Configure()
.ForMember(c => c.Vip, o => o.MapFrom(r => r.VirtualIPAddress));
//Common mapping
- Mapper.CreateMap()
+ Mapper.CreateMap()
.ForMember(c => c.OperationId, o => o.MapFrom(r => r.RequestId))
.ForMember(c => c.OperationStatus, o => o.MapFrom(r => r.StatusCode.ToString()));
diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/StorageServices/GetAzureStorageAccount.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/StorageServices/GetAzureStorageAccount.cs
index a8c448153127..0a47020db806 100644
--- a/src/ServiceManagement/Compute/Commands.ServiceManagement/StorageServices/GetAzureStorageAccount.cs
+++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/StorageServices/GetAzureStorageAccount.cs
@@ -19,6 +19,7 @@
using Microsoft.WindowsAzure.Commands.ServiceManagement.Properties;
using Microsoft.WindowsAzure.Commands.Utilities.Common;
using Microsoft.WindowsAzure.Management.Storage.Models;
+using Microsoft.WindowsAzure.Management.Storage;
namespace Microsoft.WindowsAzure.Commands.ServiceManagement.StorageServices
{
diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/StorageServices/GetAzureStorageKey.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/StorageServices/GetAzureStorageKey.cs
index 966b1a6fb493..2bc5ea961042 100644
--- a/src/ServiceManagement/Compute/Commands.ServiceManagement/StorageServices/GetAzureStorageKey.cs
+++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/StorageServices/GetAzureStorageKey.cs
@@ -16,6 +16,7 @@
using Microsoft.WindowsAzure.Commands.ServiceManagement.Model;
using Microsoft.WindowsAzure.Commands.Utilities.Common;
using Microsoft.WindowsAzure.Management.Storage.Models;
+using Microsoft.WindowsAzure.Management.Storage;
namespace Microsoft.WindowsAzure.Commands.ServiceManagement.StorageServices
{
diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/StorageServices/NewAzureStorageAccount.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/StorageServices/NewAzureStorageAccount.cs
index a86c86a75744..3a8c13153059 100644
--- a/src/ServiceManagement/Compute/Commands.ServiceManagement/StorageServices/NewAzureStorageAccount.cs
+++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/StorageServices/NewAzureStorageAccount.cs
@@ -14,6 +14,7 @@
using System.Management.Automation;
using Microsoft.WindowsAzure.Commands.Utilities.Common;
+using Microsoft.WindowsAzure.Management.Storage;
using Microsoft.WindowsAzure.Management.Storage.Models;
namespace Microsoft.WindowsAzure.Commands.ServiceManagement.StorageServices
diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/StorageServices/NewAzureStorageKey.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/StorageServices/NewAzureStorageKey.cs
index 4788a85c3893..1b95564ba060 100644
--- a/src/ServiceManagement/Compute/Commands.ServiceManagement/StorageServices/NewAzureStorageKey.cs
+++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/StorageServices/NewAzureStorageKey.cs
@@ -17,6 +17,7 @@
using Microsoft.WindowsAzure.Commands.ServiceManagement.Model;
using Microsoft.WindowsAzure.Commands.Utilities.Common;
using Microsoft.WindowsAzure.Management.Storage.Models;
+using Microsoft.WindowsAzure.Management.Storage;
namespace Microsoft.WindowsAzure.Commands.ServiceManagement.StorageServices
{
diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/StorageServices/RemoveAzureStorageAccount.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/StorageServices/RemoveAzureStorageAccount.cs
index 19b105be0b65..452db85d1fe0 100644
--- a/src/ServiceManagement/Compute/Commands.ServiceManagement/StorageServices/RemoveAzureStorageAccount.cs
+++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/StorageServices/RemoveAzureStorageAccount.cs
@@ -15,6 +15,7 @@
using System.Management.Automation;
using Microsoft.WindowsAzure.Commands.ServiceManagement.Model;
using Microsoft.WindowsAzure.Commands.Utilities.Common;
+using Microsoft.WindowsAzure.Management.Storage;
namespace Microsoft.WindowsAzure.Commands.ServiceManagement.StorageServices
{
diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/StorageServices/SaveAzureVhdCommand.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/StorageServices/SaveAzureVhdCommand.cs
index 0e5cf34605c5..f979ca6ea8ce 100644
--- a/src/ServiceManagement/Compute/Commands.ServiceManagement/StorageServices/SaveAzureVhdCommand.cs
+++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/StorageServices/SaveAzureVhdCommand.cs
@@ -18,6 +18,7 @@
using Microsoft.WindowsAzure.Commands.ServiceManagement.Model;
using Microsoft.WindowsAzure.Commands.Sync.Download;
using Microsoft.WindowsAzure.Commands.Utilities.Common;
+using Microsoft.WindowsAzure.Management.Storage;
namespace Microsoft.WindowsAzure.Commands.ServiceManagement.StorageServices
{
diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/StorageServices/SetAzureStorageAccount.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/StorageServices/SetAzureStorageAccount.cs
index 24a8ef4e0e6e..b07081fa5da6 100644
--- a/src/ServiceManagement/Compute/Commands.ServiceManagement/StorageServices/SetAzureStorageAccount.cs
+++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/StorageServices/SetAzureStorageAccount.cs
@@ -15,6 +15,7 @@
using System.Management.Automation;
using Microsoft.WindowsAzure.Commands.ServiceManagement.Properties;
using Microsoft.WindowsAzure.Commands.Utilities.Common;
+using Microsoft.WindowsAzure.Management.Storage;
using Microsoft.WindowsAzure.Management.Storage.Models;
namespace Microsoft.WindowsAzure.Commands.ServiceManagement.StorageServices
diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/packages.config b/src/ServiceManagement/Compute/Commands.ServiceManagement/packages.config
index 9ac585e925be..ce92088d8fe7 100644
--- a/src/ServiceManagement/Compute/Commands.ServiceManagement/packages.config
+++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/packages.config
@@ -1,20 +1,24 @@
+
+
+
+
+
+
-
-
-
-
-
-
+
+
+
+
diff --git a/src/ServiceManagement/Compute/Sync/Upload/ExtensionMethods.cs b/src/ServiceManagement/Compute/Sync/Upload/ExtensionMethods.cs
index 64e6253a7553..4da61052ed99 100644
--- a/src/ServiceManagement/Compute/Sync/Upload/ExtensionMethods.cs
+++ b/src/ServiceManagement/Compute/Sync/Upload/ExtensionMethods.cs
@@ -212,7 +212,7 @@ public static string DumpStorageExceptionErrorDetails(StorageException storageEx
var message = new StringBuilder();
message.AppendLine("StorageException details");
- message.Append("ErrorCode:").AppendLine(storageException.RequestInformation.ExtendedErrorInformation.ErrorCode);
+ message.Append("Error.Code:").AppendLine(storageException.RequestInformation.ExtendedErrorInformation.ErrorCode);
message.Append("ErrorMessage:").AppendLine(storageException.RequestInformation.ExtendedErrorInformation.ErrorMessage);
foreach (var key in storageException.RequestInformation.ExtendedErrorInformation.AdditionalDetails.Keys)
{
diff --git a/src/ServiceManagement/ExpressRoute/Commands.ExpressRoute/Commands.ExpressRoute.csproj b/src/ServiceManagement/ExpressRoute/Commands.ExpressRoute/Commands.ExpressRoute.csproj
index 66268195ceec..a8b0fbada5a1 100644
--- a/src/ServiceManagement/ExpressRoute/Commands.ExpressRoute/Commands.ExpressRoute.csproj
+++ b/src/ServiceManagement/ExpressRoute/Commands.ExpressRoute/Commands.ExpressRoute.csproj
@@ -41,6 +41,30 @@
false
+
+ ..\..\..\packages\Hyak.Common.1.0.1\lib\portable-net403+win+wpa81\Hyak.Common.dll
+
+
+ ..\..\..\packages\Microsoft.Azure.Common.2.0.1\lib\net45\Microsoft.Azure.Common.dll
+
+
+ False
+ ..\..\..\packages\Microsoft.Azure.Common.Extensions.0.13.0-preview\lib\net45\Microsoft.Azure.Common.Extensions.dll
+
+
+ ..\..\..\packages\Microsoft.Azure.Common.2.0.1\lib\net45\Microsoft.Azure.Common.NetFramework.dll
+
+
+ False
+ ..\..\..\packages\Microsoft.Azure.Management.Resources.2.12.0-preview\lib\net40\Microsoft.Azure.ResourceManager.dll
+
+
+ False
+ ..\..\..\packages\Microsoft.IdentityModel.Clients.ActiveDirectory.2.11.10918.1222\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.dll
+
+
+ ..\..\..\packages\Microsoft.IdentityModel.Clients.ActiveDirectory.2.11.10918.1222\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.WindowsForms.dll
+
False
..\..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.dll
@@ -53,17 +77,13 @@
False
..\..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.Desktop.dll
-
+
False
- ..\..\..\packages\Microsoft.WindowsAzure.Common.1.4.1\lib\net45\Microsoft.WindowsAzure.Common.dll
-
-
- False
- ..\..\..\packages\Microsoft.WindowsAzure.Common.1.4.1\lib\net45\Microsoft.WindowsAzure.Common.NetFramework.dll
+ ..\..\..\packages\Microsoft.WindowsAzure.Management.4.0.0\lib\net40\Microsoft.WindowsAzure.Management.dll
False
- ..\..\..\packages\Microsoft.WindowsAzure.Management.ExpressRoute.0.15.0-preview\lib\net40\Microsoft.WindowsAzure.Management.ExpressRoute.dll
+ ..\..\..\packages\Microsoft.WindowsAzure.Management.ExpressRoute.0.18.0-preview\lib\net40\Microsoft.WindowsAzure.Management.ExpressRoute.dll
..\..\..\packages\Newtonsoft.Json.6.0.4\lib\net45\Newtonsoft.Json.dll
@@ -149,10 +169,6 @@
-
- {b95c489c-8cb7-4dcf-8d5f-b9aebdbbaf89}
- Common.Extensions
-
{5ee72c53-1720-4309-b54b-5fb79703195f}
Commands.Common
diff --git a/src/ServiceManagement/ExpressRoute/Commands.ExpressRoute/ExpressRouteClient.cs b/src/ServiceManagement/ExpressRoute/Commands.ExpressRoute/ExpressRouteClient.cs
index a8d9340e11d3..22a67f9b9ed4 100644
--- a/src/ServiceManagement/ExpressRoute/Commands.ExpressRoute/ExpressRouteClient.cs
+++ b/src/ServiceManagement/ExpressRoute/Commands.ExpressRoute/ExpressRouteClient.cs
@@ -15,7 +15,7 @@
using System.Management.Automation;
using Microsoft.WindowsAzure.Commands.Common;
using Microsoft.Azure.Common.Extensions.Models;
-using Microsoft.WindowsAzure.Common;
+using Microsoft.Azure.Common;
namespace Microsoft.WindowsAzure.Commands.ExpressRoute
{
@@ -27,6 +27,7 @@ namespace Microsoft.WindowsAzure.Commands.ExpressRoute
using Utilities.Common;
using Microsoft.Azure.Common.Extensions.Models;
using Microsoft.Azure.Common.Extensions;
+ using Hyak.Common;
public class ExpressRouteClient
diff --git a/src/ServiceManagement/ExpressRoute/Commands.ExpressRoute/packages.config b/src/ServiceManagement/ExpressRoute/Commands.ExpressRoute/packages.config
index 2229a2a14dca..d4e8dbc49ceb 100644
--- a/src/ServiceManagement/ExpressRoute/Commands.ExpressRoute/packages.config
+++ b/src/ServiceManagement/ExpressRoute/Commands.ExpressRoute/packages.config
@@ -1,11 +1,16 @@
+
+
+
+
+
+
-
-
-
+
+
\ No newline at end of file
diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/Commands.HDInsight.Test.csproj b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/Commands.HDInsight.Test.csproj
index fad22f253ca0..40d1ef4d94b0 100644
--- a/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/Commands.HDInsight.Test.csproj
+++ b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/Commands.HDInsight.Test.csproj
@@ -41,6 +41,22 @@
false
+
+ ..\..\..\packages\Hyak.Common.1.0.1\lib\portable-net403+win+wpa81\Hyak.Common.dll
+
+
+ ..\..\..\packages\Microsoft.Azure.Common.2.0.1\lib\net45\Microsoft.Azure.Common.dll
+
+
+ False
+ ..\..\..\packages\Microsoft.Azure.Common.Extensions.0.13.0-preview\lib\net45\Microsoft.Azure.Common.Extensions.dll
+
+
+ ..\..\..\packages\Microsoft.Azure.Common.2.0.1\lib\net45\Microsoft.Azure.Common.NetFramework.dll
+
+
+ ..\..\..\packages\Microsoft.Azure.Management.Resources.2.12.0-preview\lib\net40\Microsoft.Azure.ResourceManager.dll
+
..\..\..\packages\Microsoft.Data.Edm.5.6.0\lib\net40\Microsoft.Data.Edm.dll
@@ -56,6 +72,13 @@
..\..\..\packages\Microsoft.Hadoop.Client.1.3.3.2\lib\net40\Microsoft.HDInsight.Net.Http.Formatting.dll
+
+ False
+ ..\..\..\packages\Microsoft.IdentityModel.Clients.ActiveDirectory.2.11.10918.1222\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.dll
+
+
+ ..\..\..\packages\Microsoft.IdentityModel.Clients.ActiveDirectory.2.11.10918.1222\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.WindowsForms.dll
+
..\..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.dll
@@ -66,17 +89,12 @@
..\..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.Desktop.dll
-
- False
- ..\..\..\packages\Microsoft.WindowsAzure.Common.1.4.1\lib\net45\Microsoft.WindowsAzure.Common.dll
-
-
- False
- ..\..\..\packages\Microsoft.WindowsAzure.Common.1.4.1\lib\net45\Microsoft.WindowsAzure.Common.NetFramework.dll
-
..\..\..\packages\Microsoft.WindowsAzure.ConfigurationManager.1.8.0.0\lib\net35-full\Microsoft.WindowsAzure.Configuration.dll
+
+ ..\..\..\packages\Microsoft.WindowsAzure.Management.4.0.0\lib\net40\Microsoft.WindowsAzure.Management.dll
+
..\..\..\packages\Microsoft.WindowsAzure.Management.HDInsight.1.3.3.2\lib\net40\Microsoft.WindowsAzure.Management.HDInsight.dll
@@ -209,10 +227,6 @@
-
- {b95c489c-8cb7-4dcf-8d5f-b9aebdbbaf89}
- Common.Extensions
-
{3b48a77b-5956-4a62-9081-92ba04b02b27}
Commands.Common.Test
diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/packages.config b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/packages.config
index c33660e0c70c..91d551eb0fa6 100644
--- a/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/packages.config
+++ b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/packages.config
@@ -1,5 +1,10 @@
+
+
+
+
+
@@ -7,10 +12,10 @@
+
-
-
+
diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Commands.HDInsight.csproj b/src/ServiceManagement/HDInsight/Commands.HDInsight/Commands.HDInsight.csproj
index a9ccabd2e293..786ed2f06e50 100644
--- a/src/ServiceManagement/HDInsight/Commands.HDInsight/Commands.HDInsight.csproj
+++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Commands.HDInsight.csproj
@@ -47,6 +47,26 @@
false
+
+ False
+ ..\..\..\packages\Hyak.Common.1.0.1\lib\portable-net403+win+wpa81\Hyak.Common.dll
+
+
+ False
+ ..\..\..\packages\Microsoft.Azure.Common.2.0.1\lib\net45\Microsoft.Azure.Common.dll
+
+
+ False
+ ..\..\..\packages\Microsoft.Azure.Common.Extensions.0.13.0-preview\lib\net45\Microsoft.Azure.Common.Extensions.dll
+
+
+ False
+ ..\..\..\packages\Microsoft.Azure.Common.2.0.1\lib\net45\Microsoft.Azure.Common.NetFramework.dll
+
+
+ False
+ ..\..\..\packages\Microsoft.Azure.Management.Resources.2.12.0-preview\lib\net40\Microsoft.Azure.ResourceManager.dll
+
..\..\..\packages\Microsoft.Data.Edm.5.6.0\lib\net40\Microsoft.Data.Edm.dll
@@ -62,6 +82,13 @@
..\..\..\packages\Microsoft.Hadoop.Client.1.3.3.2\lib\net40\Microsoft.HDInsight.Net.Http.Formatting.dll
+
+ False
+ ..\..\..\packages\Microsoft.IdentityModel.Clients.ActiveDirectory.2.11.10918.1222\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.dll
+
+
+ ..\..\..\packages\Microsoft.IdentityModel.Clients.ActiveDirectory.2.11.10918.1222\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.WindowsForms.dll
+
..\..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.dll
@@ -71,17 +98,13 @@
..\..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.Desktop.dll
-
- False
- ..\..\..\packages\Microsoft.WindowsAzure.Common.1.4.1\lib\net45\Microsoft.WindowsAzure.Common.dll
-
-
- False
- ..\..\..\packages\Microsoft.WindowsAzure.Common.1.4.1\lib\net45\Microsoft.WindowsAzure.Common.NetFramework.dll
-
..\..\..\packages\Microsoft.WindowsAzure.ConfigurationManager.1.8.0.0\lib\net35-full\Microsoft.WindowsAzure.Configuration.dll
+
+ False
+ ..\..\..\packages\Microsoft.WindowsAzure.Management.4.0.0\lib\net40\Microsoft.WindowsAzure.Management.dll
+
..\..\..\packages\Microsoft.WindowsAzure.Management.HDInsight.1.3.3.2\lib\net40\Microsoft.WindowsAzure.Management.HDInsight.dll
@@ -322,10 +345,6 @@
-
- {b95c489c-8cb7-4dcf-8d5f-b9aebdbbaf89}
- Common.Extensions
-
{5ee72c53-1720-4309-b54b-5fb79703195f}
Commands.Common
diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/packages.config b/src/ServiceManagement/HDInsight/Commands.HDInsight/packages.config
index 105f7505faea..a59c5846574c 100644
--- a/src/ServiceManagement/HDInsight/Commands.HDInsight/packages.config
+++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/packages.config
@@ -1,5 +1,10 @@
+
+
+
+
+
@@ -7,10 +12,10 @@
+
-
-
+
diff --git a/src/ServiceManagement/ManagedCache/Commands.ManagedCache.Test/Commands.ManagedCache.Test.csproj b/src/ServiceManagement/ManagedCache/Commands.ManagedCache.Test/Commands.ManagedCache.Test.csproj
index 263a10a59f99..fd297a903b9c 100644
--- a/src/ServiceManagement/ManagedCache/Commands.ManagedCache.Test/Commands.ManagedCache.Test.csproj
+++ b/src/ServiceManagement/ManagedCache/Commands.ManagedCache.Test/Commands.ManagedCache.Test.csproj
@@ -38,9 +38,27 @@
4
-
+
+ ..\..\..\packages\Hyak.Common.1.0.1\lib\portable-net403+win+wpa81\Hyak.Common.dll
+
+
+ ..\..\..\packages\Microsoft.Azure.Common.2.0.1\lib\net45\Microsoft.Azure.Common.dll
+
+
False
- ..\..\..\packages\Hydra.HttpRecorder.1.0.5417.13285-prerelease\lib\net45\Microsoft.Azure.Utilities.HttpRecorder.dll
+ ..\..\..\packages\Microsoft.Azure.Common.Extensions.0.13.0-preview\lib\net45\Microsoft.Azure.Common.Extensions.dll
+
+
+ ..\..\..\packages\Microsoft.Azure.Common.2.0.1\lib\net45\Microsoft.Azure.Common.NetFramework.dll
+
+
+ ..\..\..\packages\Microsoft.Azure.Management.Resources.2.12.0-preview\lib\net40\Microsoft.Azure.ResourceManager.dll
+
+
+ ..\..\..\packages\Microsoft.Azure.Test.Framework.1.0.5486.28526-prerelease\lib\net45\Microsoft.Azure.Test.Framework.dll
+
+
+ ..\..\..\packages\Microsoft.Azure.Test.HttpRecorder.1.0.5486.28526-prerelease\lib\net45\Microsoft.Azure.Test.HttpRecorder.dll
..\..\..\packages\Microsoft.Data.Edm.5.6.0\lib\net40\Microsoft.Data.Edm.dll
@@ -72,17 +90,8 @@
..\..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.Desktop.dll
-
- False
- ..\..\..\packages\Microsoft.WindowsAzure.Common.1.4.1\lib\net45\Microsoft.WindowsAzure.Common.dll
-
-
- False
- ..\..\..\packages\Microsoft.WindowsAzure.Common.1.4.1\lib\net45\Microsoft.WindowsAzure.Common.NetFramework.dll
-
-
- False
- ..\..\..\packages\Hydra.SpecTestSupport.1.0.5417.13285-prerelease\lib\net45\Microsoft.WindowsAzure.Testing.dll
+
+ ..\..\..\packages\Microsoft.WindowsAzure.Management.4.0.0\lib\net40\Microsoft.WindowsAzure.Management.dll
False
@@ -160,10 +169,6 @@
-
- {b95c489c-8cb7-4dcf-8d5f-b9aebdbbaf89}
- Common.Extensions
-
{3b48a77b-5956-4a62-9081-92ba04b02b27}
Commands.Common.Test
diff --git a/src/ServiceManagement/ManagedCache/Commands.ManagedCache.Test/ScenarioTests/ManagedCacheTests.cs b/src/ServiceManagement/ManagedCache/Commands.ManagedCache.Test/ScenarioTests/ManagedCacheTests.cs
index b4fa1f56cf2b..84fd8b71c8de 100644
--- a/src/ServiceManagement/ManagedCache/Commands.ManagedCache.Test/ScenarioTests/ManagedCacheTests.cs
+++ b/src/ServiceManagement/ManagedCache/Commands.ManagedCache.Test/ScenarioTests/ManagedCacheTests.cs
@@ -13,7 +13,6 @@
// ----------------------------------------------------------------------------------
using Microsoft.WindowsAzure.Commands.ScenarioTest;
-using Microsoft.WindowsAzure.Testing;
using Xunit;
namespace Microsoft.Azure.Commands.ManagedCache.Test.ScenarioTests
diff --git a/src/ServiceManagement/ManagedCache/Commands.ManagedCache.Test/ScenarioTests/ManagedCacheTestsBase.cs b/src/ServiceManagement/ManagedCache/Commands.ManagedCache.Test/ScenarioTests/ManagedCacheTestsBase.cs
index 77de25285d93..ddeb5726923a 100644
--- a/src/ServiceManagement/ManagedCache/Commands.ManagedCache.Test/ScenarioTests/ManagedCacheTestsBase.cs
+++ b/src/ServiceManagement/ManagedCache/Commands.ManagedCache.Test/ScenarioTests/ManagedCacheTestsBase.cs
@@ -14,9 +14,9 @@
using Microsoft.Azure.Common.Extensions;
using Microsoft.Azure.Management.ManagedCache;
+using Microsoft.Azure.Test;
using Microsoft.WindowsAzure.Commands.ScenarioTest;
using Microsoft.WindowsAzure.Commands.Utilities.Common;
-using Microsoft.WindowsAzure.Testing;
namespace Microsoft.Azure.Commands.ManagedCache.Test.ScenarioTests
{
diff --git a/src/ServiceManagement/ManagedCache/Commands.ManagedCache.Test/packages.config b/src/ServiceManagement/ManagedCache/Commands.ManagedCache.Test/packages.config
index 03ff9e41503d..7c4ab8c1b5b2 100644
--- a/src/ServiceManagement/ManagedCache/Commands.ManagedCache.Test/packages.config
+++ b/src/ServiceManagement/ManagedCache/Commands.ManagedCache.Test/packages.config
@@ -1,7 +1,12 @@
-
-
+
+
+
+
+
+
+
@@ -10,8 +15,7 @@
-
-
+
diff --git a/src/ServiceManagement/ManagedCache/Commands.ManagedCache/Commands.ManagedCache.csproj b/src/ServiceManagement/ManagedCache/Commands.ManagedCache/Commands.ManagedCache.csproj
index 6191b85ddc9e..4625783942d3 100644
--- a/src/ServiceManagement/ManagedCache/Commands.ManagedCache/Commands.ManagedCache.csproj
+++ b/src/ServiceManagement/ManagedCache/Commands.ManagedCache/Commands.ManagedCache.csproj
@@ -41,6 +41,23 @@
false
+
+ ..\..\..\packages\Hyak.Common.1.0.1\lib\portable-net403+win+wpa81\Hyak.Common.dll
+
+
+ ..\..\..\packages\Microsoft.Azure.Common.2.0.1\lib\net45\Microsoft.Azure.Common.dll
+
+
+ False
+ ..\..\..\packages\Microsoft.Azure.Common.Extensions.0.13.0-preview\lib\net45\Microsoft.Azure.Common.Extensions.dll
+
+
+ ..\..\..\packages\Microsoft.Azure.Common.2.0.1\lib\net45\Microsoft.Azure.Common.NetFramework.dll
+
+
+ False
+ ..\..\..\packages\Microsoft.Azure.Management.Resources.2.12.0-preview\lib\net40\Microsoft.Azure.ResourceManager.dll
+
..\..\..\packages\Microsoft.Data.Edm.5.6.0\lib\net40\Microsoft.Data.Edm.dll
@@ -50,6 +67,13 @@
..\..\..\packages\Microsoft.Data.Services.Client.5.6.0\lib\net40\Microsoft.Data.Services.Client.dll
+
+ False
+ ..\..\..\packages\Microsoft.IdentityModel.Clients.ActiveDirectory.2.11.10918.1222\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.dll
+
+
+ ..\..\..\packages\Microsoft.IdentityModel.Clients.ActiveDirectory.2.11.10918.1222\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.WindowsForms.dll
+
False
..\..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.dll
@@ -62,17 +86,13 @@
False
..\..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.Desktop.dll
-
- False
- ..\..\..\packages\Microsoft.WindowsAzure.Common.1.4.1\lib\net45\Microsoft.WindowsAzure.Common.dll
-
-
- False
- ..\..\..\packages\Microsoft.WindowsAzure.Common.1.4.1\lib\net45\Microsoft.WindowsAzure.Common.NetFramework.dll
-
..\..\..\packages\Microsoft.WindowsAzure.ConfigurationManager.2.0.3\lib\net40\Microsoft.WindowsAzure.Configuration.dll
+
+ False
+ ..\..\..\packages\Microsoft.WindowsAzure.Management.4.0.0\lib\net40\Microsoft.WindowsAzure.Management.dll
+
..\..\..\packages\Newtonsoft.Json.6.0.4\lib\net45\Newtonsoft.Json.dll
True
@@ -106,7 +126,6 @@
-
@@ -138,10 +157,6 @@
-
- {b95c489c-8cb7-4dcf-8d5f-b9aebdbbaf89}
- Common.Extensions
-
{CD5AA507-F5EF-473D-855B-84B91A1ABE54}
Commands
diff --git a/src/ServiceManagement/ManagedCache/Commands.ManagedCache/PSCacheClient.cs b/src/ServiceManagement/ManagedCache/Commands.ManagedCache/PSCacheClient.cs
index a2638475cde2..643845b11c17 100644
--- a/src/ServiceManagement/ManagedCache/Commands.ManagedCache/PSCacheClient.cs
+++ b/src/ServiceManagement/ManagedCache/Commands.ManagedCache/PSCacheClient.cs
@@ -27,6 +27,7 @@
using Microsoft.Azure.Common.Extensions.Models;
using Microsoft.WindowsAzure.Commands.Utilities.Common;
using Microsoft.Azure.Common.Extensions;
+using Hyak.Common;
namespace Microsoft.Azure.Commands.ManagedCache
{
@@ -428,7 +429,7 @@ private string EnsureCloudServiceExists(string subscriptionId, string location)
parameters.GeoRegion = location;
parameters.Description = cloudServiceName;
parameters.Label = cloudServiceName;
- OperationResponse response = client.CloudServices.Create(cloudServiceName, parameters);
+ AzureOperationResponse response = client.CloudServices.Create(cloudServiceName, parameters);
}
return cloudServiceName;
}
diff --git a/src/ServiceManagement/ManagedCache/Commands.ManagedCache/lib/ManagedCacheClient.Customization.cs b/src/ServiceManagement/ManagedCache/Commands.ManagedCache/lib/ManagedCacheClient.Customization.cs
deleted file mode 100644
index 29c3bfc34a87..000000000000
--- a/src/ServiceManagement/ManagedCache/Commands.ManagedCache/lib/ManagedCacheClient.Customization.cs
+++ /dev/null
@@ -1,70 +0,0 @@
-//
-// Copyright (c) Microsoft. All rights reserved.
-//
-// 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 System;
-using System.Collections.Generic;
-using System.Net.Http;
-using Microsoft.Azure.Management.ManagedCache;
-using Microsoft.WindowsAzure;
-using Microsoft.WindowsAzure.Common;
-using Microsoft.WindowsAzure.Common.Internals;
-
-namespace Microsoft.Azure
-{
- public static class ManagedCacheDiscoveryExtensions
- {
- public static ManagedCacheClient CreateManagedCacheManagementClient(this CloudClients clients, SubscriptionCloudCredentials credentials)
- {
- return new ManagedCacheClient(credentials);
- }
-
- public static ManagedCacheClient CreateManagedCacheManagementClient(this CloudClients clients, SubscriptionCloudCredentials credentials, Uri baseUri)
- {
- return new ManagedCacheClient(credentials, baseUri);
- }
-
- public static ManagedCacheClient CreateManagedCacheClient(this CloudClients clients)
- {
- return ConfigurationHelper.CreateFromSettings(ManagedCacheClient.Create);
- }
- }
-}
-
-namespace Microsoft.Azure.Management.ManagedCache
-{
- public partial class ManagedCacheClient
- {
- public static ManagedCacheClient Create(IDictionary settings)
- {
- if (settings == null)
- {
- throw new ArgumentNullException("settings");
- }
-
- SubscriptionCloudCredentials credentials = ConfigurationHelper.GetCredentials(settings);
-
- Uri baseUri = ConfigurationHelper.GetUri(settings, "BaseUri", false);
-
- return baseUri != null ?
- new ManagedCacheClient(credentials, baseUri) :
- new ManagedCacheClient(credentials);
- }
-
- public override ManagedCacheClient WithHandler(DelegatingHandler handler)
- {
- return (ManagedCacheClient)WithHandler(new ManagedCacheClient(), handler);
- }
- }
-}
diff --git a/src/ServiceManagement/ManagedCache/Commands.ManagedCache/lib/ManagedCacheClient.cs b/src/ServiceManagement/ManagedCache/Commands.ManagedCache/lib/ManagedCacheClient.cs
index 9112b359d02d..4b34aedca965 100644
--- a/src/ServiceManagement/ManagedCache/Commands.ManagedCache/lib/ManagedCacheClient.cs
+++ b/src/ServiceManagement/ManagedCache/Commands.ManagedCache/lib/ManagedCacheClient.cs
@@ -30,11 +30,11 @@
using System.Threading;
using System.Threading.Tasks;
using System.Xml.Linq;
+using Hyak.Common;
+using Hyak.Common.Internals;
+using Microsoft.Azure;
using Microsoft.Azure.Management.ManagedCache;
using Microsoft.Azure.Management.ManagedCache.Models;
-using Microsoft.WindowsAzure;
-using Microsoft.WindowsAzure.Common;
-using Microsoft.WindowsAzure.Common.Internals;
namespace Microsoft.Azure.Management.ManagedCache.Models
{
@@ -139,7 +139,7 @@ public enum CacheServiceSkuType
/// A standard service response including an HTTP status code and request
/// ID.
///
- public partial class CachingKeysResponse : OperationResponse
+ public partial class CachingKeysResponse : AzureOperationResponse
{
private string _primary;
@@ -175,7 +175,7 @@ public CachingKeysResponse()
/// A standard service response including an HTTP status code and request
/// ID.
///
- public partial class CheckCacheNameAvailabilityResponse : OperationResponse
+ public partial class CheckCacheNameAvailabilityResponse : AzureOperationResponse
{
private bool _available;
@@ -280,7 +280,7 @@ public CloudServiceCreateParameters(string label, string description, string geo
///
/// Information about a retrieved Cloud Service.
///
- public partial class CloudServiceGetResponse : OperationResponse
+ public partial class CloudServiceGetResponse : AzureOperationResponse
{
private string _geoLocation;
@@ -309,14 +309,14 @@ public IList Resources
///
public CloudServiceGetResponse()
{
- this.Resources = new List();
+ this.Resources = new LazyList();
}
}
///
/// The response structure for the Cloud Service List operation.
///
- public partial class CloudServiceListResponse : OperationResponse, IEnumerable
+ public partial class CloudServiceListResponse : AzureOperationResponse, IEnumerable
{
private IList _cloudServices;
@@ -334,7 +334,7 @@ public IList CloudServices
///
public CloudServiceListResponse()
{
- this.CloudServices = new List();
+ this.CloudServices = new LazyList();
}
///
@@ -421,7 +421,7 @@ public IList Resources
///
public CloudService()
{
- this.Resources = new List();
+ this.Resources = new LazyList();
}
}
}
@@ -457,7 +457,7 @@ public enum CloudServiceOperationStatus
/// failed, the response body includes the HTTP status code for the failed
/// request, and also includes error information regarding the failure.
///
- public partial class CloudServiceOperationStatusResponse : OperationResponse
+ public partial class CloudServiceOperationStatusResponse : AzureOperationResponse
{
private CloudServiceOperationStatusResponse.ErrorDetails _error;
@@ -683,8 +683,43 @@ public IList UsageLimits
///
public CloudServiceResource()
{
- this.OutputItems = new Dictionary();
- this.UsageLimits = new List();
+ this.OutputItems = new LazyDictionary();
+ this.UsageLimits = new LazyList();
+ }
+
+ ///
+ /// The operation status of an individual resource item.
+ ///
+ public partial class OperationStatus
+ {
+ private string _result;
+
+ ///
+ /// Optional. The result of this operation status.
+ ///
+ public string Result
+ {
+ get { return this._result; }
+ set { this._result = value; }
+ }
+
+ private string _type;
+
+ ///
+ /// Optional. The type of this operation status.
+ ///
+ public string Type
+ {
+ get { return this._type; }
+ set { this._type = value; }
+ }
+
+ ///
+ /// Initializes a new instance of the OperationStatus class.
+ ///
+ public OperationStatus()
+ {
+ }
}
///
@@ -840,7 +875,7 @@ public CacheServiceSkuType SkuType
///
public CacheServiceInput()
{
- this.NamedCaches = new List();
+ this.NamedCaches = new LazyList();
}
public partial class NamedCache
@@ -968,7 +1003,7 @@ public RegenerateKeysParameters()
/// A standard service response including an HTTP status code and request
/// ID.
///
- public partial class RegionsResponse : OperationResponse, IEnumerable
+ public partial class RegionsResponse : AzureOperationResponse, IEnumerable
{
private IList _regions;
@@ -986,7 +1021,7 @@ public IList Regions
///
public RegionsResponse()
{
- this.Regions = new List();
+ this.Regions = new LazyList();
}
///
@@ -1033,6 +1068,79 @@ public Region()
namespace Microsoft.Azure.Management.ManagedCache
{
+ public static partial class ManagedCacheClientExtensions
+ {
+ ///
+ /// The Get Operation Status operation returns the status of
+ /// thespecified operation. After calling an asynchronous operation,
+ /// you can call Get Operation Status to determine whether the
+ /// operation has succeeded, failed, or is still in progress. (see
+ /// http://msdn.microsoft.com/en-us/library/windowsazure/ee460783.aspx
+ /// for more information)
+ ///
+ ///
+ /// Reference to the
+ /// Microsoft.Azure.Management.ManagedCache.IManagedCacheClient.
+ ///
+ ///
+ /// Required. The request ID for the request you wish to track. The
+ /// request ID is returned in the x-ms-request-id response header for
+ /// every request.
+ ///
+ ///
+ /// The response body contains the status of the specified asynchronous
+ /// operation, indicating whether it has succeeded, is inprogress, or
+ /// has failed. Note that this status is distinct from the HTTP status
+ /// code returned for the Get Operation Status operation itself. If
+ /// the asynchronous operation succeeded, the response body includes
+ /// the HTTP status code for the successful request. If the
+ /// asynchronous operation failed, the response body includes the HTTP
+ /// status code for the failed request, and also includes error
+ /// information regarding the failure.
+ ///
+ public static CloudServiceOperationStatusResponse GetOperationStatus(this IManagedCacheClient operations, string requestId)
+ {
+ return Task.Factory.StartNew((object s) =>
+ {
+ return ((IManagedCacheClient)s).GetOperationStatusAsync(requestId);
+ }
+ , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult();
+ }
+
+ ///
+ /// The Get Operation Status operation returns the status of
+ /// thespecified operation. After calling an asynchronous operation,
+ /// you can call Get Operation Status to determine whether the
+ /// operation has succeeded, failed, or is still in progress. (see
+ /// http://msdn.microsoft.com/en-us/library/windowsazure/ee460783.aspx
+ /// for more information)
+ ///
+ ///
+ /// Reference to the
+ /// Microsoft.Azure.Management.ManagedCache.IManagedCacheClient.
+ ///
+ ///
+ /// Required. The request ID for the request you wish to track. The
+ /// request ID is returned in the x-ms-request-id response header for
+ /// every request.
+ ///
+ ///
+ /// The response body contains the status of the specified asynchronous
+ /// operation, indicating whether it has succeeded, is inprogress, or
+ /// has failed. Note that this status is distinct from the HTTP status
+ /// code returned for the Get Operation Status operation itself. If
+ /// the asynchronous operation succeeded, the response body includes
+ /// the HTTP status code for the successful request. If the
+ /// asynchronous operation failed, the response body includes the HTTP
+ /// status code for the failed request, and also includes error
+ /// information regarding the failure.
+ ///
+ public static Task GetOperationStatusAsync(this IManagedCacheClient operations, string requestId)
+ {
+ return operations.GetOperationStatusAsync(requestId, CancellationToken.None);
+ }
+ }
+
public partial interface IManagedCacheClient : IDisposable
{
///
@@ -1151,7 +1259,7 @@ public virtual ICloudServiceOperations CloudServices
///
/// Initializes a new instance of the ManagedCacheClient class.
///
- private ManagedCacheClient()
+ public ManagedCacheClient()
: base()
{
this._cacheServices = new CacheServiceOperations(this);
@@ -1172,7 +1280,7 @@ private ManagedCacheClient()
/// requests are allowed.
///
///
- /// Required. The URI used as the base for all Service Management
+ /// Optional. The URI used as the base for all Service Management
/// requests.
///
public ManagedCacheClient(SubscriptionCloudCredentials credentials, Uri baseUri)
@@ -1223,7 +1331,7 @@ public ManagedCacheClient(SubscriptionCloudCredentials credentials)
///
/// The Http client
///
- private ManagedCacheClient(HttpClient httpClient)
+ public ManagedCacheClient(HttpClient httpClient)
: base(httpClient)
{
this._cacheServices = new CacheServiceOperations(this);
@@ -1244,7 +1352,7 @@ private ManagedCacheClient(HttpClient httpClient)
/// requests are allowed.
///
///
- /// Required. The URI used as the base for all Service Management
+ /// Optional. The URI used as the base for all Service Management
/// requests.
///
///
@@ -1353,18 +1461,18 @@ public async Task GetOperationStatusAsync(s
}
// Tracing
- bool shouldTrace = CloudContext.Configuration.Tracing.IsEnabled;
+ bool shouldTrace = TracingAdapter.IsEnabled;
string invocationId = null;
if (shouldTrace)
{
- invocationId = Tracing.NextInvocationId.ToString();
+ invocationId = TracingAdapter.NextInvocationId.ToString();
Dictionary tracingParameters = new Dictionary();
tracingParameters.Add("requestId", requestId);
- Tracing.Enter(invocationId, this, "GetOperationStatusAsync", tracingParameters);
+ TracingAdapter.Enter(invocationId, this, "GetOperationStatusAsync", tracingParameters);
}
// Construct URL
- string url = (this.Credentials.SubscriptionId != null ? this.Credentials.SubscriptionId.Trim() : "") + "/operations/" + requestId.Trim();
+ string url = (this.Credentials.SubscriptionId == null ? "" : Uri.EscapeDataString(this.Credentials.SubscriptionId)) + "/operations/" + Uri.EscapeDataString(requestId);
string baseUrl = this.BaseUri.AbsoluteUri;
// Trim '/' character from the end of baseUrl and beginning of url.
if (baseUrl[baseUrl.Length - 1] == '/')
@@ -1399,13 +1507,13 @@ public async Task GetOperationStatusAsync(s
{
if (shouldTrace)
{
- Tracing.SendRequest(invocationId, httpRequest);
+ TracingAdapter.SendRequest(invocationId, httpRequest);
}
cancellationToken.ThrowIfCancellationRequested();
httpResponse = await this.HttpClient.SendAsync(httpRequest, cancellationToken).ConfigureAwait(false);
if (shouldTrace)
{
- Tracing.ReceiveResponse(invocationId, httpResponse);
+ TracingAdapter.ReceiveResponse(invocationId, httpResponse);
}
HttpStatusCode statusCode = httpResponse.StatusCode;
if (statusCode != HttpStatusCode.OK)
@@ -1414,7 +1522,7 @@ public async Task GetOperationStatusAsync(s
CloudException ex = CloudException.Create(httpRequest, null, httpResponse, await httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false));
if (shouldTrace)
{
- Tracing.Error(invocationId, ex);
+ TracingAdapter.Error(invocationId, ex);
}
throw ex;
}
@@ -1422,57 +1530,60 @@ public async Task GetOperationStatusAsync(s
// Create Result
CloudServiceOperationStatusResponse result = null;
// Deserialize Response
- cancellationToken.ThrowIfCancellationRequested();
- string responseContent = await httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- result = new CloudServiceOperationStatusResponse();
- XDocument responseDoc = XDocument.Parse(responseContent);
-
- XElement operationElement = responseDoc.Element(XName.Get("Operation", "http://schemas.microsoft.com/windowsazure"));
- if (operationElement != null)
+ if (statusCode == HttpStatusCode.OK)
{
- XElement idElement = operationElement.Element(XName.Get("ID", "http://schemas.microsoft.com/windowsazure"));
- if (idElement != null)
- {
- string idInstance = idElement.Value;
- result.Id = idInstance;
- }
-
- XElement statusElement = operationElement.Element(XName.Get("Status", "http://schemas.microsoft.com/windowsazure"));
- if (statusElement != null)
- {
- CloudServiceOperationStatus statusInstance = ((CloudServiceOperationStatus)Enum.Parse(typeof(CloudServiceOperationStatus), statusElement.Value, true));
- result.Status = statusInstance;
- }
-
- XElement httpStatusCodeElement = operationElement.Element(XName.Get("HttpStatusCode", "http://schemas.microsoft.com/windowsazure"));
- if (httpStatusCodeElement != null)
- {
- HttpStatusCode httpStatusCodeInstance = ((HttpStatusCode)Enum.Parse(typeof(HttpStatusCode), httpStatusCodeElement.Value, true));
- result.HttpStatusCode = httpStatusCodeInstance;
- }
+ cancellationToken.ThrowIfCancellationRequested();
+ string responseContent = await httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ result = new CloudServiceOperationStatusResponse();
+ XDocument responseDoc = XDocument.Parse(responseContent);
- XElement errorElement = operationElement.Element(XName.Get("Error", "http://schemas.microsoft.com/windowsazure"));
- if (errorElement != null)
+ XElement operationElement = responseDoc.Element(XName.Get("Operation", "http://schemas.microsoft.com/windowsazure"));
+ if (operationElement != null)
{
- CloudServiceOperationStatusResponse.ErrorDetails errorInstance = new CloudServiceOperationStatusResponse.ErrorDetails();
- result.Error = errorInstance;
+ XElement idElement = operationElement.Element(XName.Get("ID", "http://schemas.microsoft.com/windowsazure"));
+ if (idElement != null)
+ {
+ string idInstance = idElement.Value;
+ result.Id = idInstance;
+ }
+
+ XElement statusElement = operationElement.Element(XName.Get("Status", "http://schemas.microsoft.com/windowsazure"));
+ if (statusElement != null)
+ {
+ CloudServiceOperationStatus statusInstance = ((CloudServiceOperationStatus)Enum.Parse(typeof(CloudServiceOperationStatus), statusElement.Value, true));
+ result.Status = statusInstance;
+ }
- XElement codeElement = errorElement.Element(XName.Get("Code", "http://schemas.microsoft.com/windowsazure"));
- if (codeElement != null)
+ XElement httpStatusCodeElement = operationElement.Element(XName.Get("HttpStatusCode", "http://schemas.microsoft.com/windowsazure"));
+ if (httpStatusCodeElement != null)
{
- string codeInstance = codeElement.Value;
- errorInstance.Code = codeInstance;
+ HttpStatusCode httpStatusCodeInstance = ((HttpStatusCode)Enum.Parse(typeof(HttpStatusCode), httpStatusCodeElement.Value, true));
+ result.HttpStatusCode = httpStatusCodeInstance;
}
- XElement messageElement = errorElement.Element(XName.Get("Message", "http://schemas.microsoft.com/windowsazure"));
- if (messageElement != null)
+ XElement errorElement = operationElement.Element(XName.Get("Error", "http://schemas.microsoft.com/windowsazure"));
+ if (errorElement != null)
{
- string messageInstance = messageElement.Value;
- errorInstance.Message = messageInstance;
+ CloudServiceOperationStatusResponse.ErrorDetails errorInstance = new CloudServiceOperationStatusResponse.ErrorDetails();
+ result.Error = errorInstance;
+
+ XElement codeElement = errorElement.Element(XName.Get("Code", "http://schemas.microsoft.com/windowsazure"));
+ if (codeElement != null)
+ {
+ string codeInstance = codeElement.Value;
+ errorInstance.Code = codeInstance;
+ }
+
+ XElement messageElement = errorElement.Element(XName.Get("Message", "http://schemas.microsoft.com/windowsazure"));
+ if (messageElement != null)
+ {
+ string messageInstance = messageElement.Value;
+ errorInstance.Message = messageInstance;
+ }
}
}
+
}
-
result.StatusCode = statusCode;
if (httpResponse.Headers.Contains("x-ms-request-id"))
{
@@ -1481,7 +1592,7 @@ public async Task GetOperationStatusAsync(s
if (shouldTrace)
{
- Tracing.Exit(invocationId, result);
+ TracingAdapter.Exit(invocationId, result);
}
return result;
}
@@ -1503,33 +1614,67 @@ public async Task GetOperationStatusAsync(s
}
}
- ///
- /// The Managed Cache API includes operations for managing cache services
- ///
- public partial interface ICacheServiceOperations
+ public static partial class CacheServiceOperationsExtensions
{
///
/// Creates a new Cache Service in specified subscription and cloud
/// service.
///
+ ///
+ /// Reference to the
+ /// Microsoft.Azure.Management.ManagedCache.ICacheServiceOperations.
+ ///
///
- /// The name of the cloud service.
+ /// Required. The name of the cloud service.
///
///
- /// A name of the cache service. The name can be up to 20 characters
- /// in length with minimum 6 characters and must be all lower cases.
+ /// Required. A name of the cache service. The name can be up to 20
+ /// characters in length with minimum 6 characters and must be all
+ /// lower cases.
///
///
- /// Parameter supplied to create a cache service
+ /// Required. Parameter supplied to create a cache service
///
- ///
- /// Cancellation token.
+ ///
+ /// A standard service response including an HTTP status code and
+ /// request ID.
+ ///
+ public static AzureOperationResponse BeginCreatingCacheService(this ICacheServiceOperations operations, string cloudServiceName, string cacheServiceName, CacheServiceCreateParameters parameters)
+ {
+ return Task.Factory.StartNew((object s) =>
+ {
+ return ((ICacheServiceOperations)s).BeginCreatingCacheServiceAsync(cloudServiceName, cacheServiceName, parameters);
+ }
+ , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Creates a new Cache Service in specified subscription and cloud
+ /// service.
+ ///
+ ///
+ /// Reference to the
+ /// Microsoft.Azure.Management.ManagedCache.ICacheServiceOperations.
+ ///
+ ///
+ /// Required. The name of the cloud service.
+ ///
+ ///
+ /// Required. A name of the cache service. The name can be up to 20
+ /// characters in length with minimum 6 characters and must be all
+ /// lower cases.
+ ///
+ ///
+ /// Required. Parameter supplied to create a cache service
///
///
/// A standard service response including an HTTP status code and
/// request ID.
///
- Task BeginCreatingCacheServiceAsync(string cloudServiceName, string cacheServiceName, CacheServiceCreateParameters parameters, CancellationToken cancellationToken);
+ public static Task BeginCreatingCacheServiceAsync(this ICacheServiceOperations operations, string cloudServiceName, string cacheServiceName, CacheServiceCreateParameters parameters)
+ {
+ return operations.BeginCreatingCacheServiceAsync(cloudServiceName, cacheServiceName, parameters, CancellationToken.None);
+ }
///
/// The begin of deleting Cache Service.This operation is an
@@ -1538,82 +1683,121 @@ public partial interface ICacheServiceOperations
/// http://msdn.microsoft.com/en-us/library/hh758254.aspx for more
/// information)
///
+ ///
+ /// Reference to the
+ /// Microsoft.Azure.Management.ManagedCache.ICacheServiceOperations.
+ ///
///
- /// The name of the cloud service.
+ /// Required. The name of the cloud service.
///
///
- /// A name of the cache service.
- ///
- ///
- /// Cancellation token.
+ /// Required. A name of the cache service.
///
///
/// A standard service response including an HTTP status code and
/// request ID.
///
- Task BeginDeletingAsync(string cloudServiceName, string cacheServiceName, CancellationToken cancellationToken);
+ public static AzureOperationResponse BeginDeleting(this ICacheServiceOperations operations, string cloudServiceName, string cacheServiceName)
+ {
+ return Task.Factory.StartNew((object s) =>
+ {
+ return ((ICacheServiceOperations)s).BeginDeletingAsync(cloudServiceName, cacheServiceName);
+ }
+ , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult();
+ }
///
- /// Get access keys of Cache Service
+ /// The begin of deleting Cache Service.This operation is an
+ /// asynchronous operation. To determine whether service has finished
+ /// processing the request, call Get Operation. (see
+ /// http://msdn.microsoft.com/en-us/library/hh758254.aspx for more
+ /// information)
///
+ ///
+ /// Reference to the
+ /// Microsoft.Azure.Management.ManagedCache.ICacheServiceOperations.
+ ///
///
- /// The cloud service name.
+ /// Required. The name of the cloud service.
///
///
- /// The cache service name.
- ///
- ///
- /// Cancellation token.
+ /// Required. A name of the cache service.
///
///
/// A standard service response including an HTTP status code and
/// request ID.
///
- Task CheckNameAvailabilityAsync(string cloudServiceName, string cacheServiceName, CancellationToken cancellationToken);
+ public static Task BeginDeletingAsync(this ICacheServiceOperations operations, string cloudServiceName, string cacheServiceName)
+ {
+ return operations.BeginDeletingAsync(cloudServiceName, cacheServiceName, CancellationToken.None);
+ }
///
- /// Creates a new Cache Service in specified subscription and cloud
- /// service.
+ /// Get access keys of Cache Service
///
+ ///
+ /// Reference to the
+ /// Microsoft.Azure.Management.ManagedCache.ICacheServiceOperations.
+ ///
///
- /// The name of the cloud service.
+ /// Required. The cloud service name.
///
///
- /// The name of the cache service. The name can be up to 20 characters
- /// in length with minimum 6 characters and must be all lower cases.
- ///
- ///
- /// Parameter supplied to create a cache service
- ///
- ///
- /// Cancellation token.
+ /// Required. The cache service name.
///
///
- /// The response body contains the status of the specified asynchronous
- /// operation, indicating whether it has succeeded, is inprogress, or
- /// has failed. Note that this status is distinct from the HTTP status
- /// code returned for the Get Operation Status operation itself. If
- /// the asynchronous operation succeeded, the response body includes
- /// the HTTP status code for the successful request. If the
- /// asynchronous operation failed, the response body includes the HTTP
- /// status code for the failed request, and also includes error
- /// information regarding the failure.
+ /// A standard service response including an HTTP status code and
+ /// request ID.
///
- Task CreateCacheServiceAsync(string cloudServiceName, string cacheServiceName, CacheServiceCreateParameters parameters, CancellationToken cancellationToken);
+ public static CheckCacheNameAvailabilityResponse CheckNameAvailability(this ICacheServiceOperations operations, string cloudServiceName, string cacheServiceName)
+ {
+ return Task.Factory.StartNew((object s) =>
+ {
+ return ((ICacheServiceOperations)s).CheckNameAvailabilityAsync(cloudServiceName, cacheServiceName);
+ }
+ , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult();
+ }
///
- /// Delete Cache Service in specified subscription and cloud service.
- /// (see http://msdn.microsoft.com/en-us/library/hh758254.aspx for
- /// more information)
+ /// Get access keys of Cache Service
///
+ ///
+ /// Reference to the
+ /// Microsoft.Azure.Management.ManagedCache.ICacheServiceOperations.
+ ///
///
- /// The name of the cloud service.
+ /// Required. The cloud service name.
///
///
- /// A name of the cache service.
+ /// Required. The cache service name.
///
- ///
- /// Cancellation token.
+ ///
+ /// A standard service response including an HTTP status code and
+ /// request ID.
+ ///
+ public static Task CheckNameAvailabilityAsync(this ICacheServiceOperations operations, string cloudServiceName, string cacheServiceName)
+ {
+ return operations.CheckNameAvailabilityAsync(cloudServiceName, cacheServiceName, CancellationToken.None);
+ }
+
+ ///
+ /// Creates a new Cache Service in specified subscription and cloud
+ /// service.
+ ///
+ ///
+ /// Reference to the
+ /// Microsoft.Azure.Management.ManagedCache.ICacheServiceOperations.
+ ///
+ ///
+ /// Required. The name of the cloud service.
+ ///
+ ///
+ /// Required. The name of the cache service. The name can be up to 20
+ /// characters in length with minimum 6 characters and must be all
+ /// lower cases.
+ ///
+ ///
+ /// Required. Parameter supplied to create a cache service
///
///
/// The response body contains the status of the specified asynchronous
@@ -1626,826 +1810,352 @@ public partial interface ICacheServiceOperations
/// status code for the failed request, and also includes error
/// information regarding the failure.
///
- Task DeleteAsync(string cloudServiceName, string cacheServiceName, CancellationToken cancellationToken);
+ public static CloudServiceOperationStatusResponse CreateCacheService(this ICacheServiceOperations operations, string cloudServiceName, string cacheServiceName, CacheServiceCreateParameters parameters)
+ {
+ return Task.Factory.StartNew((object s) =>
+ {
+ return ((ICacheServiceOperations)s).CreateCacheServiceAsync(cloudServiceName, cacheServiceName, parameters);
+ }
+ , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult();
+ }
///
- /// Get access keys of Cache Service
+ /// Creates a new Cache Service in specified subscription and cloud
+ /// service.
///
+ ///
+ /// Reference to the
+ /// Microsoft.Azure.Management.ManagedCache.ICacheServiceOperations.
+ ///
///
- /// The cloud service name.
+ /// Required. The name of the cloud service.
///
///
- /// The cache service name.
+ /// Required. The name of the cache service. The name can be up to 20
+ /// characters in length with minimum 6 characters and must be all
+ /// lower cases.
///
- ///
- /// Cancellation token.
+ ///
+ /// Required. Parameter supplied to create a cache service
///
///
- /// A standard service response including an HTTP status code and
- /// request ID.
+ /// The response body contains the status of the specified asynchronous
+ /// operation, indicating whether it has succeeded, is inprogress, or
+ /// has failed. Note that this status is distinct from the HTTP status
+ /// code returned for the Get Operation Status operation itself. If
+ /// the asynchronous operation succeeded, the response body includes
+ /// the HTTP status code for the successful request. If the
+ /// asynchronous operation failed, the response body includes the HTTP
+ /// status code for the failed request, and also includes error
+ /// information regarding the failure.
///
- Task GetKeysAsync(string cloudServiceName, string cacheServiceName, CancellationToken cancellationToken);
+ public static Task CreateCacheServiceAsync(this ICacheServiceOperations operations, string cloudServiceName, string cacheServiceName, CacheServiceCreateParameters parameters)
+ {
+ return operations.CreateCacheServiceAsync(cloudServiceName, cacheServiceName, parameters, CancellationToken.None);
+ }
///
- /// List supported regions of Cache Service
+ /// Delete Cache Service in specified subscription and cloud service.
+ /// (see http://msdn.microsoft.com/en-us/library/hh758254.aspx for
+ /// more information)
///
- ///
- /// Cancellation token.
+ ///
+ /// Reference to the
+ /// Microsoft.Azure.Management.ManagedCache.ICacheServiceOperations.
+ ///
+ ///
+ /// Required. The name of the cloud service.
+ ///
+ ///
+ /// Required. A name of the cache service.
///
///
- /// A standard service response including an HTTP status code and
- /// request ID.
+ /// The response body contains the status of the specified asynchronous
+ /// operation, indicating whether it has succeeded, is inprogress, or
+ /// has failed. Note that this status is distinct from the HTTP status
+ /// code returned for the Get Operation Status operation itself. If
+ /// the asynchronous operation succeeded, the response body includes
+ /// the HTTP status code for the successful request. If the
+ /// asynchronous operation failed, the response body includes the HTTP
+ /// status code for the failed request, and also includes error
+ /// information regarding the failure.
///
- Task ListRegionsAsync(CancellationToken cancellationToken);
+ public static CloudServiceOperationStatusResponse Delete(this ICacheServiceOperations operations, string cloudServiceName, string cacheServiceName)
+ {
+ return Task.Factory.StartNew((object s) =>
+ {
+ return ((ICacheServiceOperations)s).DeleteAsync(cloudServiceName, cacheServiceName);
+ }
+ , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult();
+ }
///
- /// Regenerate access keys for a Cache Service
+ /// Delete Cache Service in specified subscription and cloud service.
+ /// (see http://msdn.microsoft.com/en-us/library/hh758254.aspx for
+ /// more information)
///
+ ///
+ /// Reference to the
+ /// Microsoft.Azure.Management.ManagedCache.ICacheServiceOperations.
+ ///
///
- /// The cloud service name.
+ /// Required. The name of the cloud service.
///
///
- /// The cache service name.
+ /// Required. A name of the cache service.
///
- ///
- /// Key type
+ ///
+ /// The response body contains the status of the specified asynchronous
+ /// operation, indicating whether it has succeeded, is inprogress, or
+ /// has failed. Note that this status is distinct from the HTTP status
+ /// code returned for the Get Operation Status operation itself. If
+ /// the asynchronous operation succeeded, the response body includes
+ /// the HTTP status code for the successful request. If the
+ /// asynchronous operation failed, the response body includes the HTTP
+ /// status code for the failed request, and also includes error
+ /// information regarding the failure.
+ ///
+ public static Task DeleteAsync(this ICacheServiceOperations operations, string cloudServiceName, string cacheServiceName)
+ {
+ return operations.DeleteAsync(cloudServiceName, cacheServiceName, CancellationToken.None);
+ }
+
+ ///
+ /// Get access keys of Cache Service
+ ///
+ ///
+ /// Reference to the
+ /// Microsoft.Azure.Management.ManagedCache.ICacheServiceOperations.
///
- ///
- /// Cancellation token.
+ ///
+ /// Required. The cloud service name.
+ ///
+ ///
+ /// Required. The cache service name.
///
///
/// A standard service response including an HTTP status code and
/// request ID.
///
- Task RegenerateKeysAsync(string cloudServiceName, string cacheServiceName, RegenerateKeysParameters parameters, CancellationToken cancellationToken);
- }
-
- ///
- /// The Managed Cache API includes operations for managing cache services
- ///
- internal partial class CacheServiceOperations : IServiceOperations, ICacheServiceOperations
- {
+ public static CachingKeysResponse GetKeys(this ICacheServiceOperations operations, string cloudServiceName, string cacheServiceName)
+ {
+ return Task.Factory.StartNew((object s) =>
+ {
+ return ((ICacheServiceOperations)s).GetKeysAsync(cloudServiceName, cacheServiceName);
+ }
+ , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult();
+ }
+
///
- /// Initializes a new instance of the CacheServiceOperations class.
+ /// Get access keys of Cache Service
///
- ///
- /// Reference to the service client.
+ ///
+ /// Reference to the
+ /// Microsoft.Azure.Management.ManagedCache.ICacheServiceOperations.
///
- internal CacheServiceOperations(ManagedCacheClient client)
+ ///
+ /// Required. The cloud service name.
+ ///
+ ///
+ /// Required. The cache service name.
+ ///
+ ///
+ /// A standard service response including an HTTP status code and
+ /// request ID.
+ ///
+ public static Task GetKeysAsync(this ICacheServiceOperations operations, string cloudServiceName, string cacheServiceName)
{
- this._client = client;
+ return operations.GetKeysAsync(cloudServiceName, cacheServiceName, CancellationToken.None);
}
- private ManagedCacheClient _client;
+ ///
+ /// List supported regions of Cache Service
+ ///
+ ///
+ /// Reference to the
+ /// Microsoft.Azure.Management.ManagedCache.ICacheServiceOperations.
+ ///
+ ///
+ /// A standard service response including an HTTP status code and
+ /// request ID.
+ ///
+ public static RegionsResponse ListRegions(this ICacheServiceOperations operations)
+ {
+ return Task.Factory.StartNew((object s) =>
+ {
+ return ((ICacheServiceOperations)s).ListRegionsAsync();
+ }
+ , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult();
+ }
///
- /// Gets a reference to the
- /// Microsoft.Azure.Management.ManagedCache.ManagedCacheClient.
+ /// List supported regions of Cache Service
///
- public ManagedCacheClient Client
+ ///
+ /// Reference to the
+ /// Microsoft.Azure.Management.ManagedCache.ICacheServiceOperations.
+ ///
+ ///
+ /// A standard service response including an HTTP status code and
+ /// request ID.
+ ///
+ public static Task ListRegionsAsync(this ICacheServiceOperations operations)
{
- get { return this._client; }
+ return operations.ListRegionsAsync(CancellationToken.None);
}
///
- /// Creates a new Cache Service in specified subscription and cloud
- /// service.
+ /// Regenerate access keys for a Cache Service
///
+ ///
+ /// Reference to the
+ /// Microsoft.Azure.Management.ManagedCache.ICacheServiceOperations.
+ ///
///
- /// Required. The name of the cloud service.
+ /// Required. The cloud service name.
///
///
- /// Required. A name of the cache service. The name can be up to 20
- /// characters in length with minimum 6 characters and must be all
- /// lower cases.
+ /// Required. The cache service name.
///
///
- /// Required. Parameter supplied to create a cache service
- ///
- ///
- /// Cancellation token.
+ /// Required. Key type
///
///
/// A standard service response including an HTTP status code and
/// request ID.
///
- public async Task BeginCreatingCacheServiceAsync(string cloudServiceName, string cacheServiceName, CacheServiceCreateParameters parameters, CancellationToken cancellationToken)
+ public static CachingKeysResponse RegenerateKeys(this ICacheServiceOperations operations, string cloudServiceName, string cacheServiceName, RegenerateKeysParameters parameters)
{
- // Validate
- if (cloudServiceName == null)
- {
- throw new ArgumentNullException("cloudServiceName");
- }
- if (cacheServiceName == null)
+ return Task.Factory.StartNew((object s) =>
{
- throw new ArgumentNullException("cacheServiceName");
- }
- if (cacheServiceName.Length < 6)
- {
- throw new ArgumentOutOfRangeException("cacheServiceName");
- }
- if (cacheServiceName.Length > 20)
- {
- throw new ArgumentOutOfRangeException("cacheServiceName");
- }
- if (parameters == null)
- {
- throw new ArgumentNullException("parameters");
- }
-
- // Tracing
- bool shouldTrace = CloudContext.Configuration.Tracing.IsEnabled;
- string invocationId = null;
- if (shouldTrace)
- {
- invocationId = Tracing.NextInvocationId.ToString();
- Dictionary tracingParameters = new Dictionary();
- tracingParameters.Add("cloudServiceName", cloudServiceName);
- tracingParameters.Add("cacheServiceName", cacheServiceName);
- tracingParameters.Add("parameters", parameters);
- Tracing.Enter(invocationId, this, "BeginCreatingCacheServiceAsync", tracingParameters);
- }
-
- // Construct URL
- string url = "/" + (this.Client.Credentials.SubscriptionId != null ? this.Client.Credentials.SubscriptionId.Trim() : "") + "/cloudservices/" + cloudServiceName.Trim() + "/resources/cacheservice/Caching/" + cacheServiceName.Trim();
- string baseUrl = this.Client.BaseUri.AbsoluteUri;
- // Trim '/' character from the end of baseUrl and beginning of url.
- if (baseUrl[baseUrl.Length - 1] == '/')
- {
- baseUrl = baseUrl.Substring(0, baseUrl.Length - 1);
- }
- if (url[0] == '/')
- {
- url = url.Substring(1);
- }
- url = baseUrl + "/" + url;
- url = url.Replace(" ", "%20");
-
- // Create HTTP transport objects
- HttpRequestMessage httpRequest = null;
- try
- {
- httpRequest = new HttpRequestMessage();
- httpRequest.Method = HttpMethod.Put;
- httpRequest.RequestUri = new Uri(url);
-
- // Set Headers
- httpRequest.Headers.TryAddWithoutValidation("If-Match", parameters.ETag);
- httpRequest.Headers.Add("x-ms-version", "2012-08-01");
-
- // Set Credentials
- cancellationToken.ThrowIfCancellationRequested();
- await this.Client.Credentials.ProcessHttpRequestAsync(httpRequest, cancellationToken).ConfigureAwait(false);
-
- // Serialize Request
- string requestContent = null;
- XDocument requestDoc = new XDocument();
-
- XElement resourceElement = new XElement(XName.Get("Resource", "http://schemas.microsoft.com/windowsazure"));
- requestDoc.Add(resourceElement);
-
- if (parameters.ResourceProviderNamespace != null)
- {
- XElement resourceProviderNamespaceElement = new XElement(XName.Get("ResourceProviderNamespace", "http://schemas.microsoft.com/windowsazure"));
- resourceProviderNamespaceElement.Value = parameters.ResourceProviderNamespace;
- resourceElement.Add(resourceProviderNamespaceElement);
- }
-
- if (parameters.Type != null)
- {
- XElement typeElement = new XElement(XName.Get("Type", "http://schemas.microsoft.com/windowsazure"));
- typeElement.Value = parameters.Type;
- resourceElement.Add(typeElement);
- }
-
- if (parameters.Name != null)
- {
- XElement nameElement = new XElement(XName.Get("Name", "http://schemas.microsoft.com/windowsazure"));
- nameElement.Value = parameters.Name;
- resourceElement.Add(nameElement);
- }
-
- if (parameters.SchemaVersion != null)
- {
- XElement schemaVersionElement = new XElement(XName.Get("SchemaVersion", "http://schemas.microsoft.com/windowsazure"));
- schemaVersionElement.Value = parameters.SchemaVersion;
- resourceElement.Add(schemaVersionElement);
- }
-
- if (parameters.Settings != null)
- {
- XElement intrinsicSettingsElement = new XElement(XName.Get("IntrinsicSettings", "http://schemas.microsoft.com/windowsazure"));
- resourceElement.Add(intrinsicSettingsElement);
-
- if (parameters.Settings.CacheServiceInputSection != null)
- {
- XElement cacheServiceInputElement = new XElement(XName.Get("CacheServiceInput", ""));
- intrinsicSettingsElement.Add(cacheServiceInputElement);
-
- XElement skuTypeElement = new XElement(XName.Get("SkuType", ""));
- skuTypeElement.Value = parameters.Settings.CacheServiceInputSection.SkuType.ToString();
- cacheServiceInputElement.Add(skuTypeElement);
-
- if (parameters.Settings.CacheServiceInputSection.Location != null)
- {
- XElement locationElement = new XElement(XName.Get("Location", ""));
- locationElement.Value = parameters.Settings.CacheServiceInputSection.Location;
- cacheServiceInputElement.Add(locationElement);
- }
-
- XElement skuCountElement = new XElement(XName.Get("SkuCount", ""));
- skuCountElement.Value = parameters.Settings.CacheServiceInputSection.SkuCount.ToString();
- cacheServiceInputElement.Add(skuCountElement);
-
- if (parameters.Settings.CacheServiceInputSection.ServiceVersion != null)
- {
- XElement serviceVersionElement = new XElement(XName.Get("ServiceVersion", ""));
- serviceVersionElement.Value = parameters.Settings.CacheServiceInputSection.ServiceVersion;
- cacheServiceInputElement.Add(serviceVersionElement);
- }
-
- XElement objectSizeInBytesElement = new XElement(XName.Get("ObjectSizeInBytes", ""));
- objectSizeInBytesElement.Value = parameters.Settings.CacheServiceInputSection.ObjectSizeInBytes.ToString();
- cacheServiceInputElement.Add(objectSizeInBytesElement);
-
- if (parameters.Settings.CacheServiceInputSection.NamedCaches != null)
- {
- XElement namedCachesSequenceElement = new XElement(XName.Get("NamedCaches", ""));
- foreach (IntrinsicSettings.CacheServiceInput.NamedCache namedCachesItem in parameters.Settings.CacheServiceInputSection.NamedCaches)
- {
- XElement namedCacheElement = new XElement(XName.Get("NamedCache", ""));
- namedCachesSequenceElement.Add(namedCacheElement);
-
- if (namedCachesItem.CacheName != null)
- {
- XElement cacheNameElement = new XElement(XName.Get("CacheName", ""));
- cacheNameElement.Value = namedCachesItem.CacheName;
- namedCacheElement.Add(cacheNameElement);
- }
-
- XElement notificationsEnabledElement = new XElement(XName.Get("NotificationsEnabled", ""));
- notificationsEnabledElement.Value = namedCachesItem.NotificationsEnabled.ToString().ToLower();
- namedCacheElement.Add(notificationsEnabledElement);
-
- XElement highAvailabilityEnabledElement = new XElement(XName.Get("HighAvailabilityEnabled", ""));
- highAvailabilityEnabledElement.Value = namedCachesItem.HighAvailabilityEnabled.ToString().ToLower();
- namedCacheElement.Add(highAvailabilityEnabledElement);
-
- if (namedCachesItem.EvictionPolicy != null)
- {
- XElement evictionPolicyElement = new XElement(XName.Get("EvictionPolicy", ""));
- evictionPolicyElement.Value = namedCachesItem.EvictionPolicy;
- namedCacheElement.Add(evictionPolicyElement);
- }
-
- if (namedCachesItem.ExpirationSettingsSection != null)
- {
- XElement expirationSettingsElement = new XElement(XName.Get("ExpirationSettings", ""));
- namedCacheElement.Add(expirationSettingsElement);
-
- XElement timeToLiveInMinutesElement = new XElement(XName.Get("TimeToLiveInMinutes", ""));
- timeToLiveInMinutesElement.Value = namedCachesItem.ExpirationSettingsSection.TimeToLiveInMinutes.ToString();
- expirationSettingsElement.Add(timeToLiveInMinutesElement);
-
- if (namedCachesItem.ExpirationSettingsSection.Type != null)
- {
- XElement typeElement2 = new XElement(XName.Get("Type", ""));
- typeElement2.Value = namedCachesItem.ExpirationSettingsSection.Type;
- expirationSettingsElement.Add(typeElement2);
- }
- }
- }
- cacheServiceInputElement.Add(namedCachesSequenceElement);
- }
- }
- }
-
- if (parameters.IntrinsicSettingsSection != null)
- {
- XElement intrinsicSettingsElement2 = new XElement(XName.Get("IntrinsicSettings", "http://schemas.microsoft.com/windowsazure"));
- resourceElement.Add(intrinsicSettingsElement2);
-
- if (parameters.IntrinsicSettingsSection.CacheServiceInputSection != null)
- {
- XElement cacheServiceInputElement2 = new XElement(XName.Get("CacheServiceInput", ""));
- intrinsicSettingsElement2.Add(cacheServiceInputElement2);
-
- XElement skuTypeElement2 = new XElement(XName.Get("SkuType", ""));
- skuTypeElement2.Value = parameters.IntrinsicSettingsSection.CacheServiceInputSection.SkuType.ToString();
- cacheServiceInputElement2.Add(skuTypeElement2);
-
- if (parameters.IntrinsicSettingsSection.CacheServiceInputSection.Location != null)
- {
- XElement locationElement2 = new XElement(XName.Get("Location", ""));
- locationElement2.Value = parameters.IntrinsicSettingsSection.CacheServiceInputSection.Location;
- cacheServiceInputElement2.Add(locationElement2);
- }
-
- XElement skuCountElement2 = new XElement(XName.Get("SkuCount", ""));
- skuCountElement2.Value = parameters.IntrinsicSettingsSection.CacheServiceInputSection.SkuCount.ToString();
- cacheServiceInputElement2.Add(skuCountElement2);
-
- if (parameters.IntrinsicSettingsSection.CacheServiceInputSection.ServiceVersion != null)
- {
- XElement serviceVersionElement2 = new XElement(XName.Get("ServiceVersion", ""));
- serviceVersionElement2.Value = parameters.IntrinsicSettingsSection.CacheServiceInputSection.ServiceVersion;
- cacheServiceInputElement2.Add(serviceVersionElement2);
- }
-
- XElement objectSizeInBytesElement2 = new XElement(XName.Get("ObjectSizeInBytes", ""));
- objectSizeInBytesElement2.Value = parameters.IntrinsicSettingsSection.CacheServiceInputSection.ObjectSizeInBytes.ToString();
- cacheServiceInputElement2.Add(objectSizeInBytesElement2);
-
- if (parameters.IntrinsicSettingsSection.CacheServiceInputSection.NamedCaches != null)
- {
- XElement namedCachesSequenceElement2 = new XElement(XName.Get("NamedCaches", ""));
- foreach (IntrinsicSettings.CacheServiceInput.NamedCache namedCachesItem2 in parameters.IntrinsicSettingsSection.CacheServiceInputSection.NamedCaches)
- {
- XElement namedCacheElement2 = new XElement(XName.Get("NamedCache", ""));
- namedCachesSequenceElement2.Add(namedCacheElement2);
-
- if (namedCachesItem2.CacheName != null)
- {
- XElement cacheNameElement2 = new XElement(XName.Get("CacheName", ""));
- cacheNameElement2.Value = namedCachesItem2.CacheName;
- namedCacheElement2.Add(cacheNameElement2);
- }
-
- XElement notificationsEnabledElement2 = new XElement(XName.Get("NotificationsEnabled", ""));
- notificationsEnabledElement2.Value = namedCachesItem2.NotificationsEnabled.ToString().ToLower();
- namedCacheElement2.Add(notificationsEnabledElement2);
-
- XElement highAvailabilityEnabledElement2 = new XElement(XName.Get("HighAvailabilityEnabled", ""));
- highAvailabilityEnabledElement2.Value = namedCachesItem2.HighAvailabilityEnabled.ToString().ToLower();
- namedCacheElement2.Add(highAvailabilityEnabledElement2);
-
- if (namedCachesItem2.EvictionPolicy != null)
- {
- XElement evictionPolicyElement2 = new XElement(XName.Get("EvictionPolicy", ""));
- evictionPolicyElement2.Value = namedCachesItem2.EvictionPolicy;
- namedCacheElement2.Add(evictionPolicyElement2);
- }
-
- if (namedCachesItem2.ExpirationSettingsSection != null)
- {
- XElement expirationSettingsElement2 = new XElement(XName.Get("ExpirationSettings", ""));
- namedCacheElement2.Add(expirationSettingsElement2);
-
- XElement timeToLiveInMinutesElement2 = new XElement(XName.Get("TimeToLiveInMinutes", ""));
- timeToLiveInMinutesElement2.Value = namedCachesItem2.ExpirationSettingsSection.TimeToLiveInMinutes.ToString();
- expirationSettingsElement2.Add(timeToLiveInMinutesElement2);
-
- if (namedCachesItem2.ExpirationSettingsSection.Type != null)
- {
- XElement typeElement3 = new XElement(XName.Get("Type", ""));
- typeElement3.Value = namedCachesItem2.ExpirationSettingsSection.Type;
- expirationSettingsElement2.Add(typeElement3);
- }
- }
- }
- cacheServiceInputElement2.Add(namedCachesSequenceElement2);
- }
- }
- }
-
- requestContent = requestDoc.ToString();
- requestContent = System.Text.RegularExpressions.Regex.Replace(requestContent, "\\s*
- /// The begin of deleting Cache Service.This operation is an
- /// asynchronous operation. To determine whether service has finished
- /// processing the request, call Get Operation. (see
- /// http://msdn.microsoft.com/en-us/library/hh758254.aspx for more
- /// information)
- ///
- ///
- /// Required. The name of the cloud service.
- ///
- ///
- /// Required. A name of the cache service.
- ///
- ///
- /// Cancellation token.
- ///
- ///
- /// A standard service response including an HTTP status code and
- /// request ID.
- ///
- public async Task BeginDeletingAsync(string cloudServiceName, string cacheServiceName, CancellationToken cancellationToken)
- {
- // Validate
- if (cloudServiceName == null)
- {
- throw new ArgumentNullException("cloudServiceName");
- }
- if (cacheServiceName == null)
- {
- throw new ArgumentNullException("cacheServiceName");
- }
-
- // Tracing
- bool shouldTrace = CloudContext.Configuration.Tracing.IsEnabled;
- string invocationId = null;
- if (shouldTrace)
- {
- invocationId = Tracing.NextInvocationId.ToString();
- Dictionary tracingParameters = new Dictionary();
- tracingParameters.Add("cloudServiceName", cloudServiceName);
- tracingParameters.Add("cacheServiceName", cacheServiceName);
- Tracing.Enter(invocationId, this, "BeginDeletingAsync", tracingParameters);
- }
-
- // Construct URL
- string url = "/" + (this.Client.Credentials.SubscriptionId != null ? this.Client.Credentials.SubscriptionId.Trim() : "") + "/cloudservices/" + cloudServiceName.Trim() + "/resources/cacheservice/Caching/" + cacheServiceName.Trim();
- string baseUrl = this.Client.BaseUri.AbsoluteUri;
- // Trim '/' character from the end of baseUrl and beginning of url.
- if (baseUrl[baseUrl.Length - 1] == '/')
- {
- baseUrl = baseUrl.Substring(0, baseUrl.Length - 1);
- }
- if (url[0] == '/')
- {
- url = url.Substring(1);
- }
- url = baseUrl + "/" + url;
- url = url.Replace(" ", "%20");
-
- // Create HTTP transport objects
- HttpRequestMessage httpRequest = null;
- try
- {
- httpRequest = new HttpRequestMessage();
- httpRequest.Method = HttpMethod.Delete;
- httpRequest.RequestUri = new Uri(url);
-
- // Set Headers
- httpRequest.Headers.Add("x-ms-version", "2012-08-01");
-
- // Set Credentials
- cancellationToken.ThrowIfCancellationRequested();
- await this.Client.Credentials.ProcessHttpRequestAsync(httpRequest, cancellationToken).ConfigureAwait(false);
-
- // Send Request
- HttpResponseMessage httpResponse = null;
- try
- {
- if (shouldTrace)
- {
- Tracing.SendRequest(invocationId, httpRequest);
- }
- cancellationToken.ThrowIfCancellationRequested();
- httpResponse = await this.Client.HttpClient.SendAsync(httpRequest, cancellationToken).ConfigureAwait(false);
- if (shouldTrace)
- {
- Tracing.ReceiveResponse(invocationId, httpResponse);
- }
- HttpStatusCode statusCode = httpResponse.StatusCode;
- if (statusCode != HttpStatusCode.Accepted)
- {
- cancellationToken.ThrowIfCancellationRequested();
- CloudException ex = CloudException.Create(httpRequest, null, httpResponse, await httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false));
- if (shouldTrace)
- {
- Tracing.Error(invocationId, ex);
- }
- throw ex;
- }
-
- // Create Result
- OperationResponse result = null;
- result = new OperationResponse();
- result.StatusCode = statusCode;
- if (httpResponse.Headers.Contains("x-ms-request-id"))
- {
- result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
- }
-
- if (shouldTrace)
- {
- Tracing.Exit(invocationId, result);
- }
- return result;
- }
- finally
- {
- if (httpResponse != null)
- {
- httpResponse.Dispose();
- }
- }
- }
- finally
- {
- if (httpRequest != null)
- {
- httpRequest.Dispose();
- }
+ return ((ICacheServiceOperations)s).RegenerateKeysAsync(cloudServiceName, cacheServiceName, parameters);
}
+ , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult();
}
///
- /// Get access keys of Cache Service
+ /// Regenerate access keys for a Cache Service
///
+ ///
+ /// Reference to the
+ /// Microsoft.Azure.Management.ManagedCache.ICacheServiceOperations.
+ ///
///
/// Required. The cloud service name.
///
///
/// Required. The cache service name.
///
- ///
- /// Cancellation token.
+ ///
+ /// Required. Key type
///
///
/// A standard service response including an HTTP status code and
/// request ID.
///
- public async Task CheckNameAvailabilityAsync(string cloudServiceName, string cacheServiceName, CancellationToken cancellationToken)
+ public static Task RegenerateKeysAsync(this ICacheServiceOperations operations, string cloudServiceName, string cacheServiceName, RegenerateKeysParameters parameters)
{
- // Validate
- if (cloudServiceName == null)
- {
- throw new ArgumentNullException("cloudServiceName");
- }
- if (cacheServiceName == null)
- {
- throw new ArgumentNullException("cacheServiceName");
- }
-
- // Tracing
- bool shouldTrace = CloudContext.Configuration.Tracing.IsEnabled;
- string invocationId = null;
- if (shouldTrace)
- {
- invocationId = Tracing.NextInvocationId.ToString();
- Dictionary tracingParameters = new Dictionary();
- tracingParameters.Add("cloudServiceName", cloudServiceName);
- tracingParameters.Add("cacheServiceName", cacheServiceName);
- Tracing.Enter(invocationId, this, "CheckNameAvailabilityAsync", tracingParameters);
- }
-
- // Construct URL
- string url = "/" + (this.Client.Credentials.SubscriptionId != null ? this.Client.Credentials.SubscriptionId.Trim() : "") + "/cloudservices/" + cloudServiceName.Trim() + "/resources/cacheservice/~/Caching/dummy/Namespaces/" + cacheServiceName.Trim();
- string baseUrl = this.Client.BaseUri.AbsoluteUri;
- // Trim '/' character from the end of baseUrl and beginning of url.
- if (baseUrl[baseUrl.Length - 1] == '/')
- {
- baseUrl = baseUrl.Substring(0, baseUrl.Length - 1);
- }
- if (url[0] == '/')
- {
- url = url.Substring(1);
- }
- url = baseUrl + "/" + url;
- url = url.Replace(" ", "%20");
-
- // Create HTTP transport objects
- HttpRequestMessage httpRequest = null;
- try
- {
- httpRequest = new HttpRequestMessage();
- httpRequest.Method = HttpMethod.Get;
- httpRequest.RequestUri = new Uri(url);
-
- // Set Headers
- httpRequest.Headers.Add("x-ms-version", "2012-08-01");
-
- // Set Credentials
- cancellationToken.ThrowIfCancellationRequested();
- await this.Client.Credentials.ProcessHttpRequestAsync(httpRequest, cancellationToken).ConfigureAwait(false);
-
- // Send Request
- HttpResponseMessage httpResponse = null;
- try
- {
- if (shouldTrace)
- {
- Tracing.SendRequest(invocationId, httpRequest);
- }
- cancellationToken.ThrowIfCancellationRequested();
- httpResponse = await this.Client.HttpClient.SendAsync(httpRequest, cancellationToken).ConfigureAwait(false);
- if (shouldTrace)
- {
- Tracing.ReceiveResponse(invocationId, httpResponse);
- }
- HttpStatusCode statusCode = httpResponse.StatusCode;
- if (statusCode != HttpStatusCode.OK)
- {
- cancellationToken.ThrowIfCancellationRequested();
- CloudException ex = CloudException.Create(httpRequest, null, httpResponse, await httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false));
- if (shouldTrace)
- {
- Tracing.Error(invocationId, ex);
- }
- throw ex;
- }
-
- // Create Result
- CheckCacheNameAvailabilityResponse result = null;
- // Deserialize Response
- cancellationToken.ThrowIfCancellationRequested();
- string responseContent = await httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- result = new CheckCacheNameAvailabilityResponse();
- XDocument responseDoc = XDocument.Parse(responseContent);
-
- XElement booleanElement = responseDoc.Element(XName.Get("boolean", "http://schemas.microsoft.com/2003/10/Serialization/"));
- if (booleanElement != null)
- {
- bool booleanInstance = bool.Parse(booleanElement.Value);
- result.Available = booleanInstance;
- }
-
- result.StatusCode = statusCode;
- if (httpResponse.Headers.Contains("x-ms-request-id"))
- {
- result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
- }
-
- if (shouldTrace)
- {
- Tracing.Exit(invocationId, result);
- }
- return result;
- }
- finally
- {
- if (httpResponse != null)
- {
- httpResponse.Dispose();
- }
- }
- }
- finally
- {
- if (httpRequest != null)
- {
- httpRequest.Dispose();
- }
- }
+ return operations.RegenerateKeysAsync(cloudServiceName, cacheServiceName, parameters, CancellationToken.None);
}
-
+ }
+
+ ///
+ /// The Managed Cache API includes operations for managing cache services
+ ///
+ public partial interface ICacheServiceOperations
+ {
///
/// Creates a new Cache Service in specified subscription and cloud
/// service.
///
///
- /// Required. The name of the cloud service.
+ /// The name of the cloud service.
///
///
- /// Required. The name of the cache service. The name can be up to 20
- /// characters in length with minimum 6 characters and must be all
- /// lower cases.
+ /// A name of the cache service. The name can be up to 20 characters
+ /// in length with minimum 6 characters and must be all lower cases.
///
///
- /// Required. Parameter supplied to create a cache service
+ /// Parameter supplied to create a cache service
///
///
/// Cancellation token.
///
///
- /// The response body contains the status of the specified asynchronous
- /// operation, indicating whether it has succeeded, is inprogress, or
- /// has failed. Note that this status is distinct from the HTTP status
- /// code returned for the Get Operation Status operation itself. If
- /// the asynchronous operation succeeded, the response body includes
- /// the HTTP status code for the successful request. If the
- /// asynchronous operation failed, the response body includes the HTTP
- /// status code for the failed request, and also includes error
- /// information regarding the failure.
+ /// A standard service response including an HTTP status code and
+ /// request ID.
///
- public async Task CreateCacheServiceAsync(string cloudServiceName, string cacheServiceName, CacheServiceCreateParameters parameters, CancellationToken cancellationToken)
- {
- ManagedCacheClient client = this.Client;
- bool shouldTrace = CloudContext.Configuration.Tracing.IsEnabled;
- string invocationId = null;
- if (shouldTrace)
- {
- invocationId = Tracing.NextInvocationId.ToString();
- Dictionary tracingParameters = new Dictionary();
- tracingParameters.Add("cloudServiceName", cloudServiceName);
- tracingParameters.Add("cacheServiceName", cacheServiceName);
- tracingParameters.Add("parameters", parameters);
- Tracing.Enter(invocationId, this, "CreateCacheServiceAsync", tracingParameters);
- }
- try
- {
- if (shouldTrace)
- {
- client = this.Client.WithHandler(new ClientRequestTrackingHandler(invocationId));
- }
-
- cancellationToken.ThrowIfCancellationRequested();
- OperationResponse response = await client.CacheServices.BeginCreatingCacheServiceAsync(cloudServiceName, cacheServiceName, parameters, cancellationToken).ConfigureAwait(false);
- cancellationToken.ThrowIfCancellationRequested();
- CloudServiceOperationStatusResponse result = await client.GetOperationStatusAsync(response.RequestId, cancellationToken).ConfigureAwait(false);
- int delayInSeconds = 30;
- while ((result.Status != CloudServiceOperationStatus.InProgress) == false)
- {
- cancellationToken.ThrowIfCancellationRequested();
- await TaskEx.Delay(delayInSeconds * 1000, cancellationToken).ConfigureAwait(false);
- cancellationToken.ThrowIfCancellationRequested();
- result = await client.GetOperationStatusAsync(response.RequestId, cancellationToken).ConfigureAwait(false);
- delayInSeconds = 30;
- }
-
- if (shouldTrace)
- {
- Tracing.Exit(invocationId, result);
- }
-
- if (result.Status != CloudServiceOperationStatus.Succeeded)
- {
- if (result.Error != null)
- {
- CloudException ex = new CloudException(result.Error.Code + " : " + result.Error.Message);
- ex.ErrorCode = result.Error.Code;
- ex.ErrorMessage = result.Error.Message;
- if (shouldTrace)
- {
- Tracing.Error(invocationId, ex);
- }
- throw ex;
- }
- else
- {
- CloudException ex = new CloudException("");
- if (shouldTrace)
- {
- Tracing.Error(invocationId, ex);
- }
- throw ex;
- }
- }
-
- return result;
- }
- finally
- {
- if (client != null && shouldTrace)
- {
- client.Dispose();
- }
- }
- }
+ Task BeginCreatingCacheServiceAsync(string cloudServiceName, string cacheServiceName, CacheServiceCreateParameters parameters, CancellationToken cancellationToken);
+
+ ///
+ /// The begin of deleting Cache Service.This operation is an
+ /// asynchronous operation. To determine whether service has finished
+ /// processing the request, call Get Operation. (see
+ /// http://msdn.microsoft.com/en-us/library/hh758254.aspx for more
+ /// information)
+ ///
+ ///
+ /// The name of the cloud service.
+ ///
+ ///
+ /// A name of the cache service.
+ ///
+ ///
+ /// Cancellation token.
+ ///
+ ///
+ /// A standard service response including an HTTP status code and
+ /// request ID.
+ ///
+ Task BeginDeletingAsync(string cloudServiceName, string cacheServiceName, CancellationToken cancellationToken);
+
+ ///
+ /// Get access keys of Cache Service
+ ///
+ ///
+ /// The cloud service name.
+ ///
+ ///
+ /// The cache service name.
+ ///
+ ///
+ /// Cancellation token.
+ ///
+ ///
+ /// A standard service response including an HTTP status code and
+ /// request ID.
+ ///
+ Task CheckNameAvailabilityAsync(string cloudServiceName, string cacheServiceName, CancellationToken cancellationToken);
+
+ ///
+ /// Creates a new Cache Service in specified subscription and cloud
+ /// service.
+ ///
+ ///
+ /// The name of the cloud service.
+ ///
+ ///
+ /// The name of the cache service. The name can be up to 20 characters
+ /// in length with minimum 6 characters and must be all lower cases.
+ ///
+ ///
+ /// Parameter supplied to create a cache service
+ ///
+ ///
+ /// Cancellation token.
+ ///
+ ///
+ /// The response body contains the status of the specified asynchronous
+ /// operation, indicating whether it has succeeded, is inprogress, or
+ /// has failed. Note that this status is distinct from the HTTP status
+ /// code returned for the Get Operation Status operation itself. If
+ /// the asynchronous operation succeeded, the response body includes
+ /// the HTTP status code for the successful request. If the
+ /// asynchronous operation failed, the response body includes the HTTP
+ /// status code for the failed request, and also includes error
+ /// information regarding the failure.
+ ///
+ Task CreateCacheServiceAsync(string cloudServiceName, string cacheServiceName, CacheServiceCreateParameters parameters, CancellationToken cancellationToken);
///
/// Delete Cache Service in specified subscription and cloud service.
@@ -2453,10 +2163,10 @@ public async Task CreateCacheServiceAsync(s
/// more information)
///
///
- /// Required. The name of the cloud service.
+ /// The name of the cloud service.
///
///
- /// Required. A name of the cache service.
+ /// A name of the cache service.
///
///
/// Cancellation token.
@@ -2472,88 +2182,16 @@ public async Task CreateCacheServiceAsync(s
/// status code for the failed request, and also includes error
/// information regarding the failure.
///
- public async Task DeleteAsync(string cloudServiceName, string cacheServiceName, CancellationToken cancellationToken)
- {
- ManagedCacheClient client = this.Client;
- bool shouldTrace = CloudContext.Configuration.Tracing.IsEnabled;
- string invocationId = null;
- if (shouldTrace)
- {
- invocationId = Tracing.NextInvocationId.ToString();
- Dictionary tracingParameters = new Dictionary();
- tracingParameters.Add("cloudServiceName", cloudServiceName);
- tracingParameters.Add("cacheServiceName", cacheServiceName);
- Tracing.Enter(invocationId, this, "DeleteAsync", tracingParameters);
- }
- try
- {
- if (shouldTrace)
- {
- client = this.Client.WithHandler(new ClientRequestTrackingHandler(invocationId));
- }
-
- cancellationToken.ThrowIfCancellationRequested();
- OperationResponse response = await client.CacheServices.BeginDeletingAsync(cloudServiceName, cacheServiceName, cancellationToken).ConfigureAwait(false);
- cancellationToken.ThrowIfCancellationRequested();
- CloudServiceOperationStatusResponse result = await client.GetOperationStatusAsync(response.RequestId, cancellationToken).ConfigureAwait(false);
- int delayInSeconds = 30;
- while ((result.Status != CloudServiceOperationStatus.InProgress) == false)
- {
- cancellationToken.ThrowIfCancellationRequested();
- await TaskEx.Delay(delayInSeconds * 1000, cancellationToken).ConfigureAwait(false);
- cancellationToken.ThrowIfCancellationRequested();
- result = await client.GetOperationStatusAsync(response.RequestId, cancellationToken).ConfigureAwait(false);
- delayInSeconds = 30;
- }
-
- if (shouldTrace)
- {
- Tracing.Exit(invocationId, result);
- }
-
- if (result.Status != CloudServiceOperationStatus.Succeeded)
- {
- if (result.Error != null)
- {
- CloudException ex = new CloudException(result.Error.Code + " : " + result.Error.Message);
- ex.ErrorCode = result.Error.Code;
- ex.ErrorMessage = result.Error.Message;
- if (shouldTrace)
- {
- Tracing.Error(invocationId, ex);
- }
- throw ex;
- }
- else
- {
- CloudException ex = new CloudException("");
- if (shouldTrace)
- {
- Tracing.Error(invocationId, ex);
- }
- throw ex;
- }
- }
-
- return result;
- }
- finally
- {
- if (client != null && shouldTrace)
- {
- client.Dispose();
- }
- }
- }
+ Task DeleteAsync(string cloudServiceName, string cacheServiceName, CancellationToken cancellationToken);
///
/// Get access keys of Cache Service
///
///
- /// Required. The cloud service name.
+ /// The cloud service name.
///
///
- /// Required. The cache service name.
+ /// The cache service name.
///
///
/// Cancellation token.
@@ -2562,152 +2200,84 @@ public async Task DeleteAsync(string cloudS
/// A standard service response including an HTTP status code and
/// request ID.
///
- public async Task GetKeysAsync(string cloudServiceName, string cacheServiceName, CancellationToken cancellationToken)
+ Task GetKeysAsync(string cloudServiceName, string cacheServiceName, CancellationToken cancellationToken);
+
+ ///
+ /// List supported regions of Cache Service
+ ///
+ ///
+ /// Cancellation token.
+ ///
+ ///
+ /// A standard service response including an HTTP status code and
+ /// request ID.
+ ///
+ Task ListRegionsAsync(CancellationToken cancellationToken);
+
+ ///
+ /// Regenerate access keys for a Cache Service
+ ///
+ ///
+ /// The cloud service name.
+ ///
+ ///
+ /// The cache service name.
+ ///
+ ///
+ /// Key type
+ ///
+ ///
+ /// Cancellation token.
+ ///
+ ///
+ /// A standard service response including an HTTP status code and
+ /// request ID.
+ ///
+ Task RegenerateKeysAsync(string cloudServiceName, string cacheServiceName, RegenerateKeysParameters parameters, CancellationToken cancellationToken);
+ }
+
+ ///
+ /// The Managed Cache API includes operations for managing cache services
+ ///
+ internal partial class CacheServiceOperations : IServiceOperations, ICacheServiceOperations
+ {
+ ///
+ /// Initializes a new instance of the CacheServiceOperations class.
+ ///
+ ///
+ /// Reference to the service client.
+ ///
+ internal CacheServiceOperations(ManagedCacheClient client)
{
- // Validate
- if (cloudServiceName == null)
- {
- throw new ArgumentNullException("cloudServiceName");
- }
- if (cloudServiceName.Length > 100)
- {
- throw new ArgumentOutOfRangeException("cloudServiceName");
- }
- if (cacheServiceName == null)
- {
- throw new ArgumentNullException("cacheServiceName");
- }
- if (cacheServiceName.Length > 100)
- {
- throw new ArgumentOutOfRangeException("cacheServiceName");
- }
-
- // Tracing
- bool shouldTrace = CloudContext.Configuration.Tracing.IsEnabled;
- string invocationId = null;
- if (shouldTrace)
- {
- invocationId = Tracing.NextInvocationId.ToString();
- Dictionary tracingParameters = new Dictionary();
- tracingParameters.Add("cloudServiceName", cloudServiceName);
- tracingParameters.Add("cacheServiceName", cacheServiceName);
- Tracing.Enter(invocationId, this, "GetKeysAsync", tracingParameters);
- }
-
- // Construct URL
- string url = "/" + (this.Client.Credentials.SubscriptionId != null ? this.Client.Credentials.SubscriptionId.Trim() : "") + "/cloudservices/" + cloudServiceName.Trim() + "/resources/cacheservice/~/Caching/" + cacheServiceName.Trim() + "/Keys";
- string baseUrl = this.Client.BaseUri.AbsoluteUri;
- // Trim '/' character from the end of baseUrl and beginning of url.
- if (baseUrl[baseUrl.Length - 1] == '/')
- {
- baseUrl = baseUrl.Substring(0, baseUrl.Length - 1);
- }
- if (url[0] == '/')
- {
- url = url.Substring(1);
- }
- url = baseUrl + "/" + url;
- url = url.Replace(" ", "%20");
-
- // Create HTTP transport objects
- HttpRequestMessage httpRequest = null;
- try
- {
- httpRequest = new HttpRequestMessage();
- httpRequest.Method = HttpMethod.Get;
- httpRequest.RequestUri = new Uri(url);
-
- // Set Headers
- httpRequest.Headers.Add("x-ms-version", "2012-08-01");
-
- // Set Credentials
- cancellationToken.ThrowIfCancellationRequested();
- await this.Client.Credentials.ProcessHttpRequestAsync(httpRequest, cancellationToken).ConfigureAwait(false);
-
- // Send Request
- HttpResponseMessage httpResponse = null;
- try
- {
- if (shouldTrace)
- {
- Tracing.SendRequest(invocationId, httpRequest);
- }
- cancellationToken.ThrowIfCancellationRequested();
- httpResponse = await this.Client.HttpClient.SendAsync(httpRequest, cancellationToken).ConfigureAwait(false);
- if (shouldTrace)
- {
- Tracing.ReceiveResponse(invocationId, httpResponse);
- }
- HttpStatusCode statusCode = httpResponse.StatusCode;
- if (statusCode != HttpStatusCode.OK)
- {
- cancellationToken.ThrowIfCancellationRequested();
- CloudException ex = CloudException.Create(httpRequest, null, httpResponse, await httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false));
- if (shouldTrace)
- {
- Tracing.Error(invocationId, ex);
- }
- throw ex;
- }
-
- // Create Result
- CachingKeysResponse result = null;
- // Deserialize Response
- cancellationToken.ThrowIfCancellationRequested();
- string responseContent = await httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- result = new CachingKeysResponse();
- XDocument responseDoc = XDocument.Parse(responseContent);
-
- XElement cachingKeysElement = responseDoc.Element(XName.Get("CachingKeys", "http://schemas.microsoft.com/windowsazure"));
- if (cachingKeysElement != null)
- {
- XElement primaryElement = cachingKeysElement.Element(XName.Get("Primary", "http://schemas.microsoft.com/windowsazure"));
- if (primaryElement != null)
- {
- string primaryInstance = primaryElement.Value;
- result.Primary = primaryInstance;
- }
-
- XElement secondaryElement = cachingKeysElement.Element(XName.Get("Secondary", "http://schemas.microsoft.com/windowsazure"));
- if (secondaryElement != null)
- {
- string secondaryInstance = secondaryElement.Value;
- result.Secondary = secondaryInstance;
- }
- }
-
- result.StatusCode = statusCode;
- if (httpResponse.Headers.Contains("x-ms-request-id"))
- {
- result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
- }
-
- if (shouldTrace)
- {
- Tracing.Exit(invocationId, result);
- }
- return result;
- }
- finally
- {
- if (httpResponse != null)
- {
- httpResponse.Dispose();
- }
- }
- }
- finally
- {
- if (httpRequest != null)
- {
- httpRequest.Dispose();
- }
- }
+ this._client = client;
+ }
+
+ private ManagedCacheClient _client;
+
+ ///
+ /// Gets a reference to the
+ /// Microsoft.Azure.Management.ManagedCache.ManagedCacheClient.
+ ///
+ public ManagedCacheClient Client
+ {
+ get { return this._client; }
}
///
- /// List supported regions of Cache Service
+ /// Creates a new Cache Service in specified subscription and cloud
+ /// service.
///
+ ///
+ /// Required. The name of the cloud service.
+ ///
+ ///
+ /// Required. A name of the cache service. The name can be up to 20
+ /// characters in length with minimum 6 characters and must be all
+ /// lower cases.
+ ///
+ ///
+ /// Required. Parameter supplied to create a cache service
+ ///
///
/// Cancellation token.
///
@@ -2715,22 +2285,45 @@ public async Task GetKeysAsync(string cloudServiceName, str
/// A standard service response including an HTTP status code and
/// request ID.
///
- public async Task ListRegionsAsync(CancellationToken cancellationToken)
+ public async Task BeginCreatingCacheServiceAsync(string cloudServiceName, string cacheServiceName, CacheServiceCreateParameters parameters, CancellationToken cancellationToken)
{
// Validate
+ if (cloudServiceName == null)
+ {
+ throw new ArgumentNullException("cloudServiceName");
+ }
+ if (cacheServiceName == null)
+ {
+ throw new ArgumentNullException("cacheServiceName");
+ }
+ if (cacheServiceName.Length < 6)
+ {
+ throw new ArgumentOutOfRangeException("cacheServiceName");
+ }
+ if (cacheServiceName.Length > 20)
+ {
+ throw new ArgumentOutOfRangeException("cacheServiceName");
+ }
+ if (parameters == null)
+ {
+ throw new ArgumentNullException("parameters");
+ }
// Tracing
- bool shouldTrace = CloudContext.Configuration.Tracing.IsEnabled;
+ bool shouldTrace = TracingAdapter.IsEnabled;
string invocationId = null;
if (shouldTrace)
{
- invocationId = Tracing.NextInvocationId.ToString();
+ invocationId = TracingAdapter.NextInvocationId.ToString();
Dictionary tracingParameters = new Dictionary();
- Tracing.Enter(invocationId, this, "ListRegionsAsync", tracingParameters);
+ tracingParameters.Add("cloudServiceName", cloudServiceName);
+ tracingParameters.Add("cacheServiceName", cacheServiceName);
+ tracingParameters.Add("parameters", parameters);
+ TracingAdapter.Enter(invocationId, this, "BeginCreatingCacheServiceAsync", tracingParameters);
}
// Construct URL
- string url = "/" + (this.Client.Credentials.SubscriptionId != null ? this.Client.Credentials.SubscriptionId.Trim() : "") + "/cloudservices/mycloudservice/resources/cacheservice/~/Caching/mycacheservice/Options/Regions";
+ string url = "/" + (this.Client.Credentials.SubscriptionId == null ? "" : Uri.EscapeDataString(this.Client.Credentials.SubscriptionId)) + "/cloudservices/" + Uri.EscapeDataString(cloudServiceName) + "/resources/cacheservice/Caching/" + Uri.EscapeDataString(cacheServiceName);
string baseUrl = this.Client.BaseUri.AbsoluteUri;
// Trim '/' character from the end of baseUrl and beginning of url.
if (baseUrl[baseUrl.Length - 1] == '/')
@@ -2749,62 +2342,268 @@ public async Task ListRegionsAsync(CancellationToken cancellati
try
{
httpRequest = new HttpRequestMessage();
- httpRequest.Method = HttpMethod.Get;
+ httpRequest.Method = HttpMethod.Put;
httpRequest.RequestUri = new Uri(url);
// Set Headers
+ httpRequest.Headers.TryAddWithoutValidation("If-Match", parameters.ETag);
httpRequest.Headers.Add("x-ms-version", "2012-08-01");
// Set Credentials
cancellationToken.ThrowIfCancellationRequested();
await this.Client.Credentials.ProcessHttpRequestAsync(httpRequest, cancellationToken).ConfigureAwait(false);
+ // Serialize Request
+ string requestContent = null;
+ XDocument requestDoc = new XDocument();
+
+ XElement resourceElement = new XElement(XName.Get("Resource", "http://schemas.microsoft.com/windowsazure"));
+ requestDoc.Add(resourceElement);
+
+ if (parameters.ResourceProviderNamespace != null)
+ {
+ XElement resourceProviderNamespaceElement = new XElement(XName.Get("ResourceProviderNamespace", "http://schemas.microsoft.com/windowsazure"));
+ resourceProviderNamespaceElement.Value = parameters.ResourceProviderNamespace;
+ resourceElement.Add(resourceProviderNamespaceElement);
+ }
+
+ if (parameters.Type != null)
+ {
+ XElement typeElement = new XElement(XName.Get("Type", "http://schemas.microsoft.com/windowsazure"));
+ typeElement.Value = parameters.Type;
+ resourceElement.Add(typeElement);
+ }
+
+ if (parameters.Name != null)
+ {
+ XElement nameElement = new XElement(XName.Get("Name", "http://schemas.microsoft.com/windowsazure"));
+ nameElement.Value = parameters.Name;
+ resourceElement.Add(nameElement);
+ }
+
+ if (parameters.SchemaVersion != null)
+ {
+ XElement schemaVersionElement = new XElement(XName.Get("SchemaVersion", "http://schemas.microsoft.com/windowsazure"));
+ schemaVersionElement.Value = parameters.SchemaVersion;
+ resourceElement.Add(schemaVersionElement);
+ }
+
+ if (parameters.Settings != null)
+ {
+ XElement intrinsicSettingsElement = new XElement(XName.Get("IntrinsicSettings", "http://schemas.microsoft.com/windowsazure"));
+ resourceElement.Add(intrinsicSettingsElement);
+
+ if (parameters.Settings.CacheServiceInputSection != null)
+ {
+ XElement cacheServiceInputElement = new XElement(XName.Get("CacheServiceInput", ""));
+ intrinsicSettingsElement.Add(cacheServiceInputElement);
+
+ XElement skuTypeElement = new XElement(XName.Get("SkuType", ""));
+ skuTypeElement.Value = parameters.Settings.CacheServiceInputSection.SkuType.ToString();
+ cacheServiceInputElement.Add(skuTypeElement);
+
+ if (parameters.Settings.CacheServiceInputSection.Location != null)
+ {
+ XElement locationElement = new XElement(XName.Get("Location", ""));
+ locationElement.Value = parameters.Settings.CacheServiceInputSection.Location;
+ cacheServiceInputElement.Add(locationElement);
+ }
+
+ XElement skuCountElement = new XElement(XName.Get("SkuCount", ""));
+ skuCountElement.Value = parameters.Settings.CacheServiceInputSection.SkuCount.ToString();
+ cacheServiceInputElement.Add(skuCountElement);
+
+ if (parameters.Settings.CacheServiceInputSection.ServiceVersion != null)
+ {
+ XElement serviceVersionElement = new XElement(XName.Get("ServiceVersion", ""));
+ serviceVersionElement.Value = parameters.Settings.CacheServiceInputSection.ServiceVersion;
+ cacheServiceInputElement.Add(serviceVersionElement);
+ }
+
+ XElement objectSizeInBytesElement = new XElement(XName.Get("ObjectSizeInBytes", ""));
+ objectSizeInBytesElement.Value = parameters.Settings.CacheServiceInputSection.ObjectSizeInBytes.ToString();
+ cacheServiceInputElement.Add(objectSizeInBytesElement);
+
+ if (parameters.Settings.CacheServiceInputSection.NamedCaches != null)
+ {
+ if (parameters.Settings.CacheServiceInputSection.NamedCaches is ILazyCollection == false || ((ILazyCollection)parameters.Settings.CacheServiceInputSection.NamedCaches).IsInitialized)
+ {
+ XElement namedCachesSequenceElement = new XElement(XName.Get("NamedCaches", ""));
+ foreach (IntrinsicSettings.CacheServiceInput.NamedCache namedCachesItem in parameters.Settings.CacheServiceInputSection.NamedCaches)
+ {
+ XElement namedCacheElement = new XElement(XName.Get("NamedCache", ""));
+ namedCachesSequenceElement.Add(namedCacheElement);
+
+ if (namedCachesItem.CacheName != null)
+ {
+ XElement cacheNameElement = new XElement(XName.Get("CacheName", ""));
+ cacheNameElement.Value = namedCachesItem.CacheName;
+ namedCacheElement.Add(cacheNameElement);
+ }
+
+ XElement notificationsEnabledElement = new XElement(XName.Get("NotificationsEnabled", ""));
+ notificationsEnabledElement.Value = namedCachesItem.NotificationsEnabled.ToString().ToLower();
+ namedCacheElement.Add(notificationsEnabledElement);
+
+ XElement highAvailabilityEnabledElement = new XElement(XName.Get("HighAvailabilityEnabled", ""));
+ highAvailabilityEnabledElement.Value = namedCachesItem.HighAvailabilityEnabled.ToString().ToLower();
+ namedCacheElement.Add(highAvailabilityEnabledElement);
+
+ if (namedCachesItem.EvictionPolicy != null)
+ {
+ XElement evictionPolicyElement = new XElement(XName.Get("EvictionPolicy", ""));
+ evictionPolicyElement.Value = namedCachesItem.EvictionPolicy;
+ namedCacheElement.Add(evictionPolicyElement);
+ }
+
+ if (namedCachesItem.ExpirationSettingsSection != null)
+ {
+ XElement expirationSettingsElement = new XElement(XName.Get("ExpirationSettings", ""));
+ namedCacheElement.Add(expirationSettingsElement);
+
+ XElement timeToLiveInMinutesElement = new XElement(XName.Get("TimeToLiveInMinutes", ""));
+ timeToLiveInMinutesElement.Value = namedCachesItem.ExpirationSettingsSection.TimeToLiveInMinutes.ToString();
+ expirationSettingsElement.Add(timeToLiveInMinutesElement);
+
+ if (namedCachesItem.ExpirationSettingsSection.Type != null)
+ {
+ XElement typeElement2 = new XElement(XName.Get("Type", ""));
+ typeElement2.Value = namedCachesItem.ExpirationSettingsSection.Type;
+ expirationSettingsElement.Add(typeElement2);
+ }
+ }
+ }
+ cacheServiceInputElement.Add(namedCachesSequenceElement);
+ }
+ }
+ }
+ }
+
+ if (parameters.IntrinsicSettingsSection != null)
+ {
+ XElement intrinsicSettingsElement2 = new XElement(XName.Get("IntrinsicSettings", "http://schemas.microsoft.com/windowsazure"));
+ resourceElement.Add(intrinsicSettingsElement2);
+
+ if (parameters.IntrinsicSettingsSection.CacheServiceInputSection != null)
+ {
+ XElement cacheServiceInputElement2 = new XElement(XName.Get("CacheServiceInput", ""));
+ intrinsicSettingsElement2.Add(cacheServiceInputElement2);
+
+ XElement skuTypeElement2 = new XElement(XName.Get("SkuType", ""));
+ skuTypeElement2.Value = parameters.IntrinsicSettingsSection.CacheServiceInputSection.SkuType.ToString();
+ cacheServiceInputElement2.Add(skuTypeElement2);
+
+ if (parameters.IntrinsicSettingsSection.CacheServiceInputSection.Location != null)
+ {
+ XElement locationElement2 = new XElement(XName.Get("Location", ""));
+ locationElement2.Value = parameters.IntrinsicSettingsSection.CacheServiceInputSection.Location;
+ cacheServiceInputElement2.Add(locationElement2);
+ }
+
+ XElement skuCountElement2 = new XElement(XName.Get("SkuCount", ""));
+ skuCountElement2.Value = parameters.IntrinsicSettingsSection.CacheServiceInputSection.SkuCount.ToString();
+ cacheServiceInputElement2.Add(skuCountElement2);
+
+ if (parameters.IntrinsicSettingsSection.CacheServiceInputSection.ServiceVersion != null)
+ {
+ XElement serviceVersionElement2 = new XElement(XName.Get("ServiceVersion", ""));
+ serviceVersionElement2.Value = parameters.IntrinsicSettingsSection.CacheServiceInputSection.ServiceVersion;
+ cacheServiceInputElement2.Add(serviceVersionElement2);
+ }
+
+ XElement objectSizeInBytesElement2 = new XElement(XName.Get("ObjectSizeInBytes", ""));
+ objectSizeInBytesElement2.Value = parameters.IntrinsicSettingsSection.CacheServiceInputSection.ObjectSizeInBytes.ToString();
+ cacheServiceInputElement2.Add(objectSizeInBytesElement2);
+
+ if (parameters.IntrinsicSettingsSection.CacheServiceInputSection.NamedCaches != null)
+ {
+ if (parameters.IntrinsicSettingsSection.CacheServiceInputSection.NamedCaches is ILazyCollection == false || ((ILazyCollection)parameters.IntrinsicSettingsSection.CacheServiceInputSection.NamedCaches).IsInitialized)
+ {
+ XElement namedCachesSequenceElement2 = new XElement(XName.Get("NamedCaches", ""));
+ foreach (IntrinsicSettings.CacheServiceInput.NamedCache namedCachesItem2 in parameters.IntrinsicSettingsSection.CacheServiceInputSection.NamedCaches)
+ {
+ XElement namedCacheElement2 = new XElement(XName.Get("NamedCache", ""));
+ namedCachesSequenceElement2.Add(namedCacheElement2);
+
+ if (namedCachesItem2.CacheName != null)
+ {
+ XElement cacheNameElement2 = new XElement(XName.Get("CacheName", ""));
+ cacheNameElement2.Value = namedCachesItem2.CacheName;
+ namedCacheElement2.Add(cacheNameElement2);
+ }
+
+ XElement notificationsEnabledElement2 = new XElement(XName.Get("NotificationsEnabled", ""));
+ notificationsEnabledElement2.Value = namedCachesItem2.NotificationsEnabled.ToString().ToLower();
+ namedCacheElement2.Add(notificationsEnabledElement2);
+
+ XElement highAvailabilityEnabledElement2 = new XElement(XName.Get("HighAvailabilityEnabled", ""));
+ highAvailabilityEnabledElement2.Value = namedCachesItem2.HighAvailabilityEnabled.ToString().ToLower();
+ namedCacheElement2.Add(highAvailabilityEnabledElement2);
+
+ if (namedCachesItem2.EvictionPolicy != null)
+ {
+ XElement evictionPolicyElement2 = new XElement(XName.Get("EvictionPolicy", ""));
+ evictionPolicyElement2.Value = namedCachesItem2.EvictionPolicy;
+ namedCacheElement2.Add(evictionPolicyElement2);
+ }
+
+ if (namedCachesItem2.ExpirationSettingsSection != null)
+ {
+ XElement expirationSettingsElement2 = new XElement(XName.Get("ExpirationSettings", ""));
+ namedCacheElement2.Add(expirationSettingsElement2);
+
+ XElement timeToLiveInMinutesElement2 = new XElement(XName.Get("TimeToLiveInMinutes", ""));
+ timeToLiveInMinutesElement2.Value = namedCachesItem2.ExpirationSettingsSection.TimeToLiveInMinutes.ToString();
+ expirationSettingsElement2.Add(timeToLiveInMinutesElement2);
+
+ if (namedCachesItem2.ExpirationSettingsSection.Type != null)
+ {
+ XElement typeElement3 = new XElement(XName.Get("Type", ""));
+ typeElement3.Value = namedCachesItem2.ExpirationSettingsSection.Type;
+ expirationSettingsElement2.Add(typeElement3);
+ }
+ }
+ }
+ cacheServiceInputElement2.Add(namedCachesSequenceElement2);
+ }
+ }
+ }
+ }
+
+ requestContent = requestDoc.ToString();
+ httpRequest.Content = new StringContent(requestContent, Encoding.UTF8);
+ httpRequest.Content.Headers.ContentType = MediaTypeHeaderValue.Parse("application/xml");
+
// Send Request
HttpResponseMessage httpResponse = null;
try
{
if (shouldTrace)
{
- Tracing.SendRequest(invocationId, httpRequest);
+ TracingAdapter.SendRequest(invocationId, httpRequest);
}
cancellationToken.ThrowIfCancellationRequested();
httpResponse = await this.Client.HttpClient.SendAsync(httpRequest, cancellationToken).ConfigureAwait(false);
if (shouldTrace)
{
- Tracing.ReceiveResponse(invocationId, httpResponse);
+ TracingAdapter.ReceiveResponse(invocationId, httpResponse);
}
HttpStatusCode statusCode = httpResponse.StatusCode;
- if (statusCode != HttpStatusCode.OK)
+ if (statusCode != HttpStatusCode.Accepted)
{
cancellationToken.ThrowIfCancellationRequested();
- CloudException ex = CloudException.Create(httpRequest, null, httpResponse, await httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false));
+ CloudException ex = CloudException.Create(httpRequest, requestContent, httpResponse, await httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false));
if (shouldTrace)
{
- Tracing.Error(invocationId, ex);
+ TracingAdapter.Error(invocationId, ex);
}
throw ex;
}
// Create Result
- RegionsResponse result = null;
+ AzureOperationResponse result = null;
// Deserialize Response
- cancellationToken.ThrowIfCancellationRequested();
- string responseContent = await httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- result = new RegionsResponse();
- XDocument responseDoc = XDocument.Parse(responseContent);
-
- XElement regionsSequenceElement = responseDoc.Element(XName.Get("Regions", "http://schemas.microsoft.com/windowsazure"));
- if (regionsSequenceElement != null)
- {
- foreach (XElement regionsElement in regionsSequenceElement.Elements(XName.Get("Region", "http://schemas.microsoft.com/windowsazure")))
- {
- RegionsResponse.Region regionInstance = new RegionsResponse.Region();
- result.Regions.Add(regionInstance);
-
- regionInstance.Location = regionsElement.Value;
- }
- }
-
+ result = new AzureOperationResponse();
result.StatusCode = statusCode;
if (httpResponse.Headers.Contains("x-ms-request-id"))
{
@@ -2813,7 +2612,7 @@ public async Task ListRegionsAsync(CancellationToken cancellati
if (shouldTrace)
{
- Tracing.Exit(invocationId, result);
+ TracingAdapter.Exit(invocationId, result);
}
return result;
}
@@ -2835,16 +2634,17 @@ public async Task ListRegionsAsync(CancellationToken cancellati
}
///
- /// Regenerate access keys for a Cache Service
+ /// The begin of deleting Cache Service.This operation is an
+ /// asynchronous operation. To determine whether service has finished
+ /// processing the request, call Get Operation. (see
+ /// http://msdn.microsoft.com/en-us/library/hh758254.aspx for more
+ /// information)
///
///
- /// Required. The cloud service name.
+ /// Required. The name of the cloud service.
///
///
- /// Required. The cache service name.
- ///
- ///
- /// Required. Key type
+ /// Required. A name of the cache service.
///
///
/// Cancellation token.
@@ -2853,45 +2653,32 @@ public async Task ListRegionsAsync(CancellationToken cancellati
/// A standard service response including an HTTP status code and
/// request ID.
///
- public async Task RegenerateKeysAsync(string cloudServiceName, string cacheServiceName, RegenerateKeysParameters parameters, CancellationToken cancellationToken)
+ public async Task BeginDeletingAsync(string cloudServiceName, string cacheServiceName, CancellationToken cancellationToken)
{
// Validate
if (cloudServiceName == null)
{
throw new ArgumentNullException("cloudServiceName");
}
- if (cloudServiceName.Length > 100)
- {
- throw new ArgumentOutOfRangeException("cloudServiceName");
- }
if (cacheServiceName == null)
{
throw new ArgumentNullException("cacheServiceName");
}
- if (cacheServiceName.Length > 100)
- {
- throw new ArgumentOutOfRangeException("cacheServiceName");
- }
- if (parameters == null)
- {
- throw new ArgumentNullException("parameters");
- }
// Tracing
- bool shouldTrace = CloudContext.Configuration.Tracing.IsEnabled;
+ bool shouldTrace = TracingAdapter.IsEnabled;
string invocationId = null;
if (shouldTrace)
{
- invocationId = Tracing.NextInvocationId.ToString();
+ invocationId = TracingAdapter.NextInvocationId.ToString();
Dictionary tracingParameters = new Dictionary();
tracingParameters.Add("cloudServiceName", cloudServiceName);
tracingParameters.Add("cacheServiceName", cacheServiceName);
- tracingParameters.Add("parameters", parameters);
- Tracing.Enter(invocationId, this, "RegenerateKeysAsync", tracingParameters);
+ TracingAdapter.Enter(invocationId, this, "BeginDeletingAsync", tracingParameters);
}
// Construct URL
- string url = "/" + (this.Client.Credentials.SubscriptionId != null ? this.Client.Credentials.SubscriptionId.Trim() : "") + "/cloudservices/" + cloudServiceName.Trim() + "/resources/cacheservice/~/Caching/" + cacheServiceName.Trim() + "/Keys/?comp=regenerate";
+ string url = "/" + (this.Client.Credentials.SubscriptionId == null ? "" : Uri.EscapeDataString(this.Client.Credentials.SubscriptionId)) + "/cloudservices/" + Uri.EscapeDataString(cloudServiceName) + "/resources/cacheservice/Caching/" + Uri.EscapeDataString(cacheServiceName);
string baseUrl = this.Client.BaseUri.AbsoluteUri;
// Trim '/' character from the end of baseUrl and beginning of url.
if (baseUrl[baseUrl.Length - 1] == '/')
@@ -2910,33 +2697,15 @@ public async Task RegenerateKeysAsync(string cloudServiceNa
try
{
httpRequest = new HttpRequestMessage();
- httpRequest.Method = HttpMethod.Post;
+ httpRequest.Method = HttpMethod.Delete;
httpRequest.RequestUri = new Uri(url);
// Set Headers
- httpRequest.Headers.Add("x-ms-version", "2012-08-01");
-
- // Set Credentials
- cancellationToken.ThrowIfCancellationRequested();
- await this.Client.Credentials.ProcessHttpRequestAsync(httpRequest, cancellationToken).ConfigureAwait(false);
-
- // Serialize Request
- string requestContent = null;
- XDocument requestDoc = new XDocument();
-
- XElement regenerateKeysElement = new XElement(XName.Get("RegenerateKeys", "http://schemas.microsoft.com/windowsazure"));
- requestDoc.Add(regenerateKeysElement);
-
- if (parameters.KeyType != null)
- {
- XElement keyTypeElement = new XElement(XName.Get("KeyType", "http://schemas.microsoft.com/windowsazure"));
- keyTypeElement.Value = parameters.KeyType;
- regenerateKeysElement.Add(keyTypeElement);
- }
+ httpRequest.Headers.Add("x-ms-version", "2012-08-01");
- requestContent = requestDoc.ToString();
- httpRequest.Content = new StringContent(requestContent, Encoding.UTF8);
- httpRequest.Content.Headers.ContentType = MediaTypeHeaderValue.Parse("application/xml");
+ // Set Credentials
+ cancellationToken.ThrowIfCancellationRequested();
+ await this.Client.Credentials.ProcessHttpRequestAsync(httpRequest, cancellationToken).ConfigureAwait(false);
// Send Request
HttpResponseMessage httpResponse = null;
@@ -2944,52 +2713,30 @@ public async Task RegenerateKeysAsync(string cloudServiceNa
{
if (shouldTrace)
{
- Tracing.SendRequest(invocationId, httpRequest);
+ TracingAdapter.SendRequest(invocationId, httpRequest);
}
cancellationToken.ThrowIfCancellationRequested();
httpResponse = await this.Client.HttpClient.SendAsync(httpRequest, cancellationToken).ConfigureAwait(false);
if (shouldTrace)
{
- Tracing.ReceiveResponse(invocationId, httpResponse);
+ TracingAdapter.ReceiveResponse(invocationId, httpResponse);
}
HttpStatusCode statusCode = httpResponse.StatusCode;
- if (statusCode != HttpStatusCode.OK)
+ if (statusCode != HttpStatusCode.Accepted)
{
cancellationToken.ThrowIfCancellationRequested();
- CloudException ex = CloudException.Create(httpRequest, requestContent, httpResponse, await httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false));
+ CloudException ex = CloudException.Create(httpRequest, null, httpResponse, await httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false));
if (shouldTrace)
{
- Tracing.Error(invocationId, ex);
+ TracingAdapter.Error(invocationId, ex);
}
throw ex;
}
// Create Result
- CachingKeysResponse result = null;
+ AzureOperationResponse result = null;
// Deserialize Response
- cancellationToken.ThrowIfCancellationRequested();
- string responseContent = await httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- result = new CachingKeysResponse();
- XDocument responseDoc = XDocument.Parse(responseContent);
-
- XElement cachingKeysElement = responseDoc.Element(XName.Get("CachingKeys", "http://schemas.microsoft.com/windowsazure"));
- if (cachingKeysElement != null)
- {
- XElement primaryElement = cachingKeysElement.Element(XName.Get("Primary", "http://schemas.microsoft.com/windowsazure"));
- if (primaryElement != null)
- {
- string primaryInstance = primaryElement.Value;
- result.Primary = primaryInstance;
- }
-
- XElement secondaryElement = cachingKeysElement.Element(XName.Get("Secondary", "http://schemas.microsoft.com/windowsazure"));
- if (secondaryElement != null)
- {
- string secondaryInstance = secondaryElement.Value;
- result.Secondary = secondaryInstance;
- }
- }
-
+ result = new AzureOperationResponse();
result.StatusCode = statusCode;
if (httpResponse.Headers.Contains("x-ms-request-id"))
{
@@ -2998,7 +2745,7 @@ public async Task RegenerateKeysAsync(string cloudServiceNa
if (shouldTrace)
{
- Tracing.Exit(invocationId, result);
+ TracingAdapter.Exit(invocationId, result);
}
return result;
}
@@ -3018,112 +2765,15 @@ public async Task RegenerateKeysAsync(string cloudServiceNa
}
}
}
- }
-
- public partial interface ICloudServiceOperations
- {
- ///
- /// Create a cloud service.
- ///
- ///
- /// The cloud service name.
- ///
- ///
- /// Parameters supplied to the Create cloud service operation.
- ///
- ///
- /// Cancellation token.
- ///
- ///
- /// A standard service response including an HTTP status code and
- /// request ID.
- ///
- Task BeginCreatingAsync(string cloudServiceName, CloudServiceCreateParameters parameters, CancellationToken cancellationToken);
-
- ///
- /// Create a cloud service.
- ///
- ///
- /// The cloud service name.
- ///
- ///
- /// Parameters supplied to the Create cloud service operation.
- ///
- ///
- /// Cancellation token.
- ///
- ///
- /// The response body contains the status of the specified asynchronous
- /// operation, indicating whether it has succeeded, is inprogress, or
- /// has failed. Note that this status is distinct from the HTTP status
- /// code returned for the Get Operation Status operation itself. If
- /// the asynchronous operation succeeded, the response body includes
- /// the HTTP status code for the successful request. If the
- /// asynchronous operation failed, the response body includes the HTTP
- /// status code for the failed request, and also includes error
- /// information regarding the failure.
- ///
- Task CreateAsync(string cloudServiceName, CloudServiceCreateParameters parameters, CancellationToken cancellationToken);
-
- ///
- /// Retrieve a cloud service.
- ///
- ///
- /// The cloud service name.
- ///
- ///
- /// Cancellation token.
- ///
- ///
- /// Information about a retrieved Cloud Service.
- ///
- Task GetAsync(string cloudServiceName, CancellationToken cancellationToken);
-
- ///
- /// The List Cloud Services operation enumerates services that are
- /// provisioned for a subscription.
- ///
- ///
- /// Cancellation token.
- ///
- ///
- /// The response structure for the Cloud Service List operation.
- ///
- Task ListAsync(CancellationToken cancellationToken);
- }
-
- internal partial class CloudServiceOperations : IServiceOperations, ICloudServiceOperations
- {
- ///
- /// Initializes a new instance of the CloudServiceOperations class.
- ///
- ///
- /// Reference to the service client.
- ///
- internal CloudServiceOperations(ManagedCacheClient client)
- {
- this._client = client;
- }
-
- private ManagedCacheClient _client;
-
- ///
- /// Gets a reference to the
- /// Microsoft.Azure.Management.ManagedCache.ManagedCacheClient.
- ///
- public ManagedCacheClient Client
- {
- get { return this._client; }
- }
///
- /// Create a cloud service.
+ /// Get access keys of Cache Service
///
///
/// Required. The cloud service name.
///
- ///
- /// Required. Parameters supplied to the Create cloud service operation.
+ ///
+ /// Required. The cache service name.
///
///
/// Cancellation token.
@@ -3132,56 +2782,32 @@ public ManagedCacheClient Client
/// A standard service response including an HTTP status code and
/// request ID.
///
- public async Task BeginCreatingAsync(string cloudServiceName, CloudServiceCreateParameters parameters, CancellationToken cancellationToken)
+ public async Task CheckNameAvailabilityAsync(string cloudServiceName, string cacheServiceName, CancellationToken cancellationToken)
{
// Validate
if (cloudServiceName == null)
{
throw new ArgumentNullException("cloudServiceName");
}
- if (cloudServiceName.Length > 100)
- {
- throw new ArgumentOutOfRangeException("cloudServiceName");
- }
- if (parameters == null)
- {
- throw new ArgumentNullException("parameters");
- }
- if (parameters.Description == null)
- {
- throw new ArgumentNullException("parameters.Description");
- }
- if (parameters.Description.Length > 1024)
- {
- throw new ArgumentOutOfRangeException("parameters.Description");
- }
- if (parameters.GeoRegion == null)
- {
- throw new ArgumentNullException("parameters.GeoRegion");
- }
- if (parameters.Label == null)
- {
- throw new ArgumentNullException("parameters.Label");
- }
- if (parameters.Label.Length > 100)
+ if (cacheServiceName == null)
{
- throw new ArgumentOutOfRangeException("parameters.Label");
+ throw new ArgumentNullException("cacheServiceName");
}
// Tracing
- bool shouldTrace = CloudContext.Configuration.Tracing.IsEnabled;
+ bool shouldTrace = TracingAdapter.IsEnabled;
string invocationId = null;
if (shouldTrace)
{
- invocationId = Tracing.NextInvocationId.ToString();
+ invocationId = TracingAdapter.NextInvocationId.ToString();
Dictionary tracingParameters = new Dictionary();
tracingParameters.Add("cloudServiceName", cloudServiceName);
- tracingParameters.Add("parameters", parameters);
- Tracing.Enter(invocationId, this, "BeginCreatingAsync", tracingParameters);
+ tracingParameters.Add("cacheServiceName", cacheServiceName);
+ TracingAdapter.Enter(invocationId, this, "CheckNameAvailabilityAsync", tracingParameters);
}
// Construct URL
- string url = (this.Client.Credentials.SubscriptionId != null ? this.Client.Credentials.SubscriptionId.Trim() : "") + "/CloudServices/" + cloudServiceName.Trim();
+ string url = "/" + (this.Client.Credentials.SubscriptionId == null ? "" : Uri.EscapeDataString(this.Client.Credentials.SubscriptionId)) + "/cloudservices/" + Uri.EscapeDataString(cloudServiceName) + "/resources/cacheservice/~/Caching/dummy/Namespaces/" + Uri.EscapeDataString(cacheServiceName);
string baseUrl = this.Client.BaseUri.AbsoluteUri;
// Trim '/' character from the end of baseUrl and beginning of url.
if (baseUrl[baseUrl.Length - 1] == '/')
@@ -3200,7 +2826,7 @@ public async Task BeginCreatingAsync(string cloudServiceName,
try
{
httpRequest = new HttpRequestMessage();
- httpRequest.Method = HttpMethod.Put;
+ httpRequest.Method = HttpMethod.Get;
httpRequest.RequestUri = new Uri(url);
// Set Headers
@@ -3210,65 +2836,50 @@ public async Task BeginCreatingAsync(string cloudServiceName,
cancellationToken.ThrowIfCancellationRequested();
await this.Client.Credentials.ProcessHttpRequestAsync(httpRequest, cancellationToken).ConfigureAwait(false);
- // Serialize Request
- string requestContent = null;
- XDocument requestDoc = new XDocument();
-
- XElement cloudServiceElement = new XElement(XName.Get("CloudService", "http://schemas.microsoft.com/windowsazure"));
- requestDoc.Add(cloudServiceElement);
-
- XElement labelElement = new XElement(XName.Get("Label", "http://schemas.microsoft.com/windowsazure"));
- labelElement.Value = parameters.Label;
- cloudServiceElement.Add(labelElement);
-
- XElement descriptionElement = new XElement(XName.Get("Description", "http://schemas.microsoft.com/windowsazure"));
- descriptionElement.Value = parameters.Description;
- cloudServiceElement.Add(descriptionElement);
-
- XElement geoRegionElement = new XElement(XName.Get("GeoRegion", "http://schemas.microsoft.com/windowsazure"));
- geoRegionElement.Value = parameters.GeoRegion;
- cloudServiceElement.Add(geoRegionElement);
-
- if (parameters.Email != null)
- {
- XElement emailElement = new XElement(XName.Get("Email", "http://schemas.microsoft.com/windowsazure"));
- emailElement.Value = parameters.Email;
- cloudServiceElement.Add(emailElement);
- }
-
- requestContent = requestDoc.ToString();
- httpRequest.Content = new StringContent(requestContent, Encoding.UTF8);
- httpRequest.Content.Headers.ContentType = MediaTypeHeaderValue.Parse("application/xml");
-
// Send Request
HttpResponseMessage httpResponse = null;
try
{
if (shouldTrace)
{
- Tracing.SendRequest(invocationId, httpRequest);
+ TracingAdapter.SendRequest(invocationId, httpRequest);
}
cancellationToken.ThrowIfCancellationRequested();
httpResponse = await this.Client.HttpClient.SendAsync(httpRequest, cancellationToken).ConfigureAwait(false);
if (shouldTrace)
{
- Tracing.ReceiveResponse(invocationId, httpResponse);
+ TracingAdapter.ReceiveResponse(invocationId, httpResponse);
}
HttpStatusCode statusCode = httpResponse.StatusCode;
- if (statusCode != HttpStatusCode.Accepted)
+ if (statusCode != HttpStatusCode.OK)
{
cancellationToken.ThrowIfCancellationRequested();
- CloudException ex = CloudException.Create(httpRequest, requestContent, httpResponse, await httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false));
+ CloudException ex = CloudException.Create(httpRequest, null, httpResponse, await httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false));
if (shouldTrace)
{
- Tracing.Error(invocationId, ex);
+ TracingAdapter.Error(invocationId, ex);
}
throw ex;
}
// Create Result
- OperationResponse result = null;
- result = new OperationResponse();
+ CheckCacheNameAvailabilityResponse result = null;
+ // Deserialize Response
+ if (statusCode == HttpStatusCode.OK)
+ {
+ cancellationToken.ThrowIfCancellationRequested();
+ string responseContent = await httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ result = new CheckCacheNameAvailabilityResponse();
+ XDocument responseDoc = XDocument.Parse(responseContent);
+
+ XElement booleanElement = responseDoc.Element(XName.Get("boolean", "http://schemas.microsoft.com/2003/10/Serialization/"));
+ if (booleanElement != null)
+ {
+ bool booleanInstance = bool.Parse(booleanElement.Value);
+ result.Available = booleanInstance;
+ }
+
+ }
result.StatusCode = statusCode;
if (httpResponse.Headers.Contains("x-ms-request-id"))
{
@@ -3277,7 +2888,7 @@ public async Task BeginCreatingAsync(string cloudServiceName,
if (shouldTrace)
{
- Tracing.Exit(invocationId, result);
+ TracingAdapter.Exit(invocationId, result);
}
return result;
}
@@ -3299,13 +2910,19 @@ public async Task BeginCreatingAsync(string cloudServiceName,
}
///
- /// Create a cloud service.
+ /// Creates a new Cache Service in specified subscription and cloud
+ /// service.
///
///
- /// Required. The cloud service name.
+ /// Required. The name of the cloud service.
+ ///
+ ///
+ /// Required. The name of the cache service. The name can be up to 20
+ /// characters in length with minimum 6 characters and must be all
+ /// lower cases.
///
///
- /// Required. Parameters supplied to the Create cloud service operation.
+ /// Required. Parameter supplied to create a cache service
///
///
/// Cancellation token.
@@ -3321,464 +2938,204 @@ public async Task BeginCreatingAsync(string cloudServiceName,
/// status code for the failed request, and also includes error
/// information regarding the failure.
///
- public async Task CreateAsync(string cloudServiceName, CloudServiceCreateParameters parameters, CancellationToken cancellationToken)
+ public async Task CreateCacheServiceAsync(string cloudServiceName, string cacheServiceName, CacheServiceCreateParameters parameters, CancellationToken cancellationToken)
{
ManagedCacheClient client = this.Client;
- bool shouldTrace = CloudContext.Configuration.Tracing.IsEnabled;
+ bool shouldTrace = TracingAdapter.IsEnabled;
string invocationId = null;
if (shouldTrace)
{
- invocationId = Tracing.NextInvocationId.ToString();
+ invocationId = TracingAdapter.NextInvocationId.ToString();
Dictionary tracingParameters = new Dictionary();
tracingParameters.Add("cloudServiceName", cloudServiceName);
+ tracingParameters.Add("cacheServiceName", cacheServiceName);
tracingParameters.Add("parameters", parameters);
- Tracing.Enter(invocationId, this, "CreateAsync", tracingParameters);
+ TracingAdapter.Enter(invocationId, this, "CreateCacheServiceAsync", tracingParameters);
}
- try
+
+ cancellationToken.ThrowIfCancellationRequested();
+ AzureOperationResponse response = await client.CacheServices.BeginCreatingCacheServiceAsync(cloudServiceName, cacheServiceName, parameters, cancellationToken).ConfigureAwait(false);
+ cancellationToken.ThrowIfCancellationRequested();
+ CloudServiceOperationStatusResponse result = await client.GetOperationStatusAsync(response.RequestId, cancellationToken).ConfigureAwait(false);
+ int delayInSeconds = 30;
+ while ((result.Status != CloudServiceOperationStatus.InProgress) == false)
{
- if (shouldTrace)
- {
- client = this.Client.WithHandler(new ClientRequestTrackingHandler(invocationId));
- }
-
cancellationToken.ThrowIfCancellationRequested();
- OperationResponse response = await client.CloudServices.BeginCreatingAsync(cloudServiceName, parameters, cancellationToken).ConfigureAwait(false);
+ await TaskEx.Delay(delayInSeconds * 1000, cancellationToken).ConfigureAwait(false);
cancellationToken.ThrowIfCancellationRequested();
- CloudServiceOperationStatusResponse result = await client.GetOperationStatusAsync(response.RequestId, cancellationToken).ConfigureAwait(false);
- int delayInSeconds = 10;
- while ((result.Status != CloudServiceOperationStatus.InProgress) == false)
- {
- cancellationToken.ThrowIfCancellationRequested();
- await TaskEx.Delay(delayInSeconds * 1000, cancellationToken).ConfigureAwait(false);
- cancellationToken.ThrowIfCancellationRequested();
- result = await client.GetOperationStatusAsync(response.RequestId, cancellationToken).ConfigureAwait(false);
- delayInSeconds = 5;
- }
-
- if (shouldTrace)
- {
- Tracing.Exit(invocationId, result);
- }
-
- if (result.Status != CloudServiceOperationStatus.Succeeded)
+ result = await client.GetOperationStatusAsync(response.RequestId, cancellationToken).ConfigureAwait(false);
+ delayInSeconds = 30;
+ }
+
+ if (shouldTrace)
+ {
+ TracingAdapter.Exit(invocationId, result);
+ }
+
+ if (result.Status != CloudServiceOperationStatus.Succeeded)
+ {
+ if (result.Error != null)
{
- if (result.Error != null)
- {
- CloudException ex = new CloudException(result.Error.Code + " : " + result.Error.Message);
- ex.ErrorCode = result.Error.Code;
- ex.ErrorMessage = result.Error.Message;
- if (shouldTrace)
- {
- Tracing.Error(invocationId, ex);
- }
- throw ex;
- }
- else
+ CloudException ex = new CloudException(result.Error.Code + " : " + result.Error.Message);
+ ex.Error = new CloudError();
+ ex.Error.Code = result.Error.Code;
+ ex.Error.Message = result.Error.Message;
+ if (shouldTrace)
{
- CloudException ex = new CloudException("");
- if (shouldTrace)
- {
- Tracing.Error(invocationId, ex);
- }
- throw ex;
+ TracingAdapter.Error(invocationId, ex);
}
+ throw ex;
}
-
- return result;
- }
- finally
- {
- if (client != null && shouldTrace)
+ else
{
- client.Dispose();
+ CloudException ex = new CloudException("");
+ if (shouldTrace)
+ {
+ TracingAdapter.Error(invocationId, ex);
+ }
+ throw ex;
}
}
+
+ return result;
}
///
- /// Retrieve a cloud service.
+ /// Delete Cache Service in specified subscription and cloud service.
+ /// (see http://msdn.microsoft.com/en-us/library/hh758254.aspx for
+ /// more information)
///
///
- /// Required. The cloud service name.
+ /// Required. The name of the cloud service.
+ ///
+ ///
+ /// Required. A name of the cache service.
///
///
/// Cancellation token.
///
///
- /// Information about a retrieved Cloud Service.
+ /// The response body contains the status of the specified asynchronous
+ /// operation, indicating whether it has succeeded, is inprogress, or
+ /// has failed. Note that this status is distinct from the HTTP status
+ /// code returned for the Get Operation Status operation itself. If
+ /// the asynchronous operation succeeded, the response body includes
+ /// the HTTP status code for the successful request. If the
+ /// asynchronous operation failed, the response body includes the HTTP
+ /// status code for the failed request, and also includes error
+ /// information regarding the failure.
///
- public async Task GetAsync(string cloudServiceName, CancellationToken cancellationToken)
+ public async Task DeleteAsync(string cloudServiceName, string cacheServiceName, CancellationToken cancellationToken)
{
- // Validate
- if (cloudServiceName == null)
- {
- throw new ArgumentNullException("cloudServiceName");
- }
- if (cloudServiceName.Length > 100)
- {
- throw new ArgumentOutOfRangeException("cloudServiceName");
- }
-
- // Tracing
- bool shouldTrace = CloudContext.Configuration.Tracing.IsEnabled;
+ ManagedCacheClient client = this.Client;
+ bool shouldTrace = TracingAdapter.IsEnabled;
string invocationId = null;
if (shouldTrace)
{
- invocationId = Tracing.NextInvocationId.ToString();
+ invocationId = TracingAdapter.NextInvocationId.ToString();
Dictionary tracingParameters = new Dictionary();
tracingParameters.Add("cloudServiceName", cloudServiceName);
- Tracing.Enter(invocationId, this, "GetAsync", tracingParameters);
+ tracingParameters.Add("cacheServiceName", cacheServiceName);
+ TracingAdapter.Enter(invocationId, this, "DeleteAsync", tracingParameters);
}
- // Construct URL
- string url = (this.Client.Credentials.SubscriptionId != null ? this.Client.Credentials.SubscriptionId.Trim() : "") + "/CloudServices/" + cloudServiceName.Trim();
- string baseUrl = this.Client.BaseUri.AbsoluteUri;
- // Trim '/' character from the end of baseUrl and beginning of url.
- if (baseUrl[baseUrl.Length - 1] == '/')
+ cancellationToken.ThrowIfCancellationRequested();
+ AzureOperationResponse response = await client.CacheServices.BeginDeletingAsync(cloudServiceName, cacheServiceName, cancellationToken).ConfigureAwait(false);
+ cancellationToken.ThrowIfCancellationRequested();
+ CloudServiceOperationStatusResponse result = await client.GetOperationStatusAsync(response.RequestId, cancellationToken).ConfigureAwait(false);
+ int delayInSeconds = 30;
+ while ((result.Status != CloudServiceOperationStatus.InProgress) == false)
{
- baseUrl = baseUrl.Substring(0, baseUrl.Length - 1);
+ cancellationToken.ThrowIfCancellationRequested();
+ await TaskEx.Delay(delayInSeconds * 1000, cancellationToken).ConfigureAwait(false);
+ cancellationToken.ThrowIfCancellationRequested();
+ result = await client.GetOperationStatusAsync(response.RequestId, cancellationToken).ConfigureAwait(false);
+ delayInSeconds = 30;
}
- if (url[0] == '/')
+
+ if (shouldTrace)
{
- url = url.Substring(1);
+ TracingAdapter.Exit(invocationId, result);
}
- url = baseUrl + "/" + url;
- url = url.Replace(" ", "%20");
- // Create HTTP transport objects
- HttpRequestMessage httpRequest = null;
- try
+ if (result.Status != CloudServiceOperationStatus.Succeeded)
{
- httpRequest = new HttpRequestMessage();
- httpRequest.Method = HttpMethod.Get;
- httpRequest.RequestUri = new Uri(url);
-
- // Set Headers
- httpRequest.Headers.Add("x-ms-version", "2012-08-01");
-
- // Set Credentials
- cancellationToken.ThrowIfCancellationRequested();
- await this.Client.Credentials.ProcessHttpRequestAsync(httpRequest, cancellationToken).ConfigureAwait(false);
-
- // Send Request
- HttpResponseMessage httpResponse = null;
- try
+ if (result.Error != null)
{
+ CloudException ex = new CloudException(result.Error.Code + " : " + result.Error.Message);
+ ex.Error = new CloudError();
+ ex.Error.Code = result.Error.Code;
+ ex.Error.Message = result.Error.Message;
if (shouldTrace)
{
- Tracing.SendRequest(invocationId, httpRequest);
- }
- cancellationToken.ThrowIfCancellationRequested();
- httpResponse = await this.Client.HttpClient.SendAsync(httpRequest, cancellationToken).ConfigureAwait(false);
- if (shouldTrace)
- {
- Tracing.ReceiveResponse(invocationId, httpResponse);
- }
- HttpStatusCode statusCode = httpResponse.StatusCode;
- if (statusCode != HttpStatusCode.OK)
- {
- cancellationToken.ThrowIfCancellationRequested();
- CloudException ex = CloudException.Create(httpRequest, null, httpResponse, await httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false));
- if (shouldTrace)
- {
- Tracing.Error(invocationId, ex);
- }
- throw ex;
- }
-
- // Create Result
- CloudServiceGetResponse result = null;
- // Deserialize Response
- cancellationToken.ThrowIfCancellationRequested();
- string responseContent = await httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- result = new CloudServiceGetResponse();
- XDocument responseDoc = XDocument.Parse(responseContent);
-
- XElement cloudServiceElement = responseDoc.Element(XName.Get("CloudService", "http://schemas.microsoft.com/windowsazure"));
- if (cloudServiceElement != null)
- {
- XElement geoLocationElement = cloudServiceElement.Element(XName.Get("GeoLocation", "http://schemas.microsoft.com/windowsazure"));
- if (geoLocationElement != null)
- {
- string geoLocationInstance = geoLocationElement.Value;
- result.GeoLocation = geoLocationInstance;
- }
-
- XElement resourcesSequenceElement = cloudServiceElement.Element(XName.Get("Resources", "http://schemas.microsoft.com/windowsazure"));
- if (resourcesSequenceElement != null)
- {
- foreach (XElement resourcesElement in resourcesSequenceElement.Elements(XName.Get("Resource", "http://schemas.microsoft.com/windowsazure")))
- {
- CloudServiceResource resourceInstance = new CloudServiceResource();
- result.Resources.Add(resourceInstance);
-
- XElement resourceProviderNamespaceElement = resourcesElement.Element(XName.Get("ResourceProviderNamespace", "http://schemas.microsoft.com/windowsazure"));
- if (resourceProviderNamespaceElement != null)
- {
- string resourceProviderNamespaceInstance = resourceProviderNamespaceElement.Value;
- resourceInstance.Namespace = resourceProviderNamespaceInstance;
- }
-
- XElement typeElement = resourcesElement.Element(XName.Get("Type", "http://schemas.microsoft.com/windowsazure"));
- if (typeElement != null)
- {
- string typeInstance = typeElement.Value;
- resourceInstance.Type = typeInstance;
- }
-
- XElement nameElement = resourcesElement.Element(XName.Get("Name", "http://schemas.microsoft.com/windowsazure"));
- if (nameElement != null)
- {
- string nameInstance = nameElement.Value;
- resourceInstance.Name = nameInstance;
- }
-
- XElement planElement = resourcesElement.Element(XName.Get("Plan", "http://schemas.microsoft.com/windowsazure"));
- if (planElement != null)
- {
- string planInstance = planElement.Value;
- resourceInstance.Plan = planInstance;
- }
-
- XElement schemaVersionElement = resourcesElement.Element(XName.Get("SchemaVersion", "http://schemas.microsoft.com/windowsazure"));
- if (schemaVersionElement != null)
- {
- string schemaVersionInstance = schemaVersionElement.Value;
- resourceInstance.SchemaVersion = schemaVersionInstance;
- }
-
- XElement eTagElement = resourcesElement.Element(XName.Get("ETag", "http://schemas.microsoft.com/windowsazure"));
- if (eTagElement != null)
- {
- string eTagInstance = eTagElement.Value;
- resourceInstance.ETag = eTagInstance;
- }
-
- XElement stateElement = resourcesElement.Element(XName.Get("State", "http://schemas.microsoft.com/windowsazure"));
- if (stateElement != null)
- {
- string stateInstance = stateElement.Value;
- resourceInstance.State = stateInstance;
- }
-
- XElement subStateElement = resourcesElement.Element(XName.Get("SubState", "http://schemas.microsoft.com/windowsazure"));
- if (subStateElement != null)
- {
- string subStateInstance = subStateElement.Value;
- resourceInstance.SubState = subStateInstance;
- }
-
- XElement usageMetersSequenceElement = resourcesElement.Element(XName.Get("UsageMeters", "http://schemas.microsoft.com/windowsazure"));
- if (usageMetersSequenceElement != null)
- {
- foreach (XElement usageMetersElement in usageMetersSequenceElement.Elements(XName.Get("UsageMeter", "http://schemas.microsoft.com/windowsazure")))
- {
- CloudServiceResource.UsageLimit usageMeterInstance = new CloudServiceResource.UsageLimit();
- resourceInstance.UsageLimits.Add(usageMeterInstance);
-
- XElement nameElement2 = usageMetersElement.Element(XName.Get("Name", "http://schemas.microsoft.com/windowsazure"));
- if (nameElement2 != null)
- {
- string nameInstance2 = nameElement2.Value;
- usageMeterInstance.Name = nameInstance2;
- }
-
- XElement unitElement = usageMetersElement.Element(XName.Get("Unit", "http://schemas.microsoft.com/windowsazure"));
- if (unitElement != null)
- {
- string unitInstance = unitElement.Value;
- usageMeterInstance.Unit = unitInstance;
- }
-
- XElement includedElement = usageMetersElement.Element(XName.Get("Included", "http://schemas.microsoft.com/windowsazure"));
- if (includedElement != null)
- {
- string includedInstance = includedElement.Value;
- usageMeterInstance.AmountIncluded = includedInstance;
- }
-
- XElement usedElement = usageMetersElement.Element(XName.Get("Used", "http://schemas.microsoft.com/windowsazure"));
- if (usedElement != null)
- {
- string usedInstance = usedElement.Value;
- usageMeterInstance.AmountUsed = usedInstance;
- }
- }
- }
-
- XElement outputItemsSequenceElement = resourcesElement.Element(XName.Get("OutputItems", "http://schemas.microsoft.com/windowsazure"));
- if (outputItemsSequenceElement != null)
- {
- foreach (XElement outputItemsElement in outputItemsSequenceElement.Elements(XName.Get("OutputItem", "http://schemas.microsoft.com/windowsazure")))
- {
- string outputItemsKey = outputItemsElement.Element(XName.Get("Key", "http://schemas.microsoft.com/windowsazure")).Value;
- string outputItemsValue = outputItemsElement.Element(XName.Get("Value", "http://schemas.microsoft.com/windowsazure")).Value;
- resourceInstance.OutputItems.Add(outputItemsKey, outputItemsValue);
- }
- }
-
- XElement intrinsicSettingsElement = resourcesElement.Element(XName.Get("IntrinsicSettings", "http://schemas.microsoft.com/windowsazure"));
- if (intrinsicSettingsElement != null)
- {
- IntrinsicSettings intrinsicSettingsInstance = new IntrinsicSettings();
- resourceInstance.IntrinsicSettingsSection = intrinsicSettingsInstance;
-
- XElement cacheServiceInputElement = intrinsicSettingsElement.Element(XName.Get("CacheServiceInput", ""));
- if (cacheServiceInputElement != null)
- {
- IntrinsicSettings.CacheServiceInput cacheServiceInputInstance = new IntrinsicSettings.CacheServiceInput();
- intrinsicSettingsInstance.CacheServiceInputSection = cacheServiceInputInstance;
-
- XElement skuTypeElement = cacheServiceInputElement.Element(XName.Get("SkuType", ""));
- if (skuTypeElement != null)
- {
- CacheServiceSkuType skuTypeInstance = ((CacheServiceSkuType)Enum.Parse(typeof(CacheServiceSkuType), skuTypeElement.Value, true));
- cacheServiceInputInstance.SkuType = skuTypeInstance;
- }
-
- XElement locationElement = cacheServiceInputElement.Element(XName.Get("Location", ""));
- if (locationElement != null)
- {
- string locationInstance = locationElement.Value;
- cacheServiceInputInstance.Location = locationInstance;
- }
-
- XElement skuCountElement = cacheServiceInputElement.Element(XName.Get("SkuCount", ""));
- if (skuCountElement != null)
- {
- int skuCountInstance = int.Parse(skuCountElement.Value, CultureInfo.InvariantCulture);
- cacheServiceInputInstance.SkuCount = skuCountInstance;
- }
-
- XElement serviceVersionElement = cacheServiceInputElement.Element(XName.Get("ServiceVersion", ""));
- if (serviceVersionElement != null)
- {
- string serviceVersionInstance = serviceVersionElement.Value;
- cacheServiceInputInstance.ServiceVersion = serviceVersionInstance;
- }
-
- XElement objectSizeInBytesElement = cacheServiceInputElement.Element(XName.Get("ObjectSizeInBytes", ""));
- if (objectSizeInBytesElement != null)
- {
- int objectSizeInBytesInstance = int.Parse(objectSizeInBytesElement.Value, CultureInfo.InvariantCulture);
- cacheServiceInputInstance.ObjectSizeInBytes = objectSizeInBytesInstance;
- }
-
- XElement namedCachesSequenceElement = cacheServiceInputElement.Element(XName.Get("NamedCaches", ""));
- if (namedCachesSequenceElement != null)
- {
- foreach (XElement namedCachesElement in namedCachesSequenceElement.Elements(XName.Get("NamedCache", "")))
- {
- IntrinsicSettings.CacheServiceInput.NamedCache namedCacheInstance = new IntrinsicSettings.CacheServiceInput.NamedCache();
- cacheServiceInputInstance.NamedCaches.Add(namedCacheInstance);
-
- XElement cacheNameElement = namedCachesElement.Element(XName.Get("CacheName", ""));
- if (cacheNameElement != null)
- {
- string cacheNameInstance = cacheNameElement.Value;
- namedCacheInstance.CacheName = cacheNameInstance;
- }
-
- XElement notificationsEnabledElement = namedCachesElement.Element(XName.Get("NotificationsEnabled", ""));
- if (notificationsEnabledElement != null)
- {
- bool notificationsEnabledInstance = bool.Parse(notificationsEnabledElement.Value);
- namedCacheInstance.NotificationsEnabled = notificationsEnabledInstance;
- }
-
- XElement highAvailabilityEnabledElement = namedCachesElement.Element(XName.Get("HighAvailabilityEnabled", ""));
- if (highAvailabilityEnabledElement != null)
- {
- bool highAvailabilityEnabledInstance = bool.Parse(highAvailabilityEnabledElement.Value);
- namedCacheInstance.HighAvailabilityEnabled = highAvailabilityEnabledInstance;
- }
-
- XElement evictionPolicyElement = namedCachesElement.Element(XName.Get("EvictionPolicy", ""));
- if (evictionPolicyElement != null)
- {
- string evictionPolicyInstance = evictionPolicyElement.Value;
- namedCacheInstance.EvictionPolicy = evictionPolicyInstance;
- }
-
- XElement expirationSettingsElement = namedCachesElement.Element(XName.Get("ExpirationSettings", ""));
- if (expirationSettingsElement != null)
- {
- IntrinsicSettings.CacheServiceInput.NamedCache.ExpirationSettings expirationSettingsInstance = new IntrinsicSettings.CacheServiceInput.NamedCache.ExpirationSettings();
- namedCacheInstance.ExpirationSettingsSection = expirationSettingsInstance;
-
- XElement timeToLiveInMinutesElement = expirationSettingsElement.Element(XName.Get("TimeToLiveInMinutes", ""));
- if (timeToLiveInMinutesElement != null)
- {
- int timeToLiveInMinutesInstance = int.Parse(timeToLiveInMinutesElement.Value, CultureInfo.InvariantCulture);
- expirationSettingsInstance.TimeToLiveInMinutes = timeToLiveInMinutesInstance;
- }
-
- XElement typeElement2 = expirationSettingsElement.Element(XName.Get("Type", ""));
- if (typeElement2 != null)
- {
- string typeInstance2 = typeElement2.Value;
- expirationSettingsInstance.Type = typeInstance2;
- }
- }
- }
- }
- }
- }
- }
- }
- }
-
- result.StatusCode = statusCode;
-
- if (shouldTrace)
- {
- Tracing.Exit(invocationId, result);
+ TracingAdapter.Error(invocationId, ex);
}
- return result;
+ throw ex;
}
- finally
+ else
{
- if (httpResponse != null)
+ CloudException ex = new CloudException("");
+ if (shouldTrace)
{
- httpResponse.Dispose();
+ TracingAdapter.Error(invocationId, ex);
}
+ throw ex;
}
}
- finally
- {
- if (httpRequest != null)
- {
- httpRequest.Dispose();
- }
- }
+
+ return result;
}
///
- /// The List Cloud Services operation enumerates services that are
- /// provisioned for a subscription.
+ /// Get access keys of Cache Service
///
+ ///
+ /// Required. The cloud service name.
+ ///
+ ///
+ /// Required. The cache service name.
+ ///
///
/// Cancellation token.
///
///
- /// The response structure for the Cloud Service List operation.
+ /// A standard service response including an HTTP status code and
+ /// request ID.
///
- public async Task ListAsync(CancellationToken cancellationToken)
+ public async Task GetKeysAsync(string cloudServiceName, string cacheServiceName, CancellationToken cancellationToken)
{
// Validate
+ if (cloudServiceName == null)
+ {
+ throw new ArgumentNullException("cloudServiceName");
+ }
+ if (cloudServiceName.Length > 100)
+ {
+ throw new ArgumentOutOfRangeException("cloudServiceName");
+ }
+ if (cacheServiceName == null)
+ {
+ throw new ArgumentNullException("cacheServiceName");
+ }
+ if (cacheServiceName.Length > 100)
+ {
+ throw new ArgumentOutOfRangeException("cacheServiceName");
+ }
// Tracing
- bool shouldTrace = CloudContext.Configuration.Tracing.IsEnabled;
+ bool shouldTrace = TracingAdapter.IsEnabled;
string invocationId = null;
if (shouldTrace)
{
- invocationId = Tracing.NextInvocationId.ToString();
+ invocationId = TracingAdapter.NextInvocationId.ToString();
Dictionary tracingParameters = new Dictionary();
- Tracing.Enter(invocationId, this, "ListAsync", tracingParameters);
+ tracingParameters.Add("cloudServiceName", cloudServiceName);
+ tracingParameters.Add("cacheServiceName", cacheServiceName);
+ TracingAdapter.Enter(invocationId, this, "GetKeysAsync", tracingParameters);
}
// Construct URL
- string url = (this.Client.Credentials.SubscriptionId != null ? this.Client.Credentials.SubscriptionId.Trim() : "") + "/CloudServices";
+ string url = "/" + (this.Client.Credentials.SubscriptionId == null ? "" : Uri.EscapeDataString(this.Client.Credentials.SubscriptionId)) + "/cloudservices/" + Uri.EscapeDataString(cloudServiceName) + "/resources/cacheservice/~/Caching/" + Uri.EscapeDataString(cacheServiceName) + "/Keys";
string baseUrl = this.Client.BaseUri.AbsoluteUri;
// Trim '/' character from the end of baseUrl and beginning of url.
if (baseUrl[baseUrl.Length - 1] == '/')
@@ -3813,13 +3170,13 @@ public async Task ListAsync(CancellationToken cancella
{
if (shouldTrace)
{
- Tracing.SendRequest(invocationId, httpRequest);
+ TracingAdapter.SendRequest(invocationId, httpRequest);
}
cancellationToken.ThrowIfCancellationRequested();
httpResponse = await this.Client.HttpClient.SendAsync(httpRequest, cancellationToken).ConfigureAwait(false);
if (shouldTrace)
{
- Tracing.ReceiveResponse(invocationId, httpResponse);
+ TracingAdapter.ReceiveResponse(invocationId, httpResponse);
}
HttpStatusCode statusCode = httpResponse.StatusCode;
if (statusCode != HttpStatusCode.OK)
@@ -3828,280 +3185,172 @@ public async Task ListAsync(CancellationToken cancella
CloudException ex = CloudException.Create(httpRequest, null, httpResponse, await httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false));
if (shouldTrace)
{
- Tracing.Error(invocationId, ex);
+ TracingAdapter.Error(invocationId, ex);
}
throw ex;
}
// Create Result
- CloudServiceListResponse result = null;
- // Deserialize Response
- cancellationToken.ThrowIfCancellationRequested();
- string responseContent = await httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- result = new CloudServiceListResponse();
- XDocument responseDoc = XDocument.Parse(responseContent);
-
- XElement cloudServicesSequenceElement = responseDoc.Element(XName.Get("CloudServices", "http://schemas.microsoft.com/windowsazure"));
- if (cloudServicesSequenceElement != null)
- {
- foreach (XElement cloudServicesElement in cloudServicesSequenceElement.Elements(XName.Get("CloudService", "http://schemas.microsoft.com/windowsazure")))
- {
- CloudServiceListResponse.CloudService cloudServiceInstance = new CloudServiceListResponse.CloudService();
- result.CloudServices.Add(cloudServiceInstance);
-
- XElement nameElement = cloudServicesElement.Element(XName.Get("Name", "http://schemas.microsoft.com/windowsazure"));
- if (nameElement != null)
- {
- string nameInstance = nameElement.Value;
- cloudServiceInstance.Name = nameInstance;
- }
-
- XElement labelElement = cloudServicesElement.Element(XName.Get("Label", "http://schemas.microsoft.com/windowsazure"));
- if (labelElement != null)
- {
- string labelInstance = labelElement.Value;
- cloudServiceInstance.Label = labelInstance;
- }
-
- XElement descriptionElement = cloudServicesElement.Element(XName.Get("Description", "http://schemas.microsoft.com/windowsazure"));
- if (descriptionElement != null)
- {
- string descriptionInstance = descriptionElement.Value;
- cloudServiceInstance.Description = descriptionInstance;
- }
-
- XElement geoRegionElement = cloudServicesElement.Element(XName.Get("GeoRegion", "http://schemas.microsoft.com/windowsazure"));
- if (geoRegionElement != null)
+ CachingKeysResponse result = null;
+ // Deserialize Response
+ if (statusCode == HttpStatusCode.OK)
+ {
+ cancellationToken.ThrowIfCancellationRequested();
+ string responseContent = await httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ result = new CachingKeysResponse();
+ XDocument responseDoc = XDocument.Parse(responseContent);
+
+ XElement cachingKeysElement = responseDoc.Element(XName.Get("CachingKeys", "http://schemas.microsoft.com/windowsazure"));
+ if (cachingKeysElement != null)
+ {
+ XElement primaryElement = cachingKeysElement.Element(XName.Get("Primary", "http://schemas.microsoft.com/windowsazure"));
+ if (primaryElement != null)
{
- string geoRegionInstance = geoRegionElement.Value;
- cloudServiceInstance.GeoRegion = geoRegionInstance;
+ string primaryInstance = primaryElement.Value;
+ result.Primary = primaryInstance;
}
- XElement resourcesSequenceElement = cloudServicesElement.Element(XName.Get("Resources", "http://schemas.microsoft.com/windowsazure"));
- if (resourcesSequenceElement != null)
+ XElement secondaryElement = cachingKeysElement.Element(XName.Get("Secondary", "http://schemas.microsoft.com/windowsazure"));
+ if (secondaryElement != null)
{
- foreach (XElement resourcesElement in resourcesSequenceElement.Elements(XName.Get("Resource", "http://schemas.microsoft.com/windowsazure")))
- {
- CloudServiceResource resourceInstance = new CloudServiceResource();
- cloudServiceInstance.Resources.Add(resourceInstance);
-
- XElement resourceProviderNamespaceElement = resourcesElement.Element(XName.Get("ResourceProviderNamespace", "http://schemas.microsoft.com/windowsazure"));
- if (resourceProviderNamespaceElement != null)
- {
- string resourceProviderNamespaceInstance = resourceProviderNamespaceElement.Value;
- resourceInstance.Namespace = resourceProviderNamespaceInstance;
- }
-
- XElement typeElement = resourcesElement.Element(XName.Get("Type", "http://schemas.microsoft.com/windowsazure"));
- if (typeElement != null)
- {
- string typeInstance = typeElement.Value;
- resourceInstance.Type = typeInstance;
- }
-
- XElement nameElement2 = resourcesElement.Element(XName.Get("Name", "http://schemas.microsoft.com/windowsazure"));
- if (nameElement2 != null)
- {
- string nameInstance2 = nameElement2.Value;
- resourceInstance.Name = nameInstance2;
- }
-
- XElement planElement = resourcesElement.Element(XName.Get("Plan", "http://schemas.microsoft.com/windowsazure"));
- if (planElement != null)
- {
- string planInstance = planElement.Value;
- resourceInstance.Plan = planInstance;
- }
-
- XElement schemaVersionElement = resourcesElement.Element(XName.Get("SchemaVersion", "http://schemas.microsoft.com/windowsazure"));
- if (schemaVersionElement != null)
- {
- string schemaVersionInstance = schemaVersionElement.Value;
- resourceInstance.SchemaVersion = schemaVersionInstance;
- }
-
- XElement eTagElement = resourcesElement.Element(XName.Get("ETag", "http://schemas.microsoft.com/windowsazure"));
- if (eTagElement != null)
- {
- string eTagInstance = eTagElement.Value;
- resourceInstance.ETag = eTagInstance;
- }
-
- XElement stateElement = resourcesElement.Element(XName.Get("State", "http://schemas.microsoft.com/windowsazure"));
- if (stateElement != null)
- {
- string stateInstance = stateElement.Value;
- resourceInstance.State = stateInstance;
- }
-
- XElement subStateElement = resourcesElement.Element(XName.Get("SubState", "http://schemas.microsoft.com/windowsazure"));
- if (subStateElement != null)
- {
- string subStateInstance = subStateElement.Value;
- resourceInstance.SubState = subStateInstance;
- }
-
- XElement usageMetersSequenceElement = resourcesElement.Element(XName.Get("UsageMeters", "http://schemas.microsoft.com/windowsazure"));
- if (usageMetersSequenceElement != null)
- {
- foreach (XElement usageMetersElement in usageMetersSequenceElement.Elements(XName.Get("UsageMeter", "http://schemas.microsoft.com/windowsazure")))
- {
- CloudServiceResource.UsageLimit usageMeterInstance = new CloudServiceResource.UsageLimit();
- resourceInstance.UsageLimits.Add(usageMeterInstance);
-
- XElement nameElement3 = usageMetersElement.Element(XName.Get("Name", "http://schemas.microsoft.com/windowsazure"));
- if (nameElement3 != null)
- {
- string nameInstance3 = nameElement3.Value;
- usageMeterInstance.Name = nameInstance3;
- }
-
- XElement unitElement = usageMetersElement.Element(XName.Get("Unit", "http://schemas.microsoft.com/windowsazure"));
- if (unitElement != null)
- {
- string unitInstance = unitElement.Value;
- usageMeterInstance.Unit = unitInstance;
- }
-
- XElement includedElement = usageMetersElement.Element(XName.Get("Included", "http://schemas.microsoft.com/windowsazure"));
- if (includedElement != null)
- {
- string includedInstance = includedElement.Value;
- usageMeterInstance.AmountIncluded = includedInstance;
- }
-
- XElement usedElement = usageMetersElement.Element(XName.Get("Used", "http://schemas.microsoft.com/windowsazure"));
- if (usedElement != null)
- {
- string usedInstance = usedElement.Value;
- usageMeterInstance.AmountUsed = usedInstance;
- }
- }
- }
-
- XElement outputItemsSequenceElement = resourcesElement.Element(XName.Get("OutputItems", "http://schemas.microsoft.com/windowsazure"));
- if (outputItemsSequenceElement != null)
- {
- foreach (XElement outputItemsElement in outputItemsSequenceElement.Elements(XName.Get("OutputItem", "http://schemas.microsoft.com/windowsazure")))
- {
- string outputItemsKey = outputItemsElement.Element(XName.Get("Key", "http://schemas.microsoft.com/windowsazure")).Value;
- string outputItemsValue = outputItemsElement.Element(XName.Get("Value", "http://schemas.microsoft.com/windowsazure")).Value;
- resourceInstance.OutputItems.Add(outputItemsKey, outputItemsValue);
- }
- }
-
- XElement intrinsicSettingsElement = resourcesElement.Element(XName.Get("IntrinsicSettings", "http://schemas.microsoft.com/windowsazure"));
- if (intrinsicSettingsElement != null)
- {
- IntrinsicSettings intrinsicSettingsInstance = new IntrinsicSettings();
- resourceInstance.IntrinsicSettingsSection = intrinsicSettingsInstance;
-
- XElement cacheServiceInputElement = intrinsicSettingsElement.Element(XName.Get("CacheServiceInput", ""));
- if (cacheServiceInputElement != null)
- {
- IntrinsicSettings.CacheServiceInput cacheServiceInputInstance = new IntrinsicSettings.CacheServiceInput();
- intrinsicSettingsInstance.CacheServiceInputSection = cacheServiceInputInstance;
-
- XElement skuTypeElement = cacheServiceInputElement.Element(XName.Get("SkuType", ""));
- if (skuTypeElement != null)
- {
- CacheServiceSkuType skuTypeInstance = ((CacheServiceSkuType)Enum.Parse(typeof(CacheServiceSkuType), skuTypeElement.Value, true));
- cacheServiceInputInstance.SkuType = skuTypeInstance;
- }
-
- XElement locationElement = cacheServiceInputElement.Element(XName.Get("Location", ""));
- if (locationElement != null)
- {
- string locationInstance = locationElement.Value;
- cacheServiceInputInstance.Location = locationInstance;
- }
-
- XElement skuCountElement = cacheServiceInputElement.Element(XName.Get("SkuCount", ""));
- if (skuCountElement != null)
- {
- int skuCountInstance = int.Parse(skuCountElement.Value, CultureInfo.InvariantCulture);
- cacheServiceInputInstance.SkuCount = skuCountInstance;
- }
-
- XElement serviceVersionElement = cacheServiceInputElement.Element(XName.Get("ServiceVersion", ""));
- if (serviceVersionElement != null)
- {
- string serviceVersionInstance = serviceVersionElement.Value;
- cacheServiceInputInstance.ServiceVersion = serviceVersionInstance;
- }
-
- XElement objectSizeInBytesElement = cacheServiceInputElement.Element(XName.Get("ObjectSizeInBytes", ""));
- if (objectSizeInBytesElement != null)
- {
- int objectSizeInBytesInstance = int.Parse(objectSizeInBytesElement.Value, CultureInfo.InvariantCulture);
- cacheServiceInputInstance.ObjectSizeInBytes = objectSizeInBytesInstance;
- }
-
- XElement namedCachesSequenceElement = cacheServiceInputElement.Element(XName.Get("NamedCaches", ""));
- if (namedCachesSequenceElement != null)
- {
- foreach (XElement namedCachesElement in namedCachesSequenceElement.Elements(XName.Get("NamedCache", "")))
- {
- IntrinsicSettings.CacheServiceInput.NamedCache namedCacheInstance = new IntrinsicSettings.CacheServiceInput.NamedCache();
- cacheServiceInputInstance.NamedCaches.Add(namedCacheInstance);
-
- XElement cacheNameElement = namedCachesElement.Element(XName.Get("CacheName", ""));
- if (cacheNameElement != null)
- {
- string cacheNameInstance = cacheNameElement.Value;
- namedCacheInstance.CacheName = cacheNameInstance;
- }
-
- XElement notificationsEnabledElement = namedCachesElement.Element(XName.Get("NotificationsEnabled", ""));
- if (notificationsEnabledElement != null)
- {
- bool notificationsEnabledInstance = bool.Parse(notificationsEnabledElement.Value);
- namedCacheInstance.NotificationsEnabled = notificationsEnabledInstance;
- }
-
- XElement highAvailabilityEnabledElement = namedCachesElement.Element(XName.Get("HighAvailabilityEnabled", ""));
- if (highAvailabilityEnabledElement != null)
- {
- bool highAvailabilityEnabledInstance = bool.Parse(highAvailabilityEnabledElement.Value);
- namedCacheInstance.HighAvailabilityEnabled = highAvailabilityEnabledInstance;
- }
-
- XElement evictionPolicyElement = namedCachesElement.Element(XName.Get("EvictionPolicy", ""));
- if (evictionPolicyElement != null)
- {
- string evictionPolicyInstance = evictionPolicyElement.Value;
- namedCacheInstance.EvictionPolicy = evictionPolicyInstance;
- }
-
- XElement expirationSettingsElement = namedCachesElement.Element(XName.Get("ExpirationSettings", ""));
- if (expirationSettingsElement != null)
- {
- IntrinsicSettings.CacheServiceInput.NamedCache.ExpirationSettings expirationSettingsInstance = new IntrinsicSettings.CacheServiceInput.NamedCache.ExpirationSettings();
- namedCacheInstance.ExpirationSettingsSection = expirationSettingsInstance;
-
- XElement timeToLiveInMinutesElement = expirationSettingsElement.Element(XName.Get("TimeToLiveInMinutes", ""));
- if (timeToLiveInMinutesElement != null)
- {
- int timeToLiveInMinutesInstance = int.Parse(timeToLiveInMinutesElement.Value, CultureInfo.InvariantCulture);
- expirationSettingsInstance.TimeToLiveInMinutes = timeToLiveInMinutesInstance;
- }
-
- XElement typeElement2 = expirationSettingsElement.Element(XName.Get("Type", ""));
- if (typeElement2 != null)
- {
- string typeInstance2 = typeElement2.Value;
- expirationSettingsInstance.Type = typeInstance2;
- }
- }
- }
- }
- }
- }
- }
+ string secondaryInstance = secondaryElement.Value;
+ result.Secondary = secondaryInstance;
}
}
+
+ }
+ result.StatusCode = statusCode;
+ if (httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+
+ if (shouldTrace)
+ {
+ TracingAdapter.Exit(invocationId, result);
+ }
+ return result;
+ }
+ finally
+ {
+ if (httpResponse != null)
+ {
+ httpResponse.Dispose();
+ }
+ }
+ }
+ finally
+ {
+ if (httpRequest != null)
+ {
+ httpRequest.Dispose();
+ }
+ }
+ }
+
+ ///
+ /// List supported regions of Cache Service
+ ///
+ ///
+ /// Cancellation token.
+ ///
+ ///
+ /// A standard service response including an HTTP status code and
+ /// request ID.
+ ///
+ public async Task ListRegionsAsync(CancellationToken cancellationToken)
+ {
+ // Validate
+
+ // Tracing
+ bool shouldTrace = TracingAdapter.IsEnabled;
+ string invocationId = null;
+ if (shouldTrace)
+ {
+ invocationId = TracingAdapter.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ TracingAdapter.Enter(invocationId, this, "ListRegionsAsync", tracingParameters);
+ }
+
+ // Construct URL
+ string url = "/" + (this.Client.Credentials.SubscriptionId == null ? "" : Uri.EscapeDataString(this.Client.Credentials.SubscriptionId)) + "/cloudservices/mycloudservice/resources/cacheservice/~/Caching/mycacheservice/Options/Regions";
+ string baseUrl = this.Client.BaseUri.AbsoluteUri;
+ // Trim '/' character from the end of baseUrl and beginning of url.
+ if (baseUrl[baseUrl.Length - 1] == '/')
+ {
+ baseUrl = baseUrl.Substring(0, baseUrl.Length - 1);
+ }
+ if (url[0] == '/')
+ {
+ url = url.Substring(1);
+ }
+ url = baseUrl + "/" + url;
+ url = url.Replace(" ", "%20");
+
+ // Create HTTP transport objects
+ HttpRequestMessage httpRequest = null;
+ try
+ {
+ httpRequest = new HttpRequestMessage();
+ httpRequest.Method = HttpMethod.Get;
+ httpRequest.RequestUri = new Uri(url);
+
+ // Set Headers
+ httpRequest.Headers.Add("x-ms-version", "2012-08-01");
+
+ // Set Credentials
+ cancellationToken.ThrowIfCancellationRequested();
+ await this.Client.Credentials.ProcessHttpRequestAsync(httpRequest, cancellationToken).ConfigureAwait(false);
+
+ // Send Request
+ HttpResponseMessage httpResponse = null;
+ try
+ {
+ if (shouldTrace)
+ {
+ TracingAdapter.SendRequest(invocationId, httpRequest);
+ }
+ cancellationToken.ThrowIfCancellationRequested();
+ httpResponse = await this.Client.HttpClient.SendAsync(httpRequest, cancellationToken).ConfigureAwait(false);
+ if (shouldTrace)
+ {
+ TracingAdapter.ReceiveResponse(invocationId, httpResponse);
+ }
+ HttpStatusCode statusCode = httpResponse.StatusCode;
+ if (statusCode != HttpStatusCode.OK)
+ {
+ cancellationToken.ThrowIfCancellationRequested();
+ CloudException ex = CloudException.Create(httpRequest, null, httpResponse, await httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false));
+ if (shouldTrace)
+ {
+ TracingAdapter.Error(invocationId, ex);
+ }
+ throw ex;
}
+ // Create Result
+ RegionsResponse result = null;
+ // Deserialize Response
+ if (statusCode == HttpStatusCode.OK)
+ {
+ cancellationToken.ThrowIfCancellationRequested();
+ string responseContent = await httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ result = new RegionsResponse();
+ XDocument responseDoc = XDocument.Parse(responseContent);
+
+ XElement regionsSequenceElement = responseDoc.Element(XName.Get("Regions", "http://schemas.microsoft.com/windowsazure"));
+ if (regionsSequenceElement != null)
+ {
+ foreach (XElement regionsElement in regionsSequenceElement.Elements(XName.Get("Region", "http://schemas.microsoft.com/windowsazure")))
+ {
+ RegionsResponse.Region regionInstance = new RegionsResponse.Region();
+ result.Regions.Add(regionInstance);
+
+ regionInstance.Location = regionsElement.Value;
+ }
+ }
+
+ }
result.StatusCode = statusCode;
if (httpResponse.Headers.Contains("x-ms-request-id"))
{
@@ -4110,7 +3359,7 @@ public async Task ListAsync(CancellationToken cancella
if (shouldTrace)
{
- Tracing.Exit(invocationId, result);
+ TracingAdapter.Exit(invocationId, result);
}
return result;
}
@@ -4130,376 +3379,416 @@ public async Task ListAsync(CancellationToken cancella
}
}
}
- }
-}
-
-namespace Microsoft.WindowsAzure
-{
- public static partial class ManagedCacheClientExtensions
- {
+
///
- /// The Get Operation Status operation returns the status of
- /// thespecified operation. After calling an asynchronous operation,
- /// you can call Get Operation Status to determine whether the
- /// operation has succeeded, failed, or is still in progress. (see
- /// http://msdn.microsoft.com/en-us/library/windowsazure/ee460783.aspx
- /// for more information)
+ /// Regenerate access keys for a Cache Service
///
- ///
- /// Reference to the
- /// Microsoft.Azure.Management.ManagedCache.IManagedCacheClient.
+ ///
+ /// Required. The cloud service name.
///
- ///
- /// Required. The request ID for the request you wish to track. The
- /// request ID is returned in the x-ms-request-id response header for
- /// every request.
+ ///
+ /// Required. The cache service name.
+ ///
+ ///
+ /// Required. Key type
+ ///
+ ///
+ /// Cancellation token.
///
///
- /// The response body contains the status of the specified asynchronous
- /// operation, indicating whether it has succeeded, is inprogress, or
- /// has failed. Note that this status is distinct from the HTTP status
- /// code returned for the Get Operation Status operation itself. If
- /// the asynchronous operation succeeded, the response body includes
- /// the HTTP status code for the successful request. If the
- /// asynchronous operation failed, the response body includes the HTTP
- /// status code for the failed request, and also includes error
- /// information regarding the failure.
+ /// A standard service response including an HTTP status code and
+ /// request ID.
///
- public static CloudServiceOperationStatusResponse GetOperationStatus(this IManagedCacheClient operations, string requestId)
+ public async Task RegenerateKeysAsync(string cloudServiceName, string cacheServiceName, RegenerateKeysParameters parameters, CancellationToken cancellationToken)
{
- return Task.Factory.StartNew((object s) =>
+ // Validate
+ if (cloudServiceName == null)
+ {
+ throw new ArgumentNullException("cloudServiceName");
+ }
+ if (cloudServiceName.Length > 100)
+ {
+ throw new ArgumentOutOfRangeException("cloudServiceName");
+ }
+ if (cacheServiceName == null)
+ {
+ throw new ArgumentNullException("cacheServiceName");
+ }
+ if (cacheServiceName.Length > 100)
+ {
+ throw new ArgumentOutOfRangeException("cacheServiceName");
+ }
+ if (parameters == null)
+ {
+ throw new ArgumentNullException("parameters");
+ }
+
+ // Tracing
+ bool shouldTrace = TracingAdapter.IsEnabled;
+ string invocationId = null;
+ if (shouldTrace)
+ {
+ invocationId = TracingAdapter.NextInvocationId.ToString();
+ Dictionary