diff --git a/src/Common/Commands.Common.Test/Commands.Common.Test.csproj b/src/Common/Commands.Common.Test/Commands.Common.Test.csproj
index e03df699a4ab..4e99e78774bf 100644
--- a/src/Common/Commands.Common.Test/Commands.Common.Test.csproj
+++ b/src/Common/Commands.Common.Test/Commands.Common.Test.csproj
@@ -105,7 +105,7 @@
..\..\packages\Microsoft.WindowsAzure.Management.4.0.0\lib\net40\Microsoft.WindowsAzure.Management.dll
- ..\..\packages\Microsoft.WindowsAzure.Management.Compute.8.0.0\lib\net40\Microsoft.WindowsAzure.Management.Compute.dll
+ ..\..\packages\Microsoft.WindowsAzure.Management.Compute.9.0.0\lib\net40\Microsoft.WindowsAzure.Management.Compute.dll
..\..\packages\Microsoft.WindowsAzure.Management.Storage.5.0.0\lib\net40\Microsoft.WindowsAzure.Management.Storage.dll
diff --git a/src/Common/Commands.Common.Test/packages.config b/src/Common/Commands.Common.Test/packages.config
index 37c24bf2f41f..cc33fbdf7884 100644
--- a/src/Common/Commands.Common.Test/packages.config
+++ b/src/Common/Commands.Common.Test/packages.config
@@ -16,7 +16,7 @@
-
+
diff --git a/src/Common/Commands.ScenarioTest/Commands.ScenarioTest.csproj b/src/Common/Commands.ScenarioTest/Commands.ScenarioTest.csproj
index 2e72218aa9cd..81aa277bfc84 100644
--- a/src/Common/Commands.ScenarioTest/Commands.ScenarioTest.csproj
+++ b/src/Common/Commands.ScenarioTest/Commands.ScenarioTest.csproj
@@ -101,7 +101,7 @@
..\..\packages\Microsoft.WindowsAzure.Management.4.0.0\lib\net40\Microsoft.WindowsAzure.Management.dll
- ..\..\packages\Microsoft.WindowsAzure.Management.Compute.8.0.0\lib\net40\Microsoft.WindowsAzure.Management.Compute.dll
+ ..\..\packages\Microsoft.WindowsAzure.Management.Compute.9.0.0\lib\net40\Microsoft.WindowsAzure.Management.Compute.dll
..\..\packages\Microsoft.WindowsAzure.Management.Storage.5.0.0\lib\net40\Microsoft.WindowsAzure.Management.Storage.dll
diff --git a/src/Common/Commands.ScenarioTest/packages.config b/src/Common/Commands.ScenarioTest/packages.config
index 366cc8d0a73a..b5698b3317b5 100644
--- a/src/Common/Commands.ScenarioTest/packages.config
+++ b/src/Common/Commands.ScenarioTest/packages.config
@@ -17,7 +17,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 e0f0df052783..719c9a0368e0 100644
--- a/src/ServiceManagement/Compute/Commands.ServiceManagement.PlatformImageRepository/Commands.ServiceManagement.PlatformImageRepository.csproj
+++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.PlatformImageRepository/Commands.ServiceManagement.PlatformImageRepository.csproj
@@ -111,9 +111,8 @@
False
..\..\..\packages\Microsoft.WindowsAzure.Management.4.0.0\lib\net40\Microsoft.WindowsAzure.Management.dll
-
- False
- ..\..\..\packages\Microsoft.WindowsAzure.Management.Compute.8.0.0\lib\net40\Microsoft.WindowsAzure.Management.Compute.dll
+
+ ..\..\..\packages\Microsoft.WindowsAzure.Management.Compute.9.0.0\lib\net40\Microsoft.WindowsAzure.Management.Compute.dll
False
diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.PlatformImageRepository/packages.config b/src/ServiceManagement/Compute/Commands.ServiceManagement.PlatformImageRepository/packages.config
index 2e1cd5f32f8f..fdd2f3dd47d4 100644
--- a/src/ServiceManagement/Compute/Commands.ServiceManagement.PlatformImageRepository/packages.config
+++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.PlatformImageRepository/packages.config
@@ -16,7 +16,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 2a595f90105a..e46660abd96a 100644
--- a/src/ServiceManagement/Compute/Commands.ServiceManagement.Preview/Commands.ServiceManagement.Preview.csproj
+++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Preview/Commands.ServiceManagement.Preview.csproj
@@ -111,9 +111,8 @@
False
..\..\..\packages\Microsoft.WindowsAzure.Management.4.0.0\lib\net40\Microsoft.WindowsAzure.Management.dll
-
- False
- ..\..\..\packages\Microsoft.WindowsAzure.Management.Compute.8.0.0\lib\net40\Microsoft.WindowsAzure.Management.Compute.dll
+
+ ..\..\..\packages\Microsoft.WindowsAzure.Management.Compute.9.0.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 ce92088d8fe7..4b1617201dc5 100644
--- a/src/ServiceManagement/Compute/Commands.ServiceManagement.Preview/packages.config
+++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Preview/packages.config
@@ -16,7 +16,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 e83263de9e16..a1bc6a5cbf46 100644
--- a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/Commands.ServiceManagement.Test.csproj
+++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/Commands.ServiceManagement.Test.csproj
@@ -105,7 +105,7 @@
..\..\..\packages\Microsoft.WindowsAzure.Management.4.0.0\lib\net40\Microsoft.WindowsAzure.Management.dll
- ..\..\..\packages\Microsoft.WindowsAzure.Management.Compute.8.0.0\lib\net40\Microsoft.WindowsAzure.Management.Compute.dll
+ ..\..\..\packages\Microsoft.WindowsAzure.Management.Compute.9.0.0\lib\net40\Microsoft.WindowsAzure.Management.Compute.dll
..\..\..\packages\Microsoft.WindowsAzure.Management.Network.6.0.0\lib\net40\Microsoft.WindowsAzure.Management.Network.dll
diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/CredentialHelper.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/CredentialHelper.cs
index 579a68ccb504..290832b0c4ae 100644
--- a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/CredentialHelper.cs
+++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/CredentialHelper.cs
@@ -239,7 +239,7 @@ public static string DefaultStorageName
}
}
- public static void CopyTestData(string srcContainer, string srcBlob, string destContainer, string destBlob)
+ public static void CopyTestData(string srcContainer, string srcBlob, string destContainer, string destBlob = null)
{
ServiceManagementCmdletTestHelper vmPowershellCmdlets = new ServiceManagementCmdletTestHelper();
Process currentProcess = Process.GetCurrentProcess();
@@ -262,7 +262,15 @@ public static void CopyTestData(string srcContainer, string srcBlob, string dest
// Make SAS Uri for the source blob.
string srcSasUri = Utilities.GenerateSasUri(CredentialHelper.CredentialBlobUriFormat, storageAccount, storageAccountKey, srcContainer, srcBlob);
- vmPowershellCmdlets.RunPSScript(string.Format("Start-AzureStorageBlobCopy -SrcUri \"{0}\" -DestContainer {1} -DestBlob {2} -Force", srcSasUri, destContainer, destBlob));
+ if (string.IsNullOrEmpty(destBlob))
+ {
+ vmPowershellCmdlets.RunPSScript(string.Format("Start-AzureStorageBlobCopy -SrcContainer {0} -SrcBlob {1} -DestContainer {2} -Force", srcContainer, srcBlob, destContainer));
+ destBlob = srcBlob;
+ }
+ else
+ {
+ vmPowershellCmdlets.RunPSScript(string.Format("Start-AzureStorageBlobCopy -SrcUri \"{0}\" -DestContainer {1} -DestBlob {2} -Force", srcSasUri, destContainer, destBlob));
+ }
for (int i = 0; i < 60; i++)
{
diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/FunctionalTestCommonVhd.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/FunctionalTestCommonVhd.cs
index 40d7b084e751..ad44f1074b04 100644
--- a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/FunctionalTestCommonVhd.cs
+++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/FunctionalTestCommonVhd.cs
@@ -155,6 +155,7 @@ public void AzureVMImageTest()
try
{
+ // BVT Tests for OS Images
OSImageContext result = vmPowershellCmdlets.AddAzureVMImage(newImageName, mediaLocation, OS.Windows, oldLabel, vmSize, iconUri, smallIconUri, showInGui);
OSImageContext resultReturned = vmPowershellCmdlets.GetAzureVMImage(newImageName)[0];
@@ -174,6 +175,97 @@ public void AzureVMImageTest()
vmPowershellCmdlets.RemoveAzureVMImage(newImageName, false);
Assert.IsTrue(Utilities.CheckRemove(vmPowershellCmdlets.GetAzureVMImage, newImageName));
+ // BVT Tests for VM Images
+ // Unique Container Prefix
+ var containerPrefix = Utilities.GetUniqueShortName("vmimg");
+
+ // Disk Blobs
+ var srcVhdName = "os1.vhd";
+ var srcVhdContainer = vhdContainerName;
+ var dstOSVhdContainer = containerPrefix.ToLower() + "os" + vhdContainerName;
+ CredentialHelper.CopyTestData(srcVhdContainer, srcVhdName, dstOSVhdContainer);
+ string osVhdLink = string.Format("{0}{1}/{2}", blobUrlRoot, dstOSVhdContainer, srcVhdName);
+
+ var dstDataVhdContainer = containerPrefix.ToLower() + "data" + vhdContainerName;
+ CredentialHelper.CopyTestData(srcVhdContainer, srcVhdName, dstDataVhdContainer);
+ string dataVhdLink = string.Format("{0}{1}/{2}", blobUrlRoot, dstDataVhdContainer, srcVhdName);
+
+ // VM Image OS/Data Disk Configuration
+ var addVMImageName = containerPrefix + "Image";
+ var diskConfig = new VirtualMachineImageDiskConfigSet
+ {
+ OSDiskConfiguration = new OSDiskConfiguration
+ {
+ HostCaching = HostCaching.ReadWrite.ToString(),
+ OS = OSType.Windows.ToString(),
+ OSState = "Generalized",
+ MediaLink = new Uri(osVhdLink)
+ },
+ DataDiskConfigurations = new DataDiskConfigurationList
+ {
+ new DataDiskConfiguration
+ {
+ HostCaching = HostCaching.ReadOnly.ToString(),
+ Lun = 0,
+ MediaLink = new Uri(dataVhdLink)
+ }
+ }
+ };
+
+ // Add-AzureVMImage
+ string label = addVMImageName;
+ string description = "test";
+ string eula = "http://www.bing.com/";
+ string imageFamily = "Windows";
+ DateTime? publishedDate = new DateTime(2015, 1, 1);
+ string privacyUri = "http://www.bing.com/";
+ string recommendedVMSize = vmSize;
+ string iconName = "iconName";
+ string smallIconName = "smallIconName";
+
+ vmPowershellCmdlets.AddAzureVMImage(
+ addVMImageName,
+ label,
+ diskConfig,
+ description,
+ eula,
+ imageFamily,
+ publishedDate,
+ privacyUri,
+ recommendedVMSize,
+ iconName,
+ smallIconName,
+ showInGui);
+
+ // Get-AzureVMImage
+ var vmImage = vmPowershellCmdlets.GetAzureVMImageReturningVMImages(addVMImageName).First();
+
+ Assert.IsTrue(vmImage.ImageName == addVMImageName);
+ Assert.IsTrue(vmImage.Label == label);
+ Assert.IsTrue(vmImage.Description == description);
+ Assert.IsTrue(vmImage.Eula == eula);
+ Assert.IsTrue(vmImage.ImageFamily == imageFamily);
+ Assert.IsTrue(vmImage.PublishedDate.Value.Year == publishedDate.Value.Year);
+ Assert.IsTrue(vmImage.PublishedDate.Value.Month == publishedDate.Value.Month);
+ Assert.IsTrue(vmImage.PublishedDate.Value.Day == publishedDate.Value.Day);
+ Assert.IsTrue(vmImage.PrivacyUri.AbsoluteUri.ToString() == privacyUri);
+ Assert.IsTrue(vmImage.RecommendedVMSize == recommendedVMSize);
+ Assert.IsTrue(vmImage.IconName == iconName);
+ Assert.IsTrue(vmImage.IconUri == iconName);
+ Assert.IsTrue(vmImage.SmallIconName == smallIconName);
+ Assert.IsTrue(vmImage.SmallIconUri == smallIconName);
+ Assert.IsTrue(vmImage.ShowInGui == showInGui);
+ Assert.IsTrue(vmImage.OSDiskConfiguration.HostCaching == diskConfig.OSDiskConfiguration.HostCaching);
+ Assert.IsTrue(vmImage.OSDiskConfiguration.OS == diskConfig.OSDiskConfiguration.OS);
+ Assert.IsTrue(vmImage.OSDiskConfiguration.OSState == diskConfig.OSDiskConfiguration.OSState);
+ Assert.IsTrue(vmImage.OSDiskConfiguration.MediaLink == diskConfig.OSDiskConfiguration.MediaLink);
+ Assert.IsTrue(vmImage.DataDiskConfigurations.First().HostCaching == diskConfig.DataDiskConfigurations.First().HostCaching);
+ Assert.IsTrue(vmImage.DataDiskConfigurations.First().Lun == diskConfig.DataDiskConfigurations.First().Lun);
+ Assert.IsTrue(vmImage.DataDiskConfigurations.First().MediaLink == diskConfig.DataDiskConfigurations.First().MediaLink);
+
+ // Remove-AzureVMImage
+ vmPowershellCmdlets.RemoveAzureVMImage(addVMImageName);
+
pass = true;
}
catch (Exception e)
diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/AddAzureVMImageCmdletInfo.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/AddAzureVMImageCmdletInfo.cs
index 44c3b4982683..265eba6b3dfc 100644
--- a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/AddAzureVMImageCmdletInfo.cs
+++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/AddAzureVMImageCmdletInfo.cs
@@ -15,6 +15,7 @@
using System;
using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.ConfigDataInfo;
using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore;
+using Microsoft.WindowsAzure.Commands.ServiceManagement.Model;
namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.IaasCmdletInfo
{
@@ -96,5 +97,76 @@ public AddAzureVMImageCmdletInfo(
cmdletParams.Add(new CmdletParam("PublishedDate", publishedDate.ToString()));
}
}
+
+ public AddAzureVMImageCmdletInfo(
+ string imageName,
+ string label,
+ VirtualMachineImageDiskConfigSet diskConfig,
+ string description,
+ string eula,
+ string imageFamily,
+ DateTime? publishedDate,
+ string privacyUri,
+ string recommendedVMSize,
+ string iconName,
+ string smallIconName,
+ bool? showInGui)
+ {
+ cmdletName = Utilities.AddAzureVMImageCmdletName;
+
+ cmdletParams.Add(new CmdletParam("ImageName", imageName));
+
+ cmdletParams.Add(new CmdletParam("Label", label));
+
+ if (diskConfig != null)
+ {
+ cmdletParams.Add(new CmdletParam("DiskConfig", diskConfig));
+ }
+
+ if (!string.IsNullOrEmpty(description))
+ {
+ cmdletParams.Add(new CmdletParam("Description", description));
+ }
+
+ if (!string.IsNullOrEmpty(eula))
+ {
+ cmdletParams.Add(new CmdletParam("Eula", eula));
+ }
+
+ if (!string.IsNullOrEmpty(imageFamily))
+ {
+ cmdletParams.Add(new CmdletParam("ImageFamily", imageFamily));
+ }
+
+ if (publishedDate != null)
+ {
+ cmdletParams.Add(new CmdletParam("PublishedDate", publishedDate));
+ }
+
+ if (!string.IsNullOrEmpty(privacyUri))
+ {
+ cmdletParams.Add(new CmdletParam("PrivacyUri", privacyUri));
+ }
+
+ if (!string.IsNullOrEmpty(recommendedVMSize))
+ {
+ cmdletParams.Add(new CmdletParam("RecommendedVMSize", recommendedVMSize));
+ }
+
+ if (!string.IsNullOrEmpty(iconName))
+ {
+ cmdletParams.Add(new CmdletParam("IconName", iconName));
+ }
+
+ if (!string.IsNullOrEmpty(smallIconName))
+ {
+ cmdletParams.Add(new CmdletParam("SmallIconName", smallIconName));
+ }
+
+ if (showInGui != null)
+ {
+ cmdletParams.Add(new CmdletParam("ShowInGui", showInGui));
+ }
+ }
}
}
diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/UpdateAzureVMImageCmdletInfo.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/UpdateAzureVMImageCmdletInfo.cs
index 9ead2750dcba..fa3855dccae2 100644
--- a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/UpdateAzureVMImageCmdletInfo.cs
+++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/UpdateAzureVMImageCmdletInfo.cs
@@ -52,8 +52,8 @@ public UpdateAzureVMImageCmdletInfo(
Uri privacyUri,
DateTime publishedDate,
string language,
- Uri iconUri,
- Uri smallIconUri,
+ string iconName,
+ string smallIconName,
bool showInGui)
: this(imageName, label, recommendedSize, null, !showInGui)
{
@@ -81,13 +81,13 @@ public UpdateAzureVMImageCmdletInfo(
{
cmdletParams.Add(new CmdletParam("Language", language));
}
- if (iconUri != null)
+ if (!string.IsNullOrEmpty(iconName))
{
- cmdletParams.Add(new CmdletParam("IconUri", iconUri));
+ cmdletParams.Add(new CmdletParam("IconName", iconName));
}
- if (smallIconUri != null)
+ if (!string.IsNullOrEmpty(smallIconName))
{
- cmdletParams.Add(new CmdletParam("SmallIconUri", smallIconUri));
+ cmdletParams.Add(new CmdletParam("SmallIconName", smallIconName));
}
}
}
diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/ServiceManagementCmdletTestHelper.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/ServiceManagementCmdletTestHelper.cs
index 5ba5432bbbf1..d5bb969f147f 100644
--- a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/ServiceManagementCmdletTestHelper.cs
+++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/ServiceManagementCmdletTestHelper.cs
@@ -1370,6 +1370,37 @@ public SM.OSImageContext AddAzureVMImage(string imageName, string mediaLocation,
return result;
}
+ public void AddAzureVMImage(
+ string imageName,
+ string label,
+ SM.VirtualMachineImageDiskConfigSet diskConfig,
+ string description = null,
+ string eula = null,
+ string imageFamily = null,
+ DateTime? publishedDate = null,
+ string privacyUri = null,
+ string recommendedVMSize = null,
+ string iconName = null,
+ string smallIconName = null,
+ bool? showInGui = null)
+ {
+ var cmdletInfo = new AddAzureVMImageCmdletInfo(
+ imageName,
+ label,
+ diskConfig,
+ description,
+ eula,
+ imageFamily,
+ publishedDate,
+ privacyUri,
+ recommendedVMSize,
+ iconName,
+ smallIconName,
+ showInGui);
+
+ RunPSCmdletAndReturnFirst(cmdletInfo);
+ }
+
public SM.OSImageContext UpdateAzureVMImage(string imageName, string label, string recommendedSize = null)
{
return RunPSCmdletAndReturnFirst(new UpdateAzureVMImageCmdletInfo(imageName, label, recommendedSize, null, null));
@@ -1386,8 +1417,8 @@ public void UpdateAzureVMImage(string imageName, string label, SM.VirtualMachine
}
public void UpdateAzureVMImage(string imageName, string label, string imageFamily, bool showInGui = false, string recommendedSize = null,
- string description = null, string eula = null, Uri privacyUri = null, DateTime? publishedDate = null, string language = null, Uri iconUri = null,
- Uri smallIconUri = null)
+ string description = null, string eula = null, Uri privacyUri = null, DateTime? publishedDate = null, string language = null, string iconUri = null,
+ string smallIconUri = null)
{
RunPSCmdletAndReturnFirst(new UpdateAzureVMImageCmdletInfo(imageName, label, recommendedSize, description, eula, imageFamily,
privacyUri, publishedDate.Value, language, iconUri, smallIconUri, showInGui));
diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/VMTemplateTests.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/VMTemplateTests.cs
index 6b289c00b741..9b5fbc024f02 100644
--- a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/VMTemplateTests.cs
+++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/VMTemplateTests.cs
@@ -558,7 +558,7 @@ public void UpdateVMImageDataDiskAndOsDiskTest()
UpdateAzureVMImageDetails(vmImageName);
string disk1Name,disk2Name;
- UpdateVMImageOsAndDataDiskAnderifyChanges( diskConfig,out disk1Name,out disk2Name);
+ UpdateVMImageOsAndDataDiskAnderifyChanges(diskConfig, out disk1Name, out disk2Name);
//Update VMImage using DiskConfig set prepared manually.
UpdateVmImageUsingDiskConfigSetAndVerifyChanges(diskConfig, disk1Name, disk2Name);
@@ -695,7 +695,7 @@ private void UpdateAzureVMImageDetails(string imageName)
Eula = "End user licensce agreement value",
ImageFamily = OS.Windows.ToString(),
Description = "Description",
- IconUri = new Uri(@"http://www.bing.com"),
+ IconUri = "IconName",
ImageName = imageName,
Label = imageName,
Language = "English",
@@ -703,13 +703,13 @@ private void UpdateAzureVMImageDetails(string imageName)
PublishedDate = DateTime.Now,
RecommendedVMSize = InstanceSize.Medium.ToString(),
ShowInGui = false,
- SmallIconUri = new Uri(@"http://www.bing.com"),
+ SmallIconUri = "SmallIconName",
};
Utilities.ExecuteAndLog(() =>
{
vmPowershellCmdlets.UpdateAzureVMImage(imageName, imageName, imageContext.ImageFamily, imageContext.ShowInGui.Value, imageContext.RecommendedVMSize, imageContext.Description, imageContext.Eula,
- imageContext.PrivacyUri, imageContext.PublishedDate, imageContext.Language, imageContext.IconUri, imageContext.SmallIconUri);
+ imageContext.PrivacyUri, imageContext.PublishedDate, imageContext.Language, imageContext.IconName, imageContext.SmallIconName);
}, "Update Azure VM Image details");
VerifyVMImageProperties(imageContext);
@@ -728,6 +728,7 @@ private void VerifyVMImageProperties(VMImageContext imageContext)
Utilities.LogAssert(() => Assert.AreEqual(imageContext.Eula, vmImageContext.Eula), "Eula");
Utilities.LogAssert(() => Assert.AreEqual(imageContext.Description, vmImageContext.Description), "Description");
Utilities.LogAssert(() => Assert.AreEqual(imageContext.IconUri, vmImageContext.IconUri), "IconUri");
+ Utilities.LogAssert(() => Assert.AreEqual(imageContext.IconName, vmImageContext.IconName), "IconName");
Utilities.LogAssert(() => Assert.AreEqual(imageContext.ImageFamily, vmImageContext.ImageFamily), "ImageFamily");
Utilities.LogAssert(() => Assert.AreEqual(imageContext.ImageName, vmImageContext.ImageName), "ImageName");
Utilities.LogAssert(() => Assert.AreEqual(imageContext.Label, vmImageContext.Label), "Label");
@@ -737,6 +738,7 @@ private void VerifyVMImageProperties(VMImageContext imageContext)
Utilities.LogAssert(() => Assert.AreEqual(imageContext.RecommendedVMSize, vmImageContext.RecommendedVMSize), "RecommendedVMSize");
Utilities.LogAssert(() => Assert.AreEqual(imageContext.ShowInGui, vmImageContext.ShowInGui), "ShowInGui");
Utilities.LogAssert(() => Assert.AreEqual(imageContext.SmallIconUri, vmImageContext.SmallIconUri), "SmallIconUri");
+ Utilities.LogAssert(() => Assert.AreEqual(imageContext.SmallIconName, vmImageContext.SmallIconName), "SmallIconName");
}, "Verify VM image details");
}
diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/packages.config b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/packages.config
index a7b8f0f1819b..415b9b282c2c 100644
--- a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/packages.config
+++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/packages.config
@@ -16,7 +16,7 @@
-
+
diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/Commands.ServiceManagement.csproj b/src/ServiceManagement/Compute/Commands.ServiceManagement/Commands.ServiceManagement.csproj
index edf24aebccc9..dd6bd00aacf1 100644
--- a/src/ServiceManagement/Compute/Commands.ServiceManagement/Commands.ServiceManagement.csproj
+++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/Commands.ServiceManagement.csproj
@@ -113,9 +113,8 @@
False
..\..\..\packages\Microsoft.WindowsAzure.Management.4.0.0\lib\net40\Microsoft.WindowsAzure.Management.dll
-
- False
- ..\..\..\packages\Microsoft.WindowsAzure.Management.Compute.8.0.0\lib\net40\Microsoft.WindowsAzure.Management.Compute.dll
+
+ ..\..\..\packages\Microsoft.WindowsAzure.Management.Compute.9.0.0\lib\net40\Microsoft.WindowsAzure.Management.Compute.dll
False
diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/DiskRepository/AddAzureVMImage.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/DiskRepository/AddAzureVMImage.cs
index 44dd6713f78e..5fce60685282 100644
--- a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/DiskRepository/AddAzureVMImage.cs
+++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/DiskRepository/AddAzureVMImage.cs
@@ -12,8 +12,9 @@
// limitations under the License.
// ----------------------------------------------------------------------------------
-
+using AutoMapper;
using System;
+using System.Linq;
using System.Management.Automation;
using Microsoft.WindowsAzure.Commands.ServiceManagement.Helpers;
using Microsoft.WindowsAzure.Commands.ServiceManagement.Model;
@@ -24,18 +25,26 @@
namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.DiskRepository
{
- [Cmdlet(VerbsCommon.Add, "AzureVMImage"), OutputType(typeof(OSImageContext))]
+ [Cmdlet(VerbsCommon.Add, "AzureVMImage", DefaultParameterSetName = OSImageParamSet), OutputType(typeof(OSImageContext))]
public class AddAzureVMImage : ServiceManagementBaseCmdlet
{
+ protected const string OSImageParamSet = "OSImage";
+ protected const string VMImageParamSet = "VMImage";
+
[Parameter(Position = 0, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "Name of the image in the image library.")]
[ValidateNotNullOrEmpty]
public string ImageName { get; set; }
- [Parameter(Position = 1, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "Location of the physical blob backing the image. This link refers to a blob in a storage account.")]
+ [Parameter(Position = 1, ParameterSetName = OSImageParamSet, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "Location of the physical blob backing the image. This link refers to a blob in a storage account.")]
[ValidateNotNullOrEmpty]
public string MediaLocation { get; set; }
- [Parameter(Position = 2, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The OS Type of the Image (Windows or Linux)")]
+ [Parameter(Position = 1, ParameterSetName = VMImageParamSet, Mandatory = true, ValueFromPipeline = true, ValueFromPipelineByPropertyName = true, HelpMessage = "Disk Configuration Set")]
+ [ValidateNotNullOrEmpty]
+ public VirtualMachineImageDiskConfigSet DiskConfig { get; set; }
+
+ [Parameter(Position = 2, ParameterSetName = OSImageParamSet, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The OS Type of the Image (Windows or Linux)")]
+ [Parameter(Position = 2, ParameterSetName = VMImageParamSet, Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "The OS Type of the Image (Windows or Linux)")]
[ValidateSet("Windows", "Linux", IgnoreCase = true)]
public string OS { get; set; }
@@ -66,30 +75,58 @@ public class AddAzureVMImage : ServiceManagementBaseCmdlet
[Parameter(Position = 9, ValueFromPipelineByPropertyName = true, HelpMessage = " Specifies the size to use for the virtual machine that is created from the OS image.")]
public string RecommendedVMSize { get; set; }
+ [Alias("IconUri")]
[Parameter(Position = 10, ValueFromPipelineByPropertyName = true, HelpMessage = "Icon Uri.")]
- public Uri IconUri { get; set; }
+ public string IconName { get; set; }
+ [Alias("SmallIconUri")]
[Parameter(Position = 11, ValueFromPipelineByPropertyName = true, HelpMessage = "Small Icon Uri.")]
- public Uri SmallIconUri { get; set; }
+ public string SmallIconName { get; set; }
[Parameter(Position = 12, ValueFromPipelineByPropertyName = true, HelpMessage = "To show in GUI.")]
public SwitchParameter ShowInGui { get; set; }
- public void ExecuteCommand()
+ protected override void OnProcessRecord()
{
- var imageType = new VirtualMachineImageHelper(this.ComputeClient).GetImageType(this.ImageName);
- bool isOSImage = imageType.HasFlag(VirtualMachineImageType.OSImage);
- bool isVMImage = imageType.HasFlag(VirtualMachineImageType.VMImage);
+ ServiceManagementProfile.Initialize();
- if (isVMImage)
+ if (string.Equals(ParameterSetName, VMImageParamSet, StringComparison.OrdinalIgnoreCase))
{
- // If there is another type of image with the same name,
- // WAPS will stop here to avoid duplicates and potential conflicts
- WriteErrorWithTimestamp(
- string.Format(
- Resources.ErrorAnotherImageTypeFoundWithTheSameName,
- VirtualMachineImageType.VMImage,
- this.ImageName));
+ var osDiskConfig = DiskConfig == null ? null : DiskConfig.OSDiskConfiguration;
+ var dataDiskConfigs = DiskConfig == null ? null : DiskConfig.DataDiskConfigurations.ToList();
+
+ var parameters = new VirtualMachineVMImageCreateParameters
+ {
+ Name = this.ImageName,
+ OSDiskConfiguration = osDiskConfig == null ? null : new OSDiskConfigurationCreateParameters
+ {
+ OS = osDiskConfig.OS,
+ OSState = osDiskConfig.OSState,
+ HostCaching = osDiskConfig.HostCaching,
+ MediaLink = osDiskConfig.MediaLink
+ },
+ DataDiskConfigurations = dataDiskConfigs == null ? null : dataDiskConfigs.Select(d => new DataDiskConfigurationCreateParameters
+ {
+ HostCaching = d.HostCaching,
+ LogicalUnitNumber = d.Lun,
+ MediaLink = d.MediaLink
+ }).ToList(),
+ Label = string.IsNullOrEmpty(this.Label) ? this.ImageName : this.Label,
+ Eula = this.Eula,
+ Description = this.Description,
+ ImageFamily = this.ImageFamily,
+ PublishedDate = this.PublishedDate,
+ PrivacyUri = this.PrivacyUri,
+ RecommendedVMSize = this.RecommendedVMSize,
+ IconUri = this.IconName,
+ SmallIconUri = this.SmallIconName,
+ ShowInGui = this.ShowInGui
+ };
+
+ this.ExecuteClientActionNewSM(
+ null,
+ this.CommandRuntime.ToString(),
+ () => this.ComputeClient.VirtualMachineVMImages.Create(parameters));
}
else
{
@@ -105,8 +142,8 @@ public void ExecuteCommand()
PublishedDate = this.PublishedDate,
PrivacyUri = this.PrivacyUri,
RecommendedVMSize = this.RecommendedVMSize,
- IconUri = this.IconUri,
- SmallIconUri = this.SmallIconUri,
+ IconUri = this.IconName,
+ SmallIconUri = this.SmallIconName,
ShowInGui = this.ShowInGui
};
@@ -117,11 +154,5 @@ public void ExecuteCommand()
(s, response) => this.ContextFactory(response, s));
}
}
-
- protected override void OnProcessRecord()
- {
- ServiceManagementProfile.Initialize();
- this.ExecuteCommand();
- }
}
}
diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/DiskRepository/SetAzureVMImageDataDiskConfig.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/DiskRepository/SetAzureVMImageDataDiskConfig.cs
index 0b1d94936b26..ae9c41fcc9bf 100644
--- a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/DiskRepository/SetAzureVMImageDataDiskConfig.cs
+++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/DiskRepository/SetAzureVMImageDataDiskConfig.cs
@@ -21,12 +21,15 @@ namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS
{
[Cmdlet(
VerbsCommon.Set,
- AzureDataDiskConfigurationNoun),
+ AzureDataDiskConfigurationNoun,
+ DefaultParameterSetName = UpdateAzureVMImageParamSet),
OutputType(
typeof(VirtualMachineImageDiskConfigSet))]
public class SetAzureVMImageDataDiskConfig : PSCmdlet
{
protected const string AzureDataDiskConfigurationNoun = "AzureVMImageDataDiskConfig";
+ protected const string UpdateAzureVMImageParamSet = "UpdateAzureVMImageParamSet";
+ protected const string AddAzureVMImageParamSet = "AddAzureVMImageParamSet";
[Parameter(
Position = 0,
@@ -38,6 +41,7 @@ public class SetAzureVMImageDataDiskConfig : PSCmdlet
public VirtualMachineImageDiskConfigSet DiskConfig { get; set; }
[Parameter(
+ ParameterSetName = UpdateAzureVMImageParamSet,
Position = 1,
Mandatory = true,
ValueFromPipelineByPropertyName = true,
@@ -46,22 +50,45 @@ public class SetAzureVMImageDataDiskConfig : PSCmdlet
public string DataDiskName { get; set; }
[Parameter(
+ ParameterSetName = UpdateAzureVMImageParamSet,
Position = 2,
Mandatory = true,
ValueFromPipelineByPropertyName = true,
HelpMessage = "Lun")]
+ [Parameter(
+ ParameterSetName = AddAzureVMImageParamSet,
+ Position = 1,
+ Mandatory = true,
+ ValueFromPipelineByPropertyName = true,
+ HelpMessage = "Lun")]
[ValidateNotNullOrEmpty]
public int Lun { get; set; }
[Parameter(
+ ParameterSetName = UpdateAzureVMImageParamSet,
Position = 3,
Mandatory = true,
ValueFromPipelineByPropertyName = true,
HelpMessage = "Controls the platform caching behavior of the data disk blob for read efficiency.")]
+ [Parameter(
+ ParameterSetName = AddAzureVMImageParamSet,
+ Position = 2,
+ Mandatory = true,
+ ValueFromPipelineByPropertyName = true,
+ HelpMessage = "Controls the platform caching behavior of the data disk blob for read efficiency.")]
[ValidateNotNullOrEmpty]
[ValidateSet("ReadOnly", "ReadWrite", "None", IgnoreCase = true)]
public string HostCaching { get; set; }
+ [Parameter(
+ ParameterSetName = AddAzureVMImageParamSet,
+ Position = 3,
+ Mandatory = true,
+ ValueFromPipelineByPropertyName = true,
+ HelpMessage = "The media link.")]
+ [ValidateNotNullOrEmpty]
+ public Uri MediaLink { get; set; }
+
protected override void ProcessRecord()
{
ServiceManagementProfile.Initialize();
@@ -80,9 +107,10 @@ protected override void ProcessRecord()
DiskConfig.DataDiskConfigurations.Add(diskConfig);
}
- diskConfig.Name = this.DataDiskName;
+ diskConfig.Name = this.DataDiskName;
diskConfig.HostCaching = this.HostCaching;
- diskConfig.Lun = this.Lun;
+ diskConfig.Lun = this.Lun;
+ diskConfig.MediaLink = this.MediaLink;
WriteObject(DiskConfig);
}
diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/DiskRepository/SetAzureVMImageOSDiskConfig.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/DiskRepository/SetAzureVMImageOSDiskConfig.cs
index 377c9f567da2..458a935ec394 100644
--- a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/DiskRepository/SetAzureVMImageOSDiskConfig.cs
+++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/DiskRepository/SetAzureVMImageOSDiskConfig.cs
@@ -12,6 +12,7 @@
// limitations under the License.
// ----------------------------------------------------------------------------------
+using System;
using System.Management.Automation;
using Microsoft.WindowsAzure.Commands.ServiceManagement.Model;
@@ -19,12 +20,17 @@ namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS
{
[Cmdlet(
VerbsCommon.Set,
- AzureOSDiskConfigurationNoun),
+ AzureOSDiskConfigurationNoun,
+ DefaultParameterSetName = UpdateAzureVMImageParamSet),
OutputType(
typeof(VirtualMachineImageDiskConfigSet))]
public class SetAzureVMImageOSDiskConfig : PSCmdlet
{
protected const string AzureOSDiskConfigurationNoun = "AzureVMImageOSDiskConfig";
+ protected const string UpdateAzureVMImageParamSet = "UpdateAzureVMImageParamSet";
+ protected const string AddAzureVMImageParamSet = "AddAzureVMImageParamSet";
+ protected const string GeneralizedStr = "Generalized";
+ protected const string SpecializedStr = "Specialized";
[Parameter(
Position = 0,
@@ -43,6 +49,35 @@ public class SetAzureVMImageOSDiskConfig : PSCmdlet
[ValidateSet("ReadOnly", "ReadWrite", IgnoreCase = true)]
public string HostCaching { get; set; }
+ [Parameter(
+ ParameterSetName = AddAzureVMImageParamSet,
+ Mandatory = true,
+ Position = 2,
+ ValueFromPipelineByPropertyName = true,
+ HelpMessage = "The media link.")]
+ [ValidateNotNullOrEmpty]
+ public Uri MediaLink { get; set; }
+
+ [Parameter(
+ ParameterSetName = AddAzureVMImageParamSet,
+ Mandatory = true,
+ Position = 3,
+ ValueFromPipelineByPropertyName = true,
+ HelpMessage = "The OS state.")]
+ [ValidateNotNullOrEmpty]
+ [ValidateSet(GeneralizedStr, SpecializedStr, IgnoreCase = true)]
+ public string OSState { get; set; }
+
+ [Parameter(
+ ParameterSetName = AddAzureVMImageParamSet,
+ Mandatory = true,
+ Position = 4,
+ ValueFromPipelineByPropertyName = true,
+ HelpMessage = "The OS type.")]
+ [ValidateNotNullOrEmpty]
+ [ValidateSet("Windows", "Linux", IgnoreCase = true)]
+ public string OS { get; set; }
+
protected override void ProcessRecord()
{
ServiceManagementProfile.Initialize();
@@ -53,6 +88,9 @@ protected override void ProcessRecord()
}
DiskConfig.OSDiskConfiguration.HostCaching = this.HostCaching;
+ DiskConfig.OSDiskConfiguration.MediaLink = this.MediaLink;
+ DiskConfig.OSDiskConfiguration.OS = this.OS;
+ DiskConfig.OSDiskConfiguration.OSState = this.OSState;
WriteObject(DiskConfig);
}
diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/DiskRepository/UpdateAzureVMImage.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/DiskRepository/UpdateAzureVMImage.cs
index 1b40f28d6355..97892645f5ce 100644
--- a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/DiskRepository/UpdateAzureVMImage.cs
+++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/DiskRepository/UpdateAzureVMImage.cs
@@ -70,13 +70,15 @@ public class UpdateAzureVMImage : ServiceManagementBaseCmdlet
[ValidateNotNullOrEmpty]
public string Language { get; set; }
+ [Alias("IconUri")]
[Parameter(Position = 10, ValueFromPipelineByPropertyName = true, HelpMessage = "IconUri.")]
[ValidateNotNullOrEmpty]
- public Uri IconUri { get; set; }
+ public string IconName { get; set; }
+ [Alias("SmallIconUri")]
[Parameter(Position = 11, ValueFromPipelineByPropertyName = true, HelpMessage = "SmallIconUri.")]
[ValidateNotNullOrEmpty]
- public Uri SmallIconUri { get; set; }
+ public string SmallIconName { get; set; }
[Parameter(Position = 12, ValueFromPipelineByPropertyName = true, HelpMessage = "DontShowInGui.")]
public SwitchParameter DontShowInGui { get; set; }
@@ -106,8 +108,8 @@ protected override void OnProcessRecord()
PrivacyUri = this.PrivacyUri,
RecommendedVMSize = this.RecommendedVMSize,
Language = this.Language,
- IconUri = this.IconUri,
- SmallIconUri = this.SmallIconUri,
+ IconUri = this.IconName,
+ SmallIconUri = this.SmallIconName,
ShowInGui = this.DontShowInGui.IsPresent ? (bool?)false : null
};
@@ -139,8 +141,8 @@ protected override void OnProcessRecord()
Name = d.Name
}).ToList(),
Language = this.Language,
- IconUri = this.IconUri,
- SmallIconUri = this.SmallIconUri,
+ IconUri = this.IconName,
+ SmallIconUri = this.SmallIconName,
ShowInGui = this.DontShowInGui.IsPresent ? (bool?)false : null
};
diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/Model/OSImageContext.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/Model/OSImageContext.cs
index 8032b5ab3813..47287a05f2ba 100644
--- a/src/ServiceManagement/Compute/Commands.ServiceManagement/Model/OSImageContext.cs
+++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/Model/OSImageContext.cs
@@ -32,12 +32,28 @@ public class OSImageContext : ManagementOperationContext
public virtual string ImageFamily { get; set; }
public virtual DateTime? PublishedDate { get; set; }
public virtual bool? IsPremium { get; set; }
- public virtual Uri IconUri { get; set; }
- public virtual Uri SmallIconUri { get; set; }
+ public virtual string IconUri { get; set; }
+ public virtual string SmallIconUri { get; set; }
public virtual Uri PrivacyUri { get; set; }
public virtual string RecommendedVMSize { get; set; }
public virtual string PublisherName { get; set; }
public virtual string IOType { get; set; }
public virtual bool? ShowInGui { get; set; }
+
+ public virtual string IconName
+ {
+ get
+ {
+ return IconUri;
+ }
+ }
+
+ public virtual string SmallIconName
+ {
+ get
+ {
+ return SmallIconUri;
+ }
+ }
}
}
\ No newline at end of file
diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/Model/VMImageContext.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/Model/VMImageContext.cs
index 33e13f27c9a0..9852d6c9d293 100644
--- a/src/ServiceManagement/Compute/Commands.ServiceManagement/Model/VMImageContext.cs
+++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/Model/VMImageContext.cs
@@ -56,8 +56,8 @@ public override string OS
public override string RecommendedVMSize { get; set; }
public override bool? IsPremium { get; set; }
public override string Eula { get; set; }
- public override Uri IconUri { get; set; }
- public override Uri SmallIconUri { get; set; }
+ public override string IconUri { get; set; }
+ public override string SmallIconUri { get; set; }
public override Uri PrivacyUri { get; set; }
public override string PublisherName { get; set; }
public override DateTime? PublishedDate { get; set; }
diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/ServiceManagementProfile.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/ServiceManagementProfile.cs
index 8a348ef17f8d..0ff62e738a2b 100644
--- a/src/ServiceManagement/Compute/Commands.ServiceManagement/ServiceManagementProfile.cs
+++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/ServiceManagementProfile.cs
@@ -185,14 +185,31 @@ protected override void Configure()
Mapper.CreateMap()
.ForMember(c => c.Lun, o => o.MapFrom(r => r.LogicalUnitNumber));
+ Mapper.CreateMap, List>();
+ Mapper.CreateMap, List>();
+ Mapper.CreateMap, PVM.DataDiskConfigurationList>();
Mapper.CreateMap, List>();
Mapper.CreateMap, List>();
Mapper.CreateMap, PVM.DataDiskConfigurationList>();
+ Mapper.CreateMap()
+ .ForMember(c => c.HostCaching, o => o.MapFrom(r => r.HostCaching))
+ .ForMember(c => c.MediaLink, o => o.MapFrom(r => r.MediaLink))
+ .ForMember(c => c.OS, o => o.MapFrom(r => r.OS))
+ .ForMember(c => c.OSState, o => o.MapFrom(r => r.OSState));
+ Mapper.CreateMap()
+ .ForMember(c => c.LogicalUnitNumber, o => o.MapFrom(r => r.Lun));
Mapper.CreateMap();
Mapper.CreateMap()
.ForMember(c => c.LogicalUnitNumber, o => o.MapFrom(r => r.Lun));
+ Mapper.CreateMap, IList>();
+ Mapper.CreateMap, List>();
+ Mapper.CreateMap>();
+ Mapper.CreateMap, IList>();
+ Mapper.CreateMap, List>();
+ Mapper.CreateMap>();
+ Mapper.CreateMap>();
Mapper.CreateMap, IList>();
Mapper.CreateMap, List>();
Mapper.CreateMap>();
diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/packages.config b/src/ServiceManagement/Compute/Commands.ServiceManagement/packages.config
index ce92088d8fe7..4b1617201dc5 100644
--- a/src/ServiceManagement/Compute/Commands.ServiceManagement/packages.config
+++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/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 a309a0d3fc5c..928fe265a35b 100644
--- a/src/ServiceManagement/Services/Commands.Test.Utilities/Commands.Test.Utilities.csproj
+++ b/src/ServiceManagement/Services/Commands.Test.Utilities/Commands.Test.Utilities.csproj
@@ -82,7 +82,7 @@
..\..\..\packages\Microsoft.WindowsAzure.Management.4.0.0\lib\net40\Microsoft.WindowsAzure.Management.dll
- ..\..\..\packages\Microsoft.WindowsAzure.Management.Compute.8.0.0\lib\net40\Microsoft.WindowsAzure.Management.Compute.dll
+ ..\..\..\packages\Microsoft.WindowsAzure.Management.Compute.9.0.0\lib\net40\Microsoft.WindowsAzure.Management.Compute.dll
..\..\..\packages\Microsoft.WindowsAzure.Management.Storage.5.0.0\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 8a8c7e1996ed..2572d396dc69 100644
--- a/src/ServiceManagement/Services/Commands.Test.Utilities/packages.config
+++ b/src/ServiceManagement/Services/Commands.Test.Utilities/packages.config
@@ -11,7 +11,7 @@
-
+
diff --git a/src/ServiceManagement/Services/Commands.Test/Commands.Test.csproj b/src/ServiceManagement/Services/Commands.Test/Commands.Test.csproj
index 6c0ceb9f26fe..40d31eee1353 100644
--- a/src/ServiceManagement/Services/Commands.Test/Commands.Test.csproj
+++ b/src/ServiceManagement/Services/Commands.Test/Commands.Test.csproj
@@ -106,7 +106,7 @@
..\..\..\packages\Microsoft.WindowsAzure.Management.4.0.0\lib\net40\Microsoft.WindowsAzure.Management.dll
- ..\..\..\packages\Microsoft.WindowsAzure.Management.Compute.8.0.0\lib\net40\Microsoft.WindowsAzure.Management.Compute.dll
+ ..\..\..\packages\Microsoft.WindowsAzure.Management.Compute.9.0.0\lib\net40\Microsoft.WindowsAzure.Management.Compute.dll
..\..\..\packages\Microsoft.WindowsAzure.Management.ExpressRoute.0.18.0-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 8c7297707af0..cf555f8e1e30 100644
--- a/src/ServiceManagement/Services/Commands.Test/packages.config
+++ b/src/ServiceManagement/Services/Commands.Test/packages.config
@@ -15,7 +15,7 @@
-
+
diff --git a/src/ServiceManagement/Services/Commands.Utilities/Commands.Utilities.csproj b/src/ServiceManagement/Services/Commands.Utilities/Commands.Utilities.csproj
index 799e0157b5bb..e90b983d54e3 100644
--- a/src/ServiceManagement/Services/Commands.Utilities/Commands.Utilities.csproj
+++ b/src/ServiceManagement/Services/Commands.Utilities/Commands.Utilities.csproj
@@ -118,9 +118,8 @@
False
..\..\..\packages\Microsoft.WindowsAzure.Management.4.0.0\lib\net40\Microsoft.WindowsAzure.Management.dll
-
- False
- ..\..\..\packages\Microsoft.WindowsAzure.Management.Compute.8.0.0\lib\net40\Microsoft.WindowsAzure.Management.Compute.dll
+
+ ..\..\..\packages\Microsoft.WindowsAzure.Management.Compute.9.0.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 9c38940e2220..01c30156e4eb 100644
--- a/src/ServiceManagement/Services/Commands.Utilities/packages.config
+++ b/src/ServiceManagement/Services/Commands.Utilities/packages.config
@@ -16,7 +16,7 @@
-
+
diff --git a/src/ServiceManagement/Services/Commands/Commands.csproj b/src/ServiceManagement/Services/Commands/Commands.csproj
index 263cf2e345c9..1525e7641510 100644
--- a/src/ServiceManagement/Services/Commands/Commands.csproj
+++ b/src/ServiceManagement/Services/Commands/Commands.csproj
@@ -116,9 +116,8 @@
False
..\..\..\packages\Microsoft.WindowsAzure.Management.4.0.0\lib\net40\Microsoft.WindowsAzure.Management.dll
-
- False
- ..\..\..\packages\Microsoft.WindowsAzure.Management.Compute.8.0.0\lib\net40\Microsoft.WindowsAzure.Management.Compute.dll
+
+ ..\..\..\packages\Microsoft.WindowsAzure.Management.Compute.9.0.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 1b775e508671..197e35f01c1a 100644
--- a/src/ServiceManagement/Services/Commands/packages.config
+++ b/src/ServiceManagement/Services/Commands/packages.config
@@ -15,7 +15,7 @@
-
+
diff --git a/src/ServiceManagement/StorSimple/Commands.StorSimple.Test/Commands.StorSimple.Test.csproj b/src/ServiceManagement/StorSimple/Commands.StorSimple.Test/Commands.StorSimple.Test.csproj
index 2ee4f8eb07ca..c1c29abc433c 100644
--- a/src/ServiceManagement/StorSimple/Commands.StorSimple.Test/Commands.StorSimple.Test.csproj
+++ b/src/ServiceManagement/StorSimple/Commands.StorSimple.Test/Commands.StorSimple.Test.csproj
@@ -129,9 +129,6 @@
-
- Designer
-
Designer
diff --git a/src/ServiceManagement/StorSimple/Commands.StorSimple.Test/app.config b/src/ServiceManagement/StorSimple/Commands.StorSimple.Test/app.config
deleted file mode 100644
index fb92df3d1885..000000000000
--- a/src/ServiceManagement/StorSimple/Commands.StorSimple.Test/app.config
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file