diff --git a/AzurePowershell.Test.targets b/AzurePowershell.Test.targets
index 3d8345319248..a3e0579c8939 100644
--- a/AzurePowershell.Test.targets
+++ b/AzurePowershell.Test.targets
@@ -22,7 +22,7 @@
.\src\ServiceManagement\HDInsight\Commands.HDInsight.Test\bin\Debug\Microsoft.WindowsAzure.Commands.HDInsight.Test.dll.\src\ServiceManagement\Storage\Commands.Storage.Test\bin\Debug\Microsoft.WindowsAzure.Commands.Storage.Test.dll.\src\ResourceManager\KeyVault\Commands.KeyVault.Test\bin\Debug\Microsoft.Azure.Commands.KeyVault.Test.dll
- "!Functional&!Scenario&!AzureRTScenario&!Sequential&!PIRTest&!Preview&!ADDomain&!Network&!AzureRTUpload"
+ "!Functional&!Scenario&!AzureRTScenario&!Sequential&!PIRTest&!Preview&!ADDomain&!Network&!AzureRTUpload&!AzureRTCleanUp"All"OneSDK&CIT""Functional|AzureRTScenario|Sequential|AzureRTUpload|Network"
@@ -32,6 +32,21 @@
"AzureRTUpload|Sequential|Network"
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -39,6 +54,13 @@
Command="MSTest.exe /testcontainer:$(_testAssembly) /testsettings:$(_testSettings) /category:$(_testFilter) /resultsfile:$(_testResult)"
ContinueOnError="false" />
+
+
+
+
+
+
@@ -115,6 +137,14 @@
+
+
+
+ <_StorSimpleTestAssembly>.\src\ServiceManagement\StorSimple\Commands.StorSimple.Test\bin\Debug\Microsoft.WindowsAzure.Commands.StorSimple.Test.dll
+
+
+
@@ -261,12 +291,12 @@
ContinueOnError="false" />
-
-
+
+
-
+
@@ -299,6 +329,14 @@
ContinueOnError="false" />
+
+
+
+
+
+
diff --git a/ChangeLog.txt b/ChangeLog.txt
index 5283a4ee0381..a6f6e2e79410 100644
--- a/ChangeLog.txt
+++ b/ChangeLog.txt
@@ -1,3 +1,56 @@
+2015.02.12 version 0.8.14
+* StorSimple: New StorSimple commands in AzureServiceManagement mode:
+ * GetAzureStorSimpleAccessControlRecord
+ * GetAzureStorSimpleStorageAccountCredential
+ * RemoveAzureStorSimpleAccessControlRecord
+ * RemoveAzureStorSimpleStorageAccountCredential
+ * SetAzureStorSimpleAccessControlRecord
+ * GetAzureStorSimpleDeviceVolume
+ * RemoveAzureStorSimpleDeviceVolume
+ * GetAzureStorSimpleDeviceVolumeContainer
+ * RemoveAzureStorSimpleDeviceVolumeContainer
+ * GetAzureStorSimpleDevice
+ * GetAzureStorSimpleDeviceConnectedInitiator
+ * GetAzureStorSimpleResource
+ * GetAzureStorSimpleResourceContext
+ * SetAzureStorSimpleDeviceBackupPolicy
+ * NewAzureStorSimpleDeviceBackupPolicy
+ * GetAzureStorSimpleDeviceBackup
+ * RemoveAzureStorSimpleDeviceBackup
+ * StartAzureStorSimpleDeviceBackupJob
+ * StartAzureStorSimpleDeviceBackupRestoreJob
+ * RemoveAzureStorSimpleDeviceBackupPolicy
+ * NewAzureStorSimpleDeviceVolume
+ * SetAzureStorSimpleDeviceVolume
+ * NewAzureStorSimpleDeviceVolumeContainer
+ * SelectAzureStorSimpleResource
+ * GetAzureStorSimpleDeviceBackupPolicy
+ * NewAzureStorSimpleStorageAccountCredential
+ * GetAzureStorSimpleTask
+ * SetAzureStorSimpleStorageAccountCredential
+ * NewAzureStorSimpleInlineStorageAccountCredential
+ * NewAzureStorSimpleAccessControlRecord
+
+* HDInsight:
+ * HeadNodeVMSize (update): the parameter is now a string that can now accept various sizes (specifications here: https://msdn.microsoft.com/en-us/library/azure/dn197896.aspx -> Sizes for Web and Worker Role Instances)
+ * DataNodeVMSize (new) : use to specify size of data nodes (where applicable)
+ * ZookeeperNodeVMSize (new): use to specify Zookeeper node sizes (where applicable)
+ * ClusterType (update): New value (Spark) can be specified as cluster type
+ * Add-AzureHDInsightConfigValues cmdlet:
+ * Spark (new): collection of configuration properties can be passed in to customize the Spark service
+
+ * Azure Insights cmdlets in AzureResourceManager Mode:
+ * Get-AzureCrrelationLogId
+ * Get-AzureResourceGroupLog
+ * Get-AzureResourceLog
+ * Get-AzureResourceProviderLog
+ * Get-AzureSubscriptionIdLog
+
+* Azure VM cmdlets
+ * Get-AzureVMDscExtentionStatus: Get the DSC Extension status for a cloud service or VM
+
+ * Updates and bug fixes for AzureAutomation and AzureDataFactory cmdlets
+
2015.01.08 version 0.8.13
* Key Vault Service - new cmdlets in AzureResourceManager mode:
* Keys:
diff --git a/build.proj b/build.proj
index 2f3cf1d77e9b..2520c485df71 100644
--- a/build.proj
+++ b/build.proj
@@ -17,6 +17,7 @@
$(PublishDirectory)\TestResultsConfiguration=Debug;Platform=Any CPUConfiguration=Release;Platform=Any CPU
+ true
@@ -90,24 +91,12 @@
-
-
-
-
-
-
-
-
+
+
-
-
-
-
-
@@ -116,11 +105,13 @@
Projects="@(AzurePowerShellSln)"
Targets="Build"
Properties="$(DebugBuildConfig)"
+ BuildInParallel="$(BuildInParallel)"
ContinueOnError="false" />
@@ -172,6 +163,7 @@
Projects="@(AzurePowerShellSln)"
Targets="Build"
Properties="$(ReleaseBuildConfig)"
+ BuildInParallel="$(BuildInParallel)"
ContinueOnError="false" />
@@ -182,6 +174,7 @@
Projects="@(AzurePowerShellSln)"
Targets="Build"
Properties="$(DebugBuildConfig)"
+ BuildInParallel="$(BuildInParallel)"
ContinueOnError="false" />
@@ -195,7 +188,7 @@
-
+
diff --git a/setup/azurecmd.wxs b/setup/azurecmd.wxs
index 6c8904626739..e6293050b032 100644
--- a/setup/azurecmd.wxs
+++ b/setup/azurecmd.wxs
@@ -1,11 +1,11 @@
-
+
-
+
diff --git a/setup/azurecmdfiles.wxi b/setup/azurecmdfiles.wxi
index 3bcc9e71e4e9..b64dd70a8798 100644
--- a/setup/azurecmdfiles.wxi
+++ b/setup/azurecmdfiles.wxi
@@ -20,12 +20,12 @@
+
+
+
-
-
-
@@ -82,12 +82,12 @@
+
+
+
-
-
-
@@ -97,15 +97,6 @@
-
-
-
-
-
-
-
-
-
@@ -167,6 +158,47 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -180,12 +212,12 @@
+
+
+
-
-
-
@@ -234,9 +266,6 @@
-
-
-
@@ -251,12 +280,12 @@
+
+
+
-
-
-
@@ -322,6 +351,12 @@
+
+
+
+
+
+
@@ -373,12 +408,12 @@
+
+
+
-
-
-
@@ -388,6 +423,9 @@
+
+
+
@@ -433,12 +471,27 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -462,12 +515,12 @@
+
+
+
-
-
-
@@ -539,12 +592,12 @@
+
+
+
-
-
-
@@ -554,15 +607,6 @@
-
-
-
-
-
-
-
-
-
@@ -608,9 +652,6 @@
-
-
-
@@ -625,12 +666,12 @@
+
+
+
-
-
-
@@ -718,18 +759,15 @@
+
+
+
-
-
-
-
-
-
@@ -751,6 +789,9 @@
+
+
+
@@ -792,6 +833,9 @@
+
+
+
@@ -801,6 +845,9 @@
+
+
+
@@ -831,12 +878,12 @@
+
+
+
-
-
-
@@ -921,6 +968,9 @@
+
+
+
@@ -1001,12 +1051,12 @@
+
+
+
-
-
-
@@ -1063,12 +1113,12 @@
+
+
+
-
-
-
@@ -1173,6 +1223,9 @@
+
+
+
@@ -1212,12 +1265,12 @@
+
+
+
-
-
-
@@ -1281,6 +1334,9 @@
+
+
+
@@ -1358,15 +1414,18 @@
+
+
+
+
+
+
-
-
-
@@ -1438,12 +1497,12 @@
+
+
+
-
-
-
@@ -1468,15 +1527,24 @@
-
-
+
+
+
+
+
+
+
+
+
+
+
@@ -1486,6 +1554,11 @@
+
+
+
+
+
@@ -1509,6 +1582,9 @@
+
+
+
@@ -1542,12 +1618,12 @@
+
+
+
-
-
-
@@ -1614,6 +1690,9 @@
+
+
+
@@ -1685,29 +1764,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -1988,6 +2044,9 @@
+
+
+
@@ -2021,12 +2080,12 @@
+
+
+
-
-
-
@@ -2111,6 +2170,9 @@
+
+
+
@@ -2185,12 +2247,12 @@
+
+
+
-
-
-
@@ -2270,16 +2332,75 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
@@ -2355,8 +2476,8 @@
+
-
@@ -2375,14 +2496,11 @@
+
-
-
-
-
@@ -2403,12 +2521,25 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
@@ -2425,13 +2556,12 @@
-
+
-
@@ -2453,6 +2583,8 @@
+
+
@@ -2470,11 +2602,12 @@
+
-
+
@@ -2490,8 +2623,13 @@
+
+
+
+
+
@@ -2499,8 +2637,8 @@
+
-
@@ -2524,14 +2662,11 @@
+
-
-
-
-
@@ -2547,13 +2682,12 @@
-
+
-
@@ -2581,10 +2715,9 @@
+
-
-
@@ -2592,6 +2725,7 @@
+
@@ -2605,9 +2739,11 @@
+
+
@@ -2618,8 +2754,8 @@
+
-
@@ -2648,6 +2784,7 @@
+
@@ -2674,8 +2811,8 @@
+
-
@@ -2694,8 +2831,8 @@
+
-
@@ -2730,6 +2867,7 @@
+
@@ -2743,8 +2881,8 @@
+
-
@@ -2766,6 +2904,7 @@
+
@@ -2791,9 +2930,10 @@
+
+
-
@@ -2817,8 +2957,8 @@
+
-
@@ -2827,12 +2967,16 @@
-
+
+
+
+
+
@@ -2840,6 +2984,7 @@
+
@@ -2851,8 +2996,8 @@
+
-
@@ -2875,6 +3020,7 @@
+
@@ -2898,11 +3044,6 @@
-
-
-
-
-
@@ -2985,6 +3126,7 @@
+
@@ -2996,8 +3138,8 @@
+
-
@@ -3026,6 +3168,7 @@
+
@@ -3050,8 +3193,8 @@
+
-
@@ -3078,9 +3221,28 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
diff --git a/src/AzurePowershell.sln b/src/AzurePowershell.sln
index b6bafadf97b1..3d1828d1a877 100644
--- a/src/AzurePowershell.sln
+++ b/src/AzurePowershell.sln
@@ -1,6 +1,6 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2013
-VisualStudioVersion = 12.0.30501.0
+VisualStudioVersion = 12.0.31101.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{8531411A-0137-4E27-9C5E-49E07C245048}"
ProjectSection(SolutionItems) = preProject
@@ -151,10 +151,20 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.RecoveryServices",
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.RecoveryServices.Test", "ServiceManagement\RecoveryServices\Commands.RecoveryServices.Test\Commands.RecoveryServices.Test.csproj", "{A415F75B-EB6A-49A6-934E-5BA71B83D6EB}"
EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.StorSimple", "ServiceManagement\StorSimple\Commands.StorSimple\Commands.StorSimple.csproj", "{11524D98-6C40-4091-A8E1-86463FEE607C}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.StorSimple.Test", "ServiceManagement\StorSimple\Commands.StorSimple.Test\Commands.StorSimple.Test.csproj", "{0FA676D5-1349-4086-B33F-65EC2CB7DA41}"
+EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.StreamAnalytics", "ResourceManager\StreamAnalytics\Commands.StreamAnalytics\Commands.StreamAnalytics.csproj", "{F49A314A-A235-47D3-A654-1EC19ACA366C}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.StreamAnalytics.Test", "ResourceManager\StreamAnalytics\Commands.StreamAnalytics.Test\Commands.StreamAnalytics.Test.csproj", "{7E6683BE-ECFF-4709-89EB-1325E9E70512}"
EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Insights", "ResourceManager\Insights\Commands.Insights\Commands.Insights.csproj", "{DEA446A1-84E2-46CC-B780-EB4AFDE2460E}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Insights.Test", "ResourceManager\Insights\Commands.Insights.Test\Commands.Insights.Test.csproj", "{469F20E0-9D40-41AD-94C3-B47AD15A4C00}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Websites", "ResourceManager\Websites\Commands.Websites\Commands.Websites.csproj", "{80A92297-7C92-456B-8EE7-9FB6CE30149D}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -365,6 +375,14 @@ 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
+ {11524D98-6C40-4091-A8E1-86463FEE607C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {11524D98-6C40-4091-A8E1-86463FEE607C}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {11524D98-6C40-4091-A8E1-86463FEE607C}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {11524D98-6C40-4091-A8E1-86463FEE607C}.Release|Any CPU.Build.0 = Release|Any CPU
+ {0FA676D5-1349-4086-B33F-65EC2CB7DA41}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {0FA676D5-1349-4086-B33F-65EC2CB7DA41}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {0FA676D5-1349-4086-B33F-65EC2CB7DA41}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {0FA676D5-1349-4086-B33F-65EC2CB7DA41}.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
@@ -373,6 +391,18 @@ 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
+ {DEA446A1-84E2-46CC-B780-EB4AFDE2460E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {DEA446A1-84E2-46CC-B780-EB4AFDE2460E}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {DEA446A1-84E2-46CC-B780-EB4AFDE2460E}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {DEA446A1-84E2-46CC-B780-EB4AFDE2460E}.Release|Any CPU.Build.0 = Release|Any CPU
+ {469F20E0-9D40-41AD-94C3-B47AD15A4C00}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {469F20E0-9D40-41AD-94C3-B47AD15A4C00}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {469F20E0-9D40-41AD-94C3-B47AD15A4C00}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {469F20E0-9D40-41AD-94C3-B47AD15A4C00}.Release|Any CPU.Build.0 = Release|Any CPU
+ {80A92297-7C92-456B-8EE7-9FB6CE30149D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {80A92297-7C92-456B-8EE7-9FB6CE30149D}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {80A92297-7C92-456B-8EE7-9FB6CE30149D}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {80A92297-7C92-456B-8EE7-9FB6CE30149D}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -403,6 +433,8 @@ Global
{FDB897BD-FCB4-44A1-8D66-AC99F22EC737} = {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}
+ {0FA676D5-1349-4086-B33F-65EC2CB7DA41} = {95C16AED-FD57-42A0-86C3-2CF4300A4817}
{7E6683BE-ECFF-4709-89EB-1325E9E70512} = {95C16AED-FD57-42A0-86C3-2CF4300A4817}
+ {469F20E0-9D40-41AD-94C3-B47AD15A4C00} = {95C16AED-FD57-42A0-86C3-2CF4300A4817}
EndGlobalSection
EndGlobal
diff --git a/src/Common/Azure.Common.Extensions/Authentication/AadAuthenticationException.cs b/src/Common/Azure.Common.Extensions/Authentication/AadAuthenticationException.cs
deleted file mode 100644
index fa0d2484f439..000000000000
--- a/src/Common/Azure.Common.Extensions/Authentication/AadAuthenticationException.cs
+++ /dev/null
@@ -1,94 +0,0 @@
-// ----------------------------------------------------------------------------------
-//
-// Copyright Microsoft Corporation
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-// http://www.apache.org/licenses/LICENSE-2.0
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-// ----------------------------------------------------------------------------------
-
-using System;
-
-namespace Microsoft.Azure.Common.Extensions.Authentication
-{
- ///
- /// Base class representing an exception that occurs when
- /// authenticating against Azure Active Directory
- ///
- [Serializable]
- public abstract class AadAuthenticationException : Exception
- {
- protected AadAuthenticationException()
- {
- }
-
- protected AadAuthenticationException(string message) : base(message)
- {
- }
-
- protected AadAuthenticationException(string message, Exception innerException) : base(message, innerException)
- {
- }
- }
-
- ///
- /// Exception that gets thrown when the user explicitly
- /// cancels an authentication operation.
- ///
- [Serializable]
- public class AadAuthenticationCanceledException : AadAuthenticationException
- {
- public AadAuthenticationCanceledException(string message, Exception innerException) : base(message, innerException)
- {
- }
- }
-
- ///
- /// Exception that gets thrown when the ADAL library
- /// is unable to authenticate without a popup dialog.
- ///
- [Serializable]
- public class AadAuthenticationFailedWithoutPopupException : AadAuthenticationException
- {
- public AadAuthenticationFailedWithoutPopupException(string message, Exception innerException)
- : base(message, innerException)
- {
- }
- }
-
- ///
- /// Exception that gets thrown if an authentication operation
- /// fails on the server.
- ///
- [Serializable]
- public class AadAuthenticationFailedException : AadAuthenticationException
- {
- public AadAuthenticationFailedException(string message, Exception innerException) : base(message, innerException)
- {
- }
- }
-
- ///
- /// Exception thrown if a refresh token has expired.
- ///
- [Serializable]
- public class AadAuthenticationCantRenewException : AadAuthenticationException
- {
- public AadAuthenticationCantRenewException()
- {
- }
-
- public AadAuthenticationCantRenewException(string message) : base(message)
- {
- }
-
- public AadAuthenticationCantRenewException(string message, Exception innerException) : base(message, innerException)
- {
- }
- }
-}
\ No newline at end of file
diff --git a/src/Common/Azure.Common.Extensions/Authentication/AccessTokenCredential.cs b/src/Common/Azure.Common.Extensions/Authentication/AccessTokenCredential.cs
deleted file mode 100644
index 270178958487..000000000000
--- a/src/Common/Azure.Common.Extensions/Authentication/AccessTokenCredential.cs
+++ /dev/null
@@ -1,51 +0,0 @@
-// ----------------------------------------------------------------------------------
-//
-// Copyright Microsoft Corporation
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-// http://www.apache.org/licenses/LICENSE-2.0
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-// ----------------------------------------------------------------------------------
-
-using Microsoft.WindowsAzure;
-using System;
-using System.Net.Http;
-using System.Net.Http.Headers;
-using System.Threading;
-using System.Threading.Tasks;
-
-namespace Microsoft.Azure.Common.Extensions.Authentication
-{
- public class AccessTokenCredential : SubscriptionCloudCredentials
- {
- private readonly Guid subscriptionId;
- private readonly IAccessToken token;
-
- public AccessTokenCredential(Guid subscriptionId, IAccessToken token)
- {
- this.subscriptionId = subscriptionId;
- this.token = token;
- this.TenantID = token.TenantId;
- }
-
- public override Task ProcessHttpRequestAsync(HttpRequestMessage request, CancellationToken cancellationToken)
- {
- token.AuthorizeRequest((tokenType, tokenValue) => {
- request.Headers.Authorization = new AuthenticationHeaderValue(tokenType, tokenValue);
- });
- return base.ProcessHttpRequestAsync(request, cancellationToken);
- }
-
- public override string SubscriptionId
- {
- get { return subscriptionId.ToString(); }
- }
-
- public string TenantID { get; set; }
- }
-}
\ No newline at end of file
diff --git a/src/Common/Azure.Common.Extensions/Authentication/AdalConfiguration.cs b/src/Common/Azure.Common.Extensions/Authentication/AdalConfiguration.cs
deleted file mode 100644
index 9ee7fd8909f8..000000000000
--- a/src/Common/Azure.Common.Extensions/Authentication/AdalConfiguration.cs
+++ /dev/null
@@ -1,69 +0,0 @@
-// ----------------------------------------------------------------------------------
-//
-// Copyright Microsoft Corporation
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-// http://www.apache.org/licenses/LICENSE-2.0
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-// ----------------------------------------------------------------------------------
-
-using System;
-using System.Linq;
-
-namespace Microsoft.Azure.Common.Extensions.Authentication
-{
- ///
- /// Class storing the configuration information needed
- /// for ADAL to request token from the right AD tenant
- /// depending on environment.
- ///
- public class AdalConfiguration
- {
- //
- // These constants define the default values to use for AD authentication
- // against RDFE
- //
- private const string PowerShellClientId = "1950a258-227b-4e31-a9cf-717495945fc2";
- private string adEndpoint = string.Empty;
-
- // Turn off endpoint validation for known test cluster AD endpoints
- private static readonly string[] knownTestEndpoints =
- {
- "https://sts.login.windows-int.net/"
- };
-
- public static readonly Uri PowerShellRedirectUri = new Uri("urn:ietf:wg:oauth:2.0:oob");
-
- // ID for site to pass to enable EBD (email-based differentiation)
- // This gets passed in the call to get the azure branding on the
- // login window. Also adding popup flag to handle overly large login windows.
- internal const string EnableEbdMagicCookie = "site_id=501358&display=popup";
-
- public string AdEndpoint
- {
- get { return adEndpoint; }
- set { adEndpoint = value; }
- }
-
- public bool ValidateAuthority
- {
- get { return knownTestEndpoints.All(s => string.Compare(s, adEndpoint, StringComparison.OrdinalIgnoreCase) != 0); }
- }
-
- public string AdDomain { get; set; }
- public string ClientId { get; set; }
- public Uri ClientRedirectUri { get; set; }
- public string ResourceClientUri { get; set; }
-
- public AdalConfiguration()
- {
- ClientId = PowerShellClientId;
- ClientRedirectUri = PowerShellRedirectUri;
- }
- }
-}
\ No newline at end of file
diff --git a/src/Common/Azure.Common.Extensions/Authentication/AdalTokenProvider.cs b/src/Common/Azure.Common.Extensions/Authentication/AdalTokenProvider.cs
deleted file mode 100644
index f0e67eecc122..000000000000
--- a/src/Common/Azure.Common.Extensions/Authentication/AdalTokenProvider.cs
+++ /dev/null
@@ -1,57 +0,0 @@
-// ----------------------------------------------------------------------------------
-//
-// Copyright Microsoft Corporation
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-// http://www.apache.org/licenses/LICENSE-2.0
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-// ----------------------------------------------------------------------------------
-
-using Microsoft.Azure.Common.Extensions.Models;
-using Microsoft.Azure.Common.Extensions.Properties;
-using System;
-using System.Security;
-using System.Windows.Forms;
-
-namespace Microsoft.Azure.Common.Extensions.Authentication
-{
- ///
- /// A token provider that uses ADAL to retrieve
- /// tokens from Azure Active Directory
- ///
- public class AdalTokenProvider : ITokenProvider
- {
- private readonly ITokenProvider userTokenProvider;
- private readonly ITokenProvider servicePrincipalTokenProvider;
-
- public AdalTokenProvider()
- : this(new ConsoleParentWindow())
- {
- }
-
- public AdalTokenProvider(IWin32Window parentWindow)
- {
- this.userTokenProvider = new UserTokenProvider(parentWindow);
- servicePrincipalTokenProvider = new ServicePrincipalTokenProvider();
- }
-
- public IAccessToken GetAccessToken(AdalConfiguration config, ShowDialog promptBehavior, string userId, SecureString password,
- AzureAccount.AccountType credentialType)
- {
- switch (credentialType)
- {
- case AzureAccount.AccountType.User:
- return userTokenProvider.GetAccessToken(config, promptBehavior, userId, password, credentialType);
- case AzureAccount.AccountType.ServicePrincipal:
- return servicePrincipalTokenProvider.GetAccessToken(config, promptBehavior, userId, password, credentialType);
- default:
- throw new ArgumentException(Resources.UnknownCredentialType, "credentialType");
- }
- }
- }
-}
diff --git a/src/Common/Azure.Common.Extensions/Authentication/CredStore.cs b/src/Common/Azure.Common.Extensions/Authentication/CredStore.cs
deleted file mode 100644
index 598019f64f9a..000000000000
--- a/src/Common/Azure.Common.Extensions/Authentication/CredStore.cs
+++ /dev/null
@@ -1,114 +0,0 @@
-// ----------------------------------------------------------------------------------
-//
-// Copyright Microsoft Corporation
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-// http://www.apache.org/licenses/LICENSE-2.0
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-// ----------------------------------------------------------------------------------
-
-using System;
-using System.Runtime.ConstrainedExecution;
-using System.Runtime.InteropServices;
-
-namespace Microsoft.Azure.Common.Extensions.Authentication
-{
- ///
- /// Class wrapping PInvoke signatures for Windows Credential store
- ///
- internal static class CredStore
- {
- internal enum CredentialType
- {
- Generic = 1,
- }
-
- internal static class NativeMethods
- {
- [DllImport("advapi32.dll", CharSet = CharSet.Unicode, SetLastError = true)]
- [ReliabilityContract(Consistency.WillNotCorruptState, Cer.MayFail)]
- internal extern static bool CredRead(
- string targetName,
- CredentialType type,
- int flags,
- [Out] out IntPtr pCredential
- );
-
- [DllImport("advapi32.dll", CharSet = CharSet.Unicode, SetLastError = true)]
- [ReliabilityContract(Consistency.WillNotCorruptState, Cer.MayFail)]
- internal extern static bool CredEnumerate(
- string targetName,
- int flags,
- [Out] out int count,
- [Out] out IntPtr pCredential
- );
-
- [DllImport("advapi32.dll", CharSet = CharSet.Unicode, SetLastError = true)]
- [ReliabilityContract(Consistency.WillNotCorruptState, Cer.MayFail)]
- internal extern static bool CredDelete(
- string targetName,
- CredentialType type,
- int flags
- );
-
- [DllImport("advapi32.dll", CharSet = CharSet.Unicode, SetLastError = true)]
- [ReliabilityContract(Consistency.WillNotCorruptState, Cer.MayFail)]
- internal extern static bool CredWrite(
- IntPtr pCredential,
- int flags
- );
-
- [DllImport("advapi32.dll", CharSet = CharSet.Unicode, SetLastError = true)]
- [ReliabilityContract(Consistency.WillNotCorruptState, Cer.MayFail)]
- internal extern static bool CredFree(
- IntPtr pCredential
- );
-
- [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1049:TypesThatOwnNativeResourcesShouldBeDisposable", Justification = "Wrapper for native struct")]
- [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
- internal struct Credential
- {
- public Credential(string userName, string key, string value)
- {
- this.flags = 0;
- this.type = CredentialType.Generic;
-
- // set the key in the targetName
- this.targetName = key;
-
- this.targetAlias = null;
- this.comment = null;
- this.lastWritten.dwHighDateTime = 0;
- this.lastWritten.dwLowDateTime = 0;
-
- // set the value in credentialBlob.
- this.credentialBlob = Marshal.StringToHGlobalUni(value);
- this.credentialBlobSize = (uint)((value.Length + 1) * 2);
-
- this.persist = 1;
- this.attibuteCount = 0;
- this.attributes = IntPtr.Zero;
- this.userName = userName;
- }
-
- internal uint flags;
- internal CredentialType type;
- internal string targetName;
- internal string comment;
- internal System.Runtime.InteropServices.ComTypes.FILETIME lastWritten;
- internal uint credentialBlobSize;
- internal IntPtr credentialBlob;
- internal uint persist;
- internal uint attibuteCount;
- internal IntPtr attributes;
- internal string targetAlias;
- internal string userName;
- }
- }
- }
-}
diff --git a/src/Common/Azure.Common.Extensions/Authentication/ITokenProvider.cs b/src/Common/Azure.Common.Extensions/Authentication/ITokenProvider.cs
deleted file mode 100644
index ea2ab77ce749..000000000000
--- a/src/Common/Azure.Common.Extensions/Authentication/ITokenProvider.cs
+++ /dev/null
@@ -1,39 +0,0 @@
-// ----------------------------------------------------------------------------------
-//
-// Copyright Microsoft Corporation
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-// http://www.apache.org/licenses/LICENSE-2.0
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-// ----------------------------------------------------------------------------------
-
-using Microsoft.Azure.Common.Extensions.Models;
-using System.Security;
-
-namespace Microsoft.Azure.Common.Extensions.Authentication
-{
- ///
- /// This interface represents objects that can be used
- /// to obtain and manage access tokens.
- ///
- public interface ITokenProvider
- {
- ///
- /// Get a new login token for the given environment, user credential,
- /// and credential type.
- ///
- /// Configuration.
- /// Prompt behavior.
- /// User ID/Service principal to get the token for.
- /// Secure strings with password/service principal key.
- /// Credential type.
- /// An access token.
- IAccessToken GetAccessToken(AdalConfiguration config, ShowDialog promptBehavior, string userId,
- SecureString password, AzureAccount.AccountType credentialType);
- }
-}
diff --git a/src/Common/Azure.Common.Extensions/Authentication/ProtectedFileTokenCache.cs b/src/Common/Azure.Common.Extensions/Authentication/ProtectedFileTokenCache.cs
deleted file mode 100644
index 2ff115cc3501..000000000000
--- a/src/Common/Azure.Common.Extensions/Authentication/ProtectedFileTokenCache.cs
+++ /dev/null
@@ -1,131 +0,0 @@
-// ----------------------------------------------------------------------------------
-//
-// Copyright Microsoft Corporation
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-// http://www.apache.org/licenses/LICENSE-2.0
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-// ----------------------------------------------------------------------------------
-
-using Microsoft.IdentityModel.Clients.ActiveDirectory;
-using System;
-using System.IO;
-using System.Security.Cryptography;
-
-namespace Microsoft.Azure.Common.Extensions.Authentication
-{
- ///
- /// An implementation of the Adal token cache that stores the cache items
- /// in the DPAPI-protected file.
- ///
- public class ProtectedFileTokenCache : TokenCache
- {
- private static readonly string CacheFileName = Path.Combine(AzureSession.ProfileDirectory, AzureSession.TokenCacheFile);
-
- private static readonly object fileLock = new object();
-
- private static readonly Lazy instance =
- new Lazy(() => new ProtectedFileTokenCache());
-
- public static ProtectedFileTokenCache Instance
- {
- get
- {
- return instance.Value;
- }
- }
-
- // Initializes the cache against a local file.
- // If the file is already present, it loads its content in the ADAL cache
- private ProtectedFileTokenCache()
- {
- Initialize(CacheFileName);
- }
-
- private void Initialize(string fileName)
- {
- AfterAccess = AfterAccessNotification;
- BeforeAccess = BeforeAccessNotification;
- lock (fileLock)
- {
- if (ProfileClient.DataStore.FileExists(fileName))
- {
- var existingData = ProfileClient.DataStore.ReadFileAsBytes(fileName);
- if (existingData != null)
- {
- try
- {
- Deserialize(ProtectedData.Unprotect(existingData, null, DataProtectionScope.CurrentUser));
- }
- catch (CryptographicException)
- {
- ProfileClient.DataStore.DeleteFile(fileName);
- }
- }
- }
- }
- }
-
- public ProtectedFileTokenCache(string cacheFile)
- {
- Initialize(cacheFile);
- }
-
- // Empties the persistent store.
- public override void Clear()
- {
- base.Clear();
- if (ProfileClient.DataStore.FileExists(CacheFileName))
- {
- ProfileClient.DataStore.DeleteFile(CacheFileName);
- }
- }
-
- // Triggered right before ADAL needs to access the cache.
- // Reload the cache from the persistent store in case it changed since the last access.
- void BeforeAccessNotification(TokenCacheNotificationArgs args)
- {
- lock (fileLock)
- {
- if (ProfileClient.DataStore.FileExists(CacheFileName))
- {
- var existingData = ProfileClient.DataStore.ReadFileAsBytes(CacheFileName);
- if (existingData != null)
- {
- try
- {
- Deserialize(ProtectedData.Unprotect(existingData, null, DataProtectionScope.CurrentUser));
- }
- catch (CryptographicException)
- {
- ProfileClient.DataStore.DeleteFile(CacheFileName);
- }
- }
- }
- }
- }
-
- // Triggered right after ADAL accessed the cache.
- void AfterAccessNotification(TokenCacheNotificationArgs args)
- {
- // if the access operation resulted in a cache update
- if (HasStateChanged)
- {
- lock (fileLock)
- {
- // reflect changes in the persistent store
- ProfileClient.DataStore.WriteFile(CacheFileName,
- ProtectedData.Protect(Serialize(), null, DataProtectionScope.CurrentUser));
- // once the write operation took place, restore the HasStateChanged bit to false
- HasStateChanged = false;
- }
- }
- }
-
- }
-}
diff --git a/src/Common/Azure.Common.Extensions/Authentication/ServicePrincipalKeyStore.cs b/src/Common/Azure.Common.Extensions/Authentication/ServicePrincipalKeyStore.cs
deleted file mode 100644
index afba969a1ad5..000000000000
--- a/src/Common/Azure.Common.Extensions/Authentication/ServicePrincipalKeyStore.cs
+++ /dev/null
@@ -1,111 +0,0 @@
-// ----------------------------------------------------------------------------------
-//
-// Copyright Microsoft Corporation
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-// http://www.apache.org/licenses/LICENSE-2.0
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-// ----------------------------------------------------------------------------------
-
-using System;
-using System.Runtime.InteropServices;
-using System.Security;
-using FILETIME = System.Runtime.InteropServices.ComTypes.FILETIME;
-
-namespace Microsoft.Azure.Common.Extensions.Authentication
-{
- ///
- /// Helper class to store service principal keys and retrieve them
- /// from the Windows Credential Store.
- ///
- public static class ServicePrincipalKeyStore
- {
- private const string keyStoreUserName = "PowerShellServicePrincipalKey";
- private const string targetNamePrefix = "AzureSession:target=";
-
- public static void SaveKey(string appId, string tenantId, SecureString serviceKey)
- {
- var credential = new CredStore.NativeMethods.Credential
- {
- flags = 0,
- type = CredStore.CredentialType.Generic,
- targetName = CreateKey(appId, tenantId),
- targetAlias = null,
- comment = null,
- lastWritten = new FILETIME {dwHighDateTime = 0, dwLowDateTime = 0},
- persist = 2, // persist on local machine
- attibuteCount = 0,
- attributes = IntPtr.Zero,
- userName = keyStoreUserName
- };
-
- // Pull bits out of SecureString to put in credential
- IntPtr credPtr = IntPtr.Zero;
- try
- {
- credential.credentialBlob = Marshal.SecureStringToGlobalAllocUnicode(serviceKey);
- credential.credentialBlobSize = (uint)(serviceKey.Length * Marshal.SystemDefaultCharSize);
-
- int size = Marshal.SizeOf(credential);
- credPtr = Marshal.AllocHGlobal(size);
-
- Marshal.StructureToPtr(credential, credPtr, false);
- CredStore.NativeMethods.CredWrite(credPtr, 0);
- }
- finally
- {
- if (credPtr != IntPtr.Zero)
- {
- Marshal.FreeHGlobal(credPtr);
- }
-
- Marshal.ZeroFreeGlobalAllocUnicode(credential.credentialBlob);
- }
- }
-
- public static SecureString GetKey(string appId, string tenantId)
- {
- IntPtr pCredential = IntPtr.Zero;
- try
- {
- if (CredStore.NativeMethods.CredRead(
- CreateKey(appId, tenantId),
- CredStore.CredentialType.Generic, 0,
- out pCredential))
- {
- var credential = (CredStore.NativeMethods.Credential)
- Marshal.PtrToStructure(pCredential, typeof (CredStore.NativeMethods.Credential));
- unsafe
- {
- return new SecureString((char*) (credential.credentialBlob),
- (int)(credential.credentialBlobSize/Marshal.SystemDefaultCharSize));
- }
- }
- return null;
- }
- finally
- {
- if (pCredential != IntPtr.Zero)
- {
- CredStore.NativeMethods.CredFree(pCredential);
- }
- }
- }
-
-
- public static void DeleteKey(string appId, string tenantId)
- {
- CredStore.NativeMethods.CredDelete(CreateKey(appId, tenantId), CredStore.CredentialType.Generic, 0);
- }
-
- private static string CreateKey(string appId, string tenantId)
- {
- return string.Format("{0}AppId={1};Tenant={2}", targetNamePrefix, appId, tenantId);
- }
- }
-}
diff --git a/src/Common/Azure.Common.Extensions/Authentication/ServicePrincipalTokenProvider.cs b/src/Common/Azure.Common.Extensions/Authentication/ServicePrincipalTokenProvider.cs
deleted file mode 100644
index cd959c9a5bde..000000000000
--- a/src/Common/Azure.Common.Extensions/Authentication/ServicePrincipalTokenProvider.cs
+++ /dev/null
@@ -1,123 +0,0 @@
-// ----------------------------------------------------------------------------------
-// Copyright Microsoft Corporation
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-// http://www.apache.org/licenses/LICENSE-2.0
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-// ----------------------------------------------------------------------------------
-
-using Microsoft.Azure.Common.Extensions.Models;
-using Microsoft.Azure.Common.Extensions.Properties;
-using Microsoft.IdentityModel.Clients.ActiveDirectory;
-using System;
-using System.Collections.Generic;
-using System.Security;
-
-namespace Microsoft.Azure.Common.Extensions.Authentication
-{
- internal class ServicePrincipalTokenProvider : ITokenProvider
- {
- private static readonly TimeSpan expirationThreshold = new TimeSpan(0, 5, 0);
-
- public IAccessToken GetAccessToken(AdalConfiguration config, ShowDialog promptBehavior, string userId, SecureString password,
- AzureAccount.AccountType credentialType)
- {
- if (credentialType == AzureAccount.AccountType.User)
- {
- throw new ArgumentException(string.Format(Resources.InvalidCredentialType, "User"), "credentialType");
- }
- return new ServicePrincipalAccessToken(config, AcquireToken(config, userId, password), this, userId);
- }
-
- private AuthenticationResult AcquireToken(AdalConfiguration config, string appId, SecureString appKey)
- {
- if (appKey == null)
- {
- return Renew(config, appId);
- }
-
- StoreAppKey(appId, config.AdDomain, appKey);
-
- string authority = config.AdEndpoint + config.AdDomain;
- var context = new AuthenticationContext(authority, config.ValidateAuthority,
- ProtectedFileTokenCache.Instance);
- var credential = new ClientCredential(appId, appKey);
- return context.AcquireToken("https://management.core.windows.net/", credential);
- }
-
- private AuthenticationResult Renew(AdalConfiguration config, string appId)
- {
- using (SecureString appKey = LoadAppKey(appId, config.AdDomain))
- {
- if (appKey == null)
- {
- throw new KeyNotFoundException(string.Format(Resources.ServiceKeyNotFound, appId));
- }
- return AcquireToken(config, appId, appKey);
- }
- }
-
- private SecureString LoadAppKey(string appId, string tenantId)
- {
- return ServicePrincipalKeyStore.GetKey(appId, tenantId);
- }
-
- private void StoreAppKey(string appId, string tenantId, SecureString appKey)
- {
- ServicePrincipalKeyStore.SaveKey(appId, tenantId, appKey);
- }
-
-
- private class ServicePrincipalAccessToken : IAccessToken
- {
- internal readonly AdalConfiguration Configuration;
- internal AuthenticationResult AuthResult;
- private readonly ServicePrincipalTokenProvider tokenProvider;
- private readonly string appId;
-
- public ServicePrincipalAccessToken(AdalConfiguration configuration, AuthenticationResult authResult, ServicePrincipalTokenProvider tokenProvider, string appId)
- {
- Configuration = configuration;
- AuthResult = authResult;
- this.tokenProvider = tokenProvider;
- this.appId = appId;
- }
-
- public void AuthorizeRequest(Action authTokenSetter)
- {
- if (IsExpired)
- {
- AuthResult = tokenProvider.Renew(Configuration, appId);
- }
-
- authTokenSetter(AuthResult.AccessTokenType, AuthResult.AccessToken);
- }
-
- public string UserId { get { return appId; }}
- public string AccessToken { get { return AuthResult.AccessToken; } }
- public LoginType LoginType { get { return LoginType.OrgId; } }
- public string TenantId { get { return this.Configuration.AdDomain; } }
-
- private bool IsExpired
- {
- get
- {
-#if DEBUG
- if (Environment.GetEnvironmentVariable("FORCE_EXPIRED_ACCESS_TOKEN") != null)
- {
- return true;
- }
-#endif
-
- return AuthResult.ExpiresOn - expirationThreshold < DateTimeOffset.Now;
- }
- }
- }
- }
-}
diff --git a/src/Common/Azure.Common.Extensions/Authentication/UserTokenProvider.cs b/src/Common/Azure.Common.Extensions/Authentication/UserTokenProvider.cs
deleted file mode 100644
index 08615e9e96b5..000000000000
--- a/src/Common/Azure.Common.Extensions/Authentication/UserTokenProvider.cs
+++ /dev/null
@@ -1,271 +0,0 @@
-// ----------------------------------------------------------------------------------
-//
-// Copyright Microsoft Corporation
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-// http://www.apache.org/licenses/LICENSE-2.0
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-// ----------------------------------------------------------------------------------
-
-using Microsoft.Azure.Common.Extensions.Models;
-using Microsoft.Azure.Common.Extensions.Properties;
-using Microsoft.IdentityModel.Clients.ActiveDirectory;
-using System;
-using System.Runtime.InteropServices;
-using System.Security;
-using System.Threading;
-using System.Windows.Forms;
-
-namespace Microsoft.Azure.Common.Extensions.Authentication
-{
- ///
- /// A token provider that uses ADAL to retrieve
- /// tokens from Azure Active Directory for user
- /// credentials.
- ///
- internal class UserTokenProvider : ITokenProvider
- {
- private readonly IWin32Window parentWindow;
-
- public UserTokenProvider(IWin32Window parentWindow)
- {
- this.parentWindow = parentWindow;
- }
-
- public IAccessToken GetAccessToken(AdalConfiguration config, ShowDialog promptBehavior, string userId, SecureString password,
- AzureAccount.AccountType credentialType)
- {
- if (credentialType != AzureAccount.AccountType.User)
- {
- throw new ArgumentException(string.Format(Resources.InvalidCredentialType, "User"), "credentialType");
- }
-
- return new AdalAccessToken(AcquireToken(config, promptBehavior, userId, password), this, config);
- }
-
- private readonly static TimeSpan thresholdExpiration = new TimeSpan(0, 5, 0);
-
- private bool IsExpired(AdalAccessToken token)
- {
-#if DEBUG
- if (Environment.GetEnvironmentVariable("FORCE_EXPIRED_ACCESS_TOKEN") != null)
- {
- return true;
- }
-#endif
-
- return token.AuthResult.ExpiresOn - DateTimeOffset.Now < thresholdExpiration;
- }
-
- private void Renew(AdalAccessToken token)
- {
- if (IsExpired(token))
- {
- AuthenticationResult result = AcquireToken(token.Configuration, ShowDialog.Never, token.UserId, null);
-
- if (result == null)
- {
- throw new Exception(Resources.ExpiredRefreshToken);
- }
- else
- {
- token.AuthResult = result;
- }
- }
- }
-
- private AuthenticationContext CreateContext(AdalConfiguration config)
- {
- return new AuthenticationContext(config.AdEndpoint + config.AdDomain, config.ValidateAuthority, ProtectedFileTokenCache.Instance)
- {
- OwnerWindow = parentWindow
- };
- }
-
- // We have to run this in a separate thread to guarantee that it's STA. This method
- // handles the threading details.
- private AuthenticationResult AcquireToken(AdalConfiguration config, ShowDialog promptBehavior, string userId,
- SecureString password)
- {
- AuthenticationResult result = null;
- Exception ex = null;
- if (promptBehavior == ShowDialog.Never)
- {
- result = SafeAquireToken(config, promptBehavior, userId, password, out ex);
- }
- else
- {
- var thread = new Thread(() =>
- {
- result = SafeAquireToken(config, promptBehavior, userId, password, out ex);
- });
-
- thread.SetApartmentState(ApartmentState.STA);
- thread.Name = "AcquireTokenThread";
- thread.Start();
- thread.Join();
- }
-
- if (ex != null)
- {
- var adex = ex as AdalException;
- if (adex != null)
- {
- if (adex.ErrorCode == AdalError.AuthenticationCanceled)
- {
- throw new AadAuthenticationCanceledException(adex.Message, adex);
- }
- }
- if (ex is AadAuthenticationException)
- {
- throw ex;
- }
- throw new AadAuthenticationFailedException(GetExceptionMessage(ex), ex);
- }
-
- return result;
- }
-
- private AuthenticationResult SafeAquireToken(
- AdalConfiguration config,
- ShowDialog showDialog,
- string userId,
- SecureString password,
- out Exception ex)
- {
- try
- {
- ex = null;
- var promptBehavior = (PromptBehavior)Enum.Parse(typeof(PromptBehavior), showDialog.ToString());
-
- return DoAcquireToken(config, promptBehavior, userId, password);
- }
- catch (AdalException adalEx)
- {
- if (adalEx.ErrorCode == AdalError.UserInteractionRequired ||
- adalEx.ErrorCode == AdalError.MultipleTokensMatched)
- {
- ex = new AadAuthenticationFailedWithoutPopupException(Resources.InvalidSubscriptionState, adalEx);
- }
- else if (adalEx.ErrorCode == AdalError.MissingFederationMetadataUrl)
- {
- ex = new AadAuthenticationFailedException(Resources.CredentialOrganizationIdMessage, adalEx);
- }
- else
- {
- ex = adalEx;
- }
- }
- catch (Exception threadEx)
- {
- ex = threadEx;
- }
- return null;
- }
-
- private AuthenticationResult DoAcquireToken(AdalConfiguration config, PromptBehavior promptBehavior, string userId,
- SecureString password)
- {
- AuthenticationResult result;
- var context = CreateContext(config);
-
- if (string.IsNullOrEmpty(userId))
- {
- if (promptBehavior != PromptBehavior.Never)
- {
- ClearCookies();
- }
-
- result = context.AcquireToken(config.ResourceClientUri, config.ClientId,
- config.ClientRedirectUri, promptBehavior,
- UserIdentifier.AnyUser, AdalConfiguration.EnableEbdMagicCookie);
- }
- else
- {
- if (password == null)
- {
- result = context.AcquireToken(config.ResourceClientUri, config.ClientId,
- config.ClientRedirectUri, promptBehavior,
- new UserIdentifier(userId, UserIdentifierType.OptionalDisplayableId),
- AdalConfiguration.EnableEbdMagicCookie);
- }
- else
- {
- UserCredential credential = new UserCredential(userId, password);
- result = context.AcquireToken(config.ResourceClientUri, config.ClientId, credential);
- }
- }
- return result;
- }
-
- private string GetExceptionMessage(Exception ex)
- {
- string message = ex.Message;
- if (ex.InnerException != null)
- {
- message += ": " + ex.InnerException.Message;
- }
- return message;
- }
- ///
- /// Implementation of using data from ADAL
- ///
- private class AdalAccessToken : IAccessToken
- {
- internal readonly AdalConfiguration Configuration;
- internal AuthenticationResult AuthResult;
- private readonly UserTokenProvider tokenProvider;
-
- public AdalAccessToken(AuthenticationResult authResult, UserTokenProvider tokenProvider, AdalConfiguration configuration)
- {
- AuthResult = authResult;
- this.tokenProvider = tokenProvider;
- Configuration = configuration;
- }
-
- public void AuthorizeRequest(Action authTokenSetter)
- {
- tokenProvider.Renew(this);
- authTokenSetter(AuthResult.AccessTokenType, AuthResult.AccessToken);
- }
-
- public string AccessToken { get { return AuthResult.AccessToken; } }
- public string UserId { get { return AuthResult.UserInfo.DisplayableId; } }
-
- public string TenantId { get { return AuthResult.TenantId; } }
-
- public LoginType LoginType
- {
- get
- {
- if (AuthResult.UserInfo.IdentityProvider != null)
- {
- return LoginType.LiveId;
- }
- return LoginType.OrgId;
- }
- }
- }
-
-
- private void ClearCookies()
- {
- NativeMethods.InternetSetOption(IntPtr.Zero, NativeMethods.INTERNET_OPTION_END_BROWSER_SESSION, IntPtr.Zero, 0);
- }
-
- private static class NativeMethods
- {
- internal const int INTERNET_OPTION_END_BROWSER_SESSION = 42;
-
- [DllImport("wininet.dll", SetLastError = true)]
- internal static extern bool InternetSetOption(IntPtr hInternet, int dwOption, IntPtr lpBuffer,
- int lpdwBufferLength);
- }
-
- }
-}
diff --git a/src/Common/Azure.Common.Extensions/AzureSession.cs b/src/Common/Azure.Common.Extensions/AzureSession.cs
deleted file mode 100644
index fa1bb66de832..000000000000
--- a/src/Common/Azure.Common.Extensions/AzureSession.cs
+++ /dev/null
@@ -1,107 +0,0 @@
-// ----------------------------------------------------------------------------------
-//
-// Copyright Microsoft Corporation
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-// http://www.apache.org/licenses/LICENSE-2.0
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-// ----------------------------------------------------------------------------------
-
-using Microsoft.Azure.Common.Extensions.Factories;
-using Microsoft.Azure.Common.Extensions.Models;
-using Microsoft.Azure.Common.Extensions.Properties;
-using System;
-using System.IO;
-
-namespace Microsoft.Azure.Common.Extensions
-{
- public static class AzureSession
- {
- static AzureSession()
- {
- ClientFactory = new ClientFactory();
- AuthenticationFactory = new AuthenticationFactory();
- CurrentContext = new AzureContext();
- CurrentContext.Environment = AzureEnvironment.PublicEnvironments[EnvironmentName.AzureCloud];
- AzureSession.OldProfileFile = "WindowsAzureProfile.xml";
- AzureSession.OldProfileFileBackup = "WindowsAzureProfile.xml.bak";
- AzureSession.ProfileDirectory = Path.Combine(
- Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData),
- Resources.AzureDirectoryName); ;
- AzureSession.ProfileFile = "AzureProfile.json";
- AzureSession.TokenCacheFile = "TokenCache.dat";
- }
-
- public static AzureContext CurrentContext { get; private set; }
-
- public static void SetCurrentContext(AzureSubscription subscription, AzureEnvironment environment, AzureAccount account)
- {
- if (environment == null)
- {
- if (subscription != null && CurrentContext != null &&
- subscription.Environment == CurrentContext.Environment.Name)
- {
- environment = CurrentContext.Environment;
- }
- else
- {
- environment = AzureEnvironment.PublicEnvironments[EnvironmentName.AzureCloud];
- }
-
- if (subscription != null)
- {
- subscription.Environment = environment.Name;
- }
- }
-
- if (account == null)
- {
- if (subscription != null && CurrentContext != null && subscription.Account != null)
- {
- if (CurrentContext.Account != null && subscription.Account == CurrentContext.Account.Id)
- {
- account = CurrentContext.Account;
- }
- else
- {
- throw new ArgumentException(Resources.AccountIdDoesntMatchSubscription, "account");
- }
-
- subscription.Account = account.Id;
-
- }
- }
-
- if (subscription != null && subscription.Environment != environment.Name)
- {
- throw new ArgumentException(Resources.EnvironmentNameDoesntMatchSubscription, "environment");
- }
-
- CurrentContext = new AzureContext
- {
- Subscription = subscription,
- Account = account,
- Environment = environment
- };
- }
-
- public static IClientFactory ClientFactory { get; set; }
-
- public static IAuthenticationFactory AuthenticationFactory { get; set; }
-
- public static string ProfileDirectory { get; set; }
-
- public static string TokenCacheFile { get; set; }
-
- public static string ProfileFile { get; set; }
-
- public static string OldProfileFileBackup { get; set; }
-
- public static string OldProfileFile { get; set; }
- }
-}
diff --git a/src/Common/Azure.Common.Extensions/Common.Extensions.csproj b/src/Common/Azure.Common.Extensions/Common.Extensions.csproj
deleted file mode 100644
index b3bb3472a230..000000000000
--- a/src/Common/Azure.Common.Extensions/Common.Extensions.csproj
+++ /dev/null
@@ -1,204 +0,0 @@
-
-
-
-
- Debug
- AnyCPU
- {B95C489C-8CB7-4DCF-8D5F-B9AEBDBBAF89}
- Library
- Properties
- Microsoft.Azure.Common.Extensions
- Microsoft.Azure.Common.Extensions
- v4.5
- 512
-
- ..\..\
- true
- /assemblyCompareMode:StrongNameIgnoringVersion
-
-
- true
- full
- false
- bin\Debug
- DEBUG;TRACE
- prompt
- 4
- true
- true
- false
- true
-
-
- bin\Release
- TRACE;SIGN
- true
- pdbonly
- AnyCPU
- bin\Release\Management.Utilities.dll.CodeAnalysisLog.xml
- true
- GlobalSuppressions.cs
- prompt
- MinimumRecommendedRules.ruleset
- ;$(ProgramFiles)\Microsoft Visual Studio 12.0\Team Tools\Static Analysis Tools\Rule Sets
- ;$(ProgramFiles)\Microsoft Visual Studio 12.0\Team Tools\Static Analysis Tools\FxCop\Rules
- true
- MSSharedLibKey.snk
- true
- true
- false
- true
-
-
-
- False
- ..\..\packages\Microsoft.Azure.Management.Resources.2.7.0-preview\lib\net40\Microsoft.Azure.ResourceManager.dll
-
-
- ..\..\packages\Microsoft.Data.Edm.5.6.0\lib\net40\Microsoft.Data.Edm.dll
-
-
- ..\..\packages\Microsoft.Data.OData.5.6.0\lib\net40\Microsoft.Data.OData.dll
-
-
- ..\..\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
-
-
- False
- ..\..\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
-
-
- False
- ..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.dll
-
-
- False
- ..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.Desktop.dll
-
-
- ..\..\packages\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.2.1.0\lib\net40\Microsoft.WindowsAzure.Management.dll
-
-
- ..\..\packages\Newtonsoft.Json.6.0.4\lib\net45\Newtonsoft.Json.dll
- True
-
-
-
-
-
-
- False
- ..\..\packages\Microsoft.Net.Http.2.2.28\lib\net45\System.Net.Http.Extensions.dll
-
-
- False
- ..\..\packages\Microsoft.AspNet.WebApi.Client.5.2.2\lib\net45\System.Net.Http.Formatting.dll
-
-
- False
- ..\..\packages\Microsoft.Net.Http.2.2.28\lib\net45\System.Net.Http.Primitives.dll
-
-
-
-
-
-
-
-
- ..\..\packages\System.Spatial.5.6.0\lib\net40\System.Spatial.dll
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- True
- True
- Resources.resx
-
-
-
-
-
-
-
-
-
- PublicResXFileCodeGenerator
- Resources.Designer.cs
-
-
-
-
-
- Designer
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/Common/Azure.Common.Extensions/Common/ProfileClient.cs b/src/Common/Azure.Common.Extensions/Common/ProfileClient.cs
deleted file mode 100644
index 968017faa1ae..000000000000
--- a/src/Common/Azure.Common.Extensions/Common/ProfileClient.cs
+++ /dev/null
@@ -1,1200 +0,0 @@
-// ----------------------------------------------------------------------------------
-//
-// Copyright Microsoft Corporation
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-// http://www.apache.org/licenses/LICENSE-2.0
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-// ----------------------------------------------------------------------------------
-
-using Microsoft.Azure.Common.Extensions.Authentication;
-using Microsoft.Azure.Common.Extensions.Factories;
-using Microsoft.Azure.Common.Extensions.Interfaces;
-using Microsoft.Azure.Common.Extensions.Models;
-using Microsoft.Azure.Common.Extensions.Properties;
-using Microsoft.Azure.Subscriptions;
-using Microsoft.WindowsAzure;
-using System;
-using System.Collections.Generic;
-using System.Diagnostics;
-using System.Linq;
-using System.Security;
-using System.Security.Cryptography.X509Certificates;
-
-namespace Microsoft.Azure.Common.Extensions
-{
- ///
- /// Convenience client for azure profile and subscriptions.
- ///
- public class ProfileClient
- {
- public static IDataStore DataStore { get; set; }
-
- public AzureProfile Profile { get; private set; }
-
- public Action WarningLog;
-
- public Action DebugLog;
-
- private void WriteDebugMessage(string message)
- {
- if (DebugLog != null)
- {
- DebugLog(message);
- }
- }
-
- private void WriteWarningMessage(string message)
- {
- if (WarningLog != null)
- {
- WarningLog(message);
- }
- }
-
- private static void UpgradeProfile()
- {
- string oldProfileFilePath = System.IO.Path.Combine(AzureSession.ProfileDirectory, AzureSession.OldProfileFile);
- string oldProfileFilePathBackup = System.IO.Path.Combine(AzureSession.ProfileDirectory, AzureSession.OldProfileFileBackup);
- string newProfileFilePath = System.IO.Path.Combine(AzureSession.ProfileDirectory, AzureSession.ProfileFile);
- if (DataStore.FileExists(oldProfileFilePath))
- {
- string oldProfilePath = System.IO.Path.Combine(AzureSession.ProfileDirectory,
- AzureSession.OldProfileFile);
-
- try
- {
- // Try to backup old profile
- try
- {
- DataStore.CopyFile(oldProfilePath, oldProfileFilePathBackup);
- }
- catch
- {
- // Ignore any errors here
- }
-
- AzureProfile oldProfile = new AzureProfile(DataStore, oldProfilePath);
-
- if (DataStore.FileExists(newProfileFilePath))
- {
- // Merge profile files
- AzureProfile newProfile = new AzureProfile(DataStore, newProfileFilePath);
- foreach (var environment in newProfile.Environments.Values)
- {
- oldProfile.Environments[environment.Name] = environment;
- }
- foreach (var subscription in newProfile.Subscriptions.Values)
- {
- oldProfile.Subscriptions[subscription.Id] = subscription;
- }
- DataStore.DeleteFile(newProfileFilePath);
- }
-
- // If there were no load errors - delete backup file
- if (oldProfile.ProfileLoadErrors.Count == 0)
- {
- try
- {
- DataStore.DeleteFile(oldProfileFilePathBackup);
- }
- catch
- {
- // Give up
- }
- }
-
- // Save the profile to the disk
- oldProfile.Save();
-
- // Rename WindowsAzureProfile.xml to WindowsAzureProfile.json
- DataStore.RenameFile(oldProfilePath, newProfileFilePath);
-
- }
- catch
- {
- // Something really bad happened - try to delete the old profile
- try
- {
- DataStore.DeleteFile(oldProfilePath);
- }
- catch
- {
- // Ignore any errors
- }
- }
- }
- }
-
- static ProfileClient()
- {
- DataStore = new DiskDataStore();
- }
-
- public ProfileClient()
- : this(System.IO.Path.Combine(AzureSession.ProfileDirectory, AzureSession.ProfileFile))
- {
-
- }
-
- public ProfileClient(string profilePath)
- {
- try
- {
- ProfileClient.UpgradeProfile();
-
- Profile = new AzureProfile(DataStore, profilePath);
- }
- catch
- {
- // Should never fail in constructor
- }
-
- WarningLog = (s) => Debug.WriteLine(s);
- }
-
- #region Account management
-
- public AzureAccount AddAccountAndLoadSubscriptions(AzureAccount account, AzureEnvironment environment, SecureString password)
- {
- if (environment == null)
- {
- throw new ArgumentNullException("environment");
- }
-
- if (account == null)
- {
- throw new ArgumentNullException("account");
- }
-
- var subscriptionsFromServer = ListSubscriptionsFromServer(
- account,
- environment,
- password,
- password == null ? ShowDialog.Always : ShowDialog.Never).ToList();
-
- // If account id is null the login failed
- if (account.Id != null)
- {
- // Update back Profile.Subscriptions
- foreach (var subscription in subscriptionsFromServer)
- {
- AddOrSetSubscription(subscription);
- }
-
- if (Profile.DefaultSubscription == null)
- {
- var firstSubscription = Profile.Subscriptions.Values.FirstOrDefault();
- if (firstSubscription != null)
- {
- SetSubscriptionAsDefault(firstSubscription.Name, firstSubscription.Account);
- }
- }
-
- return Profile.Accounts[account.Id];
- }
- else
- {
- return null;
- }
- }
-
- public AzureAccount AddOrSetAccount(AzureAccount account)
- {
- if (account == null)
- {
- throw new ArgumentNullException("Account needs to be specified.", "account");
- }
-
- if (Profile.Accounts.ContainsKey(account.Id))
- {
- Profile.Accounts[account.Id] =
- MergeAccountProperties(account, Profile.Accounts[account.Id]);
- }
- else
- {
- Profile.Accounts[account.Id] = account;
- }
-
- // Update in-memory environment
- if (AzureSession.CurrentContext != null && AzureSession.CurrentContext.Account != null &&
- AzureSession.CurrentContext.Account.Id == account.Id)
- {
- AzureSession.SetCurrentContext(AzureSession.CurrentContext.Subscription,
- AzureSession.CurrentContext.Environment,
- Profile.Accounts[account.Id]);
- }
-
- return Profile.Accounts[account.Id];
- }
-
- public AzureAccount GetAccountOrDefault(string accountName)
- {
- if (string.IsNullOrEmpty(accountName))
- {
- return AzureSession.CurrentContext.Account;
- }
- else if (AzureSession.CurrentContext.Account != null && AzureSession.CurrentContext.Account.Id == accountName)
- {
- return AzureSession.CurrentContext.Account;
- }
- else if (Profile.Accounts.ContainsKey(accountName))
- {
- return Profile.Accounts[accountName];
- }
- else
- {
- throw new ArgumentException(string.Format("Account with name '{0}' does not exist.", accountName), "accountName");
- }
- }
-
- public AzureAccount GetAccountOrNull(string accountName)
- {
- if (string.IsNullOrEmpty(accountName))
- {
- throw new ArgumentNullException("accountName");
- }
-
- if (Profile.Accounts.ContainsKey(accountName))
- {
- return Profile.Accounts[accountName];
- }
- else
- {
- return null;
- }
- }
-
- public AzureAccount GetAccount(string accountName)
- {
- var account = GetAccountOrNull(accountName);
-
- if (account == null)
- {
- throw new ArgumentException(string.Format("Account with name '{0}' does not exist.", accountName), "accountName");
- }
-
- return account;
- }
-
- public IEnumerable ListAccounts(string accountName)
- {
- List accounts = new List();
-
- if (!string.IsNullOrEmpty(accountName))
- {
- if (Profile.Accounts.ContainsKey(accountName))
- {
- accounts.Add(Profile.Accounts[accountName]);
- }
- }
- else
- {
- accounts = Profile.Accounts.Values.ToList();
- }
-
- return Profile.Accounts.Values;
- }
-
- public AzureAccount RemoveAccount(string accountId)
- {
- if (string.IsNullOrEmpty(accountId))
- {
- throw new ArgumentNullException("User name needs to be specified.", "userName");
- }
-
- if (!Profile.Accounts.ContainsKey(accountId))
- {
- throw new ArgumentException("User name is not valid.", "userName");
- }
-
- AzureAccount account = Profile.Accounts[accountId];
- Profile.Accounts.Remove(account.Id);
-
- foreach (AzureSubscription subscription in account.GetSubscriptions(Profile).ToArray())
- {
- if (subscription.Account == accountId)
- {
- AzureAccount remainingAccount = GetSubscriptionAccount(subscription.Id);
- // There's no default account to use, remove the subscription.
- if (remainingAccount == null)
- {
- // Warn the user if the removed subscription is the default one.
- if (subscription.IsPropertySet(AzureSubscription.Property.Default))
- {
- WriteWarningMessage(Resources.RemoveDefaultSubscription);
- }
-
- // Warn the user if the removed subscription is the current one.
- if (subscription.Equals(AzureSession.CurrentContext.Subscription))
- {
- WriteWarningMessage(Resources.RemoveCurrentSubscription);
- AzureSession.SetCurrentContext(null, null, null);
- }
-
- Profile.Subscriptions.Remove(subscription.Id);
- }
- else
- {
- subscription.Account = remainingAccount.Id;
- AddOrSetSubscription(subscription);
- }
- }
- }
-
- return account;
- }
-
- private AzureAccount GetSubscriptionAccount(Guid subscriptionId)
- {
- List accounts = ListSubscriptionAccounts(subscriptionId);
- AzureAccount account = accounts.FirstOrDefault(a => a.Type != AzureAccount.AccountType.Certificate);
-
- if (account != null)
- {
- // Found a non-certificate account.
- return account;
- }
-
- // Use certificate account if its there.
- account = accounts.FirstOrDefault();
-
- return account;
- }
-
- #endregion
-
- #region Subscription management
-
- public AzureSubscription AddOrSetSubscription(AzureSubscription subscription)
- {
- if (subscription == null)
- {
- throw new ArgumentNullException("Subscription needs to be specified.", "subscription");
- }
- if (subscription.Environment == null)
- {
- throw new ArgumentNullException("Environment needs to be specified.", "subscription.Environment");
- }
- // Validate environment
- GetEnvironmentOrDefault(subscription.Environment);
-
- if (Profile.Subscriptions.ContainsKey(subscription.Id))
- {
- Profile.Subscriptions[subscription.Id] = MergeSubscriptionProperties(subscription, Profile.Subscriptions[subscription.Id]);
- }
- else
- {
- Debug.Assert(!string.IsNullOrEmpty(subscription.Account));
- if (!Profile.Accounts.ContainsKey(subscription.Account))
- {
- throw new KeyNotFoundException(string.Format("The specified account {0} does not exist in profile accounts", subscription.Account));
- }
-
- Profile.Subscriptions[subscription.Id] = subscription;
- }
-
- // Update in-memory subscription
- if (AzureSession.CurrentContext != null && AzureSession.CurrentContext.Subscription != null &&
- AzureSession.CurrentContext.Subscription.Id == subscription.Id)
- {
- var account = GetAccountOrDefault(subscription.Account);
- var environment = GetEnvironmentOrDefault(subscription.Environment);
- AzureSession.SetCurrentContext(Profile.Subscriptions[subscription.Id], environment, account);
- }
-
- return Profile.Subscriptions[subscription.Id];
- }
-
- public AzureSubscription RemoveSubscription(string name)
- {
- if (string.IsNullOrEmpty(name))
- {
- throw new ArgumentNullException("Subscription name needs to be specified.", "name");
- }
-
- var subscription = Profile.Subscriptions.Values.FirstOrDefault(s => s.Name == name);
-
- if (subscription == null)
- {
- throw new ArgumentException(string.Format(Resources.SubscriptionNameNotFoundMessage, name), "name");
- }
- else
- {
- return RemoveSubscription(subscription.Id);
- }
- }
-
- public AzureSubscription RemoveSubscription(Guid id)
- {
- if (!Profile.Subscriptions.ContainsKey(id))
- {
- throw new ArgumentException(string.Format(Resources.SubscriptionIdNotFoundMessage, id), "id");
- }
-
- var subscription = Profile.Subscriptions[id];
-
- if (subscription.IsPropertySet(AzureSubscription.Property.Default))
- {
- WriteWarningMessage(Resources.RemoveDefaultSubscription);
- }
-
- // Warn the user if the removed subscription is the current one.
- if (AzureSession.CurrentContext.Subscription != null && subscription.Id == AzureSession.CurrentContext.Subscription.Id)
- {
- WriteWarningMessage(Resources.RemoveCurrentSubscription);
- AzureSession.SetCurrentContext(null, null, null);
- }
-
- Profile.Subscriptions.Remove(id);
-
- // Remove this subscription from its associated AzureAccounts
- List accounts = ListSubscriptionAccounts(id);
-
- foreach (AzureAccount account in accounts)
- {
- account.RemoveSubscription(id);
- if (!account.IsPropertySet(AzureAccount.Property.Subscriptions))
- {
- Profile.Accounts.Remove(account.Id);
- }
- }
-
- return subscription;
- }
-
- public List RefreshSubscriptions(AzureEnvironment environment)
- {
- if (environment == null)
- {
- throw new ArgumentNullException("environment");
- }
-
- var subscriptionsFromServer = ListSubscriptionsFromServerForAllAccounts(environment);
-
- // Update back Profile.Subscriptions
- foreach (var subscription in subscriptionsFromServer)
- {
- // Resetting back default account
- if (Profile.Subscriptions.ContainsKey(subscription.Id))
- {
- subscription.Account = Profile.Subscriptions[subscription.Id].Account;
- }
- AddOrSetSubscription(subscription);
- }
-
- return Profile.Subscriptions.Values.ToList();
- }
-
- public AzureSubscription GetSubscription(Guid id)
- {
- if (Profile.Subscriptions.ContainsKey(id))
- {
- return Profile.Subscriptions[id];
- }
- else
- {
- throw new ArgumentException(string.Format(Resources.SubscriptionIdNotFoundMessage, id), "id");
- }
- }
-
- public AzureSubscription GetSubscription(string name)
- {
- AzureSubscription subscription = Profile.Subscriptions.Values
- .FirstOrDefault(s => s.Name.Equals(name, StringComparison.OrdinalIgnoreCase));
-
- if (subscription != null)
- {
- return subscription;
- }
- else
- {
- throw new ArgumentException(string.Format(Resources.SubscriptionNameNotFoundMessage, name), "name");
- }
- }
-
- public AzureSubscription SetSubscriptionAsCurrent(string name, string accountName)
- {
- var subscription = Profile.Subscriptions.Values.FirstOrDefault(s => s.Name == name);
-
- if (subscription == null)
- {
- throw new ArgumentException(string.Format(Resources.InvalidSubscriptionName, name), "name");
- }
-
- return SetSubscriptionAsCurrent(subscription.Id, accountName);
- }
-
- public AzureSubscription SetSubscriptionAsCurrent(Guid id, string accountName)
- {
- if (Guid.Empty == id)
- {
- throw new ArgumentNullException("id", string.Format(Resources.InvalidSubscriptionId, id));
- }
-
- AzureSubscription currentSubscription = null;
- var subscription = Profile.Subscriptions.Values.FirstOrDefault(s => s.Id == id);
-
- if (subscription == null)
- {
- throw new ArgumentException(string.Format(Resources.InvalidSubscriptionId, id), "id");
- }
- else
- {
- currentSubscription = new AzureSubscription { Id = subscription.Id };
- currentSubscription = MergeSubscriptionProperties(subscription, currentSubscription);
- var environment = GetEnvironmentOrDefault(subscription.Environment);
- accountName = string.IsNullOrEmpty(accountName) ? subscription.Account : accountName;
- var account = GetAccount(accountName);
- currentSubscription.Account = account.Id;
- AzureSession.SetCurrentContext(currentSubscription, environment, account);
- }
-
- return currentSubscription;
- }
-
- public AzureSubscription SetSubscriptionAsDefault(string name, string accountName)
- {
- var subscription = Profile.Subscriptions.Values.FirstOrDefault(s => s.Name == name);
-
- if (subscription == null)
- {
- throw new ArgumentException(string.Format(Resources.InvalidSubscriptionName, name), "name");
- }
-
- return SetSubscriptionAsDefault(subscription.Id, accountName);
- }
-
- public AzureSubscription SetSubscriptionAsDefault(Guid id, string accountName)
- {
- AzureSubscription subscription = SetSubscriptionAsCurrent(id, accountName);
-
- if (subscription != null)
- {
- Profile.DefaultSubscription = subscription;
- }
-
- return subscription;
- }
-
- public void ClearAll()
- {
- Profile.Accounts.Clear();
- Profile.DefaultSubscription = null;
- Profile.Environments.Clear();
- Profile.Subscriptions.Clear();
- AzureSession.SetCurrentContext(null, null, null);
- Profile.Save();
-
- ProtectedFileTokenCache.Instance.Clear();
- }
-
- public void ClearDefaultSubscription()
- {
- Profile.DefaultSubscription = null;
- }
-
- public void ImportCertificate(X509Certificate2 certificate)
- {
- DataStore.AddCertificate(certificate);
- }
-
- public List ListSubscriptionAccounts(Guid subscriptionId)
- {
- return Profile.Accounts.Where(a => a.Value.HasSubscription(subscriptionId))
- .Select(a => a.Value).ToList();
- }
-
- public List ImportPublishSettings(string filePath, string environmentName)
- {
- var subscriptions = ListSubscriptionsFromPublishSettingsFile(filePath, environmentName);
- if (subscriptions.Any())
- {
- foreach (var subscription in subscriptions)
- {
- AzureAccount account = new AzureAccount
- {
- Id = subscription.Account,
- Type = AzureAccount.AccountType.Certificate
- };
- account.SetOrAppendProperty(AzureAccount.Property.Subscriptions, subscription.Id.ToString());
- AddOrSetAccount(account);
- subscription.SetOrAppendProperty(AzureSubscription.Property.SupportedModes,
- AzureModule.AzureServiceManagement.ToString());
-
- if (!Profile.Subscriptions.ContainsKey(subscription.Id))
- {
- AddOrSetSubscription(subscription);
- }
-
- if (Profile.DefaultSubscription == null)
- {
- Profile.DefaultSubscription = subscription;
- }
- }
- }
- return subscriptions;
- }
-
- private List ListSubscriptionsFromPublishSettingsFile(string filePath, string environment)
- {
- if (string.IsNullOrEmpty(filePath) || !DataStore.FileExists(filePath))
- {
- throw new ArgumentException("File path is not valid.", "filePath");
- }
- return PublishSettingsImporter.ImportAzureSubscription(DataStore.ReadFileAsStream(filePath), this, environment).ToList();
- }
-
- private IEnumerable ListSubscriptionsFromServerForAllAccounts(AzureEnvironment environment)
- {
- // Get all AD accounts and iterate
- var accountNames = Profile.Accounts.Keys;
-
- List subscriptions = new List();
-
- foreach (var accountName in accountNames.ToArray())
- {
- var account = Profile.Accounts[accountName];
-
- if (account.Type != AzureAccount.AccountType.Certificate)
- {
- subscriptions.AddRange(ListSubscriptionsFromServer(account, environment, null, ShowDialog.Never));
- }
-
- AddOrSetAccount(account);
- }
-
- if (subscriptions.Any())
- {
- return subscriptions;
- }
- else
- {
- return new AzureSubscription[0];
- }
- }
-
- private IEnumerable ListSubscriptionsFromServer(AzureAccount account, AzureEnvironment environment, SecureString password, ShowDialog promptBehavior)
- {
- string[] tenants = null;
- try
- {
- if (!account.IsPropertySet(AzureAccount.Property.Tenants))
- {
- tenants = LoadAccountTenants(account, environment, password, promptBehavior);
- }
- }
- catch (AadAuthenticationException aadEx)
- {
- WriteOrThrowAadExceptionMessage(aadEx);
- return new AzureSubscription[0];
- }
-
- try
- {
- tenants = tenants ?? account.GetPropertyAsArray(AzureAccount.Property.Tenants);
- List mergedSubscriptions = MergeSubscriptions(
- ListServiceManagementSubscriptions(account, environment, password, ShowDialog.Never, tenants).ToList(),
- ListResourceManagerSubscriptions(account, environment, password, ShowDialog.Never, tenants).ToList());
-
- // Set user ID
- foreach (var subscription in mergedSubscriptions)
- {
- account.SetOrAppendProperty(AzureAccount.Property.Subscriptions, subscription.Id.ToString());
- }
-
- if (mergedSubscriptions.Any())
- {
- return mergedSubscriptions;
- }
- else
- {
- return new AzureSubscription[0];
- }
- }
- catch (AadAuthenticationException aadEx)
- {
- WriteOrThrowAadExceptionMessage(aadEx);
- return new AzureSubscription[0];
- }
- }
-
- private string[] LoadAccountTenants(AzureAccount account, AzureEnvironment environment, SecureString password, ShowDialog promptBehavior)
- {
- var commonTenantToken = AzureSession.AuthenticationFactory.Authenticate(account, environment,
- AuthenticationFactory.CommonAdTenant, password, promptBehavior);
-
- if (environment.IsEndpointSet(AzureEnvironment.Endpoint.ResourceManager))
- {
- using (var subscriptionClient = AzureSession.ClientFactory
- .CreateCustomClient(
- new TokenCloudCredentials(commonTenantToken.AccessToken),
- environment.GetEndpointAsUri(AzureEnvironment.Endpoint.ResourceManager)))
- {
- return subscriptionClient.Tenants.List().TenantIds.Select(ti => ti.TenantId).ToArray();
- }
- }
- else
- {
- using (var subscriptionClient = AzureSession.ClientFactory
- .CreateCustomClient(
- new TokenCloudCredentials(commonTenantToken.AccessToken),
- environment.GetEndpointAsUri(AzureEnvironment.Endpoint.ServiceManagement)))
- {
- var subscriptionListResult = subscriptionClient.Subscriptions.List();
- return subscriptionListResult.Subscriptions.Select(s => s.ActiveDirectoryTenantId).Distinct().ToArray();
- }
- }
- }
-
- private List MergeSubscriptions(List subscriptionsList1,
- List subscriptionsList2)
- {
- if (subscriptionsList1 == null)
- {
- subscriptionsList1 = new List();
- }
- if (subscriptionsList2 == null)
- {
- subscriptionsList2 = new List();
- }
-
- Dictionary mergedSubscriptions = new Dictionary();
- foreach (var subscription in subscriptionsList1.Concat(subscriptionsList2))
- {
- if (mergedSubscriptions.ContainsKey(subscription.Id))
- {
- mergedSubscriptions[subscription.Id] = MergeSubscriptionProperties(mergedSubscriptions[subscription.Id],
- subscription);
- }
- else
- {
- mergedSubscriptions[subscription.Id] = subscription;
- }
- }
- return mergedSubscriptions.Values.ToList();
- }
-
- private AzureSubscription MergeSubscriptionProperties(AzureSubscription subscription1, AzureSubscription subscription2)
- {
- if (subscription1 == null || subscription2 == null)
- {
- throw new ArgumentNullException("subscription1");
- }
- if (subscription1.Id != subscription2.Id)
- {
- throw new ArgumentException("Subscription Ids do not match.");
- }
- AzureSubscription mergedSubscription = new AzureSubscription
- {
- Id = subscription1.Id,
- Name = subscription1.Name,
- Environment = subscription1.Environment,
- Account = subscription1.Account ?? subscription2.Account
- };
-
- // Merge all properties
- foreach (AzureSubscription.Property property in Enum.GetValues(typeof(AzureSubscription.Property)))
- {
- string propertyValue = subscription1.GetProperty(property) ?? subscription2.GetProperty(property);
- if (propertyValue != null)
- {
- mergedSubscription.Properties[property] = propertyValue;
- }
- }
-
- // Merge RegisteredResourceProviders
- var registeredProviders = subscription1.GetPropertyAsArray(AzureSubscription.Property.RegisteredResourceProviders)
- .Union(subscription2.GetPropertyAsArray(AzureSubscription.Property.RegisteredResourceProviders), StringComparer.CurrentCultureIgnoreCase);
-
- mergedSubscription.SetProperty(AzureSubscription.Property.RegisteredResourceProviders, registeredProviders.ToArray());
-
- // Merge SupportedMode
- var supportedModes = subscription1.GetPropertyAsArray(AzureSubscription.Property.SupportedModes)
- .Union(subscription2.GetPropertyAsArray(AzureSubscription.Property.SupportedModes), StringComparer.CurrentCultureIgnoreCase);
-
- mergedSubscription.SetProperty(AzureSubscription.Property.SupportedModes, supportedModes.ToArray());
-
- // Merge Tenants
- var tenants = subscription1.GetPropertyAsArray(AzureSubscription.Property.Tenants)
- .Union(subscription2.GetPropertyAsArray(AzureSubscription.Property.Tenants), StringComparer.CurrentCultureIgnoreCase);
-
- mergedSubscription.SetProperty(AzureSubscription.Property.Tenants, tenants.ToArray());
-
- return mergedSubscription;
- }
-
- private AzureEnvironment MergeEnvironmentProperties(AzureEnvironment environment1, AzureEnvironment environment2)
- {
- if (environment1 == null || environment2 == null)
- {
- throw new ArgumentNullException("environment1");
- }
- if (!string.Equals(environment1.Name, environment2.Name, StringComparison.InvariantCultureIgnoreCase))
- {
- throw new ArgumentException("Environment names do not match.");
- }
- AzureEnvironment mergedEnvironment = new AzureEnvironment
- {
- Name = environment1.Name
- };
-
- // Merge all properties
- foreach (AzureEnvironment.Endpoint property in Enum.GetValues(typeof(AzureEnvironment.Endpoint)))
- {
- string propertyValue = environment1.GetEndpoint(property) ?? environment2.GetEndpoint(property);
- if (propertyValue != null)
- {
- mergedEnvironment.Endpoints[property] = propertyValue;
- }
- }
-
- return mergedEnvironment;
- }
-
- private AzureAccount MergeAccountProperties(AzureAccount account1, AzureAccount account2)
- {
- if (account1 == null || account2 == null)
- {
- throw new ArgumentNullException("account1");
- }
- if (!string.Equals(account1.Id, account2.Id, StringComparison.InvariantCultureIgnoreCase))
- {
- throw new ArgumentException("Account Ids do not match.");
- }
- if (account1.Type != account2.Type)
- {
- throw new ArgumentException("Account1 types do not match.");
- }
- AzureAccount mergeAccount = new AzureAccount
- {
- Id = account1.Id,
- Type = account1.Type
- };
-
- // Merge all properties
- foreach (AzureAccount.Property property in Enum.GetValues(typeof(AzureAccount.Property)))
- {
- string propertyValue = account1.GetProperty(property) ?? account2.GetProperty(property);
- if (propertyValue != null)
- {
- mergeAccount.Properties[property] = propertyValue;
- }
- }
-
- // Merge Tenants
- var tenants = account1.GetPropertyAsArray(AzureAccount.Property.Tenants)
- .Union(account2.GetPropertyAsArray(AzureAccount.Property.Tenants), StringComparer.CurrentCultureIgnoreCase);
-
- mergeAccount.SetProperty(AzureAccount.Property.Tenants, tenants.ToArray());
-
- // Merge Subscriptions
- var subscriptions = account1.GetPropertyAsArray(AzureAccount.Property.Subscriptions)
- .Union(account2.GetPropertyAsArray(AzureAccount.Property.Subscriptions), StringComparer.CurrentCultureIgnoreCase);
-
- mergeAccount.SetProperty(AzureAccount.Property.Subscriptions, subscriptions.ToArray());
-
- return mergeAccount;
- }
-
- private IEnumerable ListResourceManagerSubscriptions(AzureAccount account, AzureEnvironment environment, SecureString password, ShowDialog promptBehavior, string[] tenants)
- {
- List result = new List();
-
- if (!environment.IsEndpointSet(AzureEnvironment.Endpoint.ResourceManager))
- {
- return result;
- }
-
- foreach (var tenant in tenants)
- {
- try
- {
- var tenantAccount = new AzureAccount();
- CopyAccount(account, tenantAccount);
- var tenantToken = AzureSession.AuthenticationFactory.Authenticate(tenantAccount, environment, tenant, password, ShowDialog.Never);
- if (string.Equals(tenantAccount.Id, account.Id, StringComparison.InvariantCultureIgnoreCase))
- {
- tenantAccount = account;
- }
-
- tenantAccount.SetOrAppendProperty(AzureAccount.Property.Tenants, new string[] { tenant });
-
- using (var subscriptionClient = AzureSession.ClientFactory.CreateCustomClient(
- new TokenCloudCredentials(tenantToken.AccessToken),
- environment.GetEndpointAsUri(AzureEnvironment.Endpoint.ResourceManager)))
- {
- var subscriptionListResult = subscriptionClient.Subscriptions.List();
- foreach (var subscription in subscriptionListResult.Subscriptions)
- {
- AzureSubscription psSubscription = new AzureSubscription
- {
- Id = new Guid(subscription.SubscriptionId),
- Name = subscription.DisplayName,
- Environment = environment.Name
- };
- psSubscription.SetProperty(AzureSubscription.Property.SupportedModes, AzureModule.AzureResourceManager.ToString());
- psSubscription.SetProperty(AzureSubscription.Property.Tenants, tenant);
- psSubscription.Account = tenantAccount.Id;
- tenantAccount.SetOrAppendProperty(AzureAccount.Property.Subscriptions, new string[] { psSubscription.Id.ToString() });
- result.Add(psSubscription);
- }
- }
-
- AddOrSetAccount(tenantAccount);
-
- }
- catch (CloudException cEx)
- {
- WriteOrThrowAadExceptionMessage(cEx);
- }
- catch (AadAuthenticationException aadEx)
- {
- WriteOrThrowAadExceptionMessage(aadEx);
- }
- }
-
- return result;
- }
-
- private void CopyAccount(AzureAccount sourceAccount, AzureAccount targetAccount)
- {
- targetAccount.Id = sourceAccount.Id;
- targetAccount.Type = sourceAccount.Type;
- }
-
- private IEnumerable ListServiceManagementSubscriptions(AzureAccount account, AzureEnvironment environment, SecureString password, ShowDialog promptBehavior, string[] tenants)
- {
- List result = new List();
-
- if (!environment.IsEndpointSet(AzureEnvironment.Endpoint.ServiceManagement))
- {
- return result;
- }
-
- foreach (var tenant in tenants)
- {
- try
- {
- var tenantAccount = new AzureAccount();
- CopyAccount(account, tenantAccount);
- var tenantToken = AzureSession.AuthenticationFactory.Authenticate(tenantAccount, environment, tenant, password, ShowDialog.Never);
- if (string.Equals(tenantAccount.Id, account.Id, StringComparison.InvariantCultureIgnoreCase))
- {
- tenantAccount = account;
- }
-
- tenantAccount.SetOrAppendProperty(AzureAccount.Property.Tenants, new string[] { tenant });
- using (var subscriptionClient = AzureSession.ClientFactory.CreateCustomClient(
- new TokenCloudCredentials(tenantToken.AccessToken),
- environment.GetEndpointAsUri(AzureEnvironment.Endpoint.ServiceManagement)))
- {
- var subscriptionListResult = subscriptionClient.Subscriptions.List();
- foreach (var subscription in subscriptionListResult.Subscriptions)
- {
- // only add the subscription if it's actually in this tenant
- if (subscription.ActiveDirectoryTenantId == tenant)
- {
- AzureSubscription psSubscription = new AzureSubscription
- {
- Id = new Guid(subscription.SubscriptionId),
- Name = subscription.SubscriptionName,
- Environment = environment.Name
- };
- psSubscription.Properties[AzureSubscription.Property.SupportedModes] =
- AzureModule.AzureServiceManagement.ToString();
- psSubscription.SetProperty(AzureSubscription.Property.Tenants,
- subscription.ActiveDirectoryTenantId);
- psSubscription.Account = tenantAccount.Id;
- tenantAccount.SetOrAppendProperty(AzureAccount.Property.Subscriptions,
- new string[] { psSubscription.Id.ToString() });
- result.Add(psSubscription);
- }
- }
- }
-
- AddOrSetAccount(tenantAccount);
- }
- catch (CloudException cEx)
- {
- WriteOrThrowAadExceptionMessage(cEx);
- }
- catch (AadAuthenticationException aadEx)
- {
- WriteOrThrowAadExceptionMessage(aadEx);
- }
- }
-
- return result;
- }
-
- private void WriteOrThrowAadExceptionMessage(AadAuthenticationException aadEx)
- {
- if (aadEx is AadAuthenticationFailedWithoutPopupException)
- {
- WriteDebugMessage(aadEx.Message);
- }
- else if (aadEx is AadAuthenticationCanceledException)
- {
- WriteWarningMessage(aadEx.Message);
- }
- else
- {
- throw aadEx;
- }
- }
-
- private void WriteOrThrowAadExceptionMessage(CloudException aadEx)
- {
- WriteDebugMessage(aadEx.Message);
- }
-
- #endregion
-
- #region Environment management
-
- public AzureEnvironment GetEnvironmentOrDefault(string name)
- {
- if (string.IsNullOrEmpty(name))
- {
- return AzureSession.CurrentContext.Environment;
- }
- else if (AzureSession.CurrentContext.Environment != null && AzureSession.CurrentContext.Environment.Name == name)
- {
- return AzureSession.CurrentContext.Environment;
- }
- else if (Profile.Environments.ContainsKey(name))
- {
- return Profile.Environments[name];
- }
- else
- {
- throw new ArgumentException(string.Format(Resources.EnvironmentNotFound, name));
- }
- }
-
- public AzureEnvironment GetEnvironment(string name, string serviceEndpoint, string resourceEndpoint)
- {
- if (serviceEndpoint == null)
- {
- // Set to invalid value
- serviceEndpoint = Guid.NewGuid().ToString();
- }
- if (resourceEndpoint == null)
- {
- // Set to invalid value
- resourceEndpoint = Guid.NewGuid().ToString();
- }
- if (name != null)
- {
- if (Profile.Environments.ContainsKey(name))
- {
- return Profile.Environments[name];
- }
- else if (AzureSession.CurrentContext.Environment != null &&
- AzureSession.CurrentContext.Environment.Name == name)
- {
- return AzureSession.CurrentContext.Environment;
- }
- }
- else
- {
- if (AzureSession.CurrentContext.Environment != null &&
- (AzureSession.CurrentContext.Environment.IsEndpointSetToValue(AzureEnvironment.Endpoint.ServiceManagement, serviceEndpoint) ||
- AzureSession.CurrentContext.Environment.IsEndpointSetToValue(AzureEnvironment.Endpoint.ResourceManager, resourceEndpoint)))
- {
- return AzureSession.CurrentContext.Environment;
- }
-
- return Profile.Environments.Values.FirstOrDefault(e =>
- e.IsEndpointSetToValue(AzureEnvironment.Endpoint.ServiceManagement, serviceEndpoint) ||
- e.IsEndpointSetToValue(AzureEnvironment.Endpoint.ResourceManager, resourceEndpoint));
- }
- return null;
- }
-
- public List ListEnvironments(string name)
- {
- if (string.IsNullOrEmpty(name))
- {
- return Profile.Environments.Values.ToList();
- }
- else if (Profile.Environments.ContainsKey(name))
- {
- return new[] { Profile.Environments[name] }.ToList();
- }
- else
- {
- return new AzureEnvironment[0].ToList();
- }
- }
-
- public AzureEnvironment RemoveEnvironment(string name)
- {
- if (string.IsNullOrEmpty(name))
- {
- throw new ArgumentNullException("Environment name needs to be specified.", "name");
- }
- if (AzureEnvironment.PublicEnvironments.ContainsKey(name))
- {
- throw new ArgumentException(Resources.RemovingDefaultEnvironmentsNotSupported, "name");
- }
-
- if (Profile.Environments.ContainsKey(name))
- {
- var environment = Profile.Environments[name];
- var subscriptions = Profile.Subscriptions.Values.Where(s => s.Environment == name).ToArray();
- foreach (var subscription in subscriptions)
- {
- RemoveSubscription(subscription.Id);
- }
- Profile.Environments.Remove(name);
- return environment;
- }
- else
- {
- throw new ArgumentException(string.Format(Resources.EnvironmentNotFound, name), "name");
- }
- }
-
- public AzureEnvironment AddOrSetEnvironment(AzureEnvironment environment)
- {
- if (environment == null)
- {
- throw new ArgumentNullException("Environment needs to be specified.", "environment");
- }
-
- if (AzureEnvironment.PublicEnvironments.ContainsKey(environment.Name))
- {
- throw new ArgumentException(Resources.ChangingDefaultEnvironmentNotSupported, "environment");
- }
-
- if (Profile.Environments.ContainsKey(environment.Name))
- {
- Profile.Environments[environment.Name] =
- MergeEnvironmentProperties(environment, Profile.Environments[environment.Name]);
- }
- else
- {
- Profile.Environments[environment.Name] = environment;
- }
-
- // Update in-memory environment
- if (AzureSession.CurrentContext != null && AzureSession.CurrentContext.Environment != null &&
- AzureSession.CurrentContext.Environment.Name == environment.Name)
- {
- AzureSession.SetCurrentContext(AzureSession.CurrentContext.Subscription,
- Profile.Environments[environment.Name],
- AzureSession.CurrentContext.Account);
- }
-
- return Profile.Environments[environment.Name];
- }
- #endregion
- }
-}
\ No newline at end of file
diff --git a/src/Common/Azure.Common.Extensions/Common/ProfileData.cs b/src/Common/Azure.Common.Extensions/Common/ProfileData.cs
deleted file mode 100644
index 049994759314..000000000000
--- a/src/Common/Azure.Common.Extensions/Common/ProfileData.cs
+++ /dev/null
@@ -1,266 +0,0 @@
-// ----------------------------------------------------------------------------------
-//
-// Copyright Microsoft Corporation
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-// http://www.apache.org/licenses/LICENSE-2.0
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-// ----------------------------------------------------------------------------------
-
-using Microsoft.Azure.Common.Extensions.Models;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Runtime.Serialization;
-using System.Text;
-
-namespace Microsoft.Azure.Common.Extensions
-{
- ///
- /// This class provides the representation of
- /// data loaded and saved into data files
- /// for AzureProfile.
- ///
- [DataContract]
- public class ProfileData
- {
- [DataMember]
- public string DefaultEnvironmentName { get; set; }
-
- [DataMember]
- public IEnumerable Environments { get; set; }
-
- [DataMember]
- public IEnumerable Subscriptions { get; set; }
- }
-
- ///
- /// This class provides the representation of
- /// data loaded and saved into data files for
- /// an individual Azure environment
- ///
- [DataContract]
- public class AzureEnvironmentData
- {
- public AzureEnvironment ToAzureEnvironment()
- {
- return new AzureEnvironment
- {
- Name = this.Name,
- Endpoints = new Dictionary
- {
- { AzureEnvironment.Endpoint.ActiveDirectoryServiceEndpointResourceId, this.ActiveDirectoryServiceEndpointResourceId },
- { AzureEnvironment.Endpoint.AdTenant, this.AdTenantUrl },
- { AzureEnvironment.Endpoint.Gallery, this.GalleryEndpoint },
- { AzureEnvironment.Endpoint.ManagementPortalUrl, this.ManagementPortalUrl },
- { AzureEnvironment.Endpoint.PublishSettingsFileUrl, this.PublishSettingsFileUrl },
- { AzureEnvironment.Endpoint.ResourceManager, this.ResourceManagerEndpoint },
- { AzureEnvironment.Endpoint.ServiceManagement, this.ServiceEndpoint },
- { AzureEnvironment.Endpoint.SqlDatabaseDnsSuffix, this.SqlDatabaseDnsSuffix },
- { AzureEnvironment.Endpoint.StorageEndpointSuffix, this.StorageEndpointSuffix },
- }
- };
- }
-
- [DataMember]
- public string Name { get; set; }
-
- [DataMember]
- public string PublishSettingsFileUrl { get; set; }
-
- [DataMember]
- public string ServiceEndpoint { get; set; }
-
- [DataMember]
- public string ResourceManagerEndpoint { get; set; }
-
- [DataMember]
- public string ManagementPortalUrl { get; set; }
-
- [DataMember]
- public string StorageEndpointSuffix { get; set; }
-
- [DataMember]
- public string AdTenantUrl { get; set; }
-
- [DataMember]
- public string CommonTenantId { get; set; }
-
- [DataMember]
- public string GalleryEndpoint { get; set; }
-
- [DataMember]
- public string ActiveDirectoryServiceEndpointResourceId { get; set; }
-
- [DataMember]
- public string SqlDatabaseDnsSuffix { get; set; }
-
- [DataMember]
- public string TrafficManagerEndpointSuffix { get; set; }
- }
-
- ///
- /// This class provides the representation of data loaded
- /// and saved into data file for an individual Azure subscription.
- ///
- [DataContract]
- public class AzureSubscriptionData
- {
- ///
- /// Constructor used by DataContractSerializer
- ///
- public AzureSubscriptionData()
- {
- }
-
- public AzureSubscription ToAzureSubscription(List envs)
- {
- AzureSubscription subscription = new AzureSubscription();
- try
- {
- subscription.Id = new Guid(this.SubscriptionId);
- }
- catch (Exception ex)
- {
- throw new ArgumentException("Subscription ID is not a valid GUID.", ex);
- }
- subscription.Name = Name;
-
- // Logic to detect what is the subscription environment rely's on having ManagementEndpoint (i.e. RDFE endpoint) set already on the subscription
- List allEnvs = envs.Union(AzureEnvironment.PublicEnvironments.Values).ToList();
- AzureEnvironment env = allEnvs.FirstOrDefault(e => e.IsEndpointSetToValue(AzureEnvironment.Endpoint.ServiceManagement, this.ManagementEndpoint));
-
- if (env != null)
- {
- subscription.Environment = env.Name;
- }
- else
- {
- subscription.Environment = EnvironmentName.AzureCloud;
- }
-
- if (!string.IsNullOrEmpty(this.ManagementCertificate))
- {
- subscription.Account = this.ManagementCertificate;
- subscription.SetProperty(AzureSubscription.Property.SupportedModes,
- AzureModule.AzureServiceManagement.ToString());
- }
-
- if (!string.IsNullOrEmpty(this.ActiveDirectoryUserId))
- {
- subscription.Account = this.ActiveDirectoryUserId;
- }
-
- if (!string.IsNullOrEmpty(this.ActiveDirectoryTenantId))
- {
- subscription.SetProperty(AzureSubscription.Property.Tenants, ActiveDirectoryTenantId);
- }
-
- if (this.IsDefault)
- {
- subscription.SetProperty(AzureSubscription.Property.Default, "True");
- }
-
- if (!string.IsNullOrEmpty(this.CloudStorageAccount))
- {
- subscription.Properties.Add(AzureSubscription.Property.StorageAccount, this.CloudStorageAccount);
- }
-
- if (this.RegisteredResourceProviders.Count() > 0)
- {
- StringBuilder providers = new StringBuilder();
- subscription.Properties.Add(AzureSubscription.Property.RegisteredResourceProviders,
- string.Join(",", RegisteredResourceProviders));
- }
-
- return subscription;
- }
-
- public IEnumerable ToAzureAccounts()
- {
- if (!string.IsNullOrEmpty(ActiveDirectoryUserId))
- {
- AzureAccount userAccount = new AzureAccount
- {
- Id = ActiveDirectoryUserId,
- Type = AzureAccount.AccountType.User
- };
-
- userAccount.SetProperty(AzureAccount.Property.Subscriptions, new Guid(this.SubscriptionId).ToString());
-
- if (!string.IsNullOrEmpty(ActiveDirectoryTenantId))
- {
- userAccount.SetProperty(AzureAccount.Property.Tenants, ActiveDirectoryTenantId);
- }
-
- yield return userAccount;
- }
-
- if (!string.IsNullOrEmpty(ManagementCertificate))
- {
- AzureAccount certificateAccount = new AzureAccount
- {
- Id = ManagementCertificate,
- Type = AzureAccount.AccountType.Certificate
- };
-
- certificateAccount.SetProperty(AzureAccount.Property.Subscriptions, new Guid(this.SubscriptionId).ToString());
-
- yield return certificateAccount;
- }
- }
-
- [DataMember]
- public string Name { get; set; }
-
- [DataMember]
- public string SubscriptionId { get; set; }
-
- [DataMember]
- public string ManagementEndpoint { get; set; }
-
- [DataMember]
- public string ResourceManagerEndpoint { get; set; }
-
- [DataMember]
- public string ActiveDirectoryEndpoint { get; set; }
-
- [DataMember]
- public string ActiveDirectoryTenantId { get; set; }
-
- [DataMember]
- public string ActiveDirectoryUserId { get; set; }
-
- [DataMember]
- public string LoginType { get; set; }
-
- [DataMember]
- public bool IsDefault { get; set; }
-
- [DataMember]
- public string ManagementCertificate { get; set; }
-
- [DataMember]
- public string CloudStorageAccount { get; set; }
-
- [DataMember]
- public IEnumerable RegisteredResourceProviders { get; set; }
-
- [DataMember]
- public string GalleryEndpoint { get; set; }
-
- [DataMember]
- public string ActiveDirectoryServiceEndpointResourceId { get; set; }
-
- [DataMember]
- public string SqlDatabaseDnsSuffix { get; set; }
-
- [DataMember]
- public string TrafficManagerEndpointSuffix { get; set; }
- }
-}
\ No newline at end of file
diff --git a/src/Common/Azure.Common.Extensions/Common/PublishSettingsImporter.cs b/src/Common/Azure.Common.Extensions/Common/PublishSettingsImporter.cs
deleted file mode 100644
index 2cad598b3159..000000000000
--- a/src/Common/Azure.Common.Extensions/Common/PublishSettingsImporter.cs
+++ /dev/null
@@ -1,95 +0,0 @@
-// ----------------------------------------------------------------------------------
-//
-// Copyright Microsoft Corporation
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-// http://www.apache.org/licenses/LICENSE-2.0
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-// ----------------------------------------------------------------------------------
-
-using Microsoft.Azure.Common.Extensions.Models;
-using Microsoft.Azure.Common.Extensions.XmlSchema;
-using System;
-using System.Collections.Generic;
-using System.IO;
-using System.Linq;
-using System.Security.Cryptography.X509Certificates;
-using System.Xml.Serialization;
-
-namespace Microsoft.Azure.Common.Extensions
-{
- ///
- /// Class that handles loading publishsettings files
- /// and turning them into AzureSubscription objects.
- ///
- public static class PublishSettingsImporter
- {
- public static IEnumerable ImportAzureSubscription(Stream stream, ProfileClient azureProfileClient, string environment)
- {
- var publishData = DeserializePublishData(stream);
- PublishDataPublishProfile profile = publishData.Items.Single();
- stream.Close();
- return profile.Subscription.Select(s => PublishSubscriptionToAzureSubscription(azureProfileClient, profile, s, environment));
- }
-
- private static PublishData DeserializePublishData(Stream stream)
- {
- var serializer = new XmlSerializer(typeof(PublishData));
- return (PublishData)serializer.Deserialize(stream);
- }
-
- private static AzureSubscription PublishSubscriptionToAzureSubscription(
- ProfileClient azureProfileClient,
- PublishDataPublishProfile profile,
- PublishDataPublishProfileSubscription s,
- string environment)
- {
- var certificate = GetCertificate(profile, s);
-
- if (string.IsNullOrEmpty(environment))
- {
- var azureEnvironment = azureProfileClient.GetEnvironment(environment, s.ServiceManagementUrl ?? profile.Url, null);
- if (azureEnvironment != null)
- {
- environment = azureEnvironment.Name;
- }
- else
- {
- environment = EnvironmentName.AzureCloud;
- }
- }
-
- return new AzureSubscription
- {
- Id = new Guid(s.Id),
- Name = s.Name,
- Environment = environment,
- Account = certificate.Thumbprint
- };
- }
-
- private static X509Certificate2 GetCertificate(PublishDataPublishProfile profile,
- PublishDataPublishProfileSubscription s)
- {
- string certificateString;
- if (!string.IsNullOrEmpty(s.ManagementCertificate))
- {
- certificateString = s.ManagementCertificate;
- }
- else
- {
- certificateString = profile.ManagementCertificate;
- }
-
- X509Certificate2 certificate = new X509Certificate2(Convert.FromBase64String(certificateString), string.Empty);
- ProfileClient.DataStore.AddCertificate(certificate);
-
- return certificate;
- }
- }
-}
diff --git a/src/Common/Azure.Common.Extensions/Common/RequiredResourceLookup.cs b/src/Common/Azure.Common.Extensions/Common/RequiredResourceLookup.cs
deleted file mode 100644
index 4219493b6d8d..000000000000
--- a/src/Common/Azure.Common.Extensions/Common/RequiredResourceLookup.cs
+++ /dev/null
@@ -1,72 +0,0 @@
-// ----------------------------------------------------------------------------------
-//
-// Copyright Microsoft Corporation
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-// http://www.apache.org/licenses/LICENSE-2.0
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-// ----------------------------------------------------------------------------------
-
-using Microsoft.WindowsAzure.Common;
-using System.Collections.Generic;
-
-namespace Microsoft.Azure.Common.Extensions
-{
- ///
- /// This class handles mapping management client types
- /// to the corresponding required resource provider names.
- ///
- internal static class RequiredResourceLookup
- {
- internal static IList RequiredProvidersForServiceManagement() where T : ServiceClient
- {
- if (typeof(T).FullName.EndsWith("WebSiteManagementClient"))
- {
- return new[] { "website" };
- }
-
- if (typeof(T).FullName.EndsWith("ManagedCacheClient"))
- {
- return new[] { "cacheservice.Caching" };
- }
-
- if (typeof(T).FullName.EndsWith("SchedulerManagementClient"))
- {
- return new[] { "scheduler.jobcollections" };
- }
-
- return new string[0];
- }
-
- internal static IList RequiredProvidersForResourceManager() where T : ServiceClient
- {
- if (typeof(T).FullName.EndsWith("ResourceManagementClient"))
- {
- return new[] {
- "Microsoft.Web",
- "microsoft.visualstudio",
- "microsoft.insights",
- "successbricks.cleardb",
- "microsoft.cache",
- "Microsoft.KeyVault"};
- }
- if (typeof(T).FullName.EndsWith("BatchManagementClient"))
- {
- return new[] { "microsoft.batch" };
- }
-
- if (typeof(T).FullName.EndsWith("DataPipelineManagementClient"))
- {
- return new[] { "Microsoft.DataFactory" };
- }
-
-
- return new string[0];
- }
- }
-}
diff --git a/src/Common/Azure.Common.Extensions/Common/Validate.cs b/src/Common/Azure.Common.Extensions/Common/Validate.cs
deleted file mode 100644
index ec24bdea9120..000000000000
--- a/src/Common/Azure.Common.Extensions/Common/Validate.cs
+++ /dev/null
@@ -1,218 +0,0 @@
-// ----------------------------------------------------------------------------------
-//
-// Copyright Microsoft Corporation
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-// http://www.apache.org/licenses/LICENSE-2.0
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-// ----------------------------------------------------------------------------------
-
-using Microsoft.Azure.Common.Extensions.Properties;
-using System;
-using System.Diagnostics.CodeAnalysis;
-using System.IO;
-using System.Linq;
-using System.Net;
-using System.Net.Sockets;
-using System.Runtime.InteropServices;
-
-namespace Microsoft.Azure.Common.Extensions
-{
- public static class Validate
- {
- [Flags]
- enum InternetConnectionState : int
- {
- INTERNET_CONNECTION_MODEM = 0x1,
- INTERNET_CONNECTION_LAN = 0x2,
- INTERNET_CONNECTION_PROXY = 0x4,
- INTERNET_RAS_INSTALLED = 0x10,
- INTERNET_CONNECTION_OFFLINE = 0x20,
- INTERNET_CONNECTION_CONFIGURED = 0x40
- }
-
- [SuppressMessage("Microsoft.Design", "CA1060:MovePInvokesToNativeMethodsClass", Justification = "Not necessary for a single p-invoke")]
- [DllImport("WININET", CharSet = CharSet.Auto)]
- static extern bool InternetGetConnectedState(ref InternetConnectionState lpdwFlags, int dwReserved);
-
- ///
- /// Validates against given string if null or empty.
- ///
- /// string variable to validate
- /// This parameter is used when the validation fails. It can contain actual message to display
- /// or parameter name to display with default message
- /// Indicates either to use messageData as actual message or parameter name
- public static void ValidateStringIsNullOrEmpty(string data, string messageData, bool useDefaultMessage = true)
- {
- if (string.IsNullOrEmpty(data))
- {
- // In this case use messageData parameter as name for null/empty string.
- if (useDefaultMessage)
- {
- throw new ArgumentException(string.Format(Resources.InvalidOrEmptyArgumentMessage, messageData));
- }
- else
- {
- // Use the message provided by the user
- throw new ArgumentException(messageData);
- }
- }
- }
-
- public static void ValidatePathName(string element, string exceptionMessage)
- {
- if (element.IndexOfAny(Path.GetInvalidPathChars()) != -1)
- {
- throw new ArgumentException(exceptionMessage);
- }
- }
-
- public static void ValidateFileName(string element, string exceptionMessage = null)
- {
- try
- {
- string fileName = Path.GetFileName(element);
-
- if (fileName.IndexOfAny(Path.GetInvalidFileNameChars()) != -1)
- {
- throw new ArgumentException(exceptionMessage ?? string.Empty);
- }
- }
- catch
- {
- throw new ArgumentException(exceptionMessage ?? string.Empty);
- }
- }
-
- public static void ValidateFileExists(string filePath, string exceptionMessage)
- {
- if (!FileUtilities.DataStore.FileExists(filePath))
- {
- throw new FileNotFoundException(exceptionMessage);
- }
- }
-
- public static void ValidateDirectoryExists(string directory, string exceptionMessage = null)
- {
- string msg = string.Format(Resources.PathDoesNotExist, directory);
-
- if (!FileUtilities.DataStore.DirectoryExists(directory))
- {
- if (!string.IsNullOrEmpty(exceptionMessage))
- {
- msg = exceptionMessage;
- }
-
- throw new FileNotFoundException(msg);
- }
- }
-
- public static void ValidateNullArgument(object item, string exceptionMessage)
- {
- if (item == null)
- {
- throw new ArgumentException(exceptionMessage);
- }
- }
-
- public static void ValidateFileExtention(string filePath, string desiredExtention)
- {
- bool invalidExtension = Convert.ToBoolean(string.Compare(Path.GetExtension(filePath), desiredExtention, true));
-
- if (invalidExtension)
- {
- throw new ArgumentException(string.Format(Resources.InvalidFileExtension, filePath, desiredExtention));
- }
- }
-
- public static void ValidateDnsName(string dnsName, string parameterName)
- {
- if (Uri.CheckHostName(dnsName) != UriHostNameType.Dns || dnsName.EndsWith("-"))
- {
- throw new ArgumentException(string.Format(Resources.InvalidDnsName, dnsName, parameterName));
- }
- }
-
- public static void ValidateDnsDoesNotExist(string dnsName)
- {
- try
- {
- Dns.GetHostEntry(dnsName);
- // Dns does exist throw exception
- //
- throw new ArgumentException(string.Format(Resources.ServiceNameExists, dnsName));
- }
- catch (SocketException)
- {
- // Dns doesn't exist
- }
- }
-
- public static void ValidateInternetConnection()
- {
- InternetConnectionState flags = 0;
-
- if (!InternetGetConnectedState(ref flags, 0))
- {
- throw new Exception(Resources.NoInternetConnection);
- }
- }
-
- public static void HasWhiteCharacter(string text, string exceptionMessage = null)
- {
- if (text.Any(char.IsWhiteSpace))
- {
- throw new ArgumentException(exceptionMessage ?? string.Empty);
- }
- }
-
- ///
- /// Make validation for given path.
- ///
- /// Path to validate
- /// message to display if this validation failed
- public static void ValidatePath(string path, string exceptionMessage)
- {
- ValidateStringIsNullOrEmpty(path, exceptionMessage, false);
- ValidatePathName(path, exceptionMessage);
- }
-
- ///
- /// Validates against given directory
- ///
- /// Directory name
- /// Name which you use to identify that directory to user (i.e. AzureSdkDirectory)
- public static void ValidateDirectoryFull(string directoryNameOnDisk, string directoryName)
- {
- BasicFileAndDirectoryValidation(directoryNameOnDisk, directoryName);
- ValidateDirectoryExists(directoryNameOnDisk, string.Format(Resources.PathDoesNotExistForElement, directoryName, directoryNameOnDisk));
- }
-
- private static void BasicFileAndDirectoryValidation(string fullPath, string name)
- {
- ValidateStringIsNullOrEmpty(fullPath, name);
- ValidateFileName(fullPath, Resources.IllegalPath);
- string directoryPath = Path.GetDirectoryName(fullPath);
- if (!string.IsNullOrEmpty(directoryPath))
- {
- ValidatePath(fullPath, Resources.IllegalPath);
- }
- }
-
- ///
- /// Validates against given file
- ///
- /// File name
- /// Name which you use to identify that directory to user (i.e. Service Settings)
- public static void ValidateFileFull(string fileNameOnDisk, string fileName)
- {
- BasicFileAndDirectoryValidation(fileNameOnDisk, fileName);
- ValidateFileExists(fileNameOnDisk, string.Format(Resources.PathDoesNotExistForElement, fileName, fileNameOnDisk));
- }
- }
-}
\ No newline at end of file
diff --git a/src/Common/Azure.Common.Extensions/Factories/AuthenticationFactory.cs b/src/Common/Azure.Common.Extensions/Factories/AuthenticationFactory.cs
deleted file mode 100644
index b50f7dd74574..000000000000
--- a/src/Common/Azure.Common.Extensions/Factories/AuthenticationFactory.cs
+++ /dev/null
@@ -1,100 +0,0 @@
-// ----------------------------------------------------------------------------------
-//
-// Copyright Microsoft Corporation
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-// http://www.apache.org/licenses/LICENSE-2.0
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-// ----------------------------------------------------------------------------------
-
-using Microsoft.Azure.Common.Extensions.Authentication;
-using Microsoft.Azure.Common.Extensions.Models;
-using Microsoft.Azure.Common.Extensions.Properties;
-using Microsoft.WindowsAzure;
-using System;
-using System.Linq;
-using System.Security;
-
-namespace Microsoft.Azure.Common.Extensions.Factories
-{
- public class AuthenticationFactory : IAuthenticationFactory
- {
- public const string CommonAdTenant = "Common";
-
- public AuthenticationFactory()
- {
- TokenProvider = new AdalTokenProvider();
- }
-
- public ITokenProvider TokenProvider { get; set; }
-
-
- public IAccessToken Authenticate(AzureAccount account, AzureEnvironment environment, string tenant, SecureString password, ShowDialog promptBehavior,
- AzureEnvironment.Endpoint resourceId = AzureEnvironment.Endpoint.ActiveDirectoryServiceEndpointResourceId)
- {
- var token = TokenProvider.GetAccessToken(GetAdalConfiguration(environment, tenant, resourceId), promptBehavior, account.Id, password, account.Type);
- account.Id = token.UserId;
- return token;
- }
- public SubscriptionCloudCredentials GetSubscriptionCloudCredentials(AzureContext context)
- {
- if (context.Subscription == null)
- {
- throw new ApplicationException(Resources.InvalidCurrentSubscription);
- }
-
- if (context.Account == null)
- {
- throw new ArgumentException(Resources.InvalidSubscriptionState);
- }
-
- if (context.Account.Type == AzureAccount.AccountType.Certificate)
- {
- var certificate = ProfileClient.DataStore.GetCertificate(context.Account.Id);
- return new CertificateCloudCredentials(context.Subscription.Id.ToString(), certificate);
- }
-
- var tenant = context.Subscription.GetPropertyAsArray(AzureSubscription.Property.Tenants)
- .Intersect(context.Account.GetPropertyAsArray(AzureAccount.Property.Tenants))
- .FirstOrDefault();
-
- if (tenant == null)
- {
- throw new ArgumentException(Resources.InvalidSubscriptionState);
- }
-
- try
- {
- var token = Authenticate(context.Account, context.Environment, tenant, null, ShowDialog.Never);
- return new AccessTokenCredential(context.Subscription.Id, token);
- }
- catch (Exception ex)
- {
- throw new ArgumentException(Resources.InvalidSubscriptionState, ex);
- }
- }
-
-
- private AdalConfiguration GetAdalConfiguration(AzureEnvironment environment, string tenantId,
- AzureEnvironment.Endpoint resourceId)
- {
- if (environment == null)
- {
- throw new ArgumentNullException("environment");
- }
- var adEndpoint = environment.Endpoints[AzureEnvironment.Endpoint.ActiveDirectory];
-
- return new AdalConfiguration
- {
- AdEndpoint = adEndpoint,
- ResourceClientUri = environment.Endpoints[resourceId],
- AdDomain = tenantId
- };
- }
- }
-}
diff --git a/src/Common/Azure.Common.Extensions/Factories/ClientFactory.cs b/src/Common/Azure.Common.Extensions/Factories/ClientFactory.cs
deleted file mode 100644
index 2211cc141c13..000000000000
--- a/src/Common/Azure.Common.Extensions/Factories/ClientFactory.cs
+++ /dev/null
@@ -1,176 +0,0 @@
-// ----------------------------------------------------------------------------------
-//
-// Copyright Microsoft Corporation
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-// http://www.apache.org/licenses/LICENSE-2.0
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-// ----------------------------------------------------------------------------------
-
-using Microsoft.Azure.Common.Extensions.Models;
-using Microsoft.Azure.Common.Extensions.Properties;
-using Microsoft.WindowsAzure;
-using Microsoft.WindowsAzure.Common;
-using System;
-using System.Collections.Generic;
-using System.Net;
-using System.Net.Http;
-using System.Net.Http.Headers;
-
-namespace Microsoft.Azure.Common.Extensions.Factories
-{
- public class ClientFactory : IClientFactory
- {
- private static readonly char[] uriPathSeparator = { '/' };
-
- private Dictionary actions;
-
- public ClientFactory()
- {
- actions = new Dictionary();
- UserAgents = new List();
- }
-
- public virtual TClient CreateClient(AzureContext context, AzureEnvironment.Endpoint endpoint) where TClient : ServiceClient
- {
- if (context == null)
- {
- throw new ApplicationException(Resources.InvalidCurrentSubscription);
- }
-
- SubscriptionCloudCredentials creds = AzureSession.AuthenticationFactory.GetSubscriptionCloudCredentials(context);
- TClient client = CreateCustomClient(creds, context.Environment.GetEndpointAsUri(endpoint));
-
- foreach (IClientAction action in actions.Values)
- {
- action.Apply(client, context, endpoint);
- }
-
- return client;
- }
-
- ///
- /// TODO: Migrate all code that references this method to use AzureContext
- ///
- ///
- ///
- ///
- ///
- public virtual TClient CreateClient(AzureSubscription subscription, AzureEnvironment.Endpoint endpoint) where TClient : ServiceClient
- {
- if (subscription == null)
- {
- throw new ApplicationException(Resources.InvalidCurrentSubscription);
- }
-
- ProfileClient profileClient = new ProfileClient();
- AzureContext context = new AzureContext
- {
- Subscription = subscription,
- Environment = profileClient.GetEnvironmentOrDefault(subscription.Environment),
- Account = profileClient.GetAccount(subscription.Account)
- };
-
- return CreateClient(context, endpoint);
- }
-
- public virtual TClient CreateCustomClient(params object[] parameters) where TClient : ServiceClient
- {
- List types = new List();
- foreach (object obj in parameters)
- {
- types.Add(obj.GetType());
- }
-
- var constructor = typeof(TClient).GetConstructor(types.ToArray());
-
- if (constructor == null)
- {
- throw new InvalidOperationException(string.Format(Resources.InvalidManagementClientType, typeof(TClient).Name));
- }
-
- TClient client = (TClient)constructor.Invoke(parameters);
-
- foreach (ProductInfoHeaderValue userAgent in UserAgents)
- {
- client.UserAgent.Add(userAgent);
- }
-
- return client;
- }
-
- public virtual HttpClient CreateHttpClient(string endpoint, ICredentials credentials)
- {
- return CreateHttpClient(endpoint, CreateHttpClientHandler(endpoint, credentials));
- }
-
- public virtual HttpClient CreateHttpClient(string endpoint, HttpMessageHandler effectiveHandler)
- {
- if (endpoint == null)
- {
- throw new ArgumentNullException("endpoint");
- }
-
- Uri serviceAddr = new Uri(endpoint);
- HttpClient client = new HttpClient(effectiveHandler)
- {
- BaseAddress = serviceAddr,
- MaxResponseContentBufferSize = 30 * 1024 * 1024
- };
-
- client.DefaultRequestHeaders.Accept.Clear();
-
- return client;
- }
-
- public static HttpClientHandler CreateHttpClientHandler(string endpoint, ICredentials credentials)
- {
- if (endpoint == null)
- {
- throw new ArgumentNullException("endpoint");
- }
-
- // Set up our own HttpClientHandler and configure it
- HttpClientHandler clientHandler = new HttpClientHandler();
-
- if (credentials != null)
- {
- // Set up credentials cache which will handle basic authentication
- CredentialCache credentialCache = new CredentialCache();
-
- // Get base address without terminating slash
- string credentialAddress = new Uri(endpoint).GetLeftPart(UriPartial.Authority).TrimEnd(uriPathSeparator);
-
- // Add credentials to cache and associate with handler
- NetworkCredential networkCredentials = credentials.GetCredential(new Uri(credentialAddress), "Basic");
- credentialCache.Add(new Uri(credentialAddress), "Basic", networkCredentials);
- clientHandler.Credentials = credentialCache;
- clientHandler.PreAuthenticate = true;
- }
-
- // Our handler is ready
- return clientHandler;
- }
-
- public void AddAction(IClientAction action)
- {
- action.ClientFactory = this;
- actions[action.GetType()] = action;
- }
-
- public void RemoveAction(Type actionType)
- {
- if (actions.ContainsKey(actionType))
- {
- actions.Remove(actionType);
- }
- }
-
- public List UserAgents { get; set; }
- }
-}
diff --git a/src/Common/Azure.Common.Extensions/Interfaces/IAuthenticationFactory.cs b/src/Common/Azure.Common.Extensions/Interfaces/IAuthenticationFactory.cs
deleted file mode 100644
index 77740ca0debe..000000000000
--- a/src/Common/Azure.Common.Extensions/Interfaces/IAuthenticationFactory.cs
+++ /dev/null
@@ -1,38 +0,0 @@
-// ----------------------------------------------------------------------------------
-//
-// Copyright Microsoft Corporation
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-// http://www.apache.org/licenses/LICENSE-2.0
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-// ----------------------------------------------------------------------------------
-
-using Microsoft.Azure.Common.Extensions.Authentication;
-using Microsoft.Azure.Common.Extensions.Models;
-using Microsoft.WindowsAzure;
-using System.Security;
-
-namespace Microsoft.Azure.Common.Extensions
-{
- public interface IAuthenticationFactory
- {
- ///
- /// Returns IAccessToken if authentication succeeds or throws an exception if authentication fails.
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- IAccessToken Authenticate(AzureAccount account, AzureEnvironment environment, string tenant, SecureString password, ShowDialog promptBehavior,
- AzureEnvironment.Endpoint resourceId = AzureEnvironment.Endpoint.ActiveDirectoryServiceEndpointResourceId);
-
- SubscriptionCloudCredentials GetSubscriptionCloudCredentials(AzureContext context);
- }
-}
diff --git a/src/Common/Azure.Common.Extensions/Interfaces/IClientFactory.cs b/src/Common/Azure.Common.Extensions/Interfaces/IClientFactory.cs
deleted file mode 100644
index 87ad3c5810e6..000000000000
--- a/src/Common/Azure.Common.Extensions/Interfaces/IClientFactory.cs
+++ /dev/null
@@ -1,43 +0,0 @@
-// ----------------------------------------------------------------------------------
-//
-// Copyright Microsoft Corporation
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-// http://www.apache.org/licenses/LICENSE-2.0
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-// ----------------------------------------------------------------------------------
-
-using Microsoft.Azure.Common.Extensions.Models;
-using Microsoft.WindowsAzure.Common;
-using System;
-using System.Collections.Generic;
-using System.Net;
-using System.Net.Http;
-using System.Net.Http.Headers;
-
-namespace Microsoft.Azure.Common.Extensions
-{
- public interface IClientFactory
- {
- TClient CreateClient(AzureContext context, AzureEnvironment.Endpoint endpoint) where TClient : ServiceClient;
-
- TClient CreateClient(AzureSubscription subscription, AzureEnvironment.Endpoint endpoint) where TClient : ServiceClient;
-
- TClient CreateCustomClient(params object[] parameters) where TClient : ServiceClient;
-
- HttpClient CreateHttpClient(string endpoint, ICredentials credentials);
-
- HttpClient CreateHttpClient(string endpoint, HttpMessageHandler effectiveHandler);
-
- void AddAction(IClientAction action);
-
- void RemoveAction(Type actionType);
-
- List UserAgents { get; set; }
- }
-}
diff --git a/src/Common/Azure.Common.Extensions/Interfaces/IDataStore.cs b/src/Common/Azure.Common.Extensions/Interfaces/IDataStore.cs
deleted file mode 100644
index 7d38fea53699..000000000000
--- a/src/Common/Azure.Common.Extensions/Interfaces/IDataStore.cs
+++ /dev/null
@@ -1,67 +0,0 @@
-// ----------------------------------------------------------------------------------
-//
-// Copyright Microsoft Corporation
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-// http://www.apache.org/licenses/LICENSE-2.0
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-// ----------------------------------------------------------------------------------
-
-using System.IO;
-using System.Security.Cryptography.X509Certificates;
-using System.Text;
-
-namespace Microsoft.Azure.Common.Extensions.Interfaces
-{
- public interface IDataStore
- {
- void WriteFile(string path, string contents);
-
- void WriteFile(string path, string content, Encoding encoding);
-
- void WriteFile(string path, byte[] contents);
-
- string ReadFileAsText(string path);
-
- Stream ReadFileAsStream(string path);
-
- byte[] ReadFileAsBytes(string path);
-
- void RenameFile(string oldPath, string newPath);
-
- void CopyFile(string oldPath, string newPath);
-
- bool FileExists(string path);
-
- void DeleteFile(string path);
-
- void DeleteDirectory(string dir);
-
- void EmptyDirectory(string dirPath);
-
- bool DirectoryExists(string path);
-
- void CreateDirectory(string path);
-
- string[] GetDirectories(string sourceDirName);
-
- string[] GetDirectories(string startDirectory, string filePattern, SearchOption options);
-
- string[] GetFiles(string sourceDirName);
-
- string[] GetFiles(string startDirectory, string filePattern, SearchOption options);
-
- FileAttributes GetFileAttributes(string path);
-
- X509Certificate2 GetCertificate(string thumbprint);
-
- void AddCertificate(X509Certificate2 cert);
-
- void RemoveCertificate(string thumbprint);
- }
-}
diff --git a/src/Common/Azure.Common.Extensions/Models/AzureAccount.Methods.cs b/src/Common/Azure.Common.Extensions/Models/AzureAccount.Methods.cs
deleted file mode 100644
index a5a3a4a61cb3..000000000000
--- a/src/Common/Azure.Common.Extensions/Models/AzureAccount.Methods.cs
+++ /dev/null
@@ -1,145 +0,0 @@
-// ----------------------------------------------------------------------------------
-//
-// Copyright Microsoft Corporation
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-// http://www.apache.org/licenses/LICENSE-2.0
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-// ----------------------------------------------------------------------------------
-
-using Microsoft.Azure.Common.Extensions.Utilities;
-using System;
-using System.Collections.Generic;
-using System.Diagnostics;
-using System.Linq;
-
-namespace Microsoft.Azure.Common.Extensions.Models
-{
- public partial class AzureAccount
- {
- public AzureAccount()
- {
- Properties = new Dictionary();
- }
-
- public string GetProperty(Property property)
- {
- return Properties.GetProperty(property);
- }
-
- public string[] GetPropertyAsArray(Property property)
- {
- return Properties.GetPropertyAsArray(property);
- }
-
- public void SetProperty(Property property, params string[] values)
- {
- Properties.SetProperty(property, values);
- }
-
- public void SetOrAppendProperty(Property property, params string[] values)
- {
- Properties.SetOrAppendProperty(property, values);
- }
-
- public bool IsPropertySet(Property property)
- {
- return Properties.IsPropertySet(property);
- }
-
- public List GetSubscriptions(AzureProfile profile)
- {
- string subscriptions = string.Empty;
- List subscriptionsList = new List();
- if (Properties.ContainsKey(Property.Subscriptions))
- {
- subscriptions = Properties[Property.Subscriptions];
- }
-
- foreach (var subscription in subscriptions.Split(new [] {','}, StringSplitOptions.RemoveEmptyEntries))
- {
- try
- {
- Guid subscriptionId = new Guid(subscription);
- Debug.Assert(profile.Subscriptions.ContainsKey(subscriptionId));
- subscriptionsList.Add(profile.Subscriptions[subscriptionId]);
- }
- catch
- {
- // Skip
- }
- }
-
- return subscriptionsList;
- }
-
- public bool HasSubscription(Guid subscriptionId)
- {
- bool exists = false;
- string subscriptions = GetProperty(Property.Subscriptions);
-
- if (!string.IsNullOrEmpty(subscriptions))
- {
- exists = subscriptions.Contains(subscriptionId.ToString());
- }
-
- return exists;
- }
-
- public void SetSubscriptions(List subscriptions)
- {
- if (subscriptions == null || subscriptions.Count == 0)
- {
- if (Properties.ContainsKey(Property.Subscriptions))
- {
- Properties.Remove(Property.Subscriptions);
- }
- }
- else
- {
- string value = string.Join(",", subscriptions.Select(s => s.Id.ToString()));
- Properties[Property.Subscriptions] = value;
- }
- }
-
- public void RemoveSubscription(Guid id)
- {
- if (HasSubscription(id))
- {
- var remainingSubscriptions = GetPropertyAsArray(Property.Subscriptions).Where(s => s != id.ToString()).ToArray();
-
- if (remainingSubscriptions.Any())
- {
- Properties[Property.Subscriptions] = string.Join(",", remainingSubscriptions);
- }
- else
- {
- Properties.Remove(Property.Subscriptions);
- }
- }
- }
-
- public override bool Equals(object obj)
- {
- var anotherAccount = obj as AzureAccount;
- if (anotherAccount == null)
- {
- return false;
- }
- else
- {
- return anotherAccount.Id == Id;
- }
- }
-
- public override int GetHashCode()
- {
- return Id.GetHashCode();
- }
- }
-}
diff --git a/src/Common/Azure.Common.Extensions/Models/AzureEnvironment.Methods.cs b/src/Common/Azure.Common.Extensions/Models/AzureEnvironment.Methods.cs
deleted file mode 100644
index a9934d8fd173..000000000000
--- a/src/Common/Azure.Common.Extensions/Models/AzureEnvironment.Methods.cs
+++ /dev/null
@@ -1,336 +0,0 @@
-// ----------------------------------------------------------------------------------
-//
-// Copyright Microsoft Corporation
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-// http://www.apache.org/licenses/LICENSE-2.0
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-// ----------------------------------------------------------------------------------
-
-using Microsoft.Azure.Common.Extensions.Properties;
-using Microsoft.Azure.Common.Extensions.Utilities;
-using System;
-using System.Collections.Generic;
-
-namespace Microsoft.Azure.Common.Extensions.Models
-{
- public partial class AzureEnvironment
- {
- ///
- /// Predefined Microsoft Azure environments
- ///
- public static Dictionary PublicEnvironments
- {
- get { return environments; }
- }
-
- private const string storageFormatTemplate = "{{0}}://{{1}}.{0}.{1}/";
-
- private string EndpointFormatFor(string service)
- {
- string suffix = GetEndpointSuffix(AzureEnvironment.Endpoint.StorageEndpointSuffix);
-
- if (!string.IsNullOrEmpty(suffix))
- {
- suffix = string.Format(storageFormatTemplate, service, suffix);
- }
-
- return suffix;
- }
-
- ///
- /// The storage service blob endpoint format.
- ///
- private string StorageBlobEndpointFormat()
- {
- return EndpointFormatFor("blob");
- }
-
- ///
- /// The storage service queue endpoint format.
- ///
- private string StorageQueueEndpointFormat()
- {
- return EndpointFormatFor("queue");
- }
-
- ///
- /// The storage service table endpoint format.
- ///
- private string StorageTableEndpointFormat()
- {
- return EndpointFormatFor("table");
- }
-
- ///
- /// The storage service file endpoint format.
- ///
- private string StorageFileEndpointFormat()
- {
- return EndpointFormatFor("file");
- }
-
- private static readonly Dictionary environments =
- new Dictionary(StringComparer.InvariantCultureIgnoreCase)
- {
- {
- EnvironmentName.AzureCloud,
- new AzureEnvironment
- {
- Name = EnvironmentName.AzureCloud,
- Endpoints = new Dictionary
- {
- { AzureEnvironment.Endpoint.PublishSettingsFileUrl, AzureEnvironmentConstants.AzurePublishSettingsFileUrl },
- { AzureEnvironment.Endpoint.ServiceManagement, AzureEnvironmentConstants.AzureServiceEndpoint },
- { AzureEnvironment.Endpoint.ResourceManager, AzureEnvironmentConstants.AzureResourceManagerEndpoint },
- { AzureEnvironment.Endpoint.ManagementPortalUrl, AzureEnvironmentConstants.AzureManagementPortalUrl },
- { AzureEnvironment.Endpoint.ActiveDirectory, AzureEnvironmentConstants.AzureActiveDirectoryEndpoint },
- { AzureEnvironment.Endpoint.ActiveDirectoryServiceEndpointResourceId, AzureEnvironmentConstants.AzureServiceEndpoint },
- { AzureEnvironment.Endpoint.StorageEndpointSuffix, AzureEnvironmentConstants.AzureStorageEndpointSuffix },
- { AzureEnvironment.Endpoint.Gallery, AzureEnvironmentConstants.GalleryEndpoint },
- { AzureEnvironment.Endpoint.SqlDatabaseDnsSuffix, AzureEnvironmentConstants.AzureSqlDatabaseDnsSuffix },
- { AzureEnvironment.Endpoint.Graph, AzureEnvironmentConstants.AzureGraphEndpoint },
- { AzureEnvironment.Endpoint.TrafficManagerDnsSuffix, AzureEnvironmentConstants.AzureTrafficManagerDnsSuffix },
- { AzureEnvironment.Endpoint.AzureKeyVaultDnsSuffix, AzureEnvironmentConstants.AzureKeyVaultDnsSuffix },
- { AzureEnvironment.Endpoint.AzureKeyVaultServiceEndpointResourceId, AzureEnvironmentConstants.AzureKeyVaultServiceEndpointResourceId },
- }
- }
- },
- {
- EnvironmentName.AzureChinaCloud,
- new AzureEnvironment
- {
- Name = EnvironmentName.AzureChinaCloud,
- Endpoints = new Dictionary
- {
- { AzureEnvironment.Endpoint.PublishSettingsFileUrl, AzureEnvironmentConstants.ChinaPublishSettingsFileUrl },
- { AzureEnvironment.Endpoint.ServiceManagement, AzureEnvironmentConstants.ChinaServiceEndpoint },
- { AzureEnvironment.Endpoint.ResourceManager, null },
- { AzureEnvironment.Endpoint.ManagementPortalUrl, AzureEnvironmentConstants.ChinaManagementPortalUrl },
- { AzureEnvironment.Endpoint.ActiveDirectory, AzureEnvironmentConstants.ChinaActiveDirectoryEndpoint },
- { AzureEnvironment.Endpoint.ActiveDirectoryServiceEndpointResourceId, AzureEnvironmentConstants.ChinaServiceEndpoint },
- { AzureEnvironment.Endpoint.StorageEndpointSuffix, AzureEnvironmentConstants.ChinaStorageEndpointSuffix },
- { AzureEnvironment.Endpoint.Gallery, null },
- { AzureEnvironment.Endpoint.SqlDatabaseDnsSuffix, AzureEnvironmentConstants.ChinaSqlDatabaseDnsSuffix },
- { AzureEnvironment.Endpoint.Graph, null },
- { AzureEnvironment.Endpoint.TrafficManagerDnsSuffix, AzureEnvironmentConstants.ChinaTrafficManagerDnsSuffix },
- }
- }
- }
- };
-
- public Uri GetEndpointAsUri(AzureEnvironment.Endpoint endpoint)
- {
- if (Endpoints.ContainsKey(endpoint))
- {
- return new Uri(Endpoints[endpoint]);
- }
-
- return null;
- }
-
- public string GetEndpoint(AzureEnvironment.Endpoint endpoint)
- {
- if (Endpoints.ContainsKey(endpoint))
- {
- return Endpoints[endpoint];
- }
-
- return null;
- }
-
- public bool IsEndpointSet(AzureEnvironment.Endpoint endpoint)
- {
- return Endpoints.IsPropertySet(endpoint);
- }
-
- public bool IsEndpointSetToValue(AzureEnvironment.Endpoint endpoint, string url)
- {
- if (url == null && !Endpoints.IsPropertySet(endpoint))
- {
- return true;
- }
- if (url != null && Endpoints.IsPropertySet(endpoint))
- {
- return GetEndpoint(endpoint)
- .Trim(new[] {'/'})
- .Equals(url.Trim(new[] {'/'}), StringComparison.InvariantCultureIgnoreCase);
- }
- return false;
- }
-
- public string GetEndpointSuffix(AzureEnvironment.Endpoint endpointSuffix)
- {
- if (Endpoints.ContainsKey(endpointSuffix))
- {
- return Endpoints[endpointSuffix];
- }
-
- return null;
- }
-
- ///
- /// Gets the endpoint for storage blob.
- ///
- /// The account name
- /// Use Https when creating the URI. Defaults to true.
- /// The fully qualified uri to the blob service
- public Uri GetStorageBlobEndpoint(string accountName, bool useHttps = true)
- {
- return new Uri(string.Format(StorageBlobEndpointFormat(), useHttps ? "https" : "http", accountName));
- }
-
- ///
- /// Gets the endpoint for storage queue.
- ///
- /// The account name
- /// Use Https when creating the URI. Defaults to true.
- /// The fully qualified uri to the queue service
- public Uri GetStorageQueueEndpoint(string accountName, bool useHttps = true)
- {
- return new Uri(string.Format(StorageQueueEndpointFormat(), useHttps ? "https" : "http", accountName));
- }
-
- ///
- /// Gets the endpoint for storage table.
- ///
- /// The account name
- /// Use Https when creating the URI. Defaults to true.
- /// The fully qualified uri to the table service
- public Uri GetStorageTableEndpoint(string accountName, bool useHttps = true)
- {
- return new Uri(string.Format(StorageTableEndpointFormat(), useHttps ? "https" : "http", accountName));
- }
-
- ///
- /// Gets the endpoint for storage file.
- ///
- /// The account name
- /// Use Https when creating the URI. Defaults to true.
- /// The fully qualified uri to the file service
- public Uri GetStorageFileEndpoint(string accountName, bool useHttps = true)
- {
- return new Uri(string.Format(StorageFileEndpointFormat(), useHttps ? "https" : "http", accountName));
- }
-
- ///
- /// Gets the management portal URI with a particular realm suffix if supplied
- ///
- /// Realm for user's account
- /// Url to management portal.
- public string GetManagementPortalUrlWithRealm(string realm = null)
- {
- if (realm != null)
- {
- realm = string.Format(Resources.PublishSettingsFileRealmFormat, realm);
- }
- else
- {
- realm = string.Empty;
- }
- return GetEndpointAsUri(Endpoint.ManagementPortalUrl) + realm;
- }
-
- ///
- /// Get the publish settings file download url with a realm suffix if needed.
- ///
- /// Realm for user's account
- /// Url to publish settings file
- public string GetPublishSettingsFileUrlWithRealm(string realm = null)
- {
- if (realm != null)
- {
- realm = string.Format(Resources.PublishSettingsFileRealmFormat, realm);
- }
- else
- {
- realm = string.Empty;
- }
- return GetEndpointAsUri(Endpoint.PublishSettingsFileUrl) + realm;
- }
-
- public enum Endpoint
- {
- ActiveDirectoryServiceEndpointResourceId,
-
- AdTenant,
-
- Gallery,
-
- ManagementPortalUrl,
-
- ServiceManagement,
-
- PublishSettingsFileUrl,
-
- ResourceManager,
-
- SqlDatabaseDnsSuffix,
-
- StorageEndpointSuffix,
-
- ActiveDirectory,
-
- Graph,
-
- TrafficManagerDnsSuffix,
-
- AzureKeyVaultDnsSuffix,
-
- AzureKeyVaultServiceEndpointResourceId,
- }
- }
-
- public static class EnvironmentName
- {
- public const string AzureCloud = "AzureCloud";
-
- public const string AzureChinaCloud = "AzureChinaCloud";
- }
-
- public static class AzureEnvironmentConstants
- {
- public const string AzureServiceEndpoint = "https://management.core.windows.net/";
-
- public const string ChinaServiceEndpoint = "https://management.core.chinacloudapi.cn/";
-
- public const string AzureResourceManagerEndpoint = "https://management.azure.com/";
-
- public const string GalleryEndpoint = "https://gallery.azure.com/";
-
- public const string AzurePublishSettingsFileUrl = "http://go.microsoft.com/fwlink/?LinkID=301775";
-
- public const string ChinaPublishSettingsFileUrl = "http://go.microsoft.com/fwlink/?LinkID=301776";
-
- public const string AzureManagementPortalUrl = "http://go.microsoft.com/fwlink/?LinkId=254433";
-
- public const string ChinaManagementPortalUrl = "http://go.microsoft.com/fwlink/?LinkId=301902";
-
- public const string AzureStorageEndpointSuffix = "core.windows.net";
-
- public const string ChinaStorageEndpointSuffix = "core.chinacloudapi.cn";
-
- public const string AzureSqlDatabaseDnsSuffix = ".database.windows.net";
-
- public const string ChinaSqlDatabaseDnsSuffix = ".database.chinacloudapi.cn";
-
- public const string AzureActiveDirectoryEndpoint = "https://login.windows.net/";
-
- public const string ChinaActiveDirectoryEndpoint = "https://login.chinacloudapi.cn/";
-
- public const string AzureGraphEndpoint = "https://graph.windows.net/";
-
- public const string AzureTrafficManagerDnsSuffix = "trafficmanager.net";
-
- public const string ChinaTrafficManagerDnsSuffix = "trafficmanager.cn";
-
- public const string AzureKeyVaultDnsSuffix = "vault.azure.net";
-
- public const string AzureKeyVaultServiceEndpointResourceId = "https://vault.azure.net";
- }
-}
diff --git a/src/Common/Azure.Common.Extensions/Models/AzureProfile.cs b/src/Common/Azure.Common.Extensions/Models/AzureProfile.cs
deleted file mode 100644
index 519dde9279fc..000000000000
--- a/src/Common/Azure.Common.Extensions/Models/AzureProfile.cs
+++ /dev/null
@@ -1,149 +0,0 @@
-// ----------------------------------------------------------------------------------
-//
-// Copyright Microsoft Corporation
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-// http://www.apache.org/licenses/LICENSE-2.0
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-// ----------------------------------------------------------------------------------
-
-using Microsoft.Azure.Common.Extensions.Interfaces;
-using Microsoft.WindowsAzure.Common.Internals;
-using System;
-using System.Collections.Generic;
-using System.IO;
-using System.Linq;
-
-namespace Microsoft.Azure.Common.Extensions.Models
-{
- public sealed class AzureProfile
- {
- private IDataStore store;
- private string profilePath;
- private string tokenCacheFile = Path.Combine(AzureSession.ProfileDirectory, AzureSession.TokenCacheFile);
-
- public AzureProfile()
- {
- Environments = new Dictionary(StringComparer.InvariantCultureIgnoreCase);
- Subscriptions = new Dictionary();
- Accounts = new Dictionary(StringComparer.InvariantCultureIgnoreCase);
- }
-
- public AzureProfile(IDataStore store, string profilePath)
- {
- this.store = store;
- this.profilePath = profilePath;
-
- Load();
- }
-
- private void Load()
- {
- Environments = new Dictionary(StringComparer.InvariantCultureIgnoreCase);
- Subscriptions = new Dictionary();
- Accounts = new Dictionary(StringComparer.InvariantCultureIgnoreCase);
- ProfileLoadErrors = new List();
-
- if (!store.DirectoryExists(AzureSession.ProfileDirectory))
- {
- store.CreateDirectory(AzureSession.ProfileDirectory);
- }
-
- if (store.FileExists(profilePath))
- {
- string contents = store.ReadFileAsText(profilePath);
-
- IProfileSerializer serializer;
-
- if (ParserHelper.IsXml(contents))
- {
- serializer = new XmlProfileSerializer();
- if (!serializer.Deserialize(contents, this))
- {
- ProfileLoadErrors.AddRange(serializer.DeserializeErrors);
- }
- }
- else if (ParserHelper.IsJson(contents))
- {
- serializer = new JsonProfileSerializer();
- if (!serializer.Deserialize(contents, this))
- {
- ProfileLoadErrors.AddRange(serializer.DeserializeErrors);
- }
- }
- }
-
- // Adding predefined environments
- foreach (AzureEnvironment env in AzureEnvironment.PublicEnvironments.Values)
- {
- Environments[env.Name] = env;
- }
- }
-
- public void Save()
- {
- // Removing predefined environments
- foreach (string env in AzureEnvironment.PublicEnvironments.Keys)
- {
- Environments.Remove(env);
- }
-
- JsonProfileSerializer jsonSerializer = new JsonProfileSerializer();
-
- string contents = jsonSerializer.Serialize(this);
- string diskContents = string.Empty;
- if (store.FileExists(profilePath))
- {
- diskContents = store.ReadFileAsText(profilePath);
- }
-
- if (diskContents != contents)
- {
- store.WriteFile(profilePath, contents);
- }
- }
-
- public List ProfileLoadErrors { get; private set; }
-
- public Dictionary Environments { get; set; }
-
- public Dictionary Subscriptions { get; set; }
-
- public Dictionary Accounts { get; set; }
-
- public AzureSubscription DefaultSubscription
- {
- get
- {
- return Subscriptions.Values.FirstOrDefault(
- s => s.Properties.ContainsKey(AzureSubscription.Property.Default));
- }
-
- set
- {
- if (value == null)
- {
- foreach (var subscription in Subscriptions.Values)
- {
- subscription.SetProperty(AzureSubscription.Property.Default, null);
- }
- }
- else if (Subscriptions.ContainsKey(value.Id))
- {
- foreach (var subscription in Subscriptions.Values)
- {
- subscription.SetProperty(AzureSubscription.Property.Default, null);
- }
-
- Subscriptions[value.Id].Properties[AzureSubscription.Property.Default] = "True";
- value.Properties[AzureSubscription.Property.Default] = "True";
- }
- }
- }
- }
-}
diff --git a/src/Common/Azure.Common.Extensions/Models/AzureSubscription.Methods.cs b/src/Common/Azure.Common.Extensions/Models/AzureSubscription.Methods.cs
deleted file mode 100644
index 030f50f89f4b..000000000000
--- a/src/Common/Azure.Common.Extensions/Models/AzureSubscription.Methods.cs
+++ /dev/null
@@ -1,70 +0,0 @@
-// ----------------------------------------------------------------------------------
-//
-// Copyright Microsoft Corporation
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-// http://www.apache.org/licenses/LICENSE-2.0
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-// ----------------------------------------------------------------------------------
-
-using Microsoft.Azure.Common.Extensions.Utilities;
-using System.Collections.Generic;
-
-namespace Microsoft.Azure.Common.Extensions.Models
-{
- public partial class AzureSubscription
- {
- public AzureSubscription()
- {
- Properties = new Dictionary();
- }
-
- public override int GetHashCode()
- {
- return Id.GetHashCode();
- }
-
- public string GetProperty(Property property)
- {
- return Properties.GetProperty(property);
- }
-
- public string[] GetPropertyAsArray(Property property)
- {
- return Properties.GetPropertyAsArray(property);
- }
-
- public void SetProperty(Property property, params string[] values)
- {
- Properties.SetProperty(property, values);
- }
-
- public void SetOrAppendProperty(Property property, params string[] values)
- {
- Properties.SetOrAppendProperty(property, values);
- }
-
- public bool IsPropertySet(Property property)
- {
- return Properties.IsPropertySet(property);
- }
-
- public override bool Equals(object obj)
- {
- var anotherSubscription = obj as AzureSubscription;
- if (anotherSubscription == null)
- {
- return false;
- }
- else
- {
- return anotherSubscription.Id == Id;
- }
- }
- }
-}
diff --git a/src/Common/Azure.Common.Extensions/Models/AzureSubscription.cs b/src/Common/Azure.Common.Extensions/Models/AzureSubscription.cs
deleted file mode 100644
index b5d6cb6b73d6..000000000000
--- a/src/Common/Azure.Common.Extensions/Models/AzureSubscription.cs
+++ /dev/null
@@ -1,57 +0,0 @@
-// ----------------------------------------------------------------------------------
-//
-// Copyright Microsoft Corporation
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-// http://www.apache.org/licenses/LICENSE-2.0
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-// ----------------------------------------------------------------------------------
-
-using System;
-using System.Collections.Generic;
-
-namespace Microsoft.Azure.Common.Extensions.Models
-{
- public partial class AzureSubscription
- {
- public Guid Id { get; set; }
-
- public string Name { get; set; }
-
- public string Environment { get; set; }
-
- public string Account { get; set; }
-
- public Dictionary Properties { get; set; }
-
- public enum Property
- {
- ///
- /// Comma separated registered resource providers, i.e.: websites,compute,hdinsight
- ///
- RegisteredResourceProviders,
-
- ///
- /// Comma separated mode names that this subscription supports, i.e.: AzureResourceManager,AzureServiceManagement
- ///
- SupportedModes,
-
- ///
- /// Associated tenants
- ///
- Tenants,
-
- ///
- /// If this property existed on the subscription indicates that it's default one.
- ///
- Default,
-
- StorageAccount
- }
- }
-}
diff --git a/src/Common/Azure.Common.Extensions/Models/DiskDataStore.cs b/src/Common/Azure.Common.Extensions/Models/DiskDataStore.cs
deleted file mode 100644
index c42bb358538b..000000000000
--- a/src/Common/Azure.Common.Extensions/Models/DiskDataStore.cs
+++ /dev/null
@@ -1,181 +0,0 @@
-// ----------------------------------------------------------------------------------
-//
-// Copyright Microsoft Corporation
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-// http://www.apache.org/licenses/LICENSE-2.0
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-// ----------------------------------------------------------------------------------
-
-using Microsoft.Azure.Common.Extensions.Interfaces;
-using Microsoft.Azure.Common.Extensions.Properties;
-using System;
-using System.IO;
-using System.Security.Cryptography.X509Certificates;
-using System.Text;
-
-namespace Microsoft.Azure.Common.Extensions.Models
-{
- public class DiskDataStore : IDataStore
- {
- public void WriteFile(string path, string contents)
- {
- File.WriteAllText(path, contents);
- }
-
- public void WriteFile(string path, string contents, Encoding encoding)
- {
- File.WriteAllText(path, contents, encoding);
- }
-
- public void WriteFile(string path, byte[] contents)
- {
- File.WriteAllBytes(path, contents);
- }
-
- public string ReadFileAsText(string path)
- {
- return File.ReadAllText(path);
- }
-
- public byte[] ReadFileAsBytes(string path)
- {
- return File.ReadAllBytes(path);
- }
-
- public Stream ReadFileAsStream(string path)
- {
- return File.Open(path, FileMode.Open, FileAccess.Read);
- }
-
- public void RenameFile(string oldPath, string newPath)
- {
- File.Move(oldPath, newPath);
- }
-
- public void CopyFile(string oldPath, string newPath)
- {
- File.Copy(oldPath, newPath, true);
- }
-
- public bool FileExists(string path)
- {
- return File.Exists(path);
- }
-
- public void DeleteFile(string path)
- {
- File.Delete(path);
- }
-
- public void DeleteDirectory(string dir)
- {
- Directory.Delete(dir, true);
- }
-
- public void EmptyDirectory(string dirPath)
- {
- foreach (var filePath in Directory.GetFiles(dirPath))
- {
- File.Delete(filePath);
- }
- }
-
- public string[] GetFiles(string sourceDirName)
- {
- return Directory.GetFiles(sourceDirName);
- }
-
- public string[] GetFiles(string startDirectory, string filePattern, SearchOption options)
- {
- return Directory.GetFiles(startDirectory, filePattern, options);
- }
-
- public FileAttributes GetFileAttributes(string path)
- {
- return File.GetAttributes(path);
- }
-
- public X509Certificate2 GetCertificate(string thumbprint)
- {
- if (thumbprint == null)
- {
- return null;
- }
- else
- {
- Validate.ValidateStringIsNullOrEmpty(thumbprint, "certificate thumbprint");
- X509Certificate2Collection certificates;
- if (TryFindCertificatesInStore(thumbprint, StoreLocation.CurrentUser, out certificates) ||
- TryFindCertificatesInStore(thumbprint, StoreLocation.LocalMachine, out certificates))
- {
- return certificates[0];
- }
- else
- {
- throw new ArgumentException(string.Format(Resources.CertificateNotFoundInStore, thumbprint));
- }
- }
- }
-
- private static bool TryFindCertificatesInStore(string thumbprint,
- StoreLocation location, out X509Certificate2Collection certificates)
- {
- X509Store store = new X509Store(StoreName.My, location);
- store.Open(OpenFlags.ReadOnly);
- certificates = store.Certificates.Find(X509FindType.FindByThumbprint, thumbprint, false);
- store.Close();
-
- return certificates.Count > 0;
- }
-
- public void AddCertificate(X509Certificate2 certificate)
- {
- Validate.ValidateNullArgument(certificate, Resources.InvalidCertificate);
- X509Store store = new X509Store(StoreName.My, StoreLocation.CurrentUser);
- store.Open(OpenFlags.ReadWrite);
- store.Add(certificate);
- store.Close();
- }
-
- public void RemoveCertificate(string thumbprint)
- {
- if (thumbprint != null)
- {
- var certificate = GetCertificate(thumbprint);
- if (certificate != null)
- {
- X509Store store = new X509Store(StoreName.My, StoreLocation.CurrentUser);
- store.Open(OpenFlags.ReadWrite);
- store.Remove(certificate);
- store.Close();
- }
- }
- }
-
- public bool DirectoryExists(string path)
- {
- return Directory.Exists(path);
- }
-
- public void CreateDirectory(string path)
- {
- Directory.CreateDirectory(path);
- }
-
- public string[] GetDirectories(string sourceDirName)
- {
- return Directory.GetDirectories(sourceDirName);
- }
-
- public string[] GetDirectories(string startDirectory, string filePattern, SearchOption options)
- {
- return Directory.GetDirectories(startDirectory, filePattern, options);
- }
- }
-}
diff --git a/src/Common/Azure.Common.Extensions/Models/IClientAction.cs b/src/Common/Azure.Common.Extensions/Models/IClientAction.cs
deleted file mode 100644
index e05ff570b7b0..000000000000
--- a/src/Common/Azure.Common.Extensions/Models/IClientAction.cs
+++ /dev/null
@@ -1,25 +0,0 @@
-// ----------------------------------------------------------------------------------
-//
-// Copyright Microsoft Corporation
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-// http://www.apache.org/licenses/LICENSE-2.0
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-// ----------------------------------------------------------------------------------
-
-using Microsoft.WindowsAzure.Common;
-
-namespace Microsoft.Azure.Common.Extensions.Models
-{
- public interface IClientAction
- {
- IClientFactory ClientFactory { get; set; }
-
- void Apply(TClient client, AzureContext context, AzureEnvironment.Endpoint endpoint) where TClient : ServiceClient;
- }
-}
diff --git a/src/Common/Azure.Common.Extensions/Models/JsonProfileSerializer.cs b/src/Common/Azure.Common.Extensions/Models/JsonProfileSerializer.cs
deleted file mode 100644
index 29ddb1c1400c..000000000000
--- a/src/Common/Azure.Common.Extensions/Models/JsonProfileSerializer.cs
+++ /dev/null
@@ -1,92 +0,0 @@
-// ----------------------------------------------------------------------------------
-//
-// Copyright Microsoft Corporation
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-// http://www.apache.org/licenses/LICENSE-2.0
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-// ----------------------------------------------------------------------------------
-
-using Microsoft.Azure.Common.Extensions.Interfaces;
-using Newtonsoft.Json;
-using Newtonsoft.Json.Linq;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-
-namespace Microsoft.Azure.Common.Extensions.Models
-{
- public class JsonProfileSerializer : IProfileSerializer
- {
- public string Serialize(AzureProfile profile)
- {
- return JsonConvert.SerializeObject(new
- {
- Environments = profile.Environments.Values.ToList(),
- Subscriptions = profile.Subscriptions.Values.ToList(),
- Accounts = profile.Accounts.Values.ToList()
- }, Formatting.Indented);
- }
-
- public bool Deserialize(string contents, AzureProfile profile)
- {
- DeserializeErrors = new List();
-
- try
- {
- var jsonProfile = JObject.Parse(contents);
-
- foreach (var env in jsonProfile["Environments"])
- {
- try
- {
- profile.Environments[(string) env["Name"]] =
- JsonConvert.DeserializeObject(env.ToString());
- }
- catch (Exception ex)
- {
- DeserializeErrors.Add(ex.Message);
- }
- }
-
- foreach (var subscription in jsonProfile["Subscriptions"])
- {
- try
- {
- profile.Subscriptions[new Guid((string) subscription["Id"])] =
- JsonConvert.DeserializeObject(subscription.ToString());
- }
- catch (Exception ex)
- {
- DeserializeErrors.Add(ex.Message);
- }
- }
-
- foreach (var account in jsonProfile["Accounts"])
- {
- try
- {
- profile.Accounts[(string) account["Id"]] =
- JsonConvert.DeserializeObject(account.ToString());
- }
- catch (Exception ex)
- {
- DeserializeErrors.Add(ex.Message);
- }
- }
- }
- catch (Exception ex)
- {
- DeserializeErrors.Add(ex.Message);
- }
- return DeserializeErrors.Count == 0;
- }
-
- public IList DeserializeErrors { get; private set; }
- }
-}
diff --git a/src/Common/Azure.Common.Extensions/Models/RPRegistrationAction.cs b/src/Common/Azure.Common.Extensions/Models/RPRegistrationAction.cs
deleted file mode 100644
index 1d8cc5ce350a..000000000000
--- a/src/Common/Azure.Common.Extensions/Models/RPRegistrationAction.cs
+++ /dev/null
@@ -1,138 +0,0 @@
-// ----------------------------------------------------------------------------------
-//
-// Copyright Microsoft Corporation
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-// http://www.apache.org/licenses/LICENSE-2.0
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-// ----------------------------------------------------------------------------------
-
-using Microsoft.Azure.Management.Resources;
-using Microsoft.WindowsAzure;
-using Microsoft.WindowsAzure.Common;
-using Microsoft.WindowsAzure.Management;
-using System.Collections.Generic;
-using System.Diagnostics;
-using System.Linq;
-using System.Net;
-
-namespace Microsoft.Azure.Common.Extensions.Models
-{
- public class RPRegistrationAction : IClientAction
- {
- ///
- /// Registers resource providers for Sparta.
- ///
- /// The client type
- private void RegisterResourceManagerProviders(AzureContext context) where T : ServiceClient
- {
- var providersToRegister = RequiredResourceLookup.RequiredProvidersForResourceManager();
- var registeredProviders = context.Subscription.GetPropertyAsArray(AzureSubscription.Property.RegisteredResourceProviders);
- var unregisteredProviders = providersToRegister.Where(p => !registeredProviders.Contains(p)).ToList();
- var successfullyRegisteredProvider = new List();
- SubscriptionCloudCredentials creds = AzureSession.AuthenticationFactory.GetSubscriptionCloudCredentials(context);
-
- if (unregisteredProviders.Count > 0)
- {
- using (var client = ClientFactory.CreateCustomClient(creds, context.Environment.GetEndpointAsUri(AzureEnvironment.Endpoint.ResourceManager)))
- {
- foreach (string provider in unregisteredProviders)
- {
- try
- {
- client.Providers.Register(provider);
- successfullyRegisteredProvider.Add(provider);
- }
- catch
- {
- // Ignore this as the user may not have access to service management endpoint or the provider is already registered
- }
- }
- }
-
- UpdateSubscriptionRegisteredProviders(context.Subscription, successfullyRegisteredProvider);
- }
- }
-
- ///
- /// Registers resource providers for RDFE.
- ///
- /// The client type
- private void RegisterServiceManagementProviders(AzureContext context) where T : ServiceClient
- {
- var credentials = AzureSession.AuthenticationFactory.GetSubscriptionCloudCredentials(context);
- var providersToRegister = RequiredResourceLookup.RequiredProvidersForServiceManagement();
- var registeredProviders = context.Subscription.GetPropertyAsArray(AzureSubscription.Property.RegisteredResourceProviders);
- var unregisteredProviders = providersToRegister.Where(p => !registeredProviders.Contains(p)).ToList();
- var successfullyRegisteredProvider = new List();
-
- if (unregisteredProviders.Count > 0)
- {
- using (var client = new ManagementClient(credentials, context.Environment.GetEndpointAsUri(AzureEnvironment.Endpoint.ServiceManagement)))
- {
- foreach (var provider in unregisteredProviders)
- {
- try
- {
- client.Subscriptions.RegisterResource(provider);
- }
- catch (CloudException ex)
- {
- if (ex.Response.StatusCode != HttpStatusCode.Conflict && ex.Response.StatusCode != HttpStatusCode.NotFound)
- {
- // Conflict means already registered, that's OK.
- // NotFound means there is no registration support, like Windows Azure Pack.
- // Otherwise it's a failure.
- throw;
- }
- }
- successfullyRegisteredProvider.Add(provider);
- }
- }
-
- UpdateSubscriptionRegisteredProviders(context.Subscription, successfullyRegisteredProvider);
- }
- }
-
- private void UpdateSubscriptionRegisteredProviders(AzureSubscription subscription, List providers)
- {
- if (providers != null && providers.Count > 0)
- {
- subscription.SetOrAppendProperty(AzureSubscription.Property.RegisteredResourceProviders,
- providers.ToArray());
- try
- {
- ProfileClient profileClient = new ProfileClient();
- profileClient.AddOrSetSubscription(subscription);
- profileClient.Profile.Save();
- }
- catch (KeyNotFoundException)
- {
- // if using a subscription data file, do not write registration to disk
- // long term solution is using -Profile parameter
- }
- }
- }
-
- public void Apply(TClient client, AzureContext context, AzureEnvironment.Endpoint endpoint) where TClient : ServiceClient
- {
- Debug.Assert(ClientFactory != null);
-
- if (endpoint == AzureEnvironment.Endpoint.ServiceManagement)
- {
- RegisterServiceManagementProviders(context);
- }
- else if (endpoint == AzureEnvironment.Endpoint.ResourceManager)
- {
- RegisterResourceManagerProviders(context);
- }
- }
-
- public IClientFactory ClientFactory { get; set; }
- }
-}
diff --git a/src/Common/Azure.Common.Extensions/Models/XmlProfileSerializer.cs b/src/Common/Azure.Common.Extensions/Models/XmlProfileSerializer.cs
deleted file mode 100644
index f7290949bbfd..000000000000
--- a/src/Common/Azure.Common.Extensions/Models/XmlProfileSerializer.cs
+++ /dev/null
@@ -1,96 +0,0 @@
-// ----------------------------------------------------------------------------------
-//
-// Copyright Microsoft Corporation
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-// http://www.apache.org/licenses/LICENSE-2.0
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-// ----------------------------------------------------------------------------------
-
-using Microsoft.Azure.Common.Extensions.Interfaces;
-using System;
-using System.Collections.Generic;
-using System.Diagnostics;
-using System.IO;
-using System.Linq;
-using System.Runtime.Serialization;
-using System.Text;
-
-namespace Microsoft.Azure.Common.Extensions.Models
-{
- public class XmlProfileSerializer : IProfileSerializer
- {
- public string Serialize(AzureProfile obj)
- {
- // We do not use the serialize for xml serializer anymore and rely solely on the JSON serializer.
- throw new NotImplementedException();
- }
-
- public bool Deserialize(string contents, AzureProfile profile)
- {
- ProfileData data = null;
- Debug.Assert(profile != null);
-
- DeserializeErrors = new List();
-
- DataContractSerializer serializer = new DataContractSerializer(typeof(ProfileData));
- using (MemoryStream s = new MemoryStream(Encoding.UTF8.GetBytes(contents ?? "")))
- {
- data = (ProfileData)serializer.ReadObject(s);
- }
-
- if (data != null)
- {
- foreach (AzureEnvironmentData oldEnv in data.Environments)
- {
- profile.Environments[oldEnv.Name] = oldEnv.ToAzureEnvironment();
- }
-
- List envs = profile.Environments.Values.ToList();
- foreach (AzureSubscriptionData oldSubscription in data.Subscriptions)
- {
- try
- {
- var newSubscription = oldSubscription.ToAzureSubscription(envs);
- if (newSubscription.Account == null)
- {
- continue;
- }
-
- var newAccounts = oldSubscription.ToAzureAccounts();
- foreach (var account in newAccounts)
- {
- if (profile.Accounts.ContainsKey(account.Id))
- {
- profile.Accounts[account.Id].SetOrAppendProperty(AzureAccount.Property.Tenants,
- account.GetPropertyAsArray(AzureAccount.Property.Tenants));
- profile.Accounts[account.Id].SetOrAppendProperty(AzureAccount.Property.Subscriptions,
- account.GetPropertyAsArray(AzureAccount.Property.Subscriptions));
- }
- else
- {
- profile.Accounts[account.Id] = account;
- }
- }
-
- profile.Subscriptions[newSubscription.Id] = newSubscription;
- }
- catch (Exception ex)
- {
- // Skip subscription if failed to load
- DeserializeErrors.Add(ex.Message);
- }
- }
- }
-
- return DeserializeErrors.Count == 0;
- }
-
- public IList DeserializeErrors { get; private set; }
- }
-}
diff --git a/src/Common/Azure.Common.Extensions/Properties/Resources.Designer.cs b/src/Common/Azure.Common.Extensions/Properties/Resources.Designer.cs
deleted file mode 100644
index 4254763922a4..000000000000
--- a/src/Common/Azure.Common.Extensions/Properties/Resources.Designer.cs
+++ /dev/null
@@ -1,4272 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by a tool.
-// Runtime Version:4.0.30319.34014
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-namespace Microsoft.Azure.Common.Extensions.Properties
-{
-
-
- ///
- /// A strongly-typed resource class, for looking up localized strings, etc.
- ///
- // This class was auto-generated by the StronglyTypedResourceBuilder
- // class via a tool like ResGen or Visual Studio.
- // To add or remove a member, edit your .ResX file then rerun ResGen
- // with the /str option, or rebuild your VS project.
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
- public class Resources {
-
- private static global::System.Resources.ResourceManager resourceMan;
-
- private static global::System.Globalization.CultureInfo resourceCulture;
-
- [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
- internal Resources() {
- }
-
- ///
- /// Returns the cached ResourceManager instance used by this class.
- ///
- [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
- public static global::System.Resources.ResourceManager ResourceManager {
- get {
- if (object.ReferenceEquals(resourceMan, null)) {
- global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Microsoft.Azure.Common.Extensions.Properties.Resources", typeof(Resources).Assembly);
- resourceMan = temp;
- }
- return resourceMan;
- }
- }
-
- ///
- /// Overrides the current thread's CurrentUICulture property for all
- /// resource lookups using this strongly typed resource class.
- ///
- [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
- public static global::System.Globalization.CultureInfo Culture {
- get {
- return resourceCulture;
- }
- set {
- resourceCulture = value;
- }
- }
-
- ///
- /// Looks up a localized string similar to The remote server returned an error: (401) Unauthorized..
- ///
- public static string AccessDeniedExceptionMessage {
- get {
- return ResourceManager.GetString("AccessDeniedExceptionMessage", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Account id doesn't match one in subscription..
- ///
- public static string AccountIdDoesntMatchSubscription {
- get {
- return ResourceManager.GetString("AccountIdDoesntMatchSubscription", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Account "{0}" has been added..
- ///
- public static string AddAccountAdded {
- get {
- return ResourceManager.GetString("AddAccountAdded", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to To switch to a different subscription, please use Select-AzureSubscription..
- ///
- public static string AddAccountChangeSubscription {
- get {
- return ResourceManager.GetString("AddAccountChangeSubscription", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Skipping external tenant {0}, because you are using a guest or a foreign principal object identity. In order to access this tenant, please run Add-AzureAccount without "-Credential"..
- ///
- public static string AddAccountNonInteractiveGuestOrFpo {
- get {
- return ResourceManager.GetString("AddAccountNonInteractiveGuestOrFpo", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Subscription "{0}" is selected as the default subscription..
- ///
- public static string AddAccountShowDefaultSubscription {
- get {
- return ResourceManager.GetString("AddAccountShowDefaultSubscription", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to To view all the subscriptions, please use Get-AzureSubscription..
- ///
- public static string AddAccountViewSubscriptions {
- get {
- return ResourceManager.GetString("AddAccountViewSubscriptions", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Add-On {0} is created successfully..
- ///
- public static string AddOnCreatedMessage {
- get {
- return ResourceManager.GetString("AddOnCreatedMessage", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Add-on name {0} is already used..
- ///
- public static string AddOnNameAlreadyUsed {
- get {
- return ResourceManager.GetString("AddOnNameAlreadyUsed", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Add-On {0} not found..
- ///
- public static string AddOnNotFound {
- get {
- return ResourceManager.GetString("AddOnNotFound", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Add-on {0} is removed successfully..
- ///
- public static string AddOnRemovedMessage {
- get {
- return ResourceManager.GetString("AddOnRemovedMessage", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Add-On {0} is updated successfully..
- ///
- public static string AddOnUpdatedMessage {
- get {
- return ResourceManager.GetString("AddOnUpdatedMessage", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Role has been created at {0}\{1}..
- ///
- public static string AddRoleMessageCreate {
- get {
- return ResourceManager.GetString("AddRoleMessageCreate", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Role has been created at {0}\{1}. For easy access to Microsoft Azure services from your application code, install the Microsoft Azure client library for Node.js by running ‘npm install azure’..
- ///
- public static string AddRoleMessageCreateNode {
- get {
- return ResourceManager.GetString("AddRoleMessageCreateNode", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Role has been created at {0}\{1}. For easy access to Microsoft Azure services from your application code, install the Microsoft Azure client library for PHP by running "pear Azure/Azure"..
- ///
- public static string AddRoleMessageCreatePHP {
- get {
- return ResourceManager.GetString("AddRoleMessageCreatePHP", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Role has been created at {0}\{1}. For easy access to Microsoft Azure services from your application code, install the Microsoft Azure client library for Python by running "pip Azure"..
- ///
- public static string AddRoleMessageCreatePython {
- get {
- return ResourceManager.GetString("AddRoleMessageCreatePython", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Unable to set role permissions. Please give the 'Network Service' user 'Read & execute' and 'Modify' permissions to the role folder, or run PowerShell as an Administrator.
- ///
- public static string AddRoleMessageInsufficientPermissions {
- get {
- return ResourceManager.GetString("AddRoleMessageInsufficientPermissions", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to A role name '{0}' already exists.
- ///
- public static string AddRoleMessageRoleExists {
- get {
- return ResourceManager.GetString("AddRoleMessageRoleExists", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Profile {0} already has an endpoint with name {1}.
- ///
- public static string AddTrafficManagerEndpointFailed {
- get {
- return ResourceManager.GetString("AddTrafficManagerEndpointFailed", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Windows Azure Powershell\.
- ///
- public static string AzureDirectory {
- get {
- return ResourceManager.GetString("AzureDirectory", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Windows Azure Powershell.
- ///
- public static string AzureDirectoryName {
- get {
- return ResourceManager.GetString("AzureDirectoryName", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Emulator.
- ///
- public static string AzureEmulatorDirectory {
- get {
- return ResourceManager.GetString("AzureEmulatorDirectory", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Azure Emulator is not installed and is required.
- ///
- public static string AzureEmulatorNotInstalledMessage {
- get {
- return ResourceManager.GetString("AzureEmulatorNotInstalledMessage", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Azure Emulator\emulator.
- ///
- public static string AzureEmulatorPathPortion {
- get {
- return ResourceManager.GetString("AzureEmulatorPathPortion", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to SOFTWARE\Microsoft\Windows Azure Emulator.
- ///
- public static string AzureEmulatorRegistryKey {
- get {
- return ResourceManager.GetString("AzureEmulatorRegistryKey", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Azure service management error
- ///{0}.
- ///
- public static string AzureException_WrapExistingError_DetailedErrorFormat {
- get {
- return ResourceManager.GetString("AzureException_WrapExistingError_DetailedErrorFormat", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to https://manage.Azure.com.
- ///
- public static string AzurePortalUrl {
- get {
- return ResourceManager.GetString("AzurePortalUrl", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to AZURE_PORTAL_URL.
- ///
- public static string AzurePortalUrlEnv {
- get {
- return ResourceManager.GetString("AzurePortalUrlEnv", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Azure SDK\{0}\.
- ///
- public static string AzureSdkDirectory {
- get {
- return ResourceManager.GetString("AzureSdkDirectory", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to InstallPath.
- ///
- public static string AzureSdkInstallPathRegistryKeyValue {
- get {
- return ResourceManager.GetString("AzureSdkInstallPathRegistryKeyValue", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to SOFTWARE\Microsoft\Microsoft SDKs\ServiceHosting.
- ///
- public static string AzureSdkRegistryKeyName {
- get {
- return ResourceManager.GetString("AzureSdkRegistryKeyName", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to The installed Azure SDK version is not supported. Make sure you version is between {0} and {1} inclusive.
- ///
- public static string AzureSdkVersionNotSupported {
- get {
- return ResourceManager.GetString("AzureSdkVersionNotSupported", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Azure Authoring Tools are not installed and are required. Installation of Azure SDK for .NET is recommended with Microsoft Web Platform Installer (PI) available at http://www.microsoft.com/web/downloads/platform.aspx..
- ///
- public static string AzureToolsNotInstalledMessage {
- get {
- return ResourceManager.GetString("AzureToolsNotInstalledMessage", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Base Uri was empty..
- ///
- public static string BaseUriEmpty {
- get {
- return ResourceManager.GetString("BaseUriEmpty", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to {0} begin processing without ParameterSet..
- ///
- public static string BeginProcessingWithoutParameterSetLog {
- get {
- return ResourceManager.GetString("BeginProcessingWithoutParameterSetLog", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to {0} begin processing with ParameterSet '{1}'..
- ///
- public static string BeginProcessingWithParameterSetLog {
- get {
- return ResourceManager.GetString("BeginProcessingWithParameterSetLog", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Blob with the name {0} already exists in the account..
- ///
- public static string BlobAlreadyExistsInTheAccount {
- get {
- return ResourceManager.GetString("BlobAlreadyExistsInTheAccount", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to https://{0}.blob.core.windows.net/.
- ///
- public static string BlobEndpointUri {
- get {
- return ResourceManager.GetString("BlobEndpointUri", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to AZURE_BLOBSTORAGE_TEMPLATE.
- ///
- public static string BlobEndpointUriEnv {
- get {
- return ResourceManager.GetString("BlobEndpointUriEnv", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Memcache is already enabled for role '{0}'..
- ///
- public static string CacheAlreadyEnabledMessage {
- get {
- return ResourceManager.GetString("CacheAlreadyEnabledMessage", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to <configuration>
- /// <configSections>
- /// <section name="dataCacheClients" type="Microsoft.ApplicationServer.Caching.DataCacheClientsSection, Microsoft.ApplicationServer.Caching.Core" allowLocation="true" allowDefinition="Everywhere" />
- /// </configSections>
- /// <dataCacheClients>
- /// <tracing sinkType="DiagnosticSink" traceLevel="Error" />
- /// <dataCacheClient name="DefaultShimConfig" useLegacyProtocol="false">
- /// <autoDiscover isEnabled="true" identifier="$RoleName$" />
- /// </dataCacheClient>
- /// </da [rest of string was truncated]";.
- ///
- public static string CacheAutoDiscoveryConfig {
- get {
- return ResourceManager.GetString("CacheAutoDiscoveryConfig", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Microsoft.Azure.Plugins.Caching.ClientDiagnosticLevel.
- ///
- public static string CacheClientDiagnosticLevelAssemblyName {
- get {
- return ResourceManager.GetString("CacheClientDiagnosticLevelAssemblyName", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to DiagnosticStore.
- ///
- public static string CacheDiagnosticStoreName {
- get {
- return ResourceManager.GetString("CacheDiagnosticStoreName", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Please upgrade the cache runtime of role '{0}' to '{1}' using Set-AzureServiceProjectRole -RoleName {0} -Runtime Cache -Version {1}.
- ///
- public static string CacheMismatchMessage {
- get {
- return ResourceManager.GetString("CacheMismatchMessage", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to CACHERUNTIMEURL.
- ///
- public static string CacheRuntimeUrl {
- get {
- return ResourceManager.GetString("CacheRuntimeUrl", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to cache.
- ///
- public static string CacheRuntimeValue {
- get {
- return ResourceManager.GetString("CacheRuntimeValue", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to CacheRuntimeVersion.
- ///
- public static string CacheRuntimeVersionKey {
- get {
- return ResourceManager.GetString("CacheRuntimeVersionKey", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Resources\Scaffolding\Cache.
- ///
- public static string CacheScaffolding {
- get {
- return ResourceManager.GetString("CacheScaffolding", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to setup_cache.cmd > cache_log.txt.
- ///
- public static string CacheStartupCommand {
- get {
- return ResourceManager.GetString("CacheStartupCommand", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Installing caching version {0} for Role '{1}' (the caching version locally installed is: {2}).
- ///
- public static string CacheVersionWarningText {
- get {
- return ResourceManager.GetString("CacheVersionWarningText", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Microsoft.Azure.Plugins.Caching.CacheSizePercentage.
- ///
- public static string CachingCacheSizePercentageSettingName {
- get {
- return ResourceManager.GetString("CachingCacheSizePercentageSettingName", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Microsoft.Azure.Plugins.Caching.ConfigStoreConnectionString.
- ///
- public static string CachingConfigStoreConnectionStringSettingName {
- get {
- return ResourceManager.GetString("CachingConfigStoreConnectionStringSettingName", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to DefaultEndpointsProtocol=https;AccountName={0};AccountKey={1}.
- ///
- public static string CachingConfigStoreConnectionStringSettingValue {
- get {
- return ResourceManager.GetString("CachingConfigStoreConnectionStringSettingValue", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Caching.
- ///
- public static string CachingModuleName {
- get {
- return ResourceManager.GetString("CachingModuleName", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Cannot find {0} with name {1}..
- ///
- public static string CannotFind {
- get {
- return ResourceManager.GetString("CannotFind", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Deployment for service {0} with {1} slot doesn't exist.
- ///
- public static string CannotFindDeployment {
- get {
- return ResourceManager.GetString("CannotFindDeployment", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Can't find valid Microsoft Azure role in current directory {0}.
- ///
- public static string CannotFindRole {
- get {
- return ResourceManager.GetString("CannotFindRole", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to service {0} configuration file (ServiceConfiguration.Cloud.cscfg) is either null or doesn't exist.
- ///
- public static string CannotFindServiceConfigurationFile {
- get {
- return ResourceManager.GetString("CannotFindServiceConfigurationFile", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Invalid service path! Cannot locate ServiceDefinition.csdef in current folder or parent folders..
- ///
- public static string CannotFindServiceRoot {
- get {
- return ResourceManager.GetString("CannotFindServiceRoot", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to The subscription named {0} with id {1} is not currently imported. You must import this subscription before it can be updated..
- ///
- public static string CannotUpdateUnknownSubscription {
- get {
- return ResourceManager.GetString("CannotUpdateUnknownSubscription", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to ManagementCertificate.
- ///
- public static string CertificateElementName {
- get {
- return ResourceManager.GetString("CertificateElementName", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to certificate.pfx.
- ///
- public static string CertificateFileName {
- get {
- return ResourceManager.GetString("CertificateFileName", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Certificate imported into CurrentUser\My\{0}.
- ///
- public static string CertificateImportedMessage {
- get {
- return ResourceManager.GetString("CertificateImportedMessage", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to No certificate was found in the certificate store with thumbprint {0}.
- ///
- public static string CertificateNotFoundInStore {
- get {
- return ResourceManager.GetString("CertificateNotFoundInStore", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to No certificate was found in the certificate store with thumbprint {0}.
- ///
- public static string CertificateNotFoundInStore1 {
- get {
- return ResourceManager.GetString("CertificateNotFoundInStore1", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Your account does not have access to the private key for certificate {0}.
- ///
- public static string CertificatePrivateKeyAccessError {
- get {
- return ResourceManager.GetString("CertificatePrivateKeyAccessError", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to {0} {1} deployment for {2} service.
- ///
- public static string ChangeDeploymentStateWaitMessage {
- get {
- return ResourceManager.GetString("ChangeDeploymentStateWaitMessage", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Cloud service {0} is in {1} state..
- ///
- public static string ChangeDeploymentStatusCompleteMessage {
- get {
- return ResourceManager.GetString("ChangeDeploymentStatusCompleteMessage", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Changing/Removing public environment '{0}' is not allowed..
- ///
- public static string ChangePublicEnvironmentMessage {
- get {
- return ResourceManager.GetString("ChangePublicEnvironmentMessage", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Service {0} is set to value {1}.
- ///
- public static string ChangeSettingsElementMessage {
- get {
- return ResourceManager.GetString("ChangeSettingsElementMessage", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Changing public environment is not supported..
- ///
- public static string ChangingDefaultEnvironmentNotSupported {
- get {
- return ResourceManager.GetString("ChangingDefaultEnvironmentNotSupported", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Choose which publish settings file to use:.
- ///
- public static string ChoosePublishSettingsFile {
- get {
- return ResourceManager.GetString("ChoosePublishSettingsFile", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Microsoft.Azure.Plugins.Caching.ClientDiagnosticLevel.
- ///
- public static string ClientDiagnosticLevelName {
- get {
- return ResourceManager.GetString("ClientDiagnosticLevelName", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to 1.
- ///
- public static string ClientDiagnosticLevelValue {
- get {
- return ResourceManager.GetString("ClientDiagnosticLevelValue", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to cloud_package.cspkg.
- ///
- public static string CloudPackageFileName {
- get {
- return ResourceManager.GetString("CloudPackageFileName", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to ServiceConfiguration.Cloud.cscfg.
- ///
- public static string CloudServiceConfigurationFileName {
- get {
- return ResourceManager.GetString("CloudServiceConfigurationFileName", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Add-ons for {0}.
- ///
- public static string CloudServiceDescription {
- get {
- return ResourceManager.GetString("CloudServiceDescription", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Communication could not be established. This could be due to an invalid subscription ID. Note that subscription IDs are case sensitive..
- ///
- public static string CommunicationCouldNotBeEstablished {
- get {
- return ResourceManager.GetString("CommunicationCouldNotBeEstablished", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Complete.
- ///
- public static string CompleteMessage {
- get {
- return ResourceManager.GetString("CompleteMessage", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Complete.
- ///
- public static string CompleteMessage1 {
- get {
- return ResourceManager.GetString("CompleteMessage1", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to config.json.
- ///
- public static string ConfigurationFileName {
- get {
- return ResourceManager.GetString("ConfigurationFileName", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to VirtualMachine creation failed..
- ///
- public static string CreateFailedErrorMessage {
- get {
- return ResourceManager.GetString("CreateFailedErrorMessage", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Creating the website failed. If this is the first website for this subscription, please create it using the management portal instead..
- ///
- public static string CreateWebsiteFailed {
- get {
- return ResourceManager.GetString("CreateWebsiteFailed", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to -Credential parameter can only be used with Organization ID credentials. For more information, please refer to http://go.microsoft.com/fwlink/?linkid=331007&clcid=0x409 for more information about the difference between an organizational account and a Microsoft account..
- ///
- public static string CredentialOrganizationIdMessage {
- get {
- return ResourceManager.GetString("CredentialOrganizationIdMessage", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Microsoft.ApplicationServer.Caching.DataCacheClientsSection, Microsoft.ApplicationServer.Caching.Core.
- ///
- public static string DataCacheClientsType {
- get {
- return ResourceManager.GetString("DataCacheClientsType", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to //blobcontainer[@datacenter='{0}'].
- ///
- public static string DatacenterBlobQuery {
- get {
- return ResourceManager.GetString("DatacenterBlobQuery", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Setting: {0} as the default and current subscription. To view other subscriptions use Get-AzureSubscription.
- ///
- public static string DefaultAndCurrentSubscription {
- get {
- return ResourceManager.GetString("DefaultAndCurrentSubscription", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to none.
- ///
- public static string DefaultFileVersion {
- get {
- return ResourceManager.GetString("DefaultFileVersion", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to There are no hostnames which could be used for validation..
- ///
- public static string DefaultHostnamesValidation {
- get {
- return ResourceManager.GetString("DefaultHostnamesValidation", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to 8080.
- ///
- public static string DefaultPort {
- get {
- return ResourceManager.GetString("DefaultPort", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to 1000.
- ///
- public static string DefaultRoleCachingInMB {
- get {
- return ResourceManager.GetString("DefaultRoleCachingInMB", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Auto.
- ///
- public static string DefaultUpgradeMode {
- get {
- return ResourceManager.GetString("DefaultUpgradeMode", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to 80.
- ///
- public static string DefaultWebPort {
- get {
- return ResourceManager.GetString("DefaultWebPort", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Delete.
- ///
- public static string Delete {
- get {
- return ResourceManager.GetString("Delete", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to The {0} slot for service {1} is already in {2} state.
- ///
- public static string DeploymentAlreadyInState {
- get {
- return ResourceManager.GetString("DeploymentAlreadyInState", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to The deployment in {0} slot for service {1} is removed.
- ///
- public static string DeploymentRemovedMessage {
- get {
- return ResourceManager.GetString("DeploymentRemovedMessage", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Microsoft.Azure.Plugins.Caching.DiagnosticLevel.
- ///
- public static string DiagnosticLevelName {
- get {
- return ResourceManager.GetString("DiagnosticLevelName", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to 1.
- ///
- public static string DiagnosticLevelValue {
- get {
- return ResourceManager.GetString("DiagnosticLevelValue", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to The key to add already exists in the dictionary..
- ///
- public static string DictionaryAddAlreadyContainsKey {
- get {
- return ResourceManager.GetString("DictionaryAddAlreadyContainsKey", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to The array index cannot be less than zero..
- ///
- public static string DictionaryCopyToArrayIndexLessThanZero {
- get {
- return ResourceManager.GetString("DictionaryCopyToArrayIndexLessThanZero", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to The supplied array does not have enough room to contain the copied elements..
- ///
- public static string DictionaryCopyToArrayTooShort {
- get {
- return ResourceManager.GetString("DictionaryCopyToArrayTooShort", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to The provided dns {0} doesn't exist.
- ///
- public static string DnsDoesNotExist {
- get {
- return ResourceManager.GetString("DnsDoesNotExist", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Microsoft Azure Certificate.
- ///
- public static string EnableRemoteDesktop_FriendlyCertificateName {
- get {
- return ResourceManager.GetString("EnableRemoteDesktop_FriendlyCertificateName", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Endpoint can't be retrieved for storage account.
- ///
- public static string EndPointNotFoundForBlobStorage {
- get {
- return ResourceManager.GetString("EndPointNotFoundForBlobStorage", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to {0} end processing..
- ///
- public static string EndProcessingLog {
- get {
- return ResourceManager.GetString("EndProcessingLog", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to To use Active Directory authentication, you must configure the ActiveDirectoryEndpoint, ActiveDirectoryTenantId, and ActiveDirectorServiceEndpointResourceId for environment of '{0}'. You can configure these properties for this environment using the Set-AzureEnvironment cmdlet..
- ///
- public static string EnvironmentDoesNotSupportActiveDirectory {
- get {
- return ResourceManager.GetString("EnvironmentDoesNotSupportActiveDirectory", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to The environment '{0}' already exists..
- ///
- public static string EnvironmentExists {
- get {
- return ResourceManager.GetString("EnvironmentExists", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Environment name doesn't match one in subscription..
- ///
- public static string EnvironmentNameDoesntMatchSubscription {
- get {
- return ResourceManager.GetString("EnvironmentNameDoesntMatchSubscription", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to The environment name '{0}' is not found..
- ///
- public static string EnvironmentNotFound {
- get {
- return ResourceManager.GetString("EnvironmentNotFound", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to environments.xml.
- ///
- public static string EnvironmentsFileName {
- get {
- return ResourceManager.GetString("EnvironmentsFileName", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Error creating VirtualMachine.
- ///
- public static string ErrorCreatingVirtualMachine {
- get {
- return ResourceManager.GetString("ErrorCreatingVirtualMachine", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Unable to download available runtimes for location '{0}'.
- ///
- public static string ErrorRetrievingRuntimesForLocation {
- get {
- return ResourceManager.GetString("ErrorRetrievingRuntimesForLocation", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Error updating VirtualMachine.
- ///
- public static string ErrorUpdatingVirtualMachine {
- get {
- return ResourceManager.GetString("ErrorUpdatingVirtualMachine", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Your Microsoft Azure credential in the Windows PowerShell session has expired. Please use Add-AzureAccount to login again..
- ///
- public static string ExpiredRefreshToken {
- get {
- return ResourceManager.GetString("ExpiredRefreshToken", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Job Id {0} failed. Error: {1}, ExceptionDetails: {2}.
- ///
- public static string FailedJobErrorMessage {
- get {
- return ResourceManager.GetString("FailedJobErrorMessage", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to The HTTP request was forbidden with client authentication scheme 'Anonymous'..
- ///
- public static string FirstPurchaseErrorMessage {
- get {
- return ResourceManager.GetString("FirstPurchaseErrorMessage", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to This add-on requires you to purchase the first instance through the Microsoft Azure Portal. Subsequent purchases can be performed through PowerShell..
- ///
- public static string FirstPurchaseMessage {
- get {
- return ResourceManager.GetString("FirstPurchaseMessage", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Operation Status:.
- ///
- public static string GatewayOperationStatus {
- get {
- return ResourceManager.GetString("GatewayOperationStatus", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Resources\Scaffolding\General.
- ///
- public static string GeneralScaffolding {
- get {
- return ResourceManager.GetString("GeneralScaffolding", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Getting all available Microsoft Azure Add-Ons, this may take few minutes....
- ///
- public static string GetAllAddOnsWaitMessage {
- get {
- return ResourceManager.GetString("GetAllAddOnsWaitMessage", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Name{0}Primary Key{0}Seconday Key.
- ///
- public static string GetStorageKeysHeader {
- get {
- return ResourceManager.GetString("GetStorageKeysHeader", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Git not found. Please install git and place it in your command line path..
- ///
- public static string GitNotFound {
- get {
- return ResourceManager.GetString("GitNotFound", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Could not find publish settings. Please run Import-AzurePublishSettingsFile..
- ///
- public static string GlobalSettingsManager_Load_PublishSettingsNotFound {
- get {
- return ResourceManager.GetString("GlobalSettingsManager_Load_PublishSettingsNotFound", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Could not find publish settings. Please run Import-AzurePublishSettingsFile..
- ///
- public static string GlobalSettingsManager_Load_PublishSettingsNotFound1 {
- get {
- return ResourceManager.GetString("GlobalSettingsManager_Load_PublishSettingsNotFound1", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to iisnode.dll.
- ///
- public static string IISNodeDll {
- get {
- return ResourceManager.GetString("IISNodeDll", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to iisnode.
- ///
- public static string IISNodeEngineKey {
- get {
- return ResourceManager.GetString("IISNodeEngineKey", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to iisnode-dev\\release\\x64.
- ///
- public static string IISNodePath {
- get {
- return ResourceManager.GetString("IISNodePath", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to iisnode.
- ///
- public static string IISNodeRuntimeValue {
- get {
- return ResourceManager.GetString("IISNodeRuntimeValue", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Installing IISNode version {0} in Azure for WebRole '{1}' (the version locally installed is: {2}).
- ///
- public static string IISNodeVersionWarningText {
- get {
- return ResourceManager.GetString("IISNodeVersionWarningText", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Illegal characters in path..
- ///
- public static string IllegalPath {
- get {
- return ResourceManager.GetString("IllegalPath", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Illegal characters in path..
- ///
- public static string IllegalPath1 {
- get {
- return ResourceManager.GetString("IllegalPath1", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Internal Server Error.
- ///
- public static string InternalServerErrorMessage {
- get {
- return ResourceManager.GetString("InternalServerErrorMessage", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Cannot enable memcach protocol on a cache worker role {0}..
- ///
- public static string InvalidCacheRoleName {
- get {
- return ResourceManager.GetString("InvalidCacheRoleName", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Invalid certificate format. Publish settings may be corrupted. Use Get-AzurePublishSettingsFile to download updated settings.
- ///
- public static string InvalidCertificate {
- get {
- return ResourceManager.GetString("InvalidCertificate", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Invalid certificate format. Publish settings may be corrupted. Use Get-AzurePublishSettingsFile to download updated settings.
- ///
- public static string InvalidCertificate1 {
- get {
- return ResourceManager.GetString("InvalidCertificate1", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Invalid certificate format..
- ///
- public static string InvalidCertificateSingle {
- get {
- return ResourceManager.GetString("InvalidCertificateSingle", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to The provided configuration path is invalid or doesn't exist.
- ///
- public static string InvalidConfigPath {
- get {
- return ResourceManager.GetString("InvalidConfigPath", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to The country name is invalid, please use a valid two character country code, as described in ISO 3166-1 alpha-2..
- ///
- public static string InvalidCountryNameMessage {
- get {
- return ResourceManager.GetString("InvalidCountryNameMessage", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Credential type invalid, only handles '{0}'.
- ///
- public static string InvalidCredentialType {
- get {
- return ResourceManager.GetString("InvalidCredentialType", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to No current subscription has been designated. Use Select-AzureSubscription -Current <subscriptionName> to set the current subscription..
- ///
- public static string InvalidCurrentSubscription {
- get {
- return ResourceManager.GetString("InvalidCurrentSubscription", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to The ID of the current subscription is invalid. Use Set-AzureSubscription to fix the subscription ID or use Select-AzureSubscription to use a different subscription..
- ///
- public static string InvalidCurrentSubscriptionId {
- get {
- return ResourceManager.GetString("InvalidCurrentSubscriptionId", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to The management certificate of the current subscription is invalid. Use Set-AzureSubscription to fix the management certificate or use Select-AzureSubscription to use a different subscription..
- ///
- public static string InvalidCurrentSuscriptionCertificate {
- get {
- return ResourceManager.GetString("InvalidCurrentSuscriptionCertificate", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to No default subscription has been designated. Use Select-AzureSubscription -Default <subscriptionName> to set the default subscription..
- ///
- public static string InvalidDefaultSubscription {
- get {
- return ResourceManager.GetString("InvalidDefaultSubscription", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Deployment with {0} does not exist.
- ///
- public static string InvalidDeployment {
- get {
- return ResourceManager.GetString("InvalidDeployment", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to The deployment slot name {0} is invalid. Slot name must be either "Staging" or "Production"..
- ///
- public static string InvalidDeploymentSlot {
- get {
- return ResourceManager.GetString("InvalidDeploymentSlot", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to "{0}" is an invalid DNS name for {1}.
- ///
- public static string InvalidDnsName {
- get {
- return ResourceManager.GetString("InvalidDnsName", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Invalid service endpoint..
- ///
- public static string InvalidEndpoint {
- get {
- return ResourceManager.GetString("InvalidEndpoint", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to The provided file in {0} must be have {1} extension.
- ///
- public static string InvalidFileExtension {
- get {
- return ResourceManager.GetString("InvalidFileExtension", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to File {0} has invalid characters.
- ///
- public static string InvalidFileName {
- get {
- return ResourceManager.GetString("InvalidFileName", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to You must create your git publishing credentials using the Microsoft Azure portal.
- ///Please follow these steps in the portal:
- ///1. On the left side open "Web Sites"
- ///2. Click on any website
- ///3. Choose "Setup Git Publishing" or "Reset deployment credentials"
- ///4. Back in the PowerShell window, rerun this command by typing "New-AzureWebSite {site name} -Git -PublishingUsername {username}.
- ///
- public static string InvalidGitCredentials {
- get {
- return ResourceManager.GetString("InvalidGitCredentials", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to The value {0} provided is not a valid GUID. Please provide a valid GUID..
- ///
- public static string InvalidGuid {
- get {
- return ResourceManager.GetString("InvalidGuid", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to The specified hostname does not exist. Please specify a valid hostname for the site..
- ///
- public static string InvalidHostnameValidation {
- get {
- return ResourceManager.GetString("InvalidHostnameValidation", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Role {0} instances must be greater than or equal 0 and less than or equal 20.
- ///
- public static string InvalidInstancesCount {
- get {
- return ResourceManager.GetString("InvalidInstancesCount", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to There was an error creating your webjob. Please make sure that the script is in the root folder of the zip file..
- ///
- public static string InvalidJobFile {
- get {
- return ResourceManager.GetString("InvalidJobFile", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Cannot create instance of management client type {0}. It does not have the expected constructor..
- ///
- public static string InvalidManagementClientType {
- get {
- return ResourceManager.GetString("InvalidManagementClientType", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Could not download a valid runtime manifest, Please check your internet connection and try again..
- ///
- public static string InvalidManifestError {
- get {
- return ResourceManager.GetString("InvalidManifestError", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to The account {0} was not found. Please specify a valid account name..
- ///
- public static string InvalidMediaServicesAccount {
- get {
- return ResourceManager.GetString("InvalidMediaServicesAccount", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to The provided name "{0}" does not match the service bus namespace naming rules..
- ///
- public static string InvalidNamespaceName {
- get {
- return ResourceManager.GetString("InvalidNamespaceName", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Value cannot be null. Parameter name: '{0}'.
- ///
- public static string InvalidNullArgument {
- get {
- return ResourceManager.GetString("InvalidNullArgument", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to {0} is invalid or empty.
- ///
- public static string InvalidOrEmptyArgumentMessage {
- get {
- return ResourceManager.GetString("InvalidOrEmptyArgumentMessage", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to The provided package path is invalid or doesn't exist.
- ///
- public static string InvalidPackagePath {
- get {
- return ResourceManager.GetString("InvalidPackagePath", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to '{0}' is an invalid parameter set name..
- ///
- public static string InvalidParameterSetName {
- get {
- return ResourceManager.GetString("InvalidParameterSetName", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to {0} doesn't exist in {1} or you've not passed valid value for it.
- ///
- public static string InvalidPath {
- get {
- return ResourceManager.GetString("InvalidPath", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Path {0} has invalid characters.
- ///
- public static string InvalidPathName {
- get {
- return ResourceManager.GetString("InvalidPathName", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to The provided publish settings file {0} has invalid content. Please get valid by running cmdlet Get-AzurePublishSettingsFile.
- ///
- public static string InvalidPublishSettingsSchema {
- get {
- return ResourceManager.GetString("InvalidPublishSettingsSchema", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to The provided publish settings file {0} has invalid content. Please get valid by running cmdlet Get-AzurePublishSettingsFile.
- ///
- public static string InvalidPublishSettingsSchema1 {
- get {
- return ResourceManager.GetString("InvalidPublishSettingsSchema1", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to The provided role name "{0}" has invalid characters.
- ///
- public static string InvalidRoleNameMessage {
- get {
- return ResourceManager.GetString("InvalidRoleNameMessage", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to A valid name for the service root folder is required.
- ///
- public static string InvalidRootNameMessage {
- get {
- return ResourceManager.GetString("InvalidRootNameMessage", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to {0} is not a recognized runtime type.
- ///
- public static string InvalidRuntimeError {
- get {
- return ResourceManager.GetString("InvalidRuntimeError", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to A valid language is required.
- ///
- public static string InvalidScaffoldingLanguageArg {
- get {
- return ResourceManager.GetString("InvalidScaffoldingLanguageArg", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to No subscription is currently selected. Use Select-Subscription to activate a subscription..
- ///
- public static string InvalidSelectedSubscription {
- get {
- return ResourceManager.GetString("InvalidSelectedSubscription", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to The provided location "{0}" does not exist in the available locations use Get-AzureSBLocation for listing available locations..
- ///
- public static string InvalidServiceBusLocation {
- get {
- return ResourceManager.GetString("InvalidServiceBusLocation", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Please provide a service name or run this command from inside a service project directory..
- ///
- public static string InvalidServiceName {
- get {
- return ResourceManager.GetString("InvalidServiceName", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to You must provide valid value for {0}.
- ///
- public static string InvalidServiceSettingElement {
- get {
- return ResourceManager.GetString("InvalidServiceSettingElement", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to You must provide valid value for {0}.
- ///
- public static string InvalidServiceSettingElement1 {
- get {
- return ResourceManager.GetString("InvalidServiceSettingElement1", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to settings.json is invalid or doesn't exist.
- ///
- public static string InvalidServiceSettingMessage {
- get {
- return ResourceManager.GetString("InvalidServiceSettingMessage", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to The subscription named '{0}' cannot be found. Use Set-AzureSubscription to initialize the subscription data..
- ///
- public static string InvalidSubscription {
- get {
- return ResourceManager.GetString("InvalidSubscription", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to The provided subscription id {0} is not valid.
- ///
- public static string InvalidSubscriptionId {
- get {
- return ResourceManager.GetString("InvalidSubscriptionId", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Must specify a non-null subscription name..
- ///
- public static string InvalidSubscriptionName {
- get {
- return ResourceManager.GetString("InvalidSubscriptionName", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to A valid subscription name is required. This can be provided using the -Subscription parameter or by setting the subscription via the Set-AzureSubscription cmdlet.
- ///
- public static string InvalidSubscriptionNameMessage {
- get {
- return ResourceManager.GetString("InvalidSubscriptionNameMessage", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to The provided subscriptions file {0} has invalid content..
- ///
- public static string InvalidSubscriptionsDataSchema {
- get {
- return ResourceManager.GetString("InvalidSubscriptionsDataSchema", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Your Azure credentials have not been set up or have expired, please run Add-AzureAccount to set up your Azure credentials..
- ///
- public static string InvalidSubscriptionState {
- get {
- return ResourceManager.GetString("InvalidSubscriptionState", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Role {0} VM size should be ExtraSmall, Small, Medium, Large or ExtraLarge..
- ///
- public static string InvalidVMSize {
- get {
- return ResourceManager.GetString("InvalidVMSize", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to The web job file must have *.zip extension.
- ///
- public static string InvalidWebJobFile {
- get {
- return ResourceManager.GetString("InvalidWebJobFile", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Singleton option works for continuous jobs only..
- ///
- public static string InvalidWebJobSingleton {
- get {
- return ResourceManager.GetString("InvalidWebJobSingleton", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to The website {0} was not found. Please specify a valid website name..
- ///
- public static string InvalidWebsite {
- get {
- return ResourceManager.GetString("InvalidWebsite", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to No job for id: {0} was found..
- ///
- public static string JobNotFound {
- get {
- return ResourceManager.GetString("JobNotFound", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to engines.
- ///
- public static string JsonEnginesSectionName {
- get {
- return ResourceManager.GetString("JsonEnginesSectionName", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Scaffolding for this language is not yet supported.
- ///
- public static string LanguageScaffoldingIsNotSupported {
- get {
- return ResourceManager.GetString("LanguageScaffoldingIsNotSupported", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Link already established.
- ///
- public static string LinkAlreadyEstablished {
- get {
- return ResourceManager.GetString("LinkAlreadyEstablished", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to local_package.csx.
- ///
- public static string LocalPackageFileName {
- get {
- return ResourceManager.GetString("LocalPackageFileName", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to ServiceConfiguration.Local.cscfg.
- ///
- public static string LocalServiceConfigurationFileName {
- get {
- return ResourceManager.GetString("LocalServiceConfigurationFileName", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Looking for {0} deployment for {1} cloud service....
- ///
- public static string LookingForDeploymentMessage {
- get {
- return ResourceManager.GetString("LookingForDeploymentMessage", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Looking for cloud service {0}....
- ///
- public static string LookingForServiceMessage {
- get {
- return ResourceManager.GetString("LookingForServiceMessage", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to managementCertificate.pem.
- ///
- public static string ManagementCertificateFileName {
- get {
- return ResourceManager.GetString("ManagementCertificateFileName", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to ?whr={0}.
- ///
- public static string ManagementPortalRealmFormat {
- get {
- return ResourceManager.GetString("ManagementPortalRealmFormat", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to //baseuri.
- ///
- public static string ManifestBaseUriQuery {
- get {
- return ResourceManager.GetString("ManifestBaseUriQuery", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to uri.
- ///
- public static string ManifestBlobUriKey {
- get {
- return ResourceManager.GetString("ManifestBlobUriKey", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to http://az413943.vo.msecnd.net/node/runtimemanifest_0.7.5.2.xml.
- ///
- public static string ManifestUri {
- get {
- return ResourceManager.GetString("ManifestUri", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to v2.5.
- ///
- public static string MaxSupportAzureSdkVersion {
- get {
- return ResourceManager.GetString("MaxSupportAzureSdkVersion", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to memcache_default.
- ///
- public static string MemcacheEndpointName {
- get {
- return ResourceManager.GetString("MemcacheEndpointName", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to 11211.
- ///
- public static string MemcacheEndpointPort {
- get {
- return ResourceManager.GetString("MemcacheEndpointPort", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to v2.5.
- ///
- public static string MinSupportAzureSdkVersion {
- get {
- return ResourceManager.GetString("MinSupportAzureSdkVersion", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Python 2.7 is not installed. Please install it as well as Django 1.4..
- ///
- public static string MissingPythonPreReq {
- get {
- return ResourceManager.GetString("MissingPythonPreReq", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Multiple Add-Ons found holding name {0}.
- ///
- public static string MultipleAddOnsFoundMessage {
- get {
- return ResourceManager.GetString("MultipleAddOnsFoundMessage", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Multiple possible publishing users. Please go to the Portal and use the listed deployment user, or click 'set/reset deployment credentials' to set up a new user account, then reurn this cmdlet and specify PublishingUsername..
- ///
- public static string MultiplePublishingUsernames {
- get {
- return ResourceManager.GetString("MultiplePublishingUsernames", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to The first publish settings file "{0}" is used. If you want to use another file specify the file name..
- ///
- public static string MultiplePublishSettingsFilesFoundMessage {
- get {
- return ResourceManager.GetString("MultiplePublishSettingsFilesFoundMessage", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Microsoft.Azure.Plugins.Caching.NamedCaches.
- ///
- public static string NamedCacheSettingName {
- get {
- return ResourceManager.GetString("NamedCacheSettingName", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to {"caches":[{"name":"default","policy":{"eviction":{"type":0},"expiration":{"defaultTTL":10,"isExpirable":true,"type":1},"serverNotification":{"isEnabled":false}},"secondaries":0}]}.
- ///
- public static string NamedCacheSettingValue {
- get {
- return ResourceManager.GetString("NamedCacheSettingValue", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to A publishing username is required. Please specify one using the argument PublishingUsername..
- ///
- public static string NeedPublishingUsernames {
- get {
- return ResourceManager.GetString("NeedPublishingUsernames", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to New Add-On Confirmation.
- ///
- public static string NewAddOnConformation {
- get {
- return ResourceManager.GetString("NewAddOnConformation", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to By typing "Yes", I (a) authorize Microsoft to charge my current payment method on a monthly basis
- ///for the amount indicated at {0} for {1} until my service is cancelled or terminated, and (b)
- ///agree to the {2}'s terms of user and privacy statement at {0} and (c) agree to sharing my
- ///contact information with {2}..
- ///
- public static string NewMicrosoftAddOnMessage {
- get {
- return ResourceManager.GetString("NewMicrosoftAddOnMessage", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Internal Server Error. This could happen because the namespace name is already used or due to an incorrect location name. Use Get-AzureSBLocation cmdlet to list valid names..
- ///
- public static string NewNamespaceErrorMessage {
- get {
- return ResourceManager.GetString("NewNamespaceErrorMessage", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to By typing "Yes", I (a) authorize Microsoft to charge my current payment method on a monthly basis
- ///for the amount indicated at {0} for {1} until my service is cancelled or terminated, and (b)
- ///acknowledge the offering is provided by {2}, not Microsoft, and agree to {2}'s terms of
- ///use and privacy statement at {0} and (c) agree to sharing my contact information with {2}..
- ///
- public static string NewNonMicrosoftAddOnMessage {
- get {
- return ResourceManager.GetString("NewNonMicrosoftAddOnMessage", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Service has been created at {0}.
- ///
- public static string NewServiceCreatedMessage {
- get {
- return ResourceManager.GetString("NewServiceCreatedMessage", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to No.
- ///
- public static string No {
- get {
- return ResourceManager.GetString("No", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to There is no access token cached for subscription {0}, user id {1}. Use the Add-AzureAccount cmdlet to log in again and get a token for this subscription..
- ///
- public static string NoCachedToken {
- get {
- return ResourceManager.GetString("NoCachedToken", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to The service does not have any cache worker roles, add one first by running cmdlet Add-AzureCacheWorkerRole..
- ///
- public static string NoCacheWorkerRoles {
- get {
- return ResourceManager.GetString("NoCacheWorkerRoles", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to No clouds available.
- ///
- public static string NoCloudsAvailable {
- get {
- return ResourceManager.GetString("NoCloudsAvailable", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to nodejs.
- ///
- public static string NodeDirectory {
- get {
- return ResourceManager.GetString("NodeDirectory", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to node.
- ///
- public static string NodeEngineKey {
- get {
- return ResourceManager.GetString("NodeEngineKey", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to node.exe.
- ///
- public static string NodeExe {
- get {
- return ResourceManager.GetString("NodeExe", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to There is no default subscription set, please set a default subscription by running Set-AzureSubscription -Default <subscription name>.
- ///
- public static string NoDefaultSubscriptionMessage {
- get {
- return ResourceManager.GetString("NoDefaultSubscriptionMessage", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Microsoft SDKs\Azure\Nodejs\Nov2011.
- ///
- public static string NodeModulesPath {
- get {
- return ResourceManager.GetString("NodeModulesPath", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to nodejs.
- ///
- public static string NodeProgramFilesFolderName {
- get {
- return ResourceManager.GetString("NodeProgramFilesFolderName", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to node.
- ///
- public static string NodeRuntimeValue {
- get {
- return ResourceManager.GetString("NodeRuntimeValue", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Resources\Scaffolding\Node.
- ///
- public static string NodeScaffolding {
- get {
- return ResourceManager.GetString("NodeScaffolding", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Microsoft.Azure.Commands.CloudService.ScaffoldingResources.Node.
- ///
- public static string NodeScaffoldingResources {
- get {
- return ResourceManager.GetString("NodeScaffoldingResources", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Installing Node version {0} in Azure for Role '{1}' (the Node version locally installed is: {2}).
- ///
- public static string NodeVersionWarningText {
- get {
- return ResourceManager.GetString("NodeVersionWarningText", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to No, I do not agree.
- ///
- public static string NoHint {
- get {
- return ResourceManager.GetString("NoHint", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Please connect to internet before executing this cmdlet.
- ///
- public static string NoInternetConnection {
- get {
- return ResourceManager.GetString("NoInternetConnection", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Please connect to internet before executing this cmdlet.
- ///
- public static string NoInternetConnection1 {
- get {
- return ResourceManager.GetString("NoInternetConnection1", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to <NONE>.
- ///
- public static string None {
- get {
- return ResourceManager.GetString("None", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to No publish settings files with extension *.publishsettings are found in the directory "{0}"..
- ///
- public static string NoPublishSettingsFilesFoundMessage {
- get {
- return ResourceManager.GetString("NoPublishSettingsFilesFoundMessage", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to There is no subscription associated with account {0}..
- ///
- public static string NoSubscriptionAddedMessage {
- get {
- return ResourceManager.GetString("NoSubscriptionAddedMessage", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to '{0}' must be a cache worker role. Verify that it has proper cache worker role configuration..
- ///
- public static string NotCacheWorkerRole {
- get {
- return ResourceManager.GetString("NotCacheWorkerRole", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Certificate can't be null..
- ///
- public static string NullCertificateMessage {
- get {
- return ResourceManager.GetString("NullCertificateMessage", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to {0} could not be null or empty.
- ///
- public static string NullObjectMessage {
- get {
- return ResourceManager.GetString("NullObjectMessage", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Unable to add a null RoleSettings to {0}.
- ///
- public static string NullRoleSettingsMessage {
- get {
- return ResourceManager.GetString("NullRoleSettingsMessage", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Unable to add new role to null service definition.
- ///
- public static string NullServiceDefinitionMessage {
- get {
- return ResourceManager.GetString("NullServiceDefinitionMessage", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to The request offer '{0}' is not found..
- ///
- public static string OfferNotFoundMessage {
- get {
- return ResourceManager.GetString("OfferNotFoundMessage", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Operation "{0}" failed on VM with ID: {1}.
- ///
- public static string OperationFailedErrorMessage {
- get {
- return ResourceManager.GetString("OperationFailedErrorMessage", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to The REST operation failed with message '{0}' and error code '{1}'.
- ///
- public static string OperationFailedMessage {
- get {
- return ResourceManager.GetString("OperationFailedMessage", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Job Id {0} did not complete within expected time or it is in Failed/Canceled/Invalid state..
- ///
- public static string OperationTimedOutOrError {
- get {
- return ResourceManager.GetString("OperationTimedOutOrError", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to package.
- ///
- public static string Package {
- get {
- return ResourceManager.GetString("Package", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Package is created at service root path {0}..
- ///
- public static string PackageCreated {
- get {
- return ResourceManager.GetString("PackageCreated", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to {{
- /// "author": "",
- ///
- /// "name": "{0}",
- /// "version": "0.0.0",
- /// "dependencies":{{}},
- /// "devDependencies":{{}},
- /// "optionalDependencies": {{}},
- /// "engines": {{
- /// "node": "*",
- /// "iisnode": "*"
- /// }}
- ///
- ///}}
- ///.
- ///
- public static string PackageJsonDefaultFile {
- get {
- return ResourceManager.GetString("PackageJsonDefaultFile", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to package.json.
- ///
- public static string PackageJsonFileName {
- get {
- return ResourceManager.GetString("PackageJsonFileName", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Path {0} doesn't exist..
- ///
- public static string PathDoesNotExist {
- get {
- return ResourceManager.GetString("PathDoesNotExist", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Path for {0} doesn't exist in {1}..
- ///
- public static string PathDoesNotExistForElement {
- get {
- return ResourceManager.GetString("PathDoesNotExistForElement", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to A value for the Peer Asn has to be provided..
- ///
- public static string PeerAsnRequired {
- get {
- return ResourceManager.GetString("PeerAsnRequired", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to 5.4.0.
- ///
- public static string PHPDefaultRuntimeVersion {
- get {
- return ResourceManager.GetString("PHPDefaultRuntimeVersion", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to php.
- ///
- public static string PhpRuntimeValue {
- get {
- return ResourceManager.GetString("PhpRuntimeValue", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Resources\Scaffolding\PHP.
- ///
- public static string PHPScaffolding {
- get {
- return ResourceManager.GetString("PHPScaffolding", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Microsoft.Azure.Commands.CloudService.ScaffoldingResources.PHP.
- ///
- public static string PHPScaffoldingResources {
- get {
- return ResourceManager.GetString("PHPScaffoldingResources", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Installing PHP version {0} for Role '{1}' (the PHP version locally installed is: {2}).
- ///
- public static string PHPVersionWarningText {
- get {
- return ResourceManager.GetString("PHPVersionWarningText", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to You must create your first web site using the Microsoft Azure portal.
- ///Please follow these steps in the portal:
- ///1. At the bottom of the page, click on New > Web Site > Quick Create
- ///2. Type {0} in the URL field
- ///3. Click on "Create Web Site"
- ///4. Once the site has been created, click on the site name
- ///5. Click on "Set up Git publishing" or "Reset deployment credentials" and setup a publishing username and password. Use those credentials for all new websites you create..
- ///
- public static string PortalInstructions {
- get {
- return ResourceManager.GetString("PortalInstructions", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to 6. Back in the console window, rerun this command by typing "New-AzureWebsite <site name> -Git".
- ///
- public static string PortalInstructionsGit {
- get {
- return ResourceManager.GetString("PortalInstructionsGit", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to A value for the Primary Peer Subnet has to be provided..
- ///
- public static string PrimaryPeerSubnetRequired {
- get {
- return ResourceManager.GetString("PrimaryPeerSubnetRequired", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Promotion code can be used only when updating to a new plan..
- ///
- public static string PromotionCodeWithCurrentPlanMessage {
- get {
- return ResourceManager.GetString("PromotionCodeWithCurrentPlanMessage", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Service not published at user request..
- ///
- public static string PublishAbortedAtUserRequest {
- get {
- return ResourceManager.GetString("PublishAbortedAtUserRequest", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Complete..
- ///
- public static string PublishCompleteMessage {
- get {
- return ResourceManager.GetString("PublishCompleteMessage", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Connecting....
- ///
- public static string PublishConnectingMessage {
- get {
- return ResourceManager.GetString("PublishConnectingMessage", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Created Deployment ID: {0}..
- ///
- public static string PublishCreatedDeploymentMessage {
- get {
- return ResourceManager.GetString("PublishCreatedDeploymentMessage", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Created hosted service '{0}'..
- ///
- public static string PublishCreatedServiceMessage {
- get {
- return ResourceManager.GetString("PublishCreatedServiceMessage", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Created Website URL: {0}..
- ///
- public static string PublishCreatedWebsiteMessage {
- get {
- return ResourceManager.GetString("PublishCreatedWebsiteMessage", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Creating....
- ///
- public static string PublishCreatingServiceMessage {
- get {
- return ResourceManager.GetString("PublishCreatingServiceMessage", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Initializing....
- ///
- public static string PublishInitializingMessage {
- get {
- return ResourceManager.GetString("PublishInitializingMessage", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to busy.
- ///
- public static string PublishInstanceStatusBusy {
- get {
- return ResourceManager.GetString("PublishInstanceStatusBusy", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to creating the virtual machine.
- ///
- public static string PublishInstanceStatusCreating {
- get {
- return ResourceManager.GetString("PublishInstanceStatusCreating", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Instance {0} of role {1} is {2}..
- ///
- public static string PublishInstanceStatusMessage {
- get {
- return ResourceManager.GetString("PublishInstanceStatusMessage", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to ready.
- ///
- public static string PublishInstanceStatusReady {
- get {
- return ResourceManager.GetString("PublishInstanceStatusReady", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Preparing deployment for {0} with Subscription ID: {1}....
- ///
- public static string PublishPreparingDeploymentMessage {
- get {
- return ResourceManager.GetString("PublishPreparingDeploymentMessage", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Publishing {0} to Microsoft Azure. This may take several minutes....
- ///
- public static string PublishServiceStartMessage {
- get {
- return ResourceManager.GetString("PublishServiceStartMessage", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to publish settings.
- ///
- public static string PublishSettings {
- get {
- return ResourceManager.GetString("PublishSettings", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Azure.
- ///
- public static string PublishSettingsElementName {
- get {
- return ResourceManager.GetString("PublishSettingsElementName", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to .PublishSettings.
- ///
- public static string PublishSettingsFileExtention {
- get {
- return ResourceManager.GetString("PublishSettingsFileExtention", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to publishSettings.xml.
- ///
- public static string PublishSettingsFileName {
- get {
- return ResourceManager.GetString("PublishSettingsFileName", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to &whr={0}.
- ///
- public static string PublishSettingsFileRealmFormat {
- get {
- return ResourceManager.GetString("PublishSettingsFileRealmFormat", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Publish settings imported.
- ///
- public static string PublishSettingsSetSuccessfully {
- get {
- return ResourceManager.GetString("PublishSettingsSetSuccessfully", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to AZURE_PUBLISHINGPROFILE_URL.
- ///
- public static string PublishSettingsUrlEnv {
- get {
- return ResourceManager.GetString("PublishSettingsUrlEnv", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Starting....
- ///
- public static string PublishStartingMessage {
- get {
- return ResourceManager.GetString("PublishStartingMessage", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Upgrading....
- ///
- public static string PublishUpgradingMessage {
- get {
- return ResourceManager.GetString("PublishUpgradingMessage", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Uploading Package to storage service {0}....
- ///
- public static string PublishUploadingPackageMessage {
- get {
- return ResourceManager.GetString("PublishUploadingPackageMessage", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Verifying storage account '{0}'....
- ///
- public static string PublishVerifyingStorageMessage {
- get {
- return ResourceManager.GetString("PublishVerifyingStorageMessage", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Resources\Scaffolding\Python.
- ///
- public static string PythonScaffolding {
- get {
- return ResourceManager.GetString("PythonScaffolding", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Replace current deployment with '{0}' Id ?.
- ///
- public static string RedeployCommit {
- get {
- return ResourceManager.GetString("RedeployCommit", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Are you sure you want to regenerate key?.
- ///
- public static string RegenerateKeyWarning {
- get {
- return ResourceManager.GetString("RegenerateKeyWarning", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Generate new key..
- ///
- public static string RegenerateKeyWhatIfMessage {
- get {
- return ResourceManager.GetString("RegenerateKeyWhatIfMessage", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Are you sure you want to remove account '{0}'?.
- ///
- public static string RemoveAccountConfirmation {
- get {
- return ResourceManager.GetString("RemoveAccountConfirmation", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Removing account.
- ///
- public static string RemoveAccountMessage {
- get {
- return ResourceManager.GetString("RemoveAccountMessage", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Remove Add-On Confirmation.
- ///
- public static string RemoveAddOnConformation {
- get {
- return ResourceManager.GetString("RemoveAddOnConformation", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to If you delete this add-on, your data may be deleted and the operation may not be undone. You may have to purchase it again from the Microsoft Azure Store to use it. The price of the add-on may not be refunded. Are you sure you want to delete this add-on? Enter “Yes” to confirm..
- ///
- public static string RemoveAddOnMessage {
- get {
- return ResourceManager.GetString("RemoveAddOnMessage", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Remove-AzureBGPPeering Operation failed..
- ///
- public static string RemoveAzureBGPPeeringFailed {
- get {
- return ResourceManager.GetString("RemoveAzureBGPPeeringFailed", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Removing Bgp Peering.
- ///
- public static string RemoveAzureBGPPeeringMessage {
- get {
- return ResourceManager.GetString("RemoveAzureBGPPeeringMessage", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Successfully removed Azure Bgp Peering with Service Key {0}..
- ///
- public static string RemoveAzureBGPPeeringSucceeded {
- get {
- return ResourceManager.GetString("RemoveAzureBGPPeeringSucceeded", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Are you sure you want to remove the Bgp Peering with service key '{0}'?.
- ///
- public static string RemoveAzureBGPPeeringWarning {
- get {
- return ResourceManager.GetString("RemoveAzureBGPPeeringWarning", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Are you sure you want to remove the Dedicated Circuit with service key '{0}'?.
- ///
- public static string RemoveAzureDedicatdCircuitWarning {
- get {
- return ResourceManager.GetString("RemoveAzureDedicatdCircuitWarning", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Remove-AzureDedicatedCircuit Operation failed..
- ///
- public static string RemoveAzureDedicatedCircuitFailed {
- get {
- return ResourceManager.GetString("RemoveAzureDedicatedCircuitFailed", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Remove-AzureDedicatedCircuitLink Operation failed..
- ///
- public static string RemoveAzureDedicatedCircuitLinkFailed {
- get {
- return ResourceManager.GetString("RemoveAzureDedicatedCircuitLinkFailed", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Removing Dedicated Circui Link.
- ///
- public static string RemoveAzureDedicatedCircuitLinkMessage {
- get {
- return ResourceManager.GetString("RemoveAzureDedicatedCircuitLinkMessage", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Successfully removed Azure Dedicated Circuit Link with Service Key {0} and Vnet Name {1}.
- ///
- public static string RemoveAzureDedicatedCircuitLinkSucceeded {
- get {
- return ResourceManager.GetString("RemoveAzureDedicatedCircuitLinkSucceeded", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Are you sure you want to remove the Dedicated Circuit Link with service key '{0}' and virtual network name '{1}'?.
- ///
- public static string RemoveAzureDedicatedCircuitLinkWarning {
- get {
- return ResourceManager.GetString("RemoveAzureDedicatedCircuitLinkWarning", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Removing Dedicated Circuit.
- ///
- public static string RemoveAzureDedicatedCircuitMessage {
- get {
- return ResourceManager.GetString("RemoveAzureDedicatedCircuitMessage", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Successfully removed Azure Dedicated Circuit with Service Key {0}..
- ///
- public static string RemoveAzureDedicatedCircuitSucceeded {
- get {
- return ResourceManager.GetString("RemoveAzureDedicatedCircuitSucceeded", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Removing cloud service {0}....
- ///
- public static string RemoveAzureServiceWaitMessage {
- get {
- return ResourceManager.GetString("RemoveAzureServiceWaitMessage", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to The current subscription is being removed. Use Select-AzureSubscription <subscriptionName> to select a new current subscription..
- ///
- public static string RemoveCurrentSubscription {
- get {
- return ResourceManager.GetString("RemoveCurrentSubscription", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to The default subscription is being removed. Use Select-AzureSubscription -Default <subscriptionName> to select a new default subscription..
- ///
- public static string RemoveDefaultSubscription {
- get {
- return ResourceManager.GetString("RemoveDefaultSubscription", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Removing {0} deployment for {1} service.
- ///
- public static string RemoveDeploymentWaitMessage {
- get {
- return ResourceManager.GetString("RemoveDeploymentWaitMessage", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Removing an environment will remove all associated subscriptions and accounts. Are you sure you want to remove an environment '{0}'?.
- ///
- public static string RemoveEnvironmentConfirmation {
- get {
- return ResourceManager.GetString("RemoveEnvironmentConfirmation", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Removing environment.
- ///
- public static string RemoveEnvironmentMessage {
- get {
- return ResourceManager.GetString("RemoveEnvironmentMessage", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Removing job collection.
- ///
- public static string RemoveJobCollectionMessage {
- get {
- return ResourceManager.GetString("RemoveJobCollectionMessage", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Are you sure you want to remove the job collection "{0}".
- ///
- public static string RemoveJobCollectionWarning {
- get {
- return ResourceManager.GetString("RemoveJobCollectionWarning", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Removing job.
- ///
- public static string RemoveJobMessage {
- get {
- return ResourceManager.GetString("RemoveJobMessage", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Are you sure you want to remove the job "{0}".
- ///
- public static string RemoveJobWarning {
- get {
- return ResourceManager.GetString("RemoveJobWarning", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Are you sure you want to remove the account?.
- ///
- public static string RemoveMediaAccountWarning {
- get {
- return ResourceManager.GetString("RemoveMediaAccountWarning", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Account removed..
- ///
- public static string RemoveMediaAccountWhatIfMessage {
- get {
- return ResourceManager.GetString("RemoveMediaAccountWhatIfMessage", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Internal Server Error. This could happen because the namespace does not exist or it does not exist under your subscription..
- ///
- public static string RemoveNamespaceErrorMessage {
- get {
- return ResourceManager.GetString("RemoveNamespaceErrorMessage", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Removing old package {0}....
- ///
- public static string RemovePackage {
- get {
- return ResourceManager.GetString("RemovePackage", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Removing the Azure profile will remove all associated environments, subscriptions, and accounts. Are you sure you want to remove the Azure profile?.
- ///
- public static string RemoveProfileConfirmation {
- get {
- return ResourceManager.GetString("RemoveProfileConfirmation", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Removing the Azure profile.
- ///
- public static string RemoveProfileMessage {
- get {
- return ResourceManager.GetString("RemoveProfileMessage", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Are you sure you want to delete the namespace '{0}'?.
- ///
- public static string RemoveServiceBusNamespaceConfirmation {
- get {
- return ResourceManager.GetString("RemoveServiceBusNamespaceConfirmation", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Are you sure you want to remove cloud service?.
- ///
- public static string RemoveServiceWarning {
- get {
- return ResourceManager.GetString("RemoveServiceWarning", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Remove cloud service and all it's deployments.
- ///
- public static string RemoveServiceWhatIfMessage {
- get {
- return ResourceManager.GetString("RemoveServiceWhatIfMessage", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Are you sure you want to remove subscription '{0}'?.
- ///
- public static string RemoveSubscriptionConfirmation {
- get {
- return ResourceManager.GetString("RemoveSubscriptionConfirmation", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Removing subscription.
- ///
- public static string RemoveSubscriptionMessage {
- get {
- return ResourceManager.GetString("RemoveSubscriptionMessage", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to The endpoint {0} cannot be removed from profile {1} because it's not in the profile..
- ///
- public static string RemoveTrafficManagerEndpointMissing {
- get {
- return ResourceManager.GetString("RemoveTrafficManagerEndpointMissing", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Remove-AzureTrafficManagerProfile Operation failed..
- ///
- public static string RemoveTrafficManagerProfileFailed {
- get {
- return ResourceManager.GetString("RemoveTrafficManagerProfileFailed", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Successfully removed Traffic Manager profile with name {0}..
- ///
- public static string RemoveTrafficManagerProfileSucceeded {
- get {
- return ResourceManager.GetString("RemoveTrafficManagerProfileSucceeded", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Are you sure you want to remove the Traffic Manager profile "{0}"?.
- ///
- public static string RemoveTrafficManagerProfileWarning {
- get {
- return ResourceManager.GetString("RemoveTrafficManagerProfileWarning", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Are you sure you want to delete the VM '{0}'?.
- ///
- public static string RemoveVMConfirmationMessage {
- get {
- return ResourceManager.GetString("RemoveVMConfirmationMessage", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Deleting VM..
- ///
- public static string RemoveVMMessage {
- get {
- return ResourceManager.GetString("RemoveVMMessage", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Removing WebJob....
- ///
- public static string RemoveWebJobMessage {
- get {
- return ResourceManager.GetString("RemoveWebJobMessage", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Are you sure you want to remove job '{0}'?.
- ///
- public static string RemoveWebJobWarning {
- get {
- return ResourceManager.GetString("RemoveWebJobWarning", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Removing website.
- ///
- public static string RemoveWebsiteMessage {
- get {
- return ResourceManager.GetString("RemoveWebsiteMessage", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Are you sure you want to remove the website "{0}".
- ///
- public static string RemoveWebsiteWarning {
- get {
- return ResourceManager.GetString("RemoveWebsiteWarning", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Removing public environment is not supported..
- ///
- public static string RemovingDefaultEnvironmentsNotSupported {
- get {
- return ResourceManager.GetString("RemovingDefaultEnvironmentsNotSupported", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Deleting namespace.
- ///
- public static string RemovingNamespaceMessage {
- get {
- return ResourceManager.GetString("RemovingNamespaceMessage", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Repository is not setup. You need to pass a valid site name..
- ///
- public static string RepositoryNotSetup {
- get {
- return ResourceManager.GetString("RepositoryNotSetup", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Reserved IP with the Name:'{0}' will no longer be in use after the deployment is deleted, and it is still reserved for later use..
- ///
- public static string ReservedIPNameNoLongerInUseButStillBeingReserved {
- get {
- return ResourceManager.GetString("ReservedIPNameNoLongerInUseButStillBeingReserved", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Resource with ID : {0} does not exist..
- ///
- public static string ResourceNotFound {
- get {
- return ResourceManager.GetString("ResourceNotFound", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Restart.
- ///
- public static string Restart {
- get {
- return ResourceManager.GetString("Restart", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Resume.
- ///
- public static string Resume {
- get {
- return ResourceManager.GetString("Resume", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to /role:{0};"{1}/{0}" .
- ///
- public static string RoleArgTemplate {
- get {
- return ResourceManager.GetString("RoleArgTemplate", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to bin.
- ///
- public static string RoleBinFolderName {
- get {
- return ResourceManager.GetString("RoleBinFolderName", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Role {0} is {1}.
- ///
- public static string RoleInstanceWaitMsg {
- get {
- return ResourceManager.GetString("RoleInstanceWaitMsg", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to 20.
- ///
- public static string RoleMaxInstances {
- get {
- return ResourceManager.GetString("RoleMaxInstances", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to role name.
- ///
- public static string RoleName {
- get {
- return ResourceManager.GetString("RoleName", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to The provided role name {0} doesn't exist.
- ///
- public static string RoleNotFoundMessage {
- get {
- return ResourceManager.GetString("RoleNotFoundMessage", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to RoleSettings.xml.
- ///
- public static string RoleSettingsTemplateFileName {
- get {
- return ResourceManager.GetString("RoleSettingsTemplateFileName", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Role type {0} doesn't exist.
- ///
- public static string RoleTypeDoesNotExist {
- get {
- return ResourceManager.GetString("RoleTypeDoesNotExist", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to public static Dictionary<string, Location> ReverseLocations { get; private set; }.
- ///
- public static string RuntimeDeploymentLocationError {
- get {
- return ResourceManager.GetString("RuntimeDeploymentLocationError", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Preparing runtime deployment for service '{0}'.
- ///
- public static string RuntimeDeploymentStart {
- get {
- return ResourceManager.GetString("RuntimeDeploymentStart", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to WARNING Runtime Mismatch: Are you sure that you want to publish service '{0}' using an Azure runtime version that does not match your local runtime version?.
- ///
- public static string RuntimeMismatchWarning {
- get {
- return ResourceManager.GetString("RuntimeMismatchWarning", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to RUNTIMEOVERRIDEURL.
- ///
- public static string RuntimeOverrideKey {
- get {
- return ResourceManager.GetString("RuntimeOverrideKey", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to /runtimemanifest/runtimes/runtime.
- ///
- public static string RuntimeQuery {
- get {
- return ResourceManager.GetString("RuntimeQuery", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to RUNTIMEID.
- ///
- public static string RuntimeTypeKey {
- get {
- return ResourceManager.GetString("RuntimeTypeKey", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to RUNTIMEURL.
- ///
- public static string RuntimeUrlKey {
- get {
- return ResourceManager.GetString("RuntimeUrlKey", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to RUNTIMEVERSIONPRIMARYKEY.
- ///
- public static string RuntimeVersionPrimaryKey {
- get {
- return ResourceManager.GetString("RuntimeVersionPrimaryKey", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to scaffold.xml.
- ///
- public static string ScaffoldXml {
- get {
- return ResourceManager.GetString("ScaffoldXml", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Invalid location entered. Pick one of the locations from Get-AzureSchedulerLocation.
- ///
- public static string SchedulerInvalidLocation {
- get {
- return ResourceManager.GetString("SchedulerInvalidLocation", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to A value for the Secondary Peer Subnet has to be provided..
- ///
- public static string SecondaryPeerSubnetRequired {
- get {
- return ResourceManager.GetString("SecondaryPeerSubnetRequired", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Service {0} already exists on disk in location {1}.
- ///
- public static string ServiceAlreadyExistsOnDisk {
- get {
- return ResourceManager.GetString("ServiceAlreadyExistsOnDisk", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to No ServiceBus authorization rule with the given characteristics was found.
- ///
- public static string ServiceBusAuthorizationRuleNotFound {
- get {
- return ResourceManager.GetString("ServiceBusAuthorizationRuleNotFound", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to The service bus entity '{0}' is not found..
- ///
- public static string ServiceBusEntityTypeNotFound {
- get {
- return ResourceManager.GetString("ServiceBusEntityTypeNotFound", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Internal Server Error. This could happen due to an incorrect/missing namespace.
- ///
- public static string ServiceBusNamespaceMissingMessage {
- get {
- return ResourceManager.GetString("ServiceBusNamespaceMissingMessage", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to service configuration.
- ///
- public static string ServiceConfiguration {
- get {
- return ResourceManager.GetString("ServiceConfiguration", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to service definition.
- ///
- public static string ServiceDefinition {
- get {
- return ResourceManager.GetString("ServiceDefinition", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to ServiceDefinition.csdef.
- ///
- public static string ServiceDefinitionFileName {
- get {
- return ResourceManager.GetString("ServiceDefinitionFileName", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to ServiceDefinition.csdef.
- ///
- public static string ServiceDefinitionFileName1 {
- get {
- return ResourceManager.GetString("ServiceDefinitionFileName1", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to {0}Deploy.
- ///
- public static string ServiceDeploymentName {
- get {
- return ResourceManager.GetString("ServiceDeploymentName", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to The specified cloud service "{0}" does not exist..
- ///
- public static string ServiceDoesNotExist {
- get {
- return ResourceManager.GetString("ServiceDoesNotExist", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to {0} slot for service {1} is in {2} state, please wait until it finish and update it's status.
- ///
- public static string ServiceIsInTransitionState {
- get {
- return ResourceManager.GetString("ServiceIsInTransitionState", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Unable to retrieve service key for ServicePrincipal account {0}. Please run the Add-AzureAccount cmdlet to supply the credentials for this service principal..
- ///
- public static string ServiceKeyNotFound {
- get {
- return ResourceManager.GetString("ServiceKeyNotFound", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to .
- ///
- public static string ServiceManagementClientExceptionStringFormat {
- get {
- return ResourceManager.GetString("ServiceManagementClientExceptionStringFormat", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to "An exception occurred when calling the ServiceManagement API. HTTP Status Code: {0}. Service Management Error Code: {1}. Message: {2}. Operation Tracking ID: {3}.".
- ///
- public static string ServiceManagementClientExceptionStringFormat1 {
- get {
- return ResourceManager.GetString("ServiceManagementClientExceptionStringFormat1", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Begin Operation: {0}.
- ///
- public static string ServiceManagementExecuteClientActionBeginOperation {
- get {
- return ResourceManager.GetString("ServiceManagementExecuteClientActionBeginOperation", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Completed Operation: {0}.
- ///
- public static string ServiceManagementExecuteClientActionCompletedOperation {
- get {
- return ResourceManager.GetString("ServiceManagementExecuteClientActionCompletedOperation", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Begin Operation: {0}.
- ///
- public static string ServiceManagementExecuteClientActionInOCSBeginOperation {
- get {
- return ResourceManager.GetString("ServiceManagementExecuteClientActionInOCSBeginOperation", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Completed Operation: {0}.
- ///
- public static string ServiceManagementExecuteClientActionInOCSCompletedOperation {
- get {
- return ResourceManager.GetString("ServiceManagementExecuteClientActionInOCSCompletedOperation", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to service name.
- ///
- public static string ServiceName {
- get {
- return ResourceManager.GetString("ServiceName", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to The provided service name {0} already exists, please pick another name.
- ///
- public static string ServiceNameExists {
- get {
- return ResourceManager.GetString("ServiceNameExists", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to The provided service name {0} already exists, please pick another name.
- ///
- public static string ServiceNameExists1 {
- get {
- return ResourceManager.GetString("ServiceNameExists1", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Please provide name for the hosted service.
- ///
- public static string ServiceNameMissingMessage {
- get {
- return ResourceManager.GetString("ServiceNameMissingMessage", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to service parent directory.
- ///
- public static string ServiceParentDirectory {
- get {
- return ResourceManager.GetString("ServiceParentDirectory", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Service {0} removed successfully.
- ///
- public static string ServiceRemovedMessage {
- get {
- return ResourceManager.GetString("ServiceRemovedMessage", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to service directory.
- ///
- public static string ServiceRoot {
- get {
- return ResourceManager.GetString("ServiceRoot", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to service settings.
- ///
- public static string ServiceSettings {
- get {
- return ResourceManager.GetString("ServiceSettings", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to The storage account name '{0}' is invalid. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only..
- ///
- public static string ServiceSettings_ValidateStorageAccountName_InvalidName {
- get {
- return ResourceManager.GetString("ServiceSettings_ValidateStorageAccountName_InvalidName", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to The storage account name '{0}' is invalid. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only..
- ///
- public static string ServiceSettings_ValidateStorageAccountName_InvalidName1 {
- get {
- return ResourceManager.GetString("ServiceSettings_ValidateStorageAccountName_InvalidName1", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to service settings.
- ///
- public static string ServiceSettings1 {
- get {
- return ResourceManager.GetString("ServiceSettings1", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to The {0} slot for cloud service {1} doesn't exist..
- ///
- public static string ServiceSlotDoesNotExist {
- get {
- return ResourceManager.GetString("ServiceSlotDoesNotExist", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to {0} slot for service {1} is {2}.
- ///
- public static string ServiceStatusChanged {
- get {
- return ResourceManager.GetString("ServiceStatusChanged", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Set Add-On Confirmation.
- ///
- public static string SetAddOnConformation {
- get {
- return ResourceManager.GetString("SetAddOnConformation", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Profile {0} does not contain endpoint {1}. Adding it..
- ///
- public static string SetInexistentTrafficManagerEndpointMessage {
- get {
- return ResourceManager.GetString("SetInexistentTrafficManagerEndpointMessage", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Note - You will be charged the amount for the new plan, without being refunded for time remaining
- ///in the existing plan.
- ///By typing "Yes", I (a) authorize Microsoft to charge my current payment method on a monthly basis
- ///for the amount indicated at {0} for {1} until my service is cancelled or terminated, and (b)
- ///agree to the {2}'s terms of user and privacy statement at {0} and (c) agree to sharing my
- ///contact information with {2}..
- ///
- public static string SetMicrosoftAddOnMessage {
- get {
- return ResourceManager.GetString("SetMicrosoftAddOnMessage", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Note - You will be charged the amount for the new plan, without being refunded for time remaining
- ///in the existing plan.
- ///By typing "Yes", I (a) authorize Microsoft to charge my current payment method on a monthly basis
- ///for the amount indicated at {0} for {1} until my service is cancelled or terminated, and (b)
- ///acknowledge the offering is provided by {2}, not Microsoft, and agree to {2}'s terms of
- ///use and privacy statement at <url> and (c) agree to sharing my contact information with {2}..
- ///
- public static string SetNonMicrosoftAddOnMessage {
- get {
- return ResourceManager.GetString("SetNonMicrosoftAddOnMessage", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Role {0} instances are set to {1}.
- ///
- public static string SetRoleInstancesMessage {
- get {
- return ResourceManager.GetString("SetRoleInstancesMessage", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to {"Slot":"","Location":"","Subscription":"","StorageAccountName":""}.
- ///
- public static string SettingsFileEmptyContent {
- get {
- return ResourceManager.GetString("SettingsFileEmptyContent", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to deploymentSettings.json.
- ///
- public static string SettingsFileName {
- get {
- return ResourceManager.GetString("SettingsFileName", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to deploymentSettings.json.
- ///
- public static string SettingsFileName1 {
- get {
- return ResourceManager.GetString("SettingsFileName1", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Insufficient parameters passed to create a new endpoint..
- ///
- public static string SetTrafficManagerEndpointNeedsParameters {
- get {
- return ResourceManager.GetString("SetTrafficManagerEndpointNeedsParameters", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Ambiguous operation: the profile name specified doesn't match the name of the profile object..
- ///
- public static string SetTrafficManagerProfileAmbiguous {
- get {
- return ResourceManager.GetString("SetTrafficManagerProfileAmbiguous", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Confirm.
- ///
- public static string ShouldProcessCaption {
- get {
- return ResourceManager.GetString("ShouldProcessCaption", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Confirm.
- ///
- public static string ShouldProcessCaption1 {
- get {
- return ResourceManager.GetString("ShouldProcessCaption1", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Shutdown.
- ///
- public static string Shutdown {
- get {
- return ResourceManager.GetString("Shutdown", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to /sites:{0};{1};"{2}/{0}" .
- ///
- public static string SitesArgTemplate {
- get {
- return ResourceManager.GetString("SitesArgTemplate", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to 1000.
- ///
- public static string StandardRetryDelayInMs {
- get {
- return ResourceManager.GetString("StandardRetryDelayInMs", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Start.
- ///
- public static string Start {
- get {
- return ResourceManager.GetString("Start", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Started.
- ///
- public static string StartedEmulator {
- get {
- return ResourceManager.GetString("StartedEmulator", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Starting Emulator....
- ///
- public static string StartingEmulator {
- get {
- return ResourceManager.GetString("StartingEmulator", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to start.
- ///
- public static string StartStorageEmulatorCommandArgument {
- get {
- return ResourceManager.GetString("StartStorageEmulatorCommandArgument", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Stop.
- ///
- public static string Stop {
- get {
- return ResourceManager.GetString("Stop", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Stopping emulator....
- ///
- public static string StopEmulatorMessage {
- get {
- return ResourceManager.GetString("StopEmulatorMessage", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Stopped.
- ///
- public static string StoppedEmulatorMessage {
- get {
- return ResourceManager.GetString("StoppedEmulatorMessage", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to stop.
- ///
- public static string StopStorageEmulatorCommandArgument {
- get {
- return ResourceManager.GetString("StopStorageEmulatorCommandArgument", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Account Name:.
- ///
- public static string StorageAccountName {
- get {
- return ResourceManager.GetString("StorageAccountName", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Cannot find storage account '{0}' please type the name of an existing storage account..
- ///
- public static string StorageAccountNotFound {
- get {
- return ResourceManager.GetString("StorageAccountNotFound", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to WAStorageEmulator.exe.
- ///
- public static string StorageEmulatorExe {
- get {
- return ResourceManager.GetString("StorageEmulatorExe", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to InstallPath.
- ///
- public static string StorageEmulatorInstallPathRegistryKeyValue {
- get {
- return ResourceManager.GetString("StorageEmulatorInstallPathRegistryKeyValue", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to SOFTWARE\Microsoft\Windows Azure Storage Emulator.
- ///
- public static string StorageEmulatorRegistryKey {
- get {
- return ResourceManager.GetString("StorageEmulatorRegistryKey", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Primary Key:.
- ///
- public static string StoragePrimaryKey {
- get {
- return ResourceManager.GetString("StoragePrimaryKey", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Secondary Key:.
- ///
- public static string StorageSecondaryKey {
- get {
- return ResourceManager.GetString("StorageSecondaryKey", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to The subscription named {0} already exists..
- ///
- public static string SubscriptionAlreadyExists {
- get {
- return ResourceManager.GetString("SubscriptionAlreadyExists", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to The SubscriptionDataFile parameter is deprecated. This parameter will be removed in a future release. See https://github.com/Azure/azure-powershell/wiki/Proposed-Design-Stateless-Azure-Profile for a description of the upcoming mechanism for providing alternate sources of subscription information..
- ///
- public static string SubscriptionDataFileDeprecated {
- get {
- return ResourceManager.GetString("SubscriptionDataFileDeprecated", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to DefaultSubscriptionData.xml.
- ///
- public static string SubscriptionDataFileName {
- get {
- return ResourceManager.GetString("SubscriptionDataFileName", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to The subscription data file {0} does not exist..
- ///
- public static string SubscriptionDataFileNotFound {
- get {
- return ResourceManager.GetString("SubscriptionDataFileNotFound", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to The subscription id {0} doesn't exist..
- ///
- public static string SubscriptionIdNotFoundMessage {
- get {
- return ResourceManager.GetString("SubscriptionIdNotFoundMessage", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Subscription must not be null.
- ///
- public static string SubscriptionMustNotBeNull {
- get {
- return ResourceManager.GetString("SubscriptionMustNotBeNull", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to The subscription name {0} doesn't exist..
- ///
- public static string SubscriptionNameNotFoundMessage {
- get {
- return ResourceManager.GetString("SubscriptionNameNotFoundMessage", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Suspend.
- ///
- public static string Suspend {
- get {
- return ResourceManager.GetString("Suspend", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Swapping website production slot ....
- ///
- public static string SwappingWebsite {
- get {
- return ResourceManager.GetString("SwappingWebsite", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Are you sure you want to swap the website '{0}' production slot with slot '{1}'?.
- ///
- public static string SwapWebsiteSlotWarning {
- get {
- return ResourceManager.GetString("SwapWebsiteSlotWarning", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Unable to create Django application: {0}.
- ///
- public static string UnableToCreateDjangoApp {
- get {
- return ResourceManager.GetString("UnableToCreateDjangoApp", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Make sure you have Python 2.7 installed along with Django installed to site-packages..
- ///
- public static string UnableToCreateDjangoAppFix {
- get {
- return ResourceManager.GetString("UnableToCreateDjangoAppFix", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Unable to decode string from base 64. Please make sure the string is correctly encoded: {0}..
- ///
- public static string UnableToDecodeBase64String {
- get {
- return ResourceManager.GetString("UnableToDecodeBase64String", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Unable to update mismatching Json structured: {0} {1}..
- ///
- public static string UnableToPatchJson {
- get {
- return ResourceManager.GetString("UnableToPatchJson", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Illegal credential type.
- ///
- public static string UnknownCredentialType {
- get {
- return ResourceManager.GetString("UnknownCredentialType", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to The provider {0} is unknown..
- ///
- public static string UnknownProviderMessage {
- get {
- return ResourceManager.GetString("UnknownProviderMessage", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Update.
- ///
- public static string Update {
- get {
- return ResourceManager.GetString("Update", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Updated settings for subscription '{0}'. Current subscription is '{1}'..
- ///
- public static string UpdatedSettings {
- get {
- return ResourceManager.GetString("UpdatedSettings", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to A value for the VLan Id has to be provided..
- ///
- public static string VlanIdRequired {
- get {
- return ResourceManager.GetString("VlanIdRequired", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Please wait....
- ///
- public static string WaitMessage {
- get {
- return ResourceManager.GetString("WaitMessage", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to The azure storage emulator is not installed, skip launching....
- ///
- public static string WarningWhenStorageEmulatorIsMissing {
- get {
- return ResourceManager.GetString("WarningWhenStorageEmulatorIsMissing", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Web.cloud.config.
- ///
- public static string WebCloudConfig {
- get {
- return ResourceManager.GetString("WebCloudConfig", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to web.config.
- ///
- public static string WebConfigTemplateFileName {
- get {
- return ResourceManager.GetString("WebConfigTemplateFileName", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to MSDeploy.
- ///
- public static string WebDeployKeywordInWebSitePublishProfile {
- get {
- return ResourceManager.GetString("WebDeployKeywordInWebSitePublishProfile", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Cannot build the project successfully. Please see logs in {0}..
- ///
- public static string WebProjectBuildFailTemplate {
- get {
- return ResourceManager.GetString("WebProjectBuildFailTemplate", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to WebRole.
- ///
- public static string WebRole {
- get {
- return ResourceManager.GetString("WebRole", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to setup_web.cmd > log.txt.
- ///
- public static string WebRoleStartupTaskCommandLine {
- get {
- return ResourceManager.GetString("WebRoleStartupTaskCommandLine", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to WebRole.xml.
- ///
- public static string WebRoleTemplateFileName {
- get {
- return ResourceManager.GetString("WebRoleTemplateFileName", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to WebSite with given name {0} already exists in the specified Subscription and Webspace..
- ///
- public static string WebsiteAlreadyExists {
- get {
- return ResourceManager.GetString("WebsiteAlreadyExists", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to WebSite with given name {0} already exists in the specified Subscription and Location..
- ///
- public static string WebsiteAlreadyExistsReplacement {
- get {
- return ResourceManager.GetString("WebsiteAlreadyExistsReplacement", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Site {0} already has repository created for it..
- ///
- public static string WebsiteRepositoryAlreadyExists {
- get {
- return ResourceManager.GetString("WebsiteRepositoryAlreadyExists", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Workspaces/WebsiteExtension/Website/{0}/dashboard/.
- ///
- public static string WebsiteSufixUrl {
- get {
- return ResourceManager.GetString("WebsiteSufixUrl", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to https://{0}/msdeploy.axd?site={1}.
- ///
- public static string WebSiteWebDeployUriTemplate {
- get {
- return ResourceManager.GetString("WebSiteWebDeployUriTemplate", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to WorkerRole.
- ///
- public static string WorkerRole {
- get {
- return ResourceManager.GetString("WorkerRole", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to setup_worker.cmd > log.txt.
- ///
- public static string WorkerRoleStartupTaskCommandLine {
- get {
- return ResourceManager.GetString("WorkerRoleStartupTaskCommandLine", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to WorkerRole.xml.
- ///
- public static string WorkerRoleTemplateFileName {
- get {
- return ResourceManager.GetString("WorkerRoleTemplateFileName", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to (x86).
- ///
- public static string x86InProgramFiles {
- get {
- return ResourceManager.GetString("x86InProgramFiles", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Yes.
- ///
- public static string Yes {
- get {
- return ResourceManager.GetString("Yes", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Yes, I agree.
- ///
- public static string YesHint {
- get {
- return ResourceManager.GetString("YesHint", resourceCulture);
- }
- }
- }
-}
diff --git a/src/Common/Azure.Common.Extensions/Properties/Resources.resx b/src/Common/Azure.Common.Extensions/Properties/Resources.resx
deleted file mode 100644
index be358f5d05b0..000000000000
--- a/src/Common/Azure.Common.Extensions/Properties/Resources.resx
+++ /dev/null
@@ -1,1579 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- text/microsoft-resx
-
-
- 2.0
-
-
- System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
- System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
- The remote server returned an error: (401) Unauthorized.
-
-
- Account "{0}" has been added.
-
-
- To switch to a different subscription, please use Select-AzureSubscription.
-
-
- Subscription "{0}" is selected as the default subscription.
-
-
- To view all the subscriptions, please use Get-AzureSubscription.
-
-
- Add-On {0} is created successfully.
-
-
- Add-on name {0} is already used.
-
-
- Add-On {0} not found.
-
-
- Add-on {0} is removed successfully.
-
-
- Add-On {0} is updated successfully.
-
-
- Role has been created at {0}\{1}.
-
-
- Role has been created at {0}\{1}. For easy access to Microsoft Azure services from your application code, install the Microsoft Azure client library for Node.js by running ‘npm install azure’.
-
-
- Role has been created at {0}\{1}. For easy access to Microsoft Azure services from your application code, install the Microsoft Azure client library for PHP by running "pear Azure/Azure".
-
-
- Role has been created at {0}\{1}. For easy access to Microsoft Azure services from your application code, install the Microsoft Azure client library for Python by running "pip Azure".
-
-
- Unable to set role permissions. Please give the 'Network Service' user 'Read & execute' and 'Modify' permissions to the role folder, or run PowerShell as an Administrator
-
-
- A role name '{0}' already exists
-
-
- Windows Azure Powershell\
-
-
- Windows Azure Powershell
-
-
- Emulator
-
-
- Azure Emulator is not installed and is required
-
-
- Azure Emulator\emulator
-
-
- SOFTWARE\Microsoft\Windows Azure Emulator
-
-
- https://manage.Azure.com
-
-
- AZURE_PORTAL_URL
-
-
- Azure SDK\{0}\
-
-
- InstallPath
-
-
- SOFTWARE\Microsoft\Microsoft SDKs\ServiceHosting
-
-
- The installed Azure SDK version is not supported. Make sure you version is between {0} and {1} inclusive
-
-
- Azure service management error
-{0}
-
-
- Azure Authoring Tools are not installed and are required. Installation of Azure SDK for .NET is recommended with Microsoft Web Platform Installer (PI) available at http://www.microsoft.com/web/downloads/platform.aspx.
-
-
- Base Uri was empty.
- WAPackIaaS
-
-
- {0} begin processing without ParameterSet.
-
-
- {0} begin processing with ParameterSet '{1}'.
-
-
- Blob with the name {0} already exists in the account.
-
-
- https://{0}.blob.core.windows.net/
-
-
- AZURE_BLOBSTORAGE_TEMPLATE
-
-
- Memcache is already enabled for role '{0}'.
-
-
- <configuration>
- <configSections>
- <section name="dataCacheClients" type="Microsoft.ApplicationServer.Caching.DataCacheClientsSection, Microsoft.ApplicationServer.Caching.Core" allowLocation="true" allowDefinition="Everywhere" />
- </configSections>
- <dataCacheClients>
- <tracing sinkType="DiagnosticSink" traceLevel="Error" />
- <dataCacheClient name="DefaultShimConfig" useLegacyProtocol="false">
- <autoDiscover isEnabled="true" identifier="$RoleName$" />
- </dataCacheClient>
- </dataCacheClients>
-</configuration>
-
-
- Microsoft.Azure.Plugins.Caching.ClientDiagnosticLevel
-
-
- DiagnosticStore
-
-
- Please upgrade the cache runtime of role '{0}' to '{1}' using Set-AzureServiceProjectRole -RoleName {0} -Runtime Cache -Version {1}
-
-
- CACHERUNTIMEURL
-
-
- cache
-
-
- CacheRuntimeVersion
-
-
- Resources\Scaffolding\Cache
-
-
- setup_cache.cmd > cache_log.txt
-
-
- Installing caching version {0} for Role '{1}' (the caching version locally installed is: {2})
-
-
- Microsoft.Azure.Plugins.Caching.CacheSizePercentage
-
-
- Microsoft.Azure.Plugins.Caching.ConfigStoreConnectionString
-
-
- DefaultEndpointsProtocol=https;AccountName={0};AccountKey={1}
-
-
- Caching
-
-
- Cannot find {0} with name {1}.
-
-
- Deployment for service {0} with {1} slot doesn't exist
-
-
- Can't find valid Microsoft Azure role in current directory {0}
-
-
- service {0} configuration file (ServiceConfiguration.Cloud.cscfg) is either null or doesn't exist
-
-
- Invalid service path! Cannot locate ServiceDefinition.csdef in current folder or parent folders.
-
-
- The subscription named {0} with id {1} is not currently imported. You must import this subscription before it can be updated.
-
-
- ManagementCertificate
-
-
- certificate.pfx
-
-
- Certificate imported into CurrentUser\My\{0}
-
-
- No certificate was found in the certificate store with thumbprint {0}
-
-
- No certificate was found in the certificate store with thumbprint {0}
-
-
- Your account does not have access to the private key for certificate {0}
-
-
- {0} {1} deployment for {2} service
-
-
- Cloud service {0} is in {1} state.
-
-
- Changing/Removing public environment '{0}' is not allowed.
-
-
- Service {0} is set to value {1}
-
-
- Choose which publish settings file to use:
-
-
- Microsoft.Azure.Plugins.Caching.ClientDiagnosticLevel
-
-
- 1
-
-
- cloud_package.cspkg
-
-
- ServiceConfiguration.Cloud.cscfg
-
-
- Add-ons for {0}
-
-
- Communication could not be established. This could be due to an invalid subscription ID. Note that subscription IDs are case sensitive.
-
-
- Complete
-
-
- Complete
-
-
- config.json
-
-
- VirtualMachine creation failed.
- WAPackIaaS
-
-
- Creating the website failed. If this is the first website for this subscription, please create it using the management portal instead.
-
-
- Microsoft.ApplicationServer.Caching.DataCacheClientsSection, Microsoft.ApplicationServer.Caching.Core
-
-
- //blobcontainer[@datacenter='{0}']
-
-
- Setting: {0} as the default and current subscription. To view other subscriptions use Get-AzureSubscription
-
-
- none
-
-
- There are no hostnames which could be used for validation.
-
-
- 8080
-
-
- 1000
-
-
- Auto
-
-
- 80
-
-
- Delete
- WAPackIaaS
-
-
- The {0} slot for service {1} is already in {2} state
-
-
- The deployment in {0} slot for service {1} is removed
-
-
- Microsoft.Azure.Plugins.Caching.DiagnosticLevel
-
-
- 1
-
-
- The key to add already exists in the dictionary.
-
-
- The array index cannot be less than zero.
-
-
- The supplied array does not have enough room to contain the copied elements.
-
-
- The provided dns {0} doesn't exist
-
-
- Microsoft Azure Certificate
-
-
- Endpoint can't be retrieved for storage account
-
-
- {0} end processing.
-
-
- To use Active Directory authentication, you must configure the ActiveDirectoryEndpoint, ActiveDirectoryTenantId, and ActiveDirectorServiceEndpointResourceId for environment of '{0}'. You can configure these properties for this environment using the Set-AzureEnvironment cmdlet.
-
-
- The environment '{0}' already exists.
-
-
- The environment name '{0}' is not found.
-
-
- environments.xml
-
-
- Error creating VirtualMachine
- WAPackIaaS
-
-
- Unable to download available runtimes for location '{0}'
-
-
- Error updating VirtualMachine
- WAPackIaaS
-
-
- Your Microsoft Azure credential in the Windows PowerShell session has expired. Please use Add-AzureAccount to login again.
-
-
- Job Id {0} failed. Error: {1}, ExceptionDetails: {2}
- WAPackIaaS
-
-
- The HTTP request was forbidden with client authentication scheme 'Anonymous'.
-
-
- This add-on requires you to purchase the first instance through the Microsoft Azure Portal. Subsequent purchases can be performed through PowerShell.
-
-
- Operation Status:
-
-
- Resources\Scaffolding\General
-
-
- Getting all available Microsoft Azure Add-Ons, this may take few minutes...
-
-
- Name{0}Primary Key{0}Seconday Key
-
-
- Git not found. Please install git and place it in your command line path.
-
-
- Could not find publish settings. Please run Import-AzurePublishSettingsFile.
-
-
- Could not find publish settings. Please run Import-AzurePublishSettingsFile.
-
-
- iisnode.dll
-
-
- iisnode
-
-
- iisnode-dev\\release\\x64
-
-
- iisnode
-
-
- Installing IISNode version {0} in Azure for WebRole '{1}' (the version locally installed is: {2})
-
-
- Illegal characters in path.
-
-
- Illegal characters in path.
-
-
- Internal Server Error
-
-
- Cannot enable memcach protocol on a cache worker role {0}.
-
-
- Invalid certificate format. Publish settings may be corrupted. Use Get-AzurePublishSettingsFile to download updated settings
-
-
- Invalid certificate format. Publish settings may be corrupted. Use Get-AzurePublishSettingsFile to download updated settings
-
-
- Invalid certificate format.
-
-
- The provided configuration path is invalid or doesn't exist
-
-
- The country name is invalid, please use a valid two character country code, as described in ISO 3166-1 alpha-2.
-
-
- No current subscription has been designated. Use Select-AzureSubscription -Current <subscriptionName> to set the current subscription.
-
-
- The ID of the current subscription is invalid. Use Set-AzureSubscription to fix the subscription ID or use Select-AzureSubscription to use a different subscription.
-
-
- The management certificate of the current subscription is invalid. Use Set-AzureSubscription to fix the management certificate or use Select-AzureSubscription to use a different subscription.
-
-
- No default subscription has been designated. Use Select-AzureSubscription -Default <subscriptionName> to set the default subscription.
-
-
- Deployment with {0} does not exist
-
-
- The deployment slot name {0} is invalid. Slot name must be either "Staging" or "Production".
-
-
- "{0}" is an invalid DNS name for {1}
-
-
- Invalid service endpoint.
-
-
- The provided file in {0} must be have {1} extension
-
-
- File {0} has invalid characters
-
-
- You must create your git publishing credentials using the Microsoft Azure portal.
-Please follow these steps in the portal:
-1. On the left side open "Web Sites"
-2. Click on any website
-3. Choose "Setup Git Publishing" or "Reset deployment credentials"
-4. Back in the PowerShell window, rerun this command by typing "New-AzureWebSite {site name} -Git -PublishingUsername {username}
-
-
- The value {0} provided is not a valid GUID. Please provide a valid GUID.
-
-
- The specified hostname does not exist. Please specify a valid hostname for the site.
-
-
- Role {0} instances must be greater than or equal 0 and less than or equal 20
-
-
- There was an error creating your webjob. Please make sure that the script is in the root folder of the zip file.
-
-
- Cannot create instance of management client type {0}. It does not have the expected constructor.
-
-
- Could not download a valid runtime manifest, Please check your internet connection and try again.
-
-
- The account {0} was not found. Please specify a valid account name.
-
-
- The provided name "{0}" does not match the service bus namespace naming rules.
-
-
- Value cannot be null. Parameter name: '{0}'
-
-
- {0} is invalid or empty
-
-
- The provided package path is invalid or doesn't exist
-
-
- '{0}' is an invalid parameter set name.
-
-
- {0} doesn't exist in {1} or you've not passed valid value for it
-
-
- Path {0} has invalid characters
-
-
- The provided publish settings file {0} has invalid content. Please get valid by running cmdlet Get-AzurePublishSettingsFile
-
-
- The provided publish settings file {0} has invalid content. Please get valid by running cmdlet Get-AzurePublishSettingsFile
-
-
- The provided role name "{0}" has invalid characters
-
-
- A valid name for the service root folder is required
-
-
- {0} is not a recognized runtime type
-
-
- A valid language is required
-
-
- No subscription is currently selected. Use Select-Subscription to activate a subscription.
-
-
- The provided location "{0}" does not exist in the available locations use Get-AzureSBLocation for listing available locations.
-
-
- Please provide a service name or run this command from inside a service project directory.
-
-
- You must provide valid value for {0}
-
-
- You must provide valid value for {0}
-
-
- settings.json is invalid or doesn't exist
-
-
- The subscription named '{0}' cannot be found. Use Set-AzureSubscription to initialize the subscription data.
-
-
- The provided subscription id {0} is not valid
-
-
- Must specify a non-null subscription name.
-
-
- A valid subscription name is required. This can be provided using the -Subscription parameter or by setting the subscription via the Set-AzureSubscription cmdlet
-
-
- The provided subscriptions file {0} has invalid content.
-
-
- Your Azure credentials have not been set up or have expired, please run Add-AzureAccount to set up your Azure credentials.
-
-
- Role {0} VM size should be ExtraSmall, Small, Medium, Large or ExtraLarge.
-
-
- The web job file must have *.zip extension
-
-
- Singleton option works for continuous jobs only.
-
-
- The website {0} was not found. Please specify a valid website name.
-
-
- No job for id: {0} was found.
- WAPackIaaS
-
-
- engines
-
-
- Scaffolding for this language is not yet supported
-
-
- Link already established
-
-
- local_package.csx
-
-
- ServiceConfiguration.Local.cscfg
-
-
- Looking for {0} deployment for {1} cloud service...
-
-
- Looking for cloud service {0}...
-
-
- managementCertificate.pem
-
-
- ?whr={0}
-
-
- //baseuri
-
-
- uri
-
-
- http://az413943.vo.msecnd.net/node/runtimemanifest_0.7.5.2.xml
-
-
- v2.5
-
-
- memcache_default
-
-
- 11211
-
-
- v2.5
-
-
- Python 2.7 is not installed. Please install it as well as Django 1.4.
-
-
- Multiple Add-Ons found holding name {0}
-
-
- Multiple possible publishing users. Please go to the Portal and use the listed deployment user, or click 'set/reset deployment credentials' to set up a new user account, then reurn this cmdlet and specify PublishingUsername.
-
-
- The first publish settings file "{0}" is used. If you want to use another file specify the file name.
-
-
- Microsoft.Azure.Plugins.Caching.NamedCaches
-
-
- {"caches":[{"name":"default","policy":{"eviction":{"type":0},"expiration":{"defaultTTL":10,"isExpirable":true,"type":1},"serverNotification":{"isEnabled":false}},"secondaries":0}]}
-
-
- A publishing username is required. Please specify one using the argument PublishingUsername.
-
-
- New Add-On Confirmation
-
-
- By typing "Yes", I (a) authorize Microsoft to charge my current payment method on a monthly basis
-for the amount indicated at {0} for {1} until my service is cancelled or terminated, and (b)
-agree to the {2}'s terms of user and privacy statement at {0} and (c) agree to sharing my
-contact information with {2}.
-
-
- Internal Server Error. This could happen because the namespace name is already used or due to an incorrect location name. Use Get-AzureSBLocation cmdlet to list valid names.
-
-
- By typing "Yes", I (a) authorize Microsoft to charge my current payment method on a monthly basis
-for the amount indicated at {0} for {1} until my service is cancelled or terminated, and (b)
-acknowledge the offering is provided by {2}, not Microsoft, and agree to {2}'s terms of
-use and privacy statement at {0} and (c) agree to sharing my contact information with {2}.
-
-
- Service has been created at {0}
-
-
- No
-
-
- There is no access token cached for subscription {0}, user id {1}. Use the Add-AzureAccount cmdlet to log in again and get a token for this subscription.
-
-
- The service does not have any cache worker roles, add one first by running cmdlet Add-AzureCacheWorkerRole.
-
-
- No clouds available
- WAPackIaaS
-
-
- nodejs
-
-
- node
-
-
- node.exe
-
-
- There is no default subscription set, please set a default subscription by running Set-AzureSubscription -Default <subscription name>
-
-
- Microsoft SDKs\Azure\Nodejs\Nov2011
-
-
- nodejs
-
-
- node
-
-
- Resources\Scaffolding\Node
-
-
- Microsoft.Azure.Commands.CloudService.ScaffoldingResources.Node
-
-
- Installing Node version {0} in Azure for Role '{1}' (the Node version locally installed is: {2})
-
-
- No, I do not agree
-
-
- Please connect to internet before executing this cmdlet
-
-
- Please connect to internet before executing this cmdlet
-
-
- No publish settings files with extension *.publishsettings are found in the directory "{0}".
-
-
- '{0}' must be a cache worker role. Verify that it has proper cache worker role configuration.
-
-
- Certificate can't be null.
-
-
- {0} could not be null or empty
-
-
- Unable to add a null RoleSettings to {0}
-
-
- Unable to add new role to null service definition
-
-
- The request offer '{0}' is not found.
-
-
- Operation "{0}" failed on VM with ID: {1}
- WAPackIaaS
-
-
- The REST operation failed with message '{0}' and error code '{1}'
-
-
- Job Id {0} did not complete within expected time or it is in Failed/Canceled/Invalid state.
- WAPackIaaS
-
-
- package
-
-
- Package is created at service root path {0}.
-
-
- {{
- "author": "",
-
- "name": "{0}",
- "version": "0.0.0",
- "dependencies":{{}},
- "devDependencies":{{}},
- "optionalDependencies": {{}},
- "engines": {{
- "node": "*",
- "iisnode": "*"
- }}
-
-}}
-
-
-
- package.json
-
-
- Path {0} doesn't exist.
-
-
- Path for {0} doesn't exist in {1}.
-
-
- A value for the Peer Asn has to be provided.
-
-
- 5.4.0
-
-
- php
-
-
- Resources\Scaffolding\PHP
-
-
- Microsoft.Azure.Commands.CloudService.ScaffoldingResources.PHP
-
-
- Installing PHP version {0} for Role '{1}' (the PHP version locally installed is: {2})
-
-
- You must create your first web site using the Microsoft Azure portal.
-Please follow these steps in the portal:
-1. At the bottom of the page, click on New > Web Site > Quick Create
-2. Type {0} in the URL field
-3. Click on "Create Web Site"
-4. Once the site has been created, click on the site name
-5. Click on "Set up Git publishing" or "Reset deployment credentials" and setup a publishing username and password. Use those credentials for all new websites you create.
-
-
- 6. Back in the console window, rerun this command by typing "New-AzureWebsite <site name> -Git"
-
-
- A value for the Primary Peer Subnet has to be provided.
-
-
- Promotion code can be used only when updating to a new plan.
-
-
- Service not published at user request.
-
-
- Complete.
-
-
- Connecting...
-
-
- Created Deployment ID: {0}.
-
-
- Created hosted service '{0}'.
-
-
- Created Website URL: {0}.
-
-
- Creating...
-
-
- Initializing...
-
-
- busy
-
-
- creating the virtual machine
-
-
- Instance {0} of role {1} is {2}.
-
-
- ready
-
-
- Preparing deployment for {0} with Subscription ID: {1}...
-
-
- Publishing {0} to Microsoft Azure. This may take several minutes...
-
-
- publish settings
-
-
- Azure
-
-
- .PublishSettings
-
-
- publishSettings.xml
-
-
- &whr={0}
-
-
- Publish settings imported
-
-
- AZURE_PUBLISHINGPROFILE_URL
-
-
- Starting...
-
-
- Upgrading...
-
-
- Uploading Package to storage service {0}...
-
-
- Verifying storage account '{0}'...
-
-
- Resources\Scaffolding\Python
-
-
- Replace current deployment with '{0}' Id ?
-
-
- Are you sure you want to regenerate key?
-
-
- Generate new key.
-
-
- Are you sure you want to remove account '{0}'?
-
-
- Removing account
-
-
- Remove Add-On Confirmation
-
-
- If you delete this add-on, your data may be deleted and the operation may not be undone. You may have to purchase it again from the Microsoft Azure Store to use it. The price of the add-on may not be refunded. Are you sure you want to delete this add-on? Enter “Yes” to confirm.
-
-
- Remove-AzureBGPPeering Operation failed.
-
-
- Removing Bgp Peering
-
-
- Successfully removed Azure Bgp Peering with Service Key {0}.
-
-
- Are you sure you want to remove the Bgp Peering with service key '{0}'?
-
-
- Are you sure you want to remove the Dedicated Circuit with service key '{0}'?
-
-
- Remove-AzureDedicatedCircuit Operation failed.
-
-
- Remove-AzureDedicatedCircuitLink Operation failed.
-
-
- Removing Dedicated Circui Link
-
-
- Successfully removed Azure Dedicated Circuit Link with Service Key {0} and Vnet Name {1}
-
-
- Are you sure you want to remove the Dedicated Circuit Link with service key '{0}' and virtual network name '{1}'?
-
-
- Removing Dedicated Circuit
-
-
- Successfully removed Azure Dedicated Circuit with Service Key {0}.
-
-
- Removing cloud service {0}...
-
-
- The current subscription is being removed. Use Select-AzureSubscription <subscriptionName> to select a new current subscription.
-
-
- The default subscription is being removed. Use Select-AzureSubscription -Default <subscriptionName> to select a new default subscription.
-
-
- Removing {0} deployment for {1} service
-
-
- Removing job collection
-
-
- Are you sure you want to remove the job collection "{0}"
-
-
- Removing job
-
-
- Are you sure you want to remove the job "{0}"
-
-
- Are you sure you want to remove the account?
-
-
- Account removed.
-
-
- Internal Server Error. This could happen because the namespace does not exist or it does not exist under your subscription.
-
-
- Removing old package {0}...
-
-
- Are you sure you want to delete the namespace '{0}'?
-
-
- Are you sure you want to remove cloud service?
-
-
- Remove cloud service and all it's deployments
-
-
- Are you sure you want to remove subscription '{0}'?
-
-
- Removing subscription
-
-
- Are you sure you want to delete the VM '{0}'?
-
-
- Deleting VM.
-
-
- Removing WebJob...
-
-
- Are you sure you want to remove job '{0}'?
-
-
- Removing website
-
-
- Are you sure you want to remove the website "{0}"
-
-
- Deleting namespace
-
-
- Repository is not setup. You need to pass a valid site name.
-
-
- Reserved IP with the Name:'{0}' will no longer be in use after the deployment is deleted, and it is still reserved for later use.
-
-
- Resource with ID : {0} does not exist.
- WAPackIaaS
-
-
- Restart
- WAPackIaaS
-
-
- Resume
- WAPackIaaS
-
-
- /role:{0};"{1}/{0}"
-
-
- bin
-
-
- Role {0} is {1}
-
-
- 20
-
-
- role name
-
-
- The provided role name {0} doesn't exist
-
-
- RoleSettings.xml
-
-
- Role type {0} doesn't exist
-
-
- public static Dictionary<string, Location> ReverseLocations { get; private set; }
-
-
- Preparing runtime deployment for service '{0}'
-
-
- WARNING Runtime Mismatch: Are you sure that you want to publish service '{0}' using an Azure runtime version that does not match your local runtime version?
-
-
- RUNTIMEOVERRIDEURL
-
-
- /runtimemanifest/runtimes/runtime
-
-
- RUNTIMEID
-
-
- RUNTIMEURL
-
-
- RUNTIMEVERSIONPRIMARYKEY
-
-
- scaffold.xml
-
-
- Invalid location entered. Pick one of the locations from Get-AzureSchedulerLocation
-
-
- A value for the Secondary Peer Subnet has to be provided.
-
-
- Service {0} already exists on disk in location {1}
-
-
- No ServiceBus authorization rule with the given characteristics was found
-
-
- The service bus entity '{0}' is not found.
-
-
- Internal Server Error. This could happen due to an incorrect/missing namespace
-
-
- service configuration
-
-
- service definition
-
-
- ServiceDefinition.csdef
-
-
- ServiceDefinition.csdef
-
-
- {0}Deploy
-
-
- The specified cloud service "{0}" does not exist.
-
-
- {0} slot for service {1} is in {2} state, please wait until it finish and update it's status
-
-
- Begin Operation: {0}
-
-
- Completed Operation: {0}
-
-
- Begin Operation: {0}
-
-
- Completed Operation: {0}
-
-
- service name
-
-
- The provided service name {0} already exists, please pick another name
-
-
- The provided service name {0} already exists, please pick another name
-
-
- Please provide name for the hosted service
-
-
- service parent directory
-
-
- Service {0} removed successfully
-
-
- service directory
-
-
- service settings
-
-
- The storage account name '{0}' is invalid. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
-
-
- The storage account name '{0}' is invalid. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
-
-
- service settings
-
-
- The {0} slot for cloud service {1} doesn't exist.
-
-
- {0} slot for service {1} is {2}
-
-
- Set Add-On Confirmation
-
-
- Note - You will be charged the amount for the new plan, without being refunded for time remaining
-in the existing plan.
-By typing "Yes", I (a) authorize Microsoft to charge my current payment method on a monthly basis
-for the amount indicated at {0} for {1} until my service is cancelled or terminated, and (b)
-agree to the {2}'s terms of user and privacy statement at {0} and (c) agree to sharing my
-contact information with {2}.
-
-
- Note - You will be charged the amount for the new plan, without being refunded for time remaining
-in the existing plan.
-By typing "Yes", I (a) authorize Microsoft to charge my current payment method on a monthly basis
-for the amount indicated at {0} for {1} until my service is cancelled or terminated, and (b)
-acknowledge the offering is provided by {2}, not Microsoft, and agree to {2}'s terms of
-use and privacy statement at <url> and (c) agree to sharing my contact information with {2}.
-
-
- Role {0} instances are set to {1}
-
-
- {"Slot":"","Location":"","Subscription":"","StorageAccountName":""}
-
-
- deploymentSettings.json
-
-
- deploymentSettings.json
-
-
- Confirm
-
-
- Confirm
-
-
- Shutdown
- WAPackIaaS
-
-
- /sites:{0};{1};"{2}/{0}"
-
-
- 1000
-
-
- Start
- WAPackIaaS
-
-
- Started
-
-
- Starting Emulator...
-
-
- start
-
-
- Stop
- WAPackIaaS
-
-
- Stopping emulator...
-
-
- Stopped
-
-
- stop
-
-
- Account Name:
-
-
- Cannot find storage account '{0}' please type the name of an existing storage account.
-
-
- WAStorageEmulator.exe
-
-
- InstallPath
-
-
- SOFTWARE\Microsoft\Windows Azure Storage Emulator
-
-
- Primary Key:
-
-
- Secondary Key:
-
-
- The subscription named {0} already exists.
-
-
- DefaultSubscriptionData.xml
-
-
- The subscription data file {0} does not exist.
-
-
- The subscription id {0} doesn't exist.
-
-
- The subscription name {0} doesn't exist.
-
-
- Subscription must not be null
- WAPackIaaS
-
-
- Suspend
- WAPackIaaS
-
-
- Swapping website production slot ...
-
-
- Are you sure you want to swap the website '{0}' production slot with slot '{1}'?
-
-
- Unable to create Django application: {0}
-
-
- Make sure you have Python 2.7 installed along with Django installed to site-packages.
-
-
- Unable to update mismatching Json structured: {0} {1}.
-
-
- The provider {0} is unknown.
-
-
- Update
- WAPackIaaS
-
-
- Updated settings for subscription '{0}'. Current subscription is '{1}'.
-
-
- A value for the VLan Id has to be provided.
-
-
- Please wait...
-
-
- The azure storage emulator is not installed, skip launching...
-
-
- Web.cloud.config
-
-
- web.config
-
-
- MSDeploy
-
-
- Cannot build the project successfully. Please see logs in {0}.
-
-
- WebRole
-
-
- setup_web.cmd > log.txt
-
-
- WebRole.xml
-
-
- WebSite with given name {0} already exists in the specified Subscription and Webspace.
-
-
- WebSite with given name {0} already exists in the specified Subscription and Location.
-
-
- Site {0} already has repository created for it.
-
-
- Workspaces/WebsiteExtension/Website/{0}/dashboard/
-
-
- https://{0}/msdeploy.axd?site={1}
-
-
- WorkerRole
-
-
- setup_worker.cmd > log.txt
-
-
- WorkerRole.xml
-
-
- (x86)
-
-
- Yes
-
-
- Yes, I agree
-
-
- Remove-AzureTrafficManagerProfile Operation failed.
-
-
- Successfully removed Traffic Manager profile with name {0}.
-
-
- Are you sure you want to remove the Traffic Manager profile "{0}"?
-
-
- Profile {0} already has an endpoint with name {1}
-
-
- Profile {0} does not contain endpoint {1}. Adding it.
-
-
- The endpoint {0} cannot be removed from profile {1} because it's not in the profile.
-
-
- Insufficient parameters passed to create a new endpoint.
-
-
- Ambiguous operation: the profile name specified doesn't match the name of the profile object.
-
-
- <NONE>
-
-
-
-
-
- "An exception occurred when calling the ServiceManagement API. HTTP Status Code: {0}. Service Management Error Code: {1}. Message: {2}. Operation Tracking ID: {3}."
- {0} is the HTTP status code. {1} is the Service Management Error Code. {2} is the Service Management Error message. {3} is the operation tracking ID.
-
-
- Unable to decode string from base 64. Please make sure the string is correctly encoded: {0}.
- {0} is the string that is not in a valid base 64 format.
-
-
- -Credential parameter can only be used with Organization ID credentials. For more information, please refer to http://go.microsoft.com/fwlink/?linkid=331007&clcid=0x409 for more information about the difference between an organizational account and a Microsoft account.
-
-
- Skipping external tenant {0}, because you are using a guest or a foreign principal object identity. In order to access this tenant, please run Add-AzureAccount without "-Credential".
-
-
- Removing an environment will remove all associated subscriptions and accounts. Are you sure you want to remove an environment '{0}'?
-
-
- Removing environment
-
-
- Removing public environment is not supported.
-
-
- Changing public environment is not supported.
-
-
- Credential type invalid, only handles '{0}'
-
-
- Illegal credential type
-
-
- There is no subscription associated with account {0}.
-
-
- Account id doesn't match one in subscription.
-
-
- Environment name doesn't match one in subscription.
-
-
- Unable to retrieve service key for ServicePrincipal account {0}. Please run the Add-AzureAccount cmdlet to supply the credentials for this service principal.
-
-
- Removing the Azure profile will remove all associated environments, subscriptions, and accounts. Are you sure you want to remove the Azure profile?
-
-
- Removing the Azure profile
-
-
- The SubscriptionDataFile parameter is deprecated. This parameter will be removed in a future release. See https://github.com/Azure/azure-powershell/wiki/Proposed-Design-Stateless-Azure-Profile for a description of the upcoming mechanism for providing alternate sources of subscription information.
-
-
\ No newline at end of file
diff --git a/src/Common/Azure.Common.Extensions/Utilities/DictionaryExtensions.cs b/src/Common/Azure.Common.Extensions/Utilities/DictionaryExtensions.cs
deleted file mode 100644
index 19c2f027c20a..000000000000
--- a/src/Common/Azure.Common.Extensions/Utilities/DictionaryExtensions.cs
+++ /dev/null
@@ -1,78 +0,0 @@
-// ----------------------------------------------------------------------------------
-//
-// Copyright Microsoft Corporation
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-// http://www.apache.org/licenses/LICENSE-2.0
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-// ----------------------------------------------------------------------------------
-
-using System;
-using System.Collections.Generic;
-using System.Linq;
-
-namespace Microsoft.Azure.Common.Extensions.Utilities
-{
- public static class DictionaryExtensions
- {
- public static TValue GetProperty(this Dictionary dictionary, TKey property)
- {
- if (dictionary.ContainsKey(property))
- {
- return dictionary[property];
- }
-
- return default(TValue);
- }
-
- public static string[] GetPropertyAsArray(this Dictionary dictionary, TKey property)
- {
- if (dictionary.ContainsKey(property))
- {
- return dictionary[property].Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
- }
-
- return new string[0];
- }
-
- public static void SetProperty(this Dictionary dictionary, TKey property, params string[] values)
- {
- if (values == null || values.Length == 0)
- {
- if (dictionary.ContainsKey(property))
- {
- dictionary.Remove(property);
- }
- }
- else
- {
- dictionary[property] = string.Join(",", values);
- }
- }
-
- public static void SetOrAppendProperty(this Dictionary dictionary, TKey property, params string[] values)
- {
- string oldValueString = "";
- if (dictionary.ContainsKey(property))
- {
- oldValueString = dictionary[property];
- }
- var oldValues = oldValueString.Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
- var newValues = oldValues.Union(values, StringComparer.CurrentCultureIgnoreCase).Where(s => !string.IsNullOrEmpty(s)).ToArray();
- if (newValues.Any())
- {
- dictionary[property] = string.Join(",", newValues);
- }
- }
-
- public static bool IsPropertySet(this Dictionary dictionary, TKey property)
- {
- return dictionary.ContainsKey(property) && !string.IsNullOrEmpty(dictionary[property]);
- }
- }
-}
diff --git a/src/Common/Azure.Common.Extensions/Utilities/FileUtilities.cs b/src/Common/Azure.Common.Extensions/Utilities/FileUtilities.cs
deleted file mode 100644
index 0a1aa121f2a9..000000000000
--- a/src/Common/Azure.Common.Extensions/Utilities/FileUtilities.cs
+++ /dev/null
@@ -1,322 +0,0 @@
-// ----------------------------------------------------------------------------------
-//
-// Copyright Microsoft Corporation
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-// http://www.apache.org/licenses/LICENSE-2.0
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-// ----------------------------------------------------------------------------------
-
-using Microsoft.Azure.Common.Extensions.Interfaces;
-using Microsoft.Azure.Common.Extensions.Models;
-using Microsoft.Azure.Common.Extensions.Properties;
-using System;
-using System.Diagnostics;
-using System.IO;
-using System.Linq;
-using System.Reflection;
-using System.Text;
-
-namespace Microsoft.Azure.Common.Extensions
-{
- public static class FileUtilities
- {
- static FileUtilities()
- {
- DataStore = new DiskDataStore();
- }
-
- public static IDataStore DataStore { get; set; }
-
- public static string GetAssemblyDirectory()
- {
- var assemblyPath = Uri.UnescapeDataString(new Uri(Assembly.GetExecutingAssembly().CodeBase).AbsolutePath);
- return Path.GetDirectoryName(assemblyPath);
- }
-
- public static string GetContentFilePath(string fileName)
- {
- return GetContentFilePath(GetAssemblyDirectory(), fileName);
- }
-
- public static string GetContentFilePath(string startDirectory, string fileName)
- {
- string path = Path.Combine(startDirectory, fileName);
-
- // Try search in the subdirectories in case that the file path does not exist in root path
- if (!DataStore.FileExists(path) && !DataStore.DirectoryExists(path))
- {
- try
- {
- path = DataStore.GetDirectories(startDirectory, fileName, SearchOption.AllDirectories).FirstOrDefault();
-
- if (string.IsNullOrEmpty(path))
- {
- path = DataStore.GetFiles(startDirectory, fileName, SearchOption.AllDirectories).First();
- }
- }
- catch
- {
- throw new FileNotFoundException(Path.Combine(startDirectory, fileName));
- }
- }
-
- return path;
- }
-
- public static string GetWithProgramFilesPath(string directoryName, bool throwIfNotFound)
- {
- string programFilesPath = Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles);
- if (DataStore.DirectoryExists(Path.Combine(programFilesPath, directoryName)))
- {
- return Path.Combine(programFilesPath, directoryName);
- }
- else
- {
- if (programFilesPath.IndexOf(Resources.x86InProgramFiles, StringComparison.InvariantCultureIgnoreCase) == -1)
- {
- programFilesPath += Resources.x86InProgramFiles;
- if (throwIfNotFound)
- {
- Validate.ValidateDirectoryExists(Path.Combine(programFilesPath, directoryName));
- }
- return Path.Combine(programFilesPath, directoryName);
- }
- else
- {
- programFilesPath = programFilesPath.Replace(Resources.x86InProgramFiles, String.Empty);
- if (throwIfNotFound)
- {
- Validate.ValidateDirectoryExists(Path.Combine(programFilesPath, directoryName));
- }
- return Path.Combine(programFilesPath, directoryName);
- }
- }
- }
-
- ///
- /// Copies a directory.
- ///
- /// The source directory name
- /// The destination directory name
- /// Should the copy be recursive
- public static void DirectoryCopy(string sourceDirName, string destDirName, bool copySubDirs)
- {
- var dirs = DataStore.GetDirectories(sourceDirName);
-
- if (!DataStore.DirectoryExists(sourceDirName))
- {
- throw new DirectoryNotFoundException(String.Format(Resources.PathDoesNotExist, sourceDirName));
- }
-
- DataStore.CreateDirectory(destDirName);
-
- var files = DataStore.GetFiles(sourceDirName);
- foreach (var file in files)
- {
- string tempPath = Path.Combine(destDirName, Path.GetFileName(file));
- DataStore.CopyFile(file, tempPath);
- }
-
- if (copySubDirs)
- {
- foreach (var subdir in dirs)
- {
- string temppath = Path.Combine(destDirName, Path.GetDirectoryName(subdir));
- DirectoryCopy(subdir, temppath, copySubDirs);
- }
- }
- }
-
- ///
- /// Ensures that a directory exists beofre attempting to write a file
- ///
- /// The path to the file that will be created
- public static void EnsureDirectoryExists(string pathName)
- {
- Validate.ValidateStringIsNullOrEmpty(pathName, "Settings directory");
- string directoryPath = Path.GetDirectoryName(pathName);
- if (!DataStore.DirectoryExists(directoryPath))
- {
- DataStore.CreateDirectory(directoryPath);
- }
- }
-
- ///
- /// Create a unique temp directory.
- ///
- /// Path to the temp directory.
- public static string CreateTempDirectory()
- {
- string tempPath;
- do
- {
- tempPath = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName());
- }
- while (DataStore.DirectoryExists(tempPath) || DataStore.FileExists(tempPath));
-
- DataStore.CreateDirectory(tempPath);
- return tempPath;
- }
-
- ///
- /// Copy a directory from one path to another.
- ///
- /// Source directory.
- /// Destination directory.
- public static void CopyDirectory(string sourceDirectory, string destinationDirectory)
- {
- Debug.Assert(!String.IsNullOrEmpty(sourceDirectory), "sourceDictory cannot be null or empty!");
- Debug.Assert(Directory.Exists(sourceDirectory), "sourceDirectory must exist!");
- Debug.Assert(!String.IsNullOrEmpty(destinationDirectory), "destinationDirectory cannot be null or empty!");
- Debug.Assert(!Directory.Exists(destinationDirectory), "destinationDirectory must not exist!");
-
- foreach (string file in DataStore.GetFiles(sourceDirectory, "*", SearchOption.AllDirectories))
- {
- string relativePath = file.Substring(
- sourceDirectory.Length + 1,
- file.Length - sourceDirectory.Length - 1);
- string destinationPath = Path.Combine(destinationDirectory, relativePath);
-
- string destinationDir = Path.GetDirectoryName(destinationPath);
- if (!DataStore.DirectoryExists(destinationDir))
- {
- DataStore.CreateDirectory(destinationDir);
- }
-
- DataStore.CopyFile(file, destinationPath);
- }
- }
-
- public static Encoding GetFileEncoding(string path)
- {
- Encoding encoding;
-
-
- if (DataStore.FileExists(path))
- {
- using (StreamReader r = new StreamReader(DataStore.ReadFileAsStream(path)))
- {
- encoding = r.CurrentEncoding;
- }
- }
- else
- {
- encoding = Encoding.Default;
- }
-
- return encoding;
- }
-
- public static string CombinePath(params string[] paths)
- {
- return Path.Combine(paths);
- }
-
- ///
- /// Returns true if path is a valid directory.
- ///
- ///
- ///
- public static bool IsValidDirectoryPath(string path)
- {
- if (String.IsNullOrEmpty(path))
- {
- return false;
- }
-
- try
- {
- FileAttributes attributes = DataStore.GetFileAttributes(path);
-
- if ((attributes & FileAttributes.Directory) == FileAttributes.Directory)
- {
- return true;
- }
- else
- {
- return false;
- }
- }
- catch
- {
- return false;
- }
- }
-
- public static void RecreateDirectory(string dir)
- {
- if (DataStore.DirectoryExists(dir))
- {
- DataStore.DeleteDirectory(dir);
- }
-
- DataStore.CreateDirectory(dir);
- }
-
- ///
- /// Gets the root installation path for the given Azure module.
- ///
- /// The module name
- /// The module full path
- public static string GetPSModulePathForModule(AzureModule module)
- {
- return GetContentFilePath(GetInstallPath(), GetModuleFolderName(module));
- }
-
- ///
- /// Gets the root directory for all modules installation.
- ///
- /// The install path
- public static string GetInstallPath()
- {
- string currentPath = GetAssemblyDirectory();
- while (!currentPath.EndsWith(GetModuleFolderName(AzureModule.AzureProfile)) &&
- !currentPath.EndsWith(GetModuleFolderName(AzureModule.AzureResourceManager)) &&
- !currentPath.EndsWith(GetModuleFolderName(AzureModule.AzureServiceManagement)))
- {
- currentPath = Directory.GetParent(currentPath).FullName;
- }
-
- // The assemption is that the install directory looks like that:
- // ServiceManagement
- // AzureServiceManagement
- //
- // ResourceManager
- // AzureResourceManager
- //
- // Profile
- // AzureProfile
- //
- return Directory.GetParent(currentPath).FullName;
- }
-
- public static string GetModuleName(AzureModule module)
- {
- switch (module)
- {
- case AzureModule.AzureServiceManagement:
- return "Azure";
-
- case AzureModule.AzureResourceManager:
- return "AzureResourceManager";
-
- case AzureModule.AzureProfile:
- return "AzureProfile";
-
- default:
- throw new ArgumentOutOfRangeException(module.ToString());
- }
- }
-
- public static string GetModuleFolderName(AzureModule module)
- {
- return module.ToString().Replace("Azure", "");
- }
- }
-}
diff --git a/src/Common/Azure.Common.Extensions/Utilities/JsonUtilities.cs b/src/Common/Azure.Common.Extensions/Utilities/JsonUtilities.cs
deleted file mode 100644
index 775718642225..000000000000
--- a/src/Common/Azure.Common.Extensions/Utilities/JsonUtilities.cs
+++ /dev/null
@@ -1,204 +0,0 @@
-// ----------------------------------------------------------------------------------
-//
-// Copyright Microsoft Corporation
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-// http://www.apache.org/licenses/LICENSE-2.0
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-// ----------------------------------------------------------------------------------
-
-using Microsoft.Azure.Common.Extensions.Properties;
-using Newtonsoft.Json;
-using Newtonsoft.Json.Linq;
-using System;
-using System.Collections.Generic;
-using System.Diagnostics.CodeAnalysis;
-
-namespace Microsoft.Azure.Common.Extensions
-{
- public static class JsonUtilities
- {
- [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Handling the failure by returning the original string.")]
- public static string TryFormatJson(string str)
- {
- try
- {
- object parsedJson = JsonConvert.DeserializeObject(str);
- return JsonConvert.SerializeObject(parsedJson, Formatting.Indented);
- }
- catch
- {
- // can't parse JSON, return the original string
- return str;
- }
- }
-
- public static Dictionary DeserializeJson(string jsonString, bool throwExceptionOnFailure = false)
- {
- Dictionary result = new Dictionary();
- if (jsonString == null)
- {
- return null;
- }
- if (String.IsNullOrWhiteSpace(jsonString))
- {
- return result;
- }
-
- try
- {
- JToken responseDoc = JToken.Parse(jsonString);
-
- if (responseDoc != null && responseDoc.Type == JTokenType.Object)
- {
- result = DeserializeJObject(responseDoc as JObject);
- }
- }
- catch
- {
- if (throwExceptionOnFailure)
- {
- throw;
- }
- result = null;
- }
- return result;
- }
-
- private static Dictionary DeserializeJObject(JObject jsonObject)
- {
- Dictionary result = new Dictionary();
- if (jsonObject == null || jsonObject.Type == JTokenType.Null)
- {
- return result;
- }
- foreach (var property in jsonObject)
- {
- if (property.Value.Type == JTokenType.Object)
- {
- result[property.Key] = DeserializeJObject(property.Value as JObject);
- }
- else if (property.Value.Type == JTokenType.Array)
- {
- result[property.Key] = DeserializeJArray(property.Value as JArray);
- }
- else
- {
- result[property.Key] = DeserializeJValue(property.Value as JValue);
- }
- }
- return result;
- }
-
- private static List