diff --git a/setup/azurecmdfiles.wxi b/setup/azurecmdfiles.wxi
index 0cc5c7287eaf..68cadc0d4524 100644
--- a/setup/azurecmdfiles.wxi
+++ b/setup/azurecmdfiles.wxi
@@ -566,15 +566,6 @@
-
-
-
-
-
-
-
-
-
@@ -1294,15 +1285,6 @@
-
-
-
-
-
-
-
-
-
@@ -1330,9 +1312,6 @@
-
-
-
@@ -3320,15 +3299,6 @@
-
-
-
-
-
-
-
-
-
@@ -3398,9 +3368,6 @@
-
-
-
@@ -3439,15 +3406,6 @@
-
-
-
-
-
-
-
-
-
@@ -3556,9 +3514,6 @@
-
-
-
@@ -5034,9 +4989,6 @@
-
-
-
@@ -5272,9 +5224,6 @@
-
-
-
@@ -5284,7 +5233,6 @@
-
@@ -5932,9 +5880,6 @@
-
-
-
@@ -5958,7 +5903,6 @@
-
@@ -5971,9 +5915,6 @@
-
-
-
@@ -6010,7 +5951,6 @@
-
diff --git a/src/ResourceManager/ApiManagement/Commands.ApiManagement.Test/Commands.ApiManagement.Test.csproj b/src/ResourceManager/ApiManagement/Commands.ApiManagement.Test/Commands.ApiManagement.Test.csproj
index 5e6563adb64b..72f0cff7a47c 100644
--- a/src/ResourceManager/ApiManagement/Commands.ApiManagement.Test/Commands.ApiManagement.Test.csproj
+++ b/src/ResourceManager/ApiManagement/Commands.ApiManagement.Test/Commands.ApiManagement.Test.csproj
@@ -109,9 +109,9 @@
False
..\..\..\packages\Microsoft.WindowsAzure.Management.4.1.1\lib\net40\Microsoft.WindowsAzure.Management.dll
-
+
False
- ..\..\..\packages\Microsoft.WindowsAzure.Management.Compute.12.3.1\lib\net40\Microsoft.WindowsAzure.Management.Compute.dll
+ ..\..\..\packages\Microsoft.WindowsAzure.Management.Compute.12.5.0\lib\net40\Microsoft.WindowsAzure.Management.Compute.dll
False
diff --git a/src/ResourceManager/ApiManagement/Commands.ApiManagement.Test/packages.config b/src/ResourceManager/ApiManagement/Commands.ApiManagement.Test/packages.config
index c32aaebf6581..05a392db53b4 100644
--- a/src/ResourceManager/ApiManagement/Commands.ApiManagement.Test/packages.config
+++ b/src/ResourceManager/ApiManagement/Commands.ApiManagement.Test/packages.config
@@ -18,7 +18,7 @@
-
+
diff --git a/src/ResourceManager/ApiManagement/Commands.SMAPI.Test/Commands.ApiManagement.ServiceManagement.Test.csproj b/src/ResourceManager/ApiManagement/Commands.SMAPI.Test/Commands.ApiManagement.ServiceManagement.Test.csproj
index 7f9d5f9391b6..725df5173b4c 100644
--- a/src/ResourceManager/ApiManagement/Commands.SMAPI.Test/Commands.ApiManagement.ServiceManagement.Test.csproj
+++ b/src/ResourceManager/ApiManagement/Commands.SMAPI.Test/Commands.ApiManagement.ServiceManagement.Test.csproj
@@ -109,9 +109,9 @@
False
..\..\..\packages\Microsoft.WindowsAzure.Management.4.1.1\lib\net40\Microsoft.WindowsAzure.Management.dll
-
+
False
- ..\..\..\packages\Microsoft.WindowsAzure.Management.Compute.12.3.1\lib\net40\Microsoft.WindowsAzure.Management.Compute.dll
+ ..\..\..\packages\Microsoft.WindowsAzure.Management.Compute.12.5.0\lib\net40\Microsoft.WindowsAzure.Management.Compute.dll
False
diff --git a/src/ResourceManager/ApiManagement/Commands.SMAPI.Test/packages.config b/src/ResourceManager/ApiManagement/Commands.SMAPI.Test/packages.config
index 1d7932d647b7..182b8a529d75 100644
--- a/src/ResourceManager/ApiManagement/Commands.SMAPI.Test/packages.config
+++ b/src/ResourceManager/ApiManagement/Commands.SMAPI.Test/packages.config
@@ -19,7 +19,7 @@
-
+
diff --git a/src/ResourceManager/Compute/Commands.Compute.Test/Common/ComputeTestController.cs b/src/ResourceManager/Compute/Commands.Compute.Test/Common/ComputeTestController.cs
index a8854c5ed268..e3cabc672588 100644
--- a/src/ResourceManager/Compute/Commands.Compute.Test/Common/ComputeTestController.cs
+++ b/src/ResourceManager/Compute/Commands.Compute.Test/Common/ComputeTestController.cs
@@ -161,7 +161,7 @@ private void SetupManagementClients(RestTestFramework.MockContext context)
NetworkManagementClient = this.GetNetworkManagementClientClient(context);
ComputeManagementClient = GetComputeManagementClient(context);
AuthorizationManagementClient = GetAuthorizationManagementClient();
- GraphClient = GetGraphClient();
+ // GraphClient = GetGraphClient();
helper.SetupManagementClients(
ResourceManagementClient,
@@ -171,8 +171,8 @@ private void SetupManagementClients(RestTestFramework.MockContext context)
//eventsClient,
NetworkManagementClient,
ComputeManagementClient,
- AuthorizationManagementClient,
- GraphClient);
+ AuthorizationManagementClient);
+ // GraphClient);
}
private GraphRbacManagementClient GetGraphClient()
diff --git a/src/ResourceManager/Profile/Commands.Profile.Test/Commands.Profile.Test.csproj b/src/ResourceManager/Profile/Commands.Profile.Test/Commands.Profile.Test.csproj
index fad970c4c118..048602ac9837 100644
--- a/src/ResourceManager/Profile/Commands.Profile.Test/Commands.Profile.Test.csproj
+++ b/src/ResourceManager/Profile/Commands.Profile.Test/Commands.Profile.Test.csproj
@@ -126,7 +126,7 @@
..\..\..\packages\Microsoft.WindowsAzure.Management.4.1.1\lib\net40\Microsoft.WindowsAzure.Management.dll
- ..\..\..\packages\Microsoft.WindowsAzure.Management.Compute.12.3.1\lib\net40\Microsoft.WindowsAzure.Management.Compute.dll
+ ..\..\..\packages\Microsoft.WindowsAzure.Management.Compute.12.5.0\lib\net40\Microsoft.WindowsAzure.Management.Compute.dll
..\..\..\packages\Microsoft.WindowsAzure.Management.Storage.5.1.1\lib\net40\Microsoft.WindowsAzure.Management.Storage.dll
diff --git a/src/ResourceManager/Profile/Commands.Profile.Test/packages.config b/src/ResourceManager/Profile/Commands.Profile.Test/packages.config
index 3aab10c17b8f..673778ff6b1f 100644
--- a/src/ResourceManager/Profile/Commands.Profile.Test/packages.config
+++ b/src/ResourceManager/Profile/Commands.Profile.Test/packages.config
@@ -20,7 +20,7 @@
-
+
diff --git a/src/ServiceManagement/Common/Commands.Common.Test/Commands.Common.Test.csproj b/src/ServiceManagement/Common/Commands.Common.Test/Commands.Common.Test.csproj
index 21143941163e..1320be72792c 100644
--- a/src/ServiceManagement/Common/Commands.Common.Test/Commands.Common.Test.csproj
+++ b/src/ServiceManagement/Common/Commands.Common.Test/Commands.Common.Test.csproj
@@ -127,7 +127,7 @@
..\..\..\packages\Microsoft.WindowsAzure.Management.4.1.1\lib\net40\Microsoft.WindowsAzure.Management.dll
- ..\..\..\packages\Microsoft.WindowsAzure.Management.Compute.12.3.1\lib\net40\Microsoft.WindowsAzure.Management.Compute.dll
+ ..\..\..\packages\Microsoft.WindowsAzure.Management.Compute.12.5.0\lib\net40\Microsoft.WindowsAzure.Management.Compute.dll
..\..\..\packages\Microsoft.WindowsAzure.Management.Storage.5.1.1\lib\net40\Microsoft.WindowsAzure.Management.Storage.dll
diff --git a/src/ServiceManagement/Common/Commands.Common.Test/packages.config b/src/ServiceManagement/Common/Commands.Common.Test/packages.config
index 5f8147025739..6bf38e990c1c 100644
--- a/src/ServiceManagement/Common/Commands.Common.Test/packages.config
+++ b/src/ServiceManagement/Common/Commands.Common.Test/packages.config
@@ -20,7 +20,7 @@
-
+
diff --git a/src/ServiceManagement/Common/Commands.ScenarioTest/Commands.ScenarioTest.csproj b/src/ServiceManagement/Common/Commands.ScenarioTest/Commands.ScenarioTest.csproj
index 87c3c491a5cd..ad81f675f239 100644
--- a/src/ServiceManagement/Common/Commands.ScenarioTest/Commands.ScenarioTest.csproj
+++ b/src/ServiceManagement/Common/Commands.ScenarioTest/Commands.ScenarioTest.csproj
@@ -120,7 +120,7 @@
False
- ..\..\..\packages\Microsoft.WindowsAzure.Management.Compute.12.3.1\lib\net40\Microsoft.WindowsAzure.Management.Compute.dll
+ ..\..\..\packages\Microsoft.WindowsAzure.Management.Compute.12.5.0\lib\net40\Microsoft.WindowsAzure.Management.Compute.dll
..\..\..\packages\Microsoft.WindowsAzure.Management.Network.7.0.4\lib\net40\Microsoft.WindowsAzure.Management.Network.dll
diff --git a/src/ServiceManagement/Common/Commands.ScenarioTest/packages.config b/src/ServiceManagement/Common/Commands.ScenarioTest/packages.config
index ae30f509d6c5..15923f5ea852 100644
--- a/src/ServiceManagement/Common/Commands.ScenarioTest/packages.config
+++ b/src/ServiceManagement/Common/Commands.ScenarioTest/packages.config
@@ -20,7 +20,7 @@
-
+
diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.PlatformImageRepository/Commands.ServiceManagement.PlatformImageRepository.csproj b/src/ServiceManagement/Compute/Commands.ServiceManagement.PlatformImageRepository/Commands.ServiceManagement.PlatformImageRepository.csproj
index 2f703b2045dd..9a3625aa5a14 100644
--- a/src/ServiceManagement/Compute/Commands.ServiceManagement.PlatformImageRepository/Commands.ServiceManagement.PlatformImageRepository.csproj
+++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.PlatformImageRepository/Commands.ServiceManagement.PlatformImageRepository.csproj
@@ -128,7 +128,7 @@
False
- ..\..\..\packages\Microsoft.WindowsAzure.Management.Compute.12.3.1\lib\net40\Microsoft.WindowsAzure.Management.Compute.dll
+ ..\..\..\packages\Microsoft.WindowsAzure.Management.Compute.12.5.0\lib\net40\Microsoft.WindowsAzure.Management.Compute.dll
..\..\..\packages\Microsoft.WindowsAzure.Management.Storage.5.1.1\lib\net40\Microsoft.WindowsAzure.Management.Storage.dll
diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.PlatformImageRepository/packages.config b/src/ServiceManagement/Compute/Commands.ServiceManagement.PlatformImageRepository/packages.config
index 7a5b66132786..3c27aff765cb 100644
--- a/src/ServiceManagement/Compute/Commands.ServiceManagement.PlatformImageRepository/packages.config
+++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.PlatformImageRepository/packages.config
@@ -19,7 +19,7 @@
-
+
diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Preview/Commands.ServiceManagement.Preview.csproj b/src/ServiceManagement/Compute/Commands.ServiceManagement.Preview/Commands.ServiceManagement.Preview.csproj
index fe327640d56b..d0b008af425a 100644
--- a/src/ServiceManagement/Compute/Commands.ServiceManagement.Preview/Commands.ServiceManagement.Preview.csproj
+++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Preview/Commands.ServiceManagement.Preview.csproj
@@ -129,7 +129,7 @@
False
- ..\..\..\packages\Microsoft.WindowsAzure.Management.Compute.12.3.1\lib\net40\Microsoft.WindowsAzure.Management.Compute.dll
+ ..\..\..\packages\Microsoft.WindowsAzure.Management.Compute.12.5.0\lib\net40\Microsoft.WindowsAzure.Management.Compute.dll
False
diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Preview/packages.config b/src/ServiceManagement/Compute/Commands.ServiceManagement.Preview/packages.config
index ea48be48e846..6060297113bd 100644
--- a/src/ServiceManagement/Compute/Commands.ServiceManagement.Preview/packages.config
+++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Preview/packages.config
@@ -19,7 +19,7 @@
-
+
diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/Commands.ServiceManagement.Test.csproj b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/Commands.ServiceManagement.Test.csproj
index 141b1e618355..79de3cc82f3d 100644
--- a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/Commands.ServiceManagement.Test.csproj
+++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/Commands.ServiceManagement.Test.csproj
@@ -129,7 +129,7 @@
False
- ..\..\..\packages\Microsoft.WindowsAzure.Management.Compute.12.3.1\lib\net40\Microsoft.WindowsAzure.Management.Compute.dll
+ ..\..\..\packages\Microsoft.WindowsAzure.Management.Compute.12.5.0\lib\net40\Microsoft.WindowsAzure.Management.Compute.dll
..\..\..\packages\Microsoft.WindowsAzure.Management.Network.7.0.4\lib\net40\Microsoft.WindowsAzure.Management.Network.dll
diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/AzureServiceExtensionTests.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/AzureServiceExtensionTests.cs
index 30a33f60ad98..fc26ce1d2667 100644
--- a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/AzureServiceExtensionTests.cs
+++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/AzureServiceExtensionTests.cs
@@ -18,6 +18,7 @@
using System.IO;
using System.Reflection;
using Microsoft.VisualStudio.TestTools.UnitTesting;
+using Microsoft.WindowsAzure.Commands.Common;
using Microsoft.WindowsAzure.Commands.ServiceManagement.Extensions;
using Microsoft.WindowsAzure.Commands.ServiceManagement.Model;
@@ -146,6 +147,7 @@ public void AzureServiceExtensionConfigScenarioTest()
DeploymentInfoContext result = vmPowershellCmdlets.GetAzureDeployment(_serviceName, DeploymentSlotType.Production);
pass = Utilities.PrintAndCompareDeployment(result, _serviceName, DeploymentName, DeploymentLabel, DeploymentSlotType.Production, null, 2);
Console.WriteLine("successfully deployed the package");
+ var extId = result.ExtensionConfiguration.AllRoles[0].Id;
ExtensionContext resultExtensionContext = vmPowershellCmdlets.GetAzureServiceExtension(_serviceName)[0];
@@ -159,6 +161,27 @@ public void AzureServiceExtensionConfigScenarioTest()
VerifyRDP(_serviceName, rdpPath);
+ ExtensionConfigurationInput extConfig = vmPowershellCmdlets.NewAzureServiceExtensionConfig(extId, "Uninstall");
+
+ try
+ {
+ vmPowershellCmdlets.SetAzureDeploymentConfig(_serviceName, DeploymentSlotType.Production,
+ _configPath.FullName, extConfig);
+ Assert.Fail("Succeeded, but extected to fail!");
+ }
+ catch (Exception e)
+ {
+ if (e.ToString().Contains("BadRequest")
+ || ((e.InnerException != null) && (e.InnerException.ToString().Contains("BadRequest"))))
+ {
+ Console.WriteLine(e.ToString());
+ }
+ else
+ {
+ throw;
+ }
+ }
+
vmPowershellCmdlets.RemoveAzureServiceExtension(
serviceName: _serviceName,
extensionName: _extensionName,
@@ -178,8 +201,6 @@ public void AzureServiceExtensionConfigScenarioTest()
Console.WriteLine("Failed to get RDP file as expected");
}
-
-
vmPowershellCmdlets.RemoveAzureDeployment(_serviceName, DeploymentSlotType.Production, true);
pass &= Utilities.CheckRemove(vmPowershellCmdlets.GetAzureDeployment, _serviceName, DeploymentSlotType.Production);
diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/PIRTest.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/PIRTest.cs
index d5bbd3eb0add..d269272c29a5 100644
--- a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/PIRTest.cs
+++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/PIRTest.cs
@@ -342,12 +342,12 @@ public void AzurePlatformVMImageScenarioTest()
private void SwitchToPublisher()
{
- vmPowershellCmdlets.SetDefaultAzureSubscription(publisher);
+ vmPowershellCmdlets.SetDefaultAzureSubscription(publisherSubId);
}
private void SwitchToNormalUser()
{
- vmPowershellCmdlets.SetDefaultAzureSubscription(normaluser);
+ vmPowershellCmdlets.SetDefaultAzureSubscription(normaluserSubId);
}
private void WaitForReplicationComplete(string imageName)
diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/PaasCmdletInfo/NewAzureServiceExtensionConfigCmdletInfo.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/PaasCmdletInfo/NewAzureServiceExtensionConfigCmdletInfo.cs
index a677b63574a3..a3e61140ce1a 100644
--- a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/PaasCmdletInfo/NewAzureServiceExtensionConfigCmdletInfo.cs
+++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/PaasCmdletInfo/NewAzureServiceExtensionConfigCmdletInfo.cs
@@ -55,5 +55,16 @@ public NewAzureServiceExtensionConfigCmdletInfo(string thumbprint, string algori
this.cmdletParams.Add(new CmdletParam("ThumbprintAlgorithm", algorithm));
}
}
+
+ public NewAzureServiceExtensionConfigCmdletInfo(string extensionId, string extensionStatus, string[] roles)
+ {
+ this.cmdletName = Utilities.NewAzureServiceExtensionConfigCmdletName;
+ this.cmdletParams.Add(new CmdletParam("ExtensionId", extensionId));
+ this.cmdletParams.Add(new CmdletParam("ExtensionState", extensionStatus));
+ if (roles != null)
+ {
+ this.cmdletParams.Add(new CmdletParam("Role", roles));
+ }
+ }
}
}
diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/ServiceManagementCmdletTestHelper.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/ServiceManagementCmdletTestHelper.cs
index bd4dac37d312..104126063e00 100644
--- a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/ServiceManagementCmdletTestHelper.cs
+++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/ServiceManagementCmdletTestHelper.cs
@@ -1319,6 +1319,14 @@ public ExtensionConfigurationInput NewAzureServiceExtensionConfig(string extensi
providerNamespace, publicConfig, privateConfig, version));
}
+ public ExtensionConfigurationInput NewAzureServiceExtensionConfig(string extensionId, string extensionStatus,
+ string [] roles = null)
+ {
+ return
+ RunPSCmdletAndReturnFirst(
+ new NewAzureServiceExtensionConfigCmdletInfo(extensionId, extensionStatus, roles));
+ }
+
// Set-AzureServiceExtension
public ManagementOperationContext SetAzureServiceExtension(string serviceName, string extensionName,
string providerNamespace, string publicConfig, string privateConfig, string[] roles = null, string slot = null, string version = null)
diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/ServiceManagementTest.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/ServiceManagementTest.cs
index 8772ea902753..d2c5285e76f9 100644
--- a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/ServiceManagementTest.cs
+++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/ServiceManagementTest.cs
@@ -341,7 +341,7 @@ protected static void ReImportSubscription()
{
// Re-import the subscription.
vmPowershellCmdlets.ImportAzurePublishSettingsFile();
- vmPowershellCmdlets.SetDefaultAzureSubscription(CredentialHelper.DefaultSubscriptionName);
+ vmPowershellCmdlets.SetDefaultAzureSubscription(defaultAzureSubscription.SubscriptionId);
vmPowershellCmdlets.SetAzureSubscription(defaultAzureSubscription.SubscriptionId, defaultAzureSubscription.CurrentStorageAccountName);
}
diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/packages.config b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/packages.config
index fb69a3d8d910..d352f0160a3c 100644
--- a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/packages.config
+++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/packages.config
@@ -20,7 +20,7 @@
-
+
diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/Commands.ServiceManagement.csproj b/src/ServiceManagement/Compute/Commands.ServiceManagement/Commands.ServiceManagement.csproj
index 72b071d3279a..d7ed5cea149b 100644
--- a/src/ServiceManagement/Compute/Commands.ServiceManagement/Commands.ServiceManagement.csproj
+++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/Commands.ServiceManagement.csproj
@@ -127,7 +127,7 @@
False
- ..\..\..\packages\Microsoft.WindowsAzure.Management.Compute.12.3.1\lib\net40\Microsoft.WindowsAzure.Management.Compute.dll
+ ..\..\..\packages\Microsoft.WindowsAzure.Management.Compute.12.5.0\lib\net40\Microsoft.WindowsAzure.Management.Compute.dll
False
diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/Common/BaseAzureServiceExtensionCmdlet.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/Common/BaseAzureServiceExtensionCmdlet.cs
index f650aefa8c5c..7eaf07ad2739 100644
--- a/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/Common/BaseAzureServiceExtensionCmdlet.cs
+++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/Common/BaseAzureServiceExtensionCmdlet.cs
@@ -39,6 +39,7 @@ public abstract class BaseAzureServiceExtensionCmdlet : ServiceManagementBaseCmd
protected const string NewExtensionParameterSetName = "NewExtension";
protected const string NewExtensionUsingThumbprintParameterSetName = "NewExtensionUsingThumbprint";
+ protected const string UpdateExtensionStatusParameterSetName = "UpdateExtensionStatusParameterSetName";
protected const string SetExtensionParameterSetName = "SetExtension";
protected const string SetExtensionUsingThumbprintParameterSetName = "SetExtensionUsingThumbprint";
protected const string SetExtensionUsingDiagnosticsConfigurationParameterSetName = "SetExtensionUsingDiagnosticsConfiguration";
@@ -66,6 +67,7 @@ public abstract class BaseAzureServiceExtensionCmdlet : ServiceManagementBaseCmd
public virtual string ExtensionName { get; set; }
public virtual string Version { get; set; }
public virtual string ExtensionId { get; set; }
+ public virtual string ExtensionState { get; set; }
public BaseAzureServiceExtensionCmdlet()
: base()
diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/Common/ExtensionConfigurationInput.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/Common/ExtensionConfigurationInput.cs
index 9271713d190e..de7fcd1c46af 100644
--- a/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/Common/ExtensionConfigurationInput.cs
+++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/Common/ExtensionConfigurationInput.cs
@@ -28,5 +28,6 @@ public class ExtensionConfigurationInput
public string PrivateConfiguration { get; set; }
public ExtensionRoleList Roles { get; set; }
public X509Certificate2 X509Certificate { get; set; }
+ public string State { get; set; }
}
}
diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/Common/ExtensionManager.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/Common/ExtensionManager.cs
index e9dc2a059c5f..f4f5c640d425 100644
--- a/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/Common/ExtensionManager.cs
+++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/Common/ExtensionManager.cs
@@ -344,6 +344,40 @@ public ExtensionConfiguration Add(DeploymentGetResponse deployment, DeploymentGe
return extConfig;
}
+ public ExtensionConfiguration UpdateExtensionState(ExtensionConfigurationInput input)
+ {
+ var extConfig = new ExtensionConfiguration();
+ if (input.Roles == null || input.Roles.Count == 1 && input.Roles[0].RoleType == ExtensionRoleType.AllRoles)
+ {
+
+ extConfig.AllRoles = new List();
+ extConfig.AllRoles.Add(new ExtensionConfiguration.Extension
+ {
+ Id = input.Id,
+ State = input.State
+ });
+ }
+ else
+ {
+ extConfig.NamedRoles = new List();
+ foreach (var role in input.Roles)
+ {
+ var ext = new List();
+ ext.Add(new ExtensionConfiguration.Extension
+ {
+ Id = input.Id,
+ State = input.State
+ });
+ extConfig.NamedRoles.Add(new ExtensionConfiguration.NamedRole
+ {
+ RoleName = role.RoleName,
+ Extensions = ext
+ });
+ }
+ }
+ return extConfig;
+ }
+
public static bool Validate(ExtensionConfigurationInput[] inputs, out string errorConfigInput)
{
var roleList = (from c in inputs
diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/Common/ExtensionParameterPropertyHelper.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/Common/ExtensionParameterPropertyHelper.cs
index f7a0339702d0..269485aaeee7 100644
--- a/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/Common/ExtensionParameterPropertyHelper.cs
+++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/Common/ExtensionParameterPropertyHelper.cs
@@ -29,5 +29,6 @@ public static class ExtensionParameterPropertyHelper
public const string ExtensionNameHelpMessage = "Extension Name";
public const string VersionHelpMessage = "Extension Version";
public const string ExtensionIdHelpMessage = "Extension ID";
+ public const string ExtensionStateHelpMessage = "Extension State. It is either Enable, Disable or Uninstall";
}
}
diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/Common/ExtensionRole.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/Common/ExtensionRole.cs
index 5585fb494c8d..d3fff4a56c93 100644
--- a/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/Common/ExtensionRole.cs
+++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/Common/ExtensionRole.cs
@@ -50,6 +50,7 @@ public ExtensionRole(string roleName)
PrefixName = RoleName = roleName.Trim();
PrefixName = PrefixName.Replace(".", string.Empty);
PrefixName = PrefixName.Replace(" ", string.Empty);
+ PrefixName = PrefixName.Replace("_", string.Empty);
RoleType = ExtensionRoleType.NamedRoles;
Default = false;
}
@@ -64,6 +65,7 @@ public string GetExtensionId(string extensionName, string slot, int index)
{
var normalizedExtName = extensionName.Replace(".", string.Empty);
normalizedExtName = normalizedExtName.Replace(" ", string.Empty);
+ normalizedExtName = normalizedExtName.Replace("_", string.Empty);
var suffix = new StringBuilder();
suffix.AppendFormat(ExtensionIdSuffixTemplate, normalizedExtName, slot, index);
diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/Common/NewAzureServiceExtensionConfig.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/Common/NewAzureServiceExtensionConfig.cs
index 03596eea0db5..8ad7414b96bb 100644
--- a/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/Common/NewAzureServiceExtensionConfig.cs
+++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/Common/NewAzureServiceExtensionConfig.cs
@@ -26,9 +26,11 @@ public class NewAzureServiceExtensionConfigCommand : BaseAzureServiceExtensionCm
{
private const string NetExtensionParameterSetName = NewExtensionParameterSetName;
private const string NetExtensionUsingThumbprintParameterSetName = NewExtensionUsingThumbprintParameterSetName;
+ private const string NetUpdateExtensionStatusParameterSetName = UpdateExtensionStatusParameterSetName;
[Parameter(Position = 0, ValueFromPipelineByPropertyName = true, ParameterSetName = NetExtensionParameterSetName, HelpMessage = ExtensionParameterPropertyHelper.RoleHelpMessage)]
[Parameter(Position = 0, ValueFromPipelineByPropertyName = true, ParameterSetName = NetExtensionUsingThumbprintParameterSetName, HelpMessage = ExtensionParameterPropertyHelper.RoleHelpMessage)]
+ [Parameter(Position = 0, ValueFromPipelineByPropertyName = true, ParameterSetName = NetUpdateExtensionStatusParameterSetName, HelpMessage = ExtensionParameterPropertyHelper.ExtensionIdHelpMessage)]
[ValidateNotNullOrEmpty]
public override string[] Role
{
@@ -109,6 +111,7 @@ public override string Version
[Parameter(Position = 8, Mandatory = false, ValueFromPipelineByPropertyName = true, ParameterSetName = NetExtensionParameterSetName, HelpMessage = ExtensionParameterPropertyHelper.ExtensionIdHelpMessage)]
[Parameter(Position = 8, Mandatory = false, ValueFromPipelineByPropertyName = true, ParameterSetName = NetExtensionUsingThumbprintParameterSetName, HelpMessage = ExtensionParameterPropertyHelper.ExtensionIdHelpMessage)]
+ [Parameter(Position = 1, Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = NetUpdateExtensionStatusParameterSetName, HelpMessage = ExtensionParameterPropertyHelper.ExtensionIdHelpMessage)]
[ValidateNotNullOrEmpty]
public override string ExtensionId
{
@@ -116,6 +119,14 @@ public override string ExtensionId
set;
}
+ [Parameter(Position = 2, Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = NetUpdateExtensionStatusParameterSetName, HelpMessage = ExtensionParameterPropertyHelper.ExtensionStateHelpMessage)]
+ [ValidateSet("Enable", "Disable", "Uninstall", IgnoreCase = true)]
+ public override string ExtensionState
+ {
+ get;
+ set;
+ }
+
protected override void ValidateParameters()
{
base.ValidateParameters();
@@ -129,6 +140,7 @@ public void ExecuteCommand()
WriteObject(new ExtensionConfigurationInput
{
Id = ExtensionId,
+ State = ExtensionState,
CertificateThumbprint = CertificateThumbprint,
ThumbprintAlgorithm = ThumbprintAlgorithm,
ProviderNameSpace = ProviderNamespace,
diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/HostedServices/SetAzureDeployment.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/HostedServices/SetAzureDeployment.cs
index 33b93a0d6de5..4f94fad9a5a6 100644
--- a/src/ServiceManagement/Compute/Commands.ServiceManagement/HostedServices/SetAzureDeployment.cs
+++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/HostedServices/SetAzureDeployment.cs
@@ -192,7 +192,10 @@ public void ExecuteCommand()
InvokeInOperationContext(() => peerDeployment = func(peerSlottype));
ExtensionManager extensionMgr = new ExtensionManager(this, ServiceName);
- extConfig = extensionMgr.Add(currentDeployment, peerDeployment, ExtensionConfiguration, this.Slot);
+
+ extConfig = (ExtensionConfiguration[0].State == null)
+ ? extensionMgr.Add(currentDeployment, peerDeployment, ExtensionConfiguration, this.Slot)
+ : extensionMgr.UpdateExtensionState(ExtensionConfiguration[0]);
}
// Upgrade Parameter Set
diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/Model/DeploymentInfoContext.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/Model/DeploymentInfoContext.cs
index 1cb67fd6b9f8..8c19bb15d98b 100644
--- a/src/ServiceManagement/Compute/Commands.ServiceManagement/Model/DeploymentInfoContext.cs
+++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/Model/DeploymentInfoContext.cs
@@ -180,6 +180,12 @@ public PVM.LoadBalancerList LoadBalancers
protected set;
}
+ public PVM.ExtensionConfiguration ExtensionConfiguration
+ {
+ get;
+ protected set;
+ }
+
public DeploymentInfoContext(DeploymentGetResponse deployment)
{
this.Slot = deployment.DeploymentSlot.ToString();
@@ -287,6 +293,35 @@ from b in deployment.LoadBalancers
this.InternalLoadBalancerName = this.LoadBalancers == null || !this.LoadBalancers.Any() ? null
: this.LoadBalancers.First().Name;
}
+
+ // ExtensionConfiguration
+ if (deployment.ExtensionConfiguration != null)
+ {
+ this.ExtensionConfiguration = new PVM.ExtensionConfiguration();
+ if (deployment.ExtensionConfiguration.AllRoles != null)
+ {
+ this.ExtensionConfiguration.AllRoles = new PVM.AllRoles(
+ from all in deployment.ExtensionConfiguration.AllRoles
+ select new PVM.Extension(all.Id, 0, all.State));
+ }
+
+ if (deployment.ExtensionConfiguration.NamedRoles != null)
+ {
+ this.ExtensionConfiguration.NamedRoles = new PVM.NamedRoles();
+ foreach (var role in deployment.ExtensionConfiguration.NamedRoles)
+ {
+ var extList = new PVM.ExtensionList(
+ from ext in role.Extensions
+ select new PVM.Extension(ext.Id, 0, ext.State));
+
+ this.ExtensionConfiguration.NamedRoles.Add(new PVM.RoleExtensions
+ {
+ RoleName = role.RoleName,
+ Extensions = extList
+ });
+ }
+ }
+ }
}
public XDocument SerializeRolesConfiguration()
diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/packages.config b/src/ServiceManagement/Compute/Commands.ServiceManagement/packages.config
index 02e97c5e9c9a..7f2978099228 100644
--- a/src/ServiceManagement/Compute/Commands.ServiceManagement/packages.config
+++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/packages.config
@@ -18,7 +18,7 @@
-
+
diff --git a/src/ServiceManagement/Network/Commands.Network.Test/Commands.ServiceManagement.Network.Test.csproj b/src/ServiceManagement/Network/Commands.Network.Test/Commands.ServiceManagement.Network.Test.csproj
index 2a030eef7f27..4f1f11b0c6ff 100644
--- a/src/ServiceManagement/Network/Commands.Network.Test/Commands.ServiceManagement.Network.Test.csproj
+++ b/src/ServiceManagement/Network/Commands.Network.Test/Commands.ServiceManagement.Network.Test.csproj
@@ -106,7 +106,7 @@
False
- ..\..\..\packages\Microsoft.WindowsAzure.Management.Compute.12.3.1\lib\net40\Microsoft.WindowsAzure.Management.Compute.dll
+ ..\..\..\packages\Microsoft.WindowsAzure.Management.Compute.12.5.0\lib\net40\Microsoft.WindowsAzure.Management.Compute.dll
..\..\..\packages\Microsoft.WindowsAzure.Management.Network.7.0.4\lib\net40\Microsoft.WindowsAzure.Management.Network.dll
diff --git a/src/ServiceManagement/Network/Commands.Network.Test/packages.config b/src/ServiceManagement/Network/Commands.Network.Test/packages.config
index fce22eb3e263..c9e27783befb 100644
--- a/src/ServiceManagement/Network/Commands.Network.Test/packages.config
+++ b/src/ServiceManagement/Network/Commands.Network.Test/packages.config
@@ -18,7 +18,7 @@
-
+
diff --git a/src/ServiceManagement/Network/Commands.Network/Commands.ServiceManagement.Network.csproj b/src/ServiceManagement/Network/Commands.Network/Commands.ServiceManagement.Network.csproj
index b4bbb1748bce..d1b2404a9038 100644
--- a/src/ServiceManagement/Network/Commands.Network/Commands.ServiceManagement.Network.csproj
+++ b/src/ServiceManagement/Network/Commands.Network/Commands.ServiceManagement.Network.csproj
@@ -103,7 +103,7 @@
False
- ..\..\..\packages\Microsoft.WindowsAzure.Management.Compute.12.3.1\lib\net40\Microsoft.WindowsAzure.Management.Compute.dll
+ ..\..\..\packages\Microsoft.WindowsAzure.Management.Compute.12.5.0\lib\net40\Microsoft.WindowsAzure.Management.Compute.dll
False
diff --git a/src/ServiceManagement/Network/Commands.Network/packages.config b/src/ServiceManagement/Network/Commands.Network/packages.config
index 2b704b7115b6..df4fa5de8bd8 100644
--- a/src/ServiceManagement/Network/Commands.Network/packages.config
+++ b/src/ServiceManagement/Network/Commands.Network/packages.config
@@ -18,7 +18,7 @@
-
+
diff --git a/src/ServiceManagement/RemoteApp/Commands.RemoteApp/Commands.RemoteApp.csproj b/src/ServiceManagement/RemoteApp/Commands.RemoteApp/Commands.RemoteApp.csproj
index e15261da52e1..19f47e0794fc 100644
--- a/src/ServiceManagement/RemoteApp/Commands.RemoteApp/Commands.RemoteApp.csproj
+++ b/src/ServiceManagement/RemoteApp/Commands.RemoteApp/Commands.RemoteApp.csproj
@@ -111,7 +111,7 @@
False
- ..\..\..\packages\Microsoft.WindowsAzure.Management.Compute.12.3.1\lib\net40\Microsoft.WindowsAzure.Management.Compute.dll
+ ..\..\..\packages\Microsoft.WindowsAzure.Management.Compute.12.5.0\lib\net40\Microsoft.WindowsAzure.Management.Compute.dll
..\..\..\packages\Microsoft.WindowsAzure.Management.Network.7.0.4\lib\net40\Microsoft.WindowsAzure.Management.Network.dll
diff --git a/src/ServiceManagement/RemoteApp/Commands.RemoteApp/packages.config b/src/ServiceManagement/RemoteApp/Commands.RemoteApp/packages.config
index 252fc6bbefd2..09e21c0de9c9 100644
--- a/src/ServiceManagement/RemoteApp/Commands.RemoteApp/packages.config
+++ b/src/ServiceManagement/RemoteApp/Commands.RemoteApp/packages.config
@@ -16,7 +16,7 @@
-
+
diff --git a/src/ServiceManagement/Services/Commands.Test.Utilities/Commands.Test.Utilities.csproj b/src/ServiceManagement/Services/Commands.Test.Utilities/Commands.Test.Utilities.csproj
index 877a1cfe67cb..21b4fa4c1299 100644
--- a/src/ServiceManagement/Services/Commands.Test.Utilities/Commands.Test.Utilities.csproj
+++ b/src/ServiceManagement/Services/Commands.Test.Utilities/Commands.Test.Utilities.csproj
@@ -96,7 +96,7 @@
False
- ..\..\..\packages\Microsoft.WindowsAzure.Management.Compute.12.3.1\lib\net40\Microsoft.WindowsAzure.Management.Compute.dll
+ ..\..\..\packages\Microsoft.WindowsAzure.Management.Compute.12.5.0\lib\net40\Microsoft.WindowsAzure.Management.Compute.dll
..\..\..\packages\Microsoft.WindowsAzure.Management.Storage.5.1.1\lib\net40\Microsoft.WindowsAzure.Management.Storage.dll
diff --git a/src/ServiceManagement/Services/Commands.Test.Utilities/packages.config b/src/ServiceManagement/Services/Commands.Test.Utilities/packages.config
index f7cd715b9f92..52e42c131f19 100644
--- a/src/ServiceManagement/Services/Commands.Test.Utilities/packages.config
+++ b/src/ServiceManagement/Services/Commands.Test.Utilities/packages.config
@@ -13,7 +13,7 @@
-
+
diff --git a/src/ServiceManagement/Services/Commands.Test/Commands.Test.csproj b/src/ServiceManagement/Services/Commands.Test/Commands.Test.csproj
index 16a8500684db..aca067a8dad2 100644
--- a/src/ServiceManagement/Services/Commands.Test/Commands.Test.csproj
+++ b/src/ServiceManagement/Services/Commands.Test/Commands.Test.csproj
@@ -132,7 +132,7 @@
False
- ..\..\..\packages\Microsoft.WindowsAzure.Management.Compute.12.3.1\lib\net40\Microsoft.WindowsAzure.Management.Compute.dll
+ ..\..\..\packages\Microsoft.WindowsAzure.Management.Compute.12.5.0\lib\net40\Microsoft.WindowsAzure.Management.Compute.dll
..\..\..\packages\Microsoft.WindowsAzure.Management.ExpressRoute.0.18.14-preview\lib\net40\Microsoft.WindowsAzure.Management.ExpressRoute.dll
diff --git a/src/ServiceManagement/Services/Commands.Test/packages.config b/src/ServiceManagement/Services/Commands.Test/packages.config
index b8a5bb460f44..0835c6fe37e6 100644
--- a/src/ServiceManagement/Services/Commands.Test/packages.config
+++ b/src/ServiceManagement/Services/Commands.Test/packages.config
@@ -20,7 +20,7 @@
-
+
diff --git a/src/ServiceManagement/Services/Commands.Utilities/Commands.Utilities.csproj b/src/ServiceManagement/Services/Commands.Utilities/Commands.Utilities.csproj
index 259e67d1ab9a..71d6ec0ce294 100644
--- a/src/ServiceManagement/Services/Commands.Utilities/Commands.Utilities.csproj
+++ b/src/ServiceManagement/Services/Commands.Utilities/Commands.Utilities.csproj
@@ -134,7 +134,7 @@
False
- ..\..\..\packages\Microsoft.WindowsAzure.Management.Compute.12.3.1\lib\net40\Microsoft.WindowsAzure.Management.Compute.dll
+ ..\..\..\packages\Microsoft.WindowsAzure.Management.Compute.12.5.0\lib\net40\Microsoft.WindowsAzure.Management.Compute.dll
False
diff --git a/src/ServiceManagement/Services/Commands.Utilities/packages.config b/src/ServiceManagement/Services/Commands.Utilities/packages.config
index 70b037b1d7d6..4535f53bd8d4 100644
--- a/src/ServiceManagement/Services/Commands.Utilities/packages.config
+++ b/src/ServiceManagement/Services/Commands.Utilities/packages.config
@@ -19,7 +19,7 @@
-
+
diff --git a/src/ServiceManagement/Services/Commands/Commands.csproj b/src/ServiceManagement/Services/Commands/Commands.csproj
index e55786f494e8..34b84ad088e0 100644
--- a/src/ServiceManagement/Services/Commands/Commands.csproj
+++ b/src/ServiceManagement/Services/Commands/Commands.csproj
@@ -122,7 +122,7 @@
False
- ..\..\..\packages\Microsoft.WindowsAzure.Management.Compute.12.3.1\lib\net40\Microsoft.WindowsAzure.Management.Compute.dll
+ ..\..\..\packages\Microsoft.WindowsAzure.Management.Compute.12.5.0\lib\net40\Microsoft.WindowsAzure.Management.Compute.dll
False
diff --git a/src/ServiceManagement/Services/Commands/packages.config b/src/ServiceManagement/Services/Commands/packages.config
index bcde5cd6b41c..c476087614db 100644
--- a/src/ServiceManagement/Services/Commands/packages.config
+++ b/src/ServiceManagement/Services/Commands/packages.config
@@ -16,7 +16,7 @@
-
+