From 7738ff9d4d38b3a058a271995bc7ea484250ae59 Mon Sep 17 00:00:00 2001 From: Hyonho Lee Date: Thu, 8 Oct 2015 23:20:22 -0700 Subject: [PATCH 1/5] Fix New-AzureDeployment cmdlet --- .../HostedServices/NewAzureDeployment.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/HostedServices/NewAzureDeployment.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/HostedServices/NewAzureDeployment.cs index 6046108d14ec..a1745e22ea1b 100644 --- a/src/ServiceManagement/Compute/Commands.ServiceManagement/HostedServices/NewAzureDeployment.cs +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/HostedServices/NewAzureDeployment.cs @@ -16,7 +16,7 @@ using System; using System.Management.Automation; using System.Net; -using Microsoft.Azure.Common.Authentication.Models; +using System.Text.RegularExpressions; using Microsoft.WindowsAzure.Commands.Common; using Microsoft.WindowsAzure.Commands.ServiceManagement.Extensions; using Microsoft.WindowsAzure.Commands.ServiceManagement.Helpers; @@ -114,7 +114,10 @@ public virtual void NewPaaSDeploymentProcess() AssertNoPersistenVmRoleExistsInDeployment(PVM.DeploymentSlotType.Production); AssertNoPersistenVmRoleExistsInDeployment(PVM.DeploymentSlotType.Staging); - var storageName = Profile.Context.Subscription.GetStorageAccountName(); + var storageAccount = Profile.Context.Subscription.GetStorageAccountName(); + var regex = new Regex(@";AccountName=([a-zA-Z0-9]{0,})"); + var match = regex.Match(storageAccount); + string storageName = match.Groups[1].Value; Uri packageUrl; if (this.Package.StartsWith(Uri.UriSchemeHttp, StringComparison.OrdinalIgnoreCase) || From 9b1d98aeb4832c8a63d06e47e30f78228c3fe1d1 Mon Sep 17 00:00:00 2001 From: Hyonho Lee Date: Thu, 8 Oct 2015 23:20:49 -0700 Subject: [PATCH 2/5] Update ASM AzureRT test setup --- .../FunctionalTests/ServiceManagementTest.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/ServiceManagementTest.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/ServiceManagementTest.cs index c0d4e43ced9b..9dbe5e1a4426 100644 --- a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/ServiceManagementTest.cs +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/ServiceManagementTest.cs @@ -105,9 +105,9 @@ public static void SetDefaultStorage() { defaultAzureSubscription = vmPowershellCmdlets.SetAzureSubscription(defaultAzureSubscription.SubscriptionName, defaultAzureSubscription.SubscriptionId, CredentialHelper.DefaultStorageName); vmPowershellCmdlets.SelectAzureSubscription(defaultAzureSubscription.SubscriptionName, true); - storageAccountKey = vmPowershellCmdlets.GetAzureStorageAccountKey(defaultAzureSubscription.CurrentStorageAccountName); - Assert.AreEqual(defaultAzureSubscription.CurrentStorageAccountName, storageAccountKey.StorageAccountName); - blobUrlRoot = (vmPowershellCmdlets.GetAzureStorageAccount(defaultAzureSubscription.CurrentStorageAccountName)[0].Endpoints.ToArray())[0]; + storageAccountKey = vmPowershellCmdlets.GetAzureStorageAccountKey(CredentialHelper.DefaultStorageName); + Assert.AreEqual(CredentialHelper.DefaultStorageName, storageAccountKey.StorageAccountName); + blobUrlRoot = (vmPowershellCmdlets.GetAzureStorageAccount(CredentialHelper.DefaultStorageName)[0].Endpoints.ToArray())[0]; } else { From 88bc07881b3450faa6bcf3f12186177b9d19d5ac Mon Sep 17 00:00:00 2001 From: Hyonho Lee Date: Wed, 20 Jan 2016 19:03:19 -0800 Subject: [PATCH 3/5] Fix Set-AzureDiskEncryptionExtension issue dut to client library update --- .../SetAzureDiskEncryptionExtension.cs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/ResourceManager/Compute/Commands.Compute/Extension/AzureDiskEncryption/SetAzureDiskEncryptionExtension.cs b/src/ResourceManager/Compute/Commands.Compute/Extension/AzureDiskEncryption/SetAzureDiskEncryptionExtension.cs index 0572458f6fd9..902b2907527b 100644 --- a/src/ResourceManager/Compute/Commands.Compute/Extension/AzureDiskEncryption/SetAzureDiskEncryptionExtension.cs +++ b/src/ResourceManager/Compute/Commands.Compute/Extension/AzureDiskEncryption/SetAzureDiskEncryptionExtension.cs @@ -309,7 +309,7 @@ private AzureOperationResponse UpdateVmEncryptionSettings() parameters).GetAwaiter().GetResult(); } - private string GetExtensionPublicSettings() + private Hashtable GetExtensionPublicSettings() { Hashtable publicSettings = new Hashtable(); publicSettings.Add(aadClientIDKey, AadClientID ?? String.Empty); @@ -321,10 +321,10 @@ private string GetExtensionPublicSettings() publicSettings.Add(encryptionOperationKey, enableEncryptionOperation); publicSettings.Add(sequenceVersionKey, SequenceVersion ?? String.Empty); - return JsonConvert.SerializeObject(publicSettings); + return publicSettings; } - private string GetExtensionProtectedSettings() + private Hashtable GetExtensionProtectedSettings() { Hashtable protectedSettings = new Hashtable(); protectedSettings.Add(aadClientSecretKey, AadClientSecret ?? String.Empty); @@ -332,13 +332,13 @@ private string GetExtensionProtectedSettings() { protectedSettings.Add(passphraseKey, Passphrase ?? null); } - return JsonConvert.SerializeObject(protectedSettings); + return protectedSettings; } private VirtualMachineExtension GetVmExtensionParameters(VirtualMachine vmParameters) { - string SettingString = GetExtensionPublicSettings(); - string ProtectedSettingString = GetExtensionProtectedSettings(); + Hashtable SettingString = GetExtensionPublicSettings(); + Hashtable ProtectedSettingString = GetExtensionProtectedSettings(); if (vmParameters == null) { From 593816acb8fc9e3673c4a81d2c11e56d3b56edfc Mon Sep 17 00:00:00 2001 From: Hyonho Lee Date: Wed, 20 Jan 2016 19:12:08 -0800 Subject: [PATCH 4/5] Revert unnecessary change --- .../HostedServices/NewAzureDeployment.cs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/HostedServices/NewAzureDeployment.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/HostedServices/NewAzureDeployment.cs index a1745e22ea1b..6046108d14ec 100644 --- a/src/ServiceManagement/Compute/Commands.ServiceManagement/HostedServices/NewAzureDeployment.cs +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/HostedServices/NewAzureDeployment.cs @@ -16,7 +16,7 @@ using System; using System.Management.Automation; using System.Net; -using System.Text.RegularExpressions; +using Microsoft.Azure.Common.Authentication.Models; using Microsoft.WindowsAzure.Commands.Common; using Microsoft.WindowsAzure.Commands.ServiceManagement.Extensions; using Microsoft.WindowsAzure.Commands.ServiceManagement.Helpers; @@ -114,10 +114,7 @@ public virtual void NewPaaSDeploymentProcess() AssertNoPersistenVmRoleExistsInDeployment(PVM.DeploymentSlotType.Production); AssertNoPersistenVmRoleExistsInDeployment(PVM.DeploymentSlotType.Staging); - var storageAccount = Profile.Context.Subscription.GetStorageAccountName(); - var regex = new Regex(@";AccountName=([a-zA-Z0-9]{0,})"); - var match = regex.Match(storageAccount); - string storageName = match.Groups[1].Value; + var storageName = Profile.Context.Subscription.GetStorageAccountName(); Uri packageUrl; if (this.Package.StartsWith(Uri.UriSchemeHttp, StringComparison.OrdinalIgnoreCase) || From 79e381583f50ad65cdb690a6db9d267045deaf1c Mon Sep 17 00:00:00 2001 From: Yitao Zhang Date: Sun, 24 Jan 2016 21:57:12 -0800 Subject: [PATCH 5/5] Update ADF OM. --- .../Commands.DataFactories.Test.csproj | 5 ++--- .../Commands.DataFactories.Test/packages.config | 2 +- .../Commands.DataFactories/Commands.DataFactories.csproj | 2 +- .../DataFactories/Commands.DataFactories/packages.config | 2 +- 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories.Test/Commands.DataFactories.Test.csproj b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/Commands.DataFactories.Test.csproj index 6d7fcd748c3d..48d584209e55 100644 --- a/src/ResourceManager/DataFactories/Commands.DataFactories.Test/Commands.DataFactories.Test.csproj +++ b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/Commands.DataFactories.Test.csproj @@ -67,9 +67,8 @@ False ..\..\..\packages\Microsoft.Azure.Management.Authorization.2.0.0\lib\net40\Microsoft.Azure.Management.Authorization.dll - - False - ..\..\..\packages\Microsoft.Azure.Management.DataFactories.4.1.0\lib\net45\Microsoft.Azure.Management.DataFactories.dll + + ..\..\..\packages\Microsoft.Azure.Management.DataFactories.4.3.0\lib\net45\Microsoft.Azure.Management.DataFactories.dll False diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories.Test/packages.config b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/packages.config index 39070f65e346..9af15537b80d 100644 --- a/src/ResourceManager/DataFactories/Commands.DataFactories.Test/packages.config +++ b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/packages.config @@ -7,7 +7,7 @@ - + diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories/Commands.DataFactories.csproj b/src/ResourceManager/DataFactories/Commands.DataFactories/Commands.DataFactories.csproj index 0a169f494da3..e7f9f66567d1 100644 --- a/src/ResourceManager/DataFactories/Commands.DataFactories/Commands.DataFactories.csproj +++ b/src/ResourceManager/DataFactories/Commands.DataFactories/Commands.DataFactories.csproj @@ -67,7 +67,7 @@ False - ..\..\..\packages\Microsoft.Azure.Management.DataFactories.4.1.0\lib\net45\Microsoft.Azure.Management.DataFactories.dll + ..\..\..\packages\Microsoft.Azure.Management.DataFactories.4.3.0\lib\net45\Microsoft.Azure.Management.DataFactories.dll False diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories/packages.config b/src/ResourceManager/DataFactories/Commands.DataFactories/packages.config index 430e79381f14..07e31155d884 100644 --- a/src/ResourceManager/DataFactories/Commands.DataFactories/packages.config +++ b/src/ResourceManager/DataFactories/Commands.DataFactories/packages.config @@ -5,7 +5,7 @@ - +