diff --git a/ChangeLog.txt b/ChangeLog.txt index 5283a4ee0381..a6f6e2e79410 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -1,3 +1,56 @@ +2015.02.12 version 0.8.14 +* StorSimple: New StorSimple commands in AzureServiceManagement mode: + * GetAzureStorSimpleAccessControlRecord + * GetAzureStorSimpleStorageAccountCredential + * RemoveAzureStorSimpleAccessControlRecord + * RemoveAzureStorSimpleStorageAccountCredential + * SetAzureStorSimpleAccessControlRecord + * GetAzureStorSimpleDeviceVolume + * RemoveAzureStorSimpleDeviceVolume + * GetAzureStorSimpleDeviceVolumeContainer + * RemoveAzureStorSimpleDeviceVolumeContainer + * GetAzureStorSimpleDevice + * GetAzureStorSimpleDeviceConnectedInitiator + * GetAzureStorSimpleResource + * GetAzureStorSimpleResourceContext + * SetAzureStorSimpleDeviceBackupPolicy + * NewAzureStorSimpleDeviceBackupPolicy + * GetAzureStorSimpleDeviceBackup + * RemoveAzureStorSimpleDeviceBackup + * StartAzureStorSimpleDeviceBackupJob + * StartAzureStorSimpleDeviceBackupRestoreJob + * RemoveAzureStorSimpleDeviceBackupPolicy + * NewAzureStorSimpleDeviceVolume + * SetAzureStorSimpleDeviceVolume + * NewAzureStorSimpleDeviceVolumeContainer + * SelectAzureStorSimpleResource + * GetAzureStorSimpleDeviceBackupPolicy + * NewAzureStorSimpleStorageAccountCredential + * GetAzureStorSimpleTask + * SetAzureStorSimpleStorageAccountCredential + * NewAzureStorSimpleInlineStorageAccountCredential + * NewAzureStorSimpleAccessControlRecord + +* HDInsight: + * HeadNodeVMSize (update): the parameter is now a string that can now accept various sizes (specifications here: https://msdn.microsoft.com/en-us/library/azure/dn197896.aspx -> Sizes for Web and Worker Role Instances) + * DataNodeVMSize (new) : use to specify size of data nodes (where applicable) + * ZookeeperNodeVMSize (new): use to specify Zookeeper node sizes (where applicable) + * ClusterType (update): New value (Spark) can be specified as cluster type + * Add-AzureHDInsightConfigValues cmdlet: + * Spark (new): collection of configuration properties can be passed in to customize the Spark service + + * Azure Insights cmdlets in AzureResourceManager Mode: + * Get-AzureCrrelationLogId + * Get-AzureResourceGroupLog + * Get-AzureResourceLog + * Get-AzureResourceProviderLog + * Get-AzureSubscriptionIdLog + +* Azure VM cmdlets + * Get-AzureVMDscExtentionStatus: Get the DSC Extension status for a cloud service or VM + + * Updates and bug fixes for AzureAutomation and AzureDataFactory cmdlets + 2015.01.08 version 0.8.13 * Key Vault Service - new cmdlets in AzureResourceManager mode: * Keys: diff --git a/setup/azurecmd.wxs b/setup/azurecmd.wxs index d0914dbe14f3..e6293050b032 100644 --- a/setup/azurecmd.wxs +++ b/setup/azurecmd.wxs @@ -1,7 +1,7 @@  - + 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 f56d5bcfc7e1..4fe01c6605b8 100644 --- a/src/ResourceManager/DataFactories/Commands.DataFactories.Test/Commands.DataFactories.Test.csproj +++ b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/Commands.DataFactories.Test.csproj @@ -62,7 +62,7 @@ ..\..\..\packages\Microsoft.Azure.Management.Authorization.0.17.0-preview\lib\net40\Microsoft.Azure.Management.Authorization.dll - ..\..\..\packages\Microsoft.Azure.Management.DataFactories.0.15.0-preview\lib\net40\Microsoft.Azure.Management.DataFactories.dll + ..\..\..\packages\Microsoft.Azure.Management.DataFactories.0.15.3-preview\lib\net40\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 be98726f7488..cecd99ae7535 100644 --- a/src/ResourceManager/DataFactories/Commands.DataFactories.Test/packages.config +++ b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/packages.config @@ -6,7 +6,7 @@ - + diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories/Commands.DataFactories.csproj b/src/ResourceManager/DataFactories/Commands.DataFactories/Commands.DataFactories.csproj index 9374f33d7437..6d1f4c548ac3 100644 --- a/src/ResourceManager/DataFactories/Commands.DataFactories/Commands.DataFactories.csproj +++ b/src/ResourceManager/DataFactories/Commands.DataFactories/Commands.DataFactories.csproj @@ -63,7 +63,7 @@ False - ..\..\..\packages\Microsoft.Azure.Management.DataFactories.0.15.0-preview\lib\net40\Microsoft.Azure.Management.DataFactories.dll + ..\..\..\packages\Microsoft.Azure.Management.DataFactories.0.15.3-preview\lib\net40\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 59c6dd35c222..0e0d3318842b 100644 --- a/src/ResourceManager/DataFactories/Commands.DataFactories/packages.config +++ b/src/ResourceManager/DataFactories/Commands.DataFactories/packages.config @@ -4,7 +4,7 @@ - + diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/ScenarioTest.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/ScenarioTest.cs index 970c46469ae6..78114f61c852 100644 --- a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/ScenarioTest.cs +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/ScenarioTest.cs @@ -22,6 +22,7 @@ using System.Net; using System.Net.Cache; using System.Reflection; +using System.Security.Cryptography.X509Certificates; using System.Text; using System.Threading; using System.Xml; @@ -1059,6 +1060,98 @@ public void AzureServiceDiagnosticsExtensionTest() #endregion + + [TestMethod(), TestCategory(Category.Scenario), TestProperty("Feature", "PAAS"), Priority(1), Owner("huangpf"), Description("Test the ADDomain cmdlets.")] + [DataSource("Microsoft.VisualStudio.TestTools.DataSource.CSV", "|DataDirectory|\\Resources\\package.csv", "package#csv", DataAccessMethod.Sequential)] + public void AzureServiceADDomainExtensionTest() + { + StartTest(MethodBase.GetCurrentMethod().Name, testStartTime); + + // Choose the package and config files from local machine + string packageName = Convert.ToString(TestContext.DataRow["upgradePackage"]); + string configName = Convert.ToString(TestContext.DataRow["upgradeConfig"]); + var packagePath1 = new FileInfo(Directory.GetCurrentDirectory() + "\\" + packageName); + var configPath1 = new FileInfo(Directory.GetCurrentDirectory() + "\\" + configName); + + Assert.IsTrue(File.Exists(packagePath1.FullName), "VHD file not exist={0}", packagePath1); + Assert.IsTrue(File.Exists(configPath1.FullName), "VHD file not exist={0}", configPath1); + + string deploymentName = "deployment1"; + string deploymentLabel = "label1"; + DeploymentInfoContext result; + + PSCredential cred = new PSCredential(username, Utilities.convertToSecureString(password)); + + try + { + serviceName = Utilities.GetUniqueShortName(serviceNamePrefix); + vmPowershellCmdlets.NewAzureService(serviceName, serviceName, locationName); + Console.WriteLine("service, {0}, is created.", serviceName); + + // Workgroup Config + var workGroupName = "test"; + ExtensionConfigurationInput config = vmPowershellCmdlets.NewAzureServiceDomainJoinExtensionConfig( + workGroupName, null, null, false, null, null, null); + + vmPowershellCmdlets.NewAzureDeployment(serviceName, packagePath1.FullName, configPath1.FullName, DeploymentSlotType.Production, deploymentLabel, deploymentName, false, false, config); + + result = vmPowershellCmdlets.GetAzureDeployment(serviceName, DeploymentSlotType.Production); + pass = Utilities.PrintAndCompareDeployment(result, serviceName, deploymentName, deploymentLabel, DeploymentSlotType.Production, null, 2); + Console.WriteLine("successfully deployed the package"); + + var resultContext = vmPowershellCmdlets.GetAzureServiceDomainJoinExtension(serviceName); + Assert.IsTrue(string.IsNullOrEmpty(resultContext.User)); + Assert.IsTrue(resultContext.Name == workGroupName); + Assert.IsTrue(resultContext.Restart == false); + + vmPowershellCmdlets.RemoveAzureServiceDomainJoinExtension(serviceName, DeploymentSlotType.Production); + + // Join a Workgroup + vmPowershellCmdlets.SetAzureServiceDomainJoinExtension( + workGroupName, serviceName, DeploymentSlotType.Production, null, null, false, null, null, "1.*"); + resultContext = vmPowershellCmdlets.GetAzureServiceDomainJoinExtension(serviceName); + Assert.IsTrue(string.IsNullOrEmpty(resultContext.User)); + Assert.IsTrue(resultContext.Name == workGroupName); + Assert.IsTrue(resultContext.Restart == false); + Assert.IsTrue(resultContext.Version == "1.*"); + + vmPowershellCmdlets.RemoveAzureDeployment(serviceName, DeploymentSlotType.Production, true); + + // Domain Config + var domainName = "test.bing.com"; + config = vmPowershellCmdlets.NewAzureServiceDomainJoinExtensionConfig( + domainName, null, null, null, null, null, 35, true, cred, "1.*"); + Assert.IsTrue(config.Roles.Any(r => r.Default)); + Assert.IsTrue(config.PublicConfiguration.Contains(cred.UserName)); + Assert.IsTrue(config.PublicConfiguration.Contains(domainName)); + Assert.IsTrue(config.PublicConfiguration.Contains("35")); + + vmPowershellCmdlets.NewAzureDeployment(serviceName, packagePath1.FullName, configPath1.FullName, DeploymentSlotType.Production, deploymentLabel, deploymentName, false, false, config); + + vmPowershellCmdlets.RemoveAzureServiceDomainJoinExtension(serviceName, DeploymentSlotType.Production); + + // Join a Domain + vmPowershellCmdlets.SetAzureServiceDomainJoinExtension( + domainName, cred, 35, false, serviceName, DeploymentSlotType.Production, null, (X509Certificate2)null, null, (PSCredential)null, null, "1.*"); + + resultContext = vmPowershellCmdlets.GetAzureServiceDomainJoinExtension(serviceName); + Assert.IsTrue(resultContext.User == cred.UserName); + Assert.IsTrue(resultContext.Name == domainName); + Assert.IsTrue(resultContext.JoinOption == 35); + Assert.IsTrue(resultContext.Restart == false); + Assert.IsTrue(resultContext.Version == "1.*"); + + vmPowershellCmdlets.RemoveAzureDeployment(serviceName, DeploymentSlotType.Production, true); + + pass &= Utilities.CheckRemove(vmPowershellCmdlets.GetAzureDeployment, serviceName, DeploymentSlotType.Production); + } + catch (Exception e) + { + pass = false; + Assert.Fail("Exception occurred: {0}", e.ToString()); + } + } + #region AzureServiceRemoteDesktopExtension Tests [TestMethod(), TestCategory(Category.Scenario), TestProperty("Feature", "PAAS"), Priority(1), Owner("hylee"), Description("Test the cmdlet (New-AzureServiceRemoteDesktopConfig)")] diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/ADDomain/BaseAzureServiceADDomainExtension.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/ADDomain/BaseAzureServiceADDomainExtension.cs index a61d658be8ab..9c96884777b5 100644 --- a/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/ADDomain/BaseAzureServiceADDomainExtension.cs +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/ADDomain/BaseAzureServiceADDomainExtension.cs @@ -181,6 +181,8 @@ public virtual PSCredential UnjoinDomainCredential public BaseAzureServiceADDomainExtensionCmdlet() : base() { + PrivateConfig.Password = string.Empty; + PrivateConfig.UnjoinDomainPassword = string.Empty; } protected override void ValidateParameters() @@ -188,8 +190,6 @@ protected override void ValidateParameters() base.ValidateParameters(); ProviderNamespace = DomainExtensionNamespace; ExtensionName = DomainExtensionType; - PrivateConfig.Password = string.Empty; - PrivateConfig.UnjoinDomainPassword = string.Empty; } protected override void ValidateConfiguration() diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/ADDomain/NewAzureServiceADDomainExtensionConfig.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/ADDomain/NewAzureServiceADDomainExtensionConfig.cs index 7fa8112302d8..a3ce321e5eea 100644 --- a/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/ADDomain/NewAzureServiceADDomainExtensionConfig.cs +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/ADDomain/NewAzureServiceADDomainExtensionConfig.cs @@ -187,6 +187,8 @@ public override string OUPath [Parameter(Position = 9, ValueFromPipelineByPropertyName = true, ParameterSetName = DomainThumbprintParameterSet)] [Parameter(Position = 9, ValueFromPipelineByPropertyName = true, ParameterSetName = DomainJoinOptionParameterSet)] [Parameter(Position = 9, ValueFromPipelineByPropertyName = true, ParameterSetName = DomainJoinOptionThumbprintParameterSet)] + [Parameter(Position = 6, ValueFromPipelineByPropertyName = true, ParameterSetName = WorkgroupParameterSet)] + [Parameter(Position = 6, ValueFromPipelineByPropertyName = true, ParameterSetName = WorkgroupThumbprintParameterSet)] [ValidateNotNullOrEmpty] public override string Version { diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/ADDomain/SetAzureServiceADDomainExtension.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/ADDomain/SetAzureServiceADDomainExtension.cs index 9308b75c07fb..84e31ad1140b 100644 --- a/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/ADDomain/SetAzureServiceADDomainExtension.cs +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/ADDomain/SetAzureServiceADDomainExtension.cs @@ -204,6 +204,8 @@ public override string OUPath [Parameter(Position = 12, ValueFromPipelineByPropertyName = true, ParameterSetName = DomainThumbprintParameterSet)] [Parameter(Position = 12, ValueFromPipelineByPropertyName = true, ParameterSetName = DomainJoinOptionParameterSet)] [Parameter(Position = 12, ValueFromPipelineByPropertyName = true, ParameterSetName = DomainJoinOptionThumbprintParameterSet)] + [Parameter(Position = 8, ValueFromPipelineByPropertyName = true, ParameterSetName = WorkgroupParameterSet)] + [Parameter(Position = 8, ValueFromPipelineByPropertyName = true, ParameterSetName = WorkgroupThumbprintParameterSet)] [ValidateNotNullOrEmpty] public override string Version { diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/Microsoft.WindowsAzure.Commands.ServiceManagement.dll-Help.xml b/src/ServiceManagement/Compute/Commands.ServiceManagement/Microsoft.WindowsAzure.Commands.ServiceManagement.dll-Help.xml index 409f7107d0b0..9222bf65ffeb 100644 --- a/src/ServiceManagement/Compute/Commands.ServiceManagement/Microsoft.WindowsAzure.Commands.ServiceManagement.dll-Help.xml +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/Microsoft.WindowsAzure.Commands.ServiceManagement.dll-Help.xml @@ -2875,285 +2875,544 @@ New-AzureVMConfig -Name "MyNonDomainVM" -InstanceSize Small -ImageName - - - - Add-AzureVMImage - - The Add-AzureVMImage cmdlet adds a new operating system (OS) image to the image repository. The image should be a sysprep'd or generalized OS image. - - - - - Add - AzureVMImage - - - - - - - - - Add-AzureVMImage - - ImageName - - Specifies the name of the image being added to the image repository. - - String - - - MediaLocation - - Specifies the location of the physical blob page where the image resides. This is a link to a blob page in the current subscription's storage. - - String - - - OS - - Specifies the operating system version of the image. - - String - - - Label - - Specifies a label to give the image. - - String - - - Eula - - Specifies the End User License Aggreement, recommended value is a URL. - - String - - - Description - - Specifies the description of the OS image. - - String - - - ImageFamily - - Specifies a value that can be used to group OS images. - - String - - - PublishedDate - - Specifies the date when the OS image was added to the image repository. - - Nullable`1[DateTime] - - - PrivacyUri - - Specifies the URI that points to a document that contains the privacy policy related to the OS image. - - Uri - - - RecommendedVMSize - - Specifies the size to use for the virtual machine that is created from the OS image. Values are: "Medium", "Large", and "ExtraLarge", "A5", "A6",, "A7". - - String - - - - - - ImageName - - Specifies the name of the image being added to the image repository. - - String - - String - - - - - - MediaLocation - - Specifies the location of the physical blob page where the image resides. This is a link to a blob page in the current subscription's storage. - - String - - String - - - - - - OS - - Specifies the operating system version of the image. - - String - - String - - - - - - Label - - Specifies a label to give the image. - - String - - String - - - - - - Eula - - Specifies the End User License Aggreement, recommended value is a URL. - - String - - String - - - - - - Description - - Specifies the description of the OS image. - - String - - String - - - - - - ImageFamily - - Specifies a value that can be used to group OS images. - - String - - String - - - - - - PublishedDate - - Specifies the date when the OS image was added to the image repository. - - Nullable`1[DateTime] - - Nullable`1[DateTime] - - - - - - PrivacyUri - - Specifies the URI that points to a document that contains the privacy policy related to the OS image. - - Uri - - Uri - - - - - - RecommendedVMSize - - Specifies the size to use for the virtual machine that is created from the OS image. Values are: "Medium", "Large", and "ExtraLarge", "A5", "A6",, "A7". - - String - - String - - - - - - - - - - - - - - - - - - - - - OSImageContext - - - - - - - - - - - - - - - - - - - -------------------------- EXAMPLE 1 -------------------------- - - - - PS C:\> Add-AzureVMImage -ImageName imageName -MediaLocation http://yourstorageaccount.blob.core.azure.com/container/sampleImage.vhd -Label imageLabel - - Description - - - - -----------This example adds a new operating system image in the repository - - - - - - - Get-AzureVMImage - - - - Remove-AzureVMImage - - - - Update-AzureVMImage - - - - + + + + + Add-AzureVMImage + + + The Add-AzureVMImage cmdlet adds a new operating system (OS) image or a new VM Image to the image repository. The image should be a sysprep'd or generalized image. + + + + + Add + AzureVMImage + + + + + + + + + Add-AzureVMImage + + ImageName + + Specifies the name of the image being added to the image repository. + + string + + + MediaLocation + + Specifies the location of the physical blob page where the image resides. This is a link to a blob page in the current subscription's storage. + + string + + + Label + + Specifies a label to give the image. + + string + + + Eula + + Specifies the End User License Aggreement, recommended value is a URL. + + string + + + Description + + Specifies the description of the OS image. + + string + + + ImageFamily + + Specifies a value that can be used to group OS images. + + string + + + PublishedDate + + + + System.Nullable`1[[System.DateTime, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]] + + + PrivacyUri + + Specifies the URI that points to a document that contains the privacy policy related to the OS image. + + Uri + + + RecommendedVMSize + + Specifies the size to use for the virtual machine that is created from the OS image. Values are: "Medium", "Large", and "ExtraLarge", "A5", "A6",, "A7". + + string + + + IconName + + Not Specified + + string + + + SmallIconName + + Not Specified + + string + + + ShowInGui + + Not Specified + + + + PipelineVariable + + Not Specified + + string + + + + Add-AzureVMImage + + ImageName + + Specifies the name of the image being added to the image repository. + + string + + + DiskConfig + + Not Specified + + VirtualMachineImageDiskConfigSet + + + OS + + Specifies the operating system version of the image. + + string + + + Label + + Specifies a label to give the image. + + string + + + Eula + + Specifies the End User License Aggreement, recommended value is a URL. + + string + + + Description + + Specifies the description of the OS image. + + string + + + ImageFamily + + Specifies a value that can be used to group OS images. + + string + + + PublishedDate + + + + System.Nullable`1[[System.DateTime, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]] + + + PrivacyUri + + Specifies the URI that points to a document that contains the privacy policy related to the OS image. + + Uri + + + RecommendedVMSize + + Specifies the size to use for the virtual machine that is created from the OS image. Values are: "Medium", "Large", and "ExtraLarge", "A5", "A6",, "A7". + + string + + + IconName + + Not Specified + + string + + + SmallIconName + + Not Specified + + string + + + ShowInGui + + Not Specified + + + + PipelineVariable + + Not Specified + + string + + + + + + + Description + + Specifies the description of the OS image. + + + string + + string + + + + + + DiskConfig + + Not Specified + + + VirtualMachineImageDiskConfigSet + + VirtualMachineImageDiskConfigSet + + + + + + Eula + + Specifies the End User License Aggreement, recommended value is a URL. + + + string + + string + + + + + + IconName + + Not Specified + + + string + + string + + + + + + ImageFamily + + Specifies a value that can be used to group OS images. + + + string + + string + + + + + + ImageName + + Specifies the name of the image being added to the image repository. + + + string + + string + + + + + + Label + + Specifies a label to give the image. + + + string + + string + + + + + + MediaLocation + + Specifies the location of the physical blob page where the image resides. This is a link to a blob page in the current subscription's storage. + + + string + + string + + + + + + OS + + Specifies the operating system version of the image. + + + string + + string + + + + + + PipelineVariable + + Not Specified + + + string + + string + + + + + + PrivacyUri + + Specifies the URI that points to a document that contains the privacy policy related to the OS image. + + + Uri + + Uri + + + + + + PublishedDate + + + + + System.Nullable`1[[System.DateTime, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]] + + System.Nullable`1[[System.DateTime, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]] + + + + + + RecommendedVMSize + + Specifies the size to use for the virtual machine that is created from the OS image. Values are: "Medium", "Large", and "ExtraLarge", "A5", "A6",, "A7". + + + string + + string + + + + + + ShowInGui + + Not Specified + + + SwitchParameter + + SwitchParameter + + + + + + SmallIconName + + Not Specified + + + string + + string + + + + + + + + + + + + + + + + + + + + + + + + + OSImageContext + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- EXAMPLE 1 -------------------------- + + + C:\PS> + + + $s = New-AzureVMImageDiskConfigSet + + Set-AzureVMImageOSDiskConfig -DiskConfig $s -HostCaching ReadWrite -OSState 'Generalized' -OS 'Windows' -MediaLink $link + # A Uri link to the vhd in your storage account + + Set-AzureVMImageDataDiskConfig -DiskConfig $s -DataDiskName test1 -HostCaching ReadWrite -Lun 0 -MediaLink $link1 + + Set-AzureVMImageDataDiskConfig -DiskConfig $s -DataDiskName test4 -HostCaching ReadWrite -Lun 0 -MediaLink $link + + Remove-AzureVMImageDataDiskConfig -DiskConfig $s -DataDiskName test4 + + $imgname = 'testCREATEvmimage2'; + + Add-AzureVMImage -ImageName $imgname -Label test1 -Description test1 -DiskConfig $s -Eula 'http://www.test.com' -ImageFamily Windows -PublishedDate (Get-Date) -PrivacyUri 'http://www.test.com' -RecommendedVMSize Small -IconName test1 -SmallIconName test2 -ShowInGui + + + Description + ----------- + + Adds a VM Image to image repository + + + + + + + + + + + + + + + + -------------------------- EXAMPLE 2 -------------------------- + + + C:\PS> + + + + + Description + ----------- + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Cmdlet/AddAzureHDInsightMetastoreCmdlet.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Cmdlet/AddAzureHDInsightMetastoreCmdlet.cs index ad1cdb079ca0..3292aefa5786 100644 --- a/src/ServiceManagement/HDInsight/Commands.HDInsight/Cmdlet/AddAzureHDInsightMetastoreCmdlet.cs +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Cmdlet/AddAzureHDInsightMetastoreCmdlet.cs @@ -58,18 +58,27 @@ public AzureHDInsightConfig Config { throw new ArgumentNullException("value", "The value for the configuration can not be null."); } + this.command.Config.ClusterSizeInNodes = value.ClusterSizeInNodes; this.command.Config.DefaultStorageAccount = value.DefaultStorageAccount; this.command.Config.AdditionalStorageAccounts.AddRange(value.AdditionalStorageAccounts); this.command.Config.ConfigActions.AddRange(value.ConfigActions); - if (value.HiveMetastore.IsNotNull()) - { - this.command.Config.HiveMetastore = value.HiveMetastore; - } - if (value.OozieMetastore.IsNotNull()) - { - this.command.Config.OozieMetastore = value.OozieMetastore; - } + this.command.Config.HiveMetastore = value.HiveMetastore ?? this.command.Config.HiveMetastore; + this.command.Config.OozieMetastore = value.OozieMetastore ?? this.command.Config.OozieMetastore; + this.command.Config.CoreConfiguration.AddRange(value.CoreConfiguration); + this.command.Config.YarnConfiguration.AddRange(value.YarnConfiguration); + this.command.Config.HdfsConfiguration.AddRange(value.HdfsConfiguration); + this.command.Config.MapReduceConfiguration.ConfigurationCollection.AddRange(value.MapReduceConfiguration.ConfigurationCollection); + this.command.Config.MapReduceConfiguration.CapacitySchedulerConfigurationCollection.AddRange( + value.MapReduceConfiguration.CapacitySchedulerConfigurationCollection); + this.command.Config.HiveConfiguration.ConfigurationCollection.AddRange(value.HiveConfiguration.ConfigurationCollection); + this.command.Config.OozieConfiguration.ConfigurationCollection.AddRange(value.OozieConfiguration.ConfigurationCollection); + this.command.Config.HeadNodeVMSize = value.HeadNodeVMSize; + this.command.Config.ClusterType = value.ClusterType; + this.command.Config.VirtualNetworkId = value.VirtualNetworkId; + this.command.Config.SubnetName = value.SubnetName; + this.command.Config.StormConfiguration.AddRange(value.StormConfiguration); + this.command.Config.HBaseConfiguration.ConfigurationCollection.AddRange(value.HBaseConfiguration.ConfigurationCollection); } } diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Cmdlet/AddAzureHDInsightStorageCmdlet.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Cmdlet/AddAzureHDInsightStorageCmdlet.cs index b499d0d499c3..af5f392b61e0 100644 --- a/src/ServiceManagement/HDInsight/Commands.HDInsight/Cmdlet/AddAzureHDInsightStorageCmdlet.cs +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Cmdlet/AddAzureHDInsightStorageCmdlet.cs @@ -58,12 +58,27 @@ public AzureHDInsightConfig Config { throw new ArgumentNullException("value", "The value for the configuration can not be null."); } + this.command.Config.ClusterSizeInNodes = value.ClusterSizeInNodes; this.command.Config.DefaultStorageAccount = value.DefaultStorageAccount; - this.command.Config.HiveMetastore = value.HiveMetastore ?? this.command.Config.HiveMetastore; - this.command.Config.OozieMetastore = value.OozieMetastore ?? this.command.Config.OozieMetastore; this.command.Config.AdditionalStorageAccounts.AddRange(value.AdditionalStorageAccounts); this.command.Config.ConfigActions.AddRange(value.ConfigActions); + this.command.Config.HiveMetastore = value.HiveMetastore ?? this.command.Config.HiveMetastore; + this.command.Config.OozieMetastore = value.OozieMetastore ?? this.command.Config.OozieMetastore; + this.command.Config.CoreConfiguration.AddRange(value.CoreConfiguration); + this.command.Config.YarnConfiguration.AddRange(value.YarnConfiguration); + this.command.Config.HdfsConfiguration.AddRange(value.HdfsConfiguration); + this.command.Config.MapReduceConfiguration.ConfigurationCollection.AddRange(value.MapReduceConfiguration.ConfigurationCollection); + this.command.Config.MapReduceConfiguration.CapacitySchedulerConfigurationCollection.AddRange( + value.MapReduceConfiguration.CapacitySchedulerConfigurationCollection); + this.command.Config.HiveConfiguration.ConfigurationCollection.AddRange(value.HiveConfiguration.ConfigurationCollection); + this.command.Config.OozieConfiguration.ConfigurationCollection.AddRange(value.OozieConfiguration.ConfigurationCollection); + this.command.Config.HeadNodeVMSize = value.HeadNodeVMSize; + this.command.Config.ClusterType = value.ClusterType; + this.command.Config.VirtualNetworkId = value.VirtualNetworkId; + this.command.Config.SubnetName = value.SubnetName; + this.command.Config.StormConfiguration.AddRange(value.StormConfiguration); + this.command.Config.HBaseConfiguration.ConfigurationCollection.AddRange(value.HBaseConfiguration.ConfigurationCollection); } } diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Cmdlet/SetAzureHDInsightDefaultStorageCmdlet.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Cmdlet/SetAzureHDInsightDefaultStorageCmdlet.cs index aa2084f49faf..5a451f5eacfd 100644 --- a/src/ServiceManagement/HDInsight/Commands.HDInsight/Cmdlet/SetAzureHDInsightDefaultStorageCmdlet.cs +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Cmdlet/SetAzureHDInsightDefaultStorageCmdlet.cs @@ -56,30 +56,26 @@ public AzureHDInsightConfig Config throw new ArgumentNullException("value", "The value for the configuration can not be null."); } - if (value.CoreConfiguration != null) - { - this.command.Config.CoreConfiguration.AddRange(value.CoreConfiguration); - } - - if (value.YarnConfiguration != null) - { - this.command.Config.YarnConfiguration.AddRange(value.YarnConfiguration); - } this.command.Config.ClusterSizeInNodes = value.ClusterSizeInNodes; + this.command.Config.DefaultStorageAccount = value.DefaultStorageAccount; this.command.Config.AdditionalStorageAccounts.AddRange(value.AdditionalStorageAccounts); this.command.Config.ConfigActions.AddRange(value.ConfigActions); this.command.Config.HiveMetastore = value.HiveMetastore ?? this.command.Config.HiveMetastore; this.command.Config.OozieMetastore = value.OozieMetastore ?? this.command.Config.OozieMetastore; + this.command.Config.CoreConfiguration.AddRange(value.CoreConfiguration); + this.command.Config.YarnConfiguration.AddRange(value.YarnConfiguration); + this.command.Config.HdfsConfiguration.AddRange(value.HdfsConfiguration); + this.command.Config.MapReduceConfiguration.ConfigurationCollection.AddRange(value.MapReduceConfiguration.ConfigurationCollection); + this.command.Config.MapReduceConfiguration.CapacitySchedulerConfigurationCollection.AddRange( + value.MapReduceConfiguration.CapacitySchedulerConfigurationCollection); + this.command.Config.HiveConfiguration.ConfigurationCollection.AddRange(value.HiveConfiguration.ConfigurationCollection); + this.command.Config.OozieConfiguration.ConfigurationCollection.AddRange(value.OozieConfiguration.ConfigurationCollection); this.command.Config.HeadNodeVMSize = value.HeadNodeVMSize; this.command.Config.ClusterType = value.ClusterType; - if (!string.IsNullOrEmpty(value.VirtualNetworkId)) - { - this.command.Config.VirtualNetworkId = value.VirtualNetworkId; - } - if (!string.IsNullOrEmpty(value.SubnetName)) - { - this.command.Config.SubnetName = value.SubnetName; - } + this.command.Config.VirtualNetworkId = value.VirtualNetworkId; + this.command.Config.SubnetName = value.SubnetName; + this.command.Config.StormConfiguration.AddRange(value.StormConfiguration); + this.command.Config.HBaseConfiguration.ConfigurationCollection.AddRange(value.HBaseConfiguration.ConfigurationCollection); } } diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/CommandImplementations/NewAzureHDInsightClusterCommand.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/CommandImplementations/NewAzureHDInsightClusterCommand.cs index 8b2eb5b05984..d8440c31a24d 100644 --- a/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/CommandImplementations/NewAzureHDInsightClusterCommand.cs +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/CommandImplementations/NewAzureHDInsightClusterCommand.cs @@ -12,6 +12,7 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using System; using System.Collections.Generic; using System.Linq; using System.Management.Automation; @@ -184,7 +185,7 @@ internal ClusterCreateParametersV2 GetClusterCreateParameters() this.OozieMetastore.Credential.GetCleartextPassword()); } - if (!string.IsNullOrEmpty(this.HeadNodeSize)) + if (!string.IsNullOrEmpty(this.HeadNodeSize) && !this.HeadNodeSize.Equals("Default", StringComparison.OrdinalIgnoreCase)) { createClusterRequest.HeadNodeSize = this.HeadNodeSize; } diff --git a/src/ServiceManagement/ManagedCache/Commands.ManagedCache/lib/ManagedCacheClient.cs b/src/ServiceManagement/ManagedCache/Commands.ManagedCache/lib/ManagedCacheClient.cs index 4b34aedca965..8082c7b4fb28 100644 --- a/src/ServiceManagement/ManagedCache/Commands.ManagedCache/lib/ManagedCacheClient.cs +++ b/src/ServiceManagement/ManagedCache/Commands.ManagedCache/lib/ManagedCacheClient.cs @@ -2571,6 +2571,7 @@ public async Task BeginCreatingCacheServiceAsync(string } requestContent = requestDoc.ToString(); + requestContent = System.Text.RegularExpressions.Regex.Replace(requestContent, "\\s*