diff --git a/ChangeLog.md b/ChangeLog.md
index b58764902dc7..30180d017260 100644
--- a/ChangeLog.md
+++ b/ChangeLog.md
@@ -51,6 +51,13 @@
* Set-AzureVMSqlServerExtension
* Get-AzureVMSqlServerExtension
* Remove-AzureVMSqlServerExtension
+* Azure SQL Database Index Recommendation Cmdlets
+ * Get-AzureSqlDatabaseIndexRecommendations
+ * Start-AzureSqlDatabaseExecuteIndexRecommendation
+ * Stop-AzureSqlDatabaseExecuteIndexRecommendation
+* Azure SQL Database and Server Upgrade Hints Cmdlets
+ * Get-AzureSqlDatabaseUpgradeHint
+ * Get-AzureSqlServerUpgradeHint
## 2015.08.17 version 0.9.7
* Azure Profile cmdlets
diff --git a/setup-powershellget/Setup/ShortcutStartup.ps1 b/setup-powershellget/Setup/ShortcutStartup.ps1
index 9d2228f0d5a6..674eed639271 100644
--- a/setup-powershellget/Setup/ShortcutStartup.ps1
+++ b/setup-powershellget/Setup/ShortcutStartup.ps1
@@ -56,8 +56,10 @@ This may take some time...
} else {
cd c:\
$welcomeMessage = @"
-For a list of all Azure cmdlets type 'help azure'.
-For a list of Azure Pack cmdlets type 'Get-Command *wapack*'.
+For a list of all Azure RM cmdlets type 'help azurerm'.
+
+To start using Azure RM login via Login-AzureRmAccount cmdlet.
+To switch between subscriptions use Set-AzureRmContext.
To use Azure Service Management cmdlets please execute the following cmdlet:
Install-Module Azure
diff --git a/src/Common/Storage/Azure.Storage.psd1 b/src/Common/Storage/Azure.Storage.psd1
index 54f4e2bea750..70e49fec200a 100644
--- a/src/Common/Storage/Azure.Storage.psd1
+++ b/src/Common/Storage/Azure.Storage.psd1
@@ -9,7 +9,7 @@
@{
# Version number of this module.
-ModuleVersion = '0.9.8'
+ModuleVersion = '0.9.10'
# ID used to uniquely identify this module
GUID = '00612bca-fa22-401d-a671-9cc48b010e3b'
@@ -21,7 +21,7 @@ Author = 'Microsoft Corporation'
CompanyName = 'Microsoft Corporation'
# Copyright statement for this module
-Copyright = '� Microsoft Corporation. All rights reserved.'
+Copyright = 'Microsoft Corporation. All rights reserved.'
# Description of the functionality provided by this module
Description = 'Microsoft Azure PowerShell - Storage'
@@ -45,7 +45,7 @@ CLRVersion='4.0'
ProcessorArchitecture = 'None'
# Modules that must be imported into the global environment prior to importing this module
-RequiredModules = @( @{ ModuleName = 'AzureRM.Profile'; ModuleVersion = '0.9.8' })
+RequiredModules = @( @{ ModuleName = 'AzureRM.Profile'; ModuleVersion = '0.9.10' })
# Assemblies that must be loaded prior to importing this module
RequiredAssemblies = @()
diff --git a/src/Common/Storage/Commands.Storage/Microsoft.WindowsAzure.Commands.Storage.dll-Help.psd1 b/src/Common/Storage/Commands.Storage/Microsoft.WindowsAzure.Commands.Storage.dll-Help.psd1
index 629cc56833d1..19c0010da379 100644
--- a/src/Common/Storage/Commands.Storage/Microsoft.WindowsAzure.Commands.Storage.dll-Help.psd1
+++ b/src/Common/Storage/Commands.Storage/Microsoft.WindowsAzure.Commands.Storage.dll-Help.psd1
@@ -9,7 +9,7 @@
@{
# Version number of this module.
-ModuleVersion = '0.8.8'
+ModuleVersion = '0.9.10'
# ID used to uniquely identify this module
GUID = 'D48CF693-4125-4D2D-8790-1514F44CE325'
@@ -21,7 +21,7 @@ Author = 'Microsoft Corporation'
CompanyName = 'Microsoft Corporation'
# Copyright statement for this module
-Copyright = '?Microsoft Corporation. All rights reserved.'
+Copyright = 'Microsoft Corporation. All rights reserved.'
# Description of the functionality provided by this module
Description = ''
diff --git a/src/ResourceManager/ApiManagement/AzureRM.ApiManagement.psd1 b/src/ResourceManager/ApiManagement/AzureRM.ApiManagement.psd1
index a1e9f526253c..dc100a7d7ed5 100644
--- a/src/ResourceManager/ApiManagement/AzureRM.ApiManagement.psd1
+++ b/src/ResourceManager/ApiManagement/AzureRM.ApiManagement.psd1
@@ -9,7 +9,7 @@
@{
# Version number of this module.
-ModuleVersion = '0.9.8'
+ModuleVersion = '0.9.10'
# ID used to uniquely identify this module
GUID = 'f875725d-8ce4-423f-a6af-ea880bc63f13'
@@ -21,7 +21,7 @@ Author = 'Microsoft Corporation'
CompanyName = 'Microsoft Corporation'
# Copyright statement for this module
-Copyright = '� Microsoft Corporation. All rights reserved.'
+Copyright = 'Microsoft Corporation. All rights reserved.'
# Description of the functionality provided by this module
Description = 'Microsoft Azure PowerShell - Api Management'
@@ -45,7 +45,7 @@ CLRVersion='4.0'
ProcessorArchitecture = 'None'
# Modules that must be imported into the global environment prior to importing this module
-RequiredModules = @( @{ ModuleName = 'AzureRM.Profile'; ModuleVersion = '0.9.8' })
+RequiredModules = @( @{ ModuleName = 'AzureRM.Profile'; ModuleVersion = '0.9.10' })
# Assemblies that must be loaded prior to importing this module
RequiredAssemblies = @()
diff --git a/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Microsoft.Azure.Commands.ApiManagement.ServiceManagement.dll-help.psd1 b/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Microsoft.Azure.Commands.ApiManagement.ServiceManagement.dll-help.psd1
index 19b334a59394..1ebd2d8198ef 100644
--- a/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Microsoft.Azure.Commands.ApiManagement.ServiceManagement.dll-help.psd1
+++ b/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Microsoft.Azure.Commands.ApiManagement.ServiceManagement.dll-help.psd1
@@ -9,7 +9,7 @@
@{
# Version number of this module.
-ModuleVersion = '0.0.1'
+ModuleVersion = '0.9.10'
# ID used to uniquely identify this module
GUID = '77A7B3B3-A067-4173-9AC9-8A7248EF3C1C'
@@ -21,7 +21,7 @@ Author = 'Microsoft Corporation'
CompanyName = 'Microsoft Corporation'
# Copyright statement for this module
-Copyright = '?Microsoft Corporation. All rights reserved.'
+Copyright = 'Microsoft Corporation. All rights reserved.'
# Description of the functionality provided by this module
Description = ''
diff --git a/src/ResourceManager/ApiManagement/Commands.ApiManagement/Microsoft.Azure.Commands.ApiManagement.dll-help.psd1 b/src/ResourceManager/ApiManagement/Commands.ApiManagement/Microsoft.Azure.Commands.ApiManagement.dll-help.psd1
index 05b2bd7f062a..0b716c4ee335 100644
--- a/src/ResourceManager/ApiManagement/Commands.ApiManagement/Microsoft.Azure.Commands.ApiManagement.dll-help.psd1
+++ b/src/ResourceManager/ApiManagement/Commands.ApiManagement/Microsoft.Azure.Commands.ApiManagement.dll-help.psd1
@@ -9,7 +9,7 @@
@{
# Version number of this module.
-ModuleVersion = '0.0.1'
+ModuleVersion = '0.9.10'
# ID used to uniquely identify this module
GUID = '77A7B3B3-A067-4173-9AC9-8A7248EF3C1C'
@@ -21,7 +21,7 @@ Author = 'Microsoft Corporation'
CompanyName = 'Microsoft Corporation'
# Copyright statement for this module
-Copyright = '?Microsoft Corporation. All rights reserved.'
+Copyright = 'Microsoft Corporation. All rights reserved.'
# Description of the functionality provided by this module
Description = ''
diff --git a/src/ResourceManager/Automation/AzureRM.Automation.psd1 b/src/ResourceManager/Automation/AzureRM.Automation.psd1
index 32e34ec0000c..1fa668e4ee6b 100644
--- a/src/ResourceManager/Automation/AzureRM.Automation.psd1
+++ b/src/ResourceManager/Automation/AzureRM.Automation.psd1
@@ -9,7 +9,7 @@
@{
# Version number of this module.
-ModuleVersion = '0.9.8'
+ModuleVersion = '0.9.10'
# ID used to uniquely identify this module
GUID = 'bcea1c70-a32b-48c3-a05c-323e1c02f4d3'
@@ -21,7 +21,7 @@ Author = 'Microsoft Corporation'
CompanyName = 'Microsoft Corporation'
# Copyright statement for this module
-Copyright = '� Microsoft Corporation. All rights reserved.'
+Copyright = 'Microsoft Corporation. All rights reserved.'
# Description of the functionality provided by this module
Description = 'Microsoft Azure PowerShell - Automation'
@@ -45,7 +45,7 @@ CLRVersion='4.0'
ProcessorArchitecture = 'None'
# Modules that must be imported into the global environment prior to importing this module
-RequiredModules = @( @{ ModuleName = 'AzureRM.Profile'; ModuleVersion = '0.9.8' })
+RequiredModules = @( @{ ModuleName = 'AzureRM.Profile'; ModuleVersion = '0.9.10' })
# Assemblies that must be loaded prior to importing this module
RequiredAssemblies = @()
diff --git a/src/ResourceManager/Automation/Commands.Automation.Test/packages.config b/src/ResourceManager/Automation/Commands.Automation.Test/packages.config
index 8b5713e969f3..222b03afb390 100644
--- a/src/ResourceManager/Automation/Commands.Automation.Test/packages.config
+++ b/src/ResourceManager/Automation/Commands.Automation.Test/packages.config
@@ -16,7 +16,6 @@
-
diff --git a/src/ResourceManager/Automation/Commands.Automation/Microsoft.Azure.Commands.ResourceManager.Automation.dll-help.psd1 b/src/ResourceManager/Automation/Commands.Automation/Microsoft.Azure.Commands.ResourceManager.Automation.dll-help.psd1
index af863f636d1c..10184949a318 100644
--- a/src/ResourceManager/Automation/Commands.Automation/Microsoft.Azure.Commands.ResourceManager.Automation.dll-help.psd1
+++ b/src/ResourceManager/Automation/Commands.Automation/Microsoft.Azure.Commands.ResourceManager.Automation.dll-help.psd1
@@ -9,7 +9,7 @@
@{
# Version number of this module.
-ModuleVersion = '0.8.8'
+ModuleVersion = '0.9.10'
# ID used to uniquely identify this module
GUID = 'D48CF693-4125-4D2D-8790-1514F44CE325'
@@ -21,7 +21,7 @@ Author = 'Microsoft Corporation'
CompanyName = 'Microsoft Corporation'
# Copyright statement for this module
-Copyright = '?Microsoft Corporation. All rights reserved.'
+Copyright = 'Microsoft Corporation. All rights reserved.'
# Description of the functionality provided by this module
Description = ''
diff --git a/src/ResourceManager/AzureBackup/AzureRM.Backup.psd1 b/src/ResourceManager/AzureBackup/AzureRM.Backup.psd1
index 41305a372432..8f9ce8488534 100644
--- a/src/ResourceManager/AzureBackup/AzureRM.Backup.psd1
+++ b/src/ResourceManager/AzureBackup/AzureRM.Backup.psd1
@@ -9,7 +9,7 @@
@{
# Version number of this module.
-ModuleVersion = '0.9.8'
+ModuleVersion = '0.9.10'
# ID used to uniquely identify this module
GUID = '0b1d76f5-a928-4b8f-9c83-df26947568d4'
@@ -21,7 +21,7 @@ Author = 'Microsoft Corporation'
CompanyName = 'Microsoft Corporation'
# Copyright statement for this module
-Copyright = '� Microsoft Corporation. All rights reserved.'
+Copyright = 'Microsoft Corporation. All rights reserved.'
# Description of the functionality provided by this module
Description = 'Microsoft Azure PowerShell - AzureBackup'
@@ -45,7 +45,7 @@ CLRVersion='4.0'
ProcessorArchitecture = 'None'
# Modules that must be imported into the global environment prior to importing this module
-RequiredModules = @( @{ ModuleName = 'AzureRM.Profile'; ModuleVersion = '0.9.8' })
+RequiredModules = @( @{ ModuleName = 'AzureRM.Profile'; ModuleVersion = '0.9.10' })
# Assemblies that must be loaded prior to importing this module
RequiredAssemblies = @()
diff --git a/src/ResourceManager/AzureBackup/Commands.AzureBackup.Test/Commands.AzureBackup.Test.csproj b/src/ResourceManager/AzureBackup/Commands.AzureBackup.Test/Commands.AzureBackup.Test.csproj
index 3e5033a2462f..e6de3e29ac97 100644
--- a/src/ResourceManager/AzureBackup/Commands.AzureBackup.Test/Commands.AzureBackup.Test.csproj
+++ b/src/ResourceManager/AzureBackup/Commands.AzureBackup.Test/Commands.AzureBackup.Test.csproj
@@ -40,7 +40,8 @@
True
- ..\..\..\packages\Microsoft.Azure.Management.BackupServices.1.0.4-preview\lib\net40\Microsoft.Azure.Management.BackupServicesManagement.dll
+ False
+ ..\..\..\packages\Microsoft.Azure.Management.BackupServices.1.0.5-preview\lib\net40\Microsoft.Azure.Management.BackupServicesManagement.dll
False
diff --git a/src/ResourceManager/AzureBackup/Commands.AzureBackup.Test/packages.config b/src/ResourceManager/AzureBackup/Commands.AzureBackup.Test/packages.config
index 24eeae4af6aa..d0d223c6e304 100644
--- a/src/ResourceManager/AzureBackup/Commands.AzureBackup.Test/packages.config
+++ b/src/ResourceManager/AzureBackup/Commands.AzureBackup.Test/packages.config
@@ -4,7 +4,7 @@
-
+
diff --git a/src/ResourceManager/AzureBackup/Commands.AzureBackup/Cmdlets/Container/EnableAzureRMBackupContainerReregistration.cs b/src/ResourceManager/AzureBackup/Commands.AzureBackup/Cmdlets/Container/EnableAzureRMBackupContainerReregistration.cs
index 7918dc778980..24b170af1d89 100644
--- a/src/ResourceManager/AzureBackup/Commands.AzureBackup/Cmdlets/Container/EnableAzureRMBackupContainerReregistration.cs
+++ b/src/ResourceManager/AzureBackup/Commands.AzureBackup/Cmdlets/Container/EnableAzureRMBackupContainerReregistration.cs
@@ -46,6 +46,8 @@ protected override void ProcessRecord()
{
case AzureBackupContainerType.Windows:
case AzureBackupContainerType.SCDPM:
+ case AzureBackupContainerType.AzureBackupServer:
+ case AzureBackupContainerType.Other:
AzureBackupClient.EnableMachineContainerReregistration(Container.ResourceGroupName, Container.ResourceName, Container.Id);
break;
default:
diff --git a/src/ResourceManager/AzureBackup/Commands.AzureBackup/Cmdlets/Container/GetAzureRMBackupContainer.cs b/src/ResourceManager/AzureBackup/Commands.AzureBackup/Cmdlets/Container/GetAzureRMBackupContainer.cs
index 35c2d8e30b15..1bb691991d18 100644
--- a/src/ResourceManager/AzureBackup/Commands.AzureBackup/Cmdlets/Container/GetAzureRMBackupContainer.cs
+++ b/src/ResourceManager/AzureBackup/Commands.AzureBackup/Cmdlets/Container/GetAzureRMBackupContainer.cs
@@ -60,6 +60,8 @@ protected override void ProcessRecord()
{
case AzureBackupContainerType.Windows:
case AzureBackupContainerType.SCDPM:
+ case AzureBackupContainerType.AzureBackupServer:
+ case AzureBackupContainerType.Other:
containers.AddRange(GetMachineContainers(Vault.ResourceGroupName, Vault.Name));
break;
case AzureBackupContainerType.AzureVM:
diff --git a/src/ResourceManager/AzureBackup/Commands.AzureBackup/Cmdlets/Container/UnregisterAzureRMBackupContainer.cs b/src/ResourceManager/AzureBackup/Commands.AzureBackup/Cmdlets/Container/UnregisterAzureRMBackupContainer.cs
index fd3bf7d509f4..e4a09401574f 100644
--- a/src/ResourceManager/AzureBackup/Commands.AzureBackup/Cmdlets/Container/UnregisterAzureRMBackupContainer.cs
+++ b/src/ResourceManager/AzureBackup/Commands.AzureBackup/Cmdlets/Container/UnregisterAzureRMBackupContainer.cs
@@ -47,6 +47,8 @@ protected override void ProcessRecord()
{
case AzureBackupContainerType.Windows:
case AzureBackupContainerType.SCDPM:
+ case AzureBackupContainerType.AzureBackupServer:
+ case AzureBackupContainerType.Other:
DeleteServer();
break;
case AzureBackupContainerType.AzureVM:
diff --git a/src/ResourceManager/AzureBackup/Commands.AzureBackup/Commands.AzureBackup.csproj b/src/ResourceManager/AzureBackup/Commands.AzureBackup/Commands.AzureBackup.csproj
index c6a6460dfc96..aec29b762da4 100644
--- a/src/ResourceManager/AzureBackup/Commands.AzureBackup/Commands.AzureBackup.csproj
+++ b/src/ResourceManager/AzureBackup/Commands.AzureBackup/Commands.AzureBackup.csproj
@@ -57,7 +57,8 @@
..\..\..\packages\Microsoft.Azure.Common.2.1.0\lib\net45\Microsoft.Azure.Common.NetFramework.dll
- ..\..\..\packages\Microsoft.Azure.Management.BackupServices.1.0.4-preview\lib\net40\Microsoft.Azure.Management.BackupServicesManagement.dll
+ False
+ ..\..\..\packages\Microsoft.Azure.Management.BackupServices.1.0.5-preview\lib\net40\Microsoft.Azure.Management.BackupServicesManagement.dll
False
diff --git a/src/ResourceManager/AzureBackup/Commands.AzureBackup/Helpers/ContainerHelpers.cs b/src/ResourceManager/AzureBackup/Commands.AzureBackup/Helpers/ContainerHelpers.cs
index 67d011686ac0..b0fa09138368 100644
--- a/src/ResourceManager/AzureBackup/Commands.AzureBackup/Helpers/ContainerHelpers.cs
+++ b/src/ResourceManager/AzureBackup/Commands.AzureBackup/Helpers/ContainerHelpers.cs
@@ -38,33 +38,37 @@ internal class ContainerHelpers
{
private static readonly Regex ResourceGroupRegex = new Regex(@"/subscriptions/(?.+)/resourceGroups/(?.+)/providers/(?.+)/BackupVault/(?.+)/containers/(?.+)", RegexOptions.Compiled);
- internal static AzureBackupContainerType GetContainerType(string customerType)
+ internal static AzureBackupContainerType GetContainerType(string customerTypeString)
{
- CustomerType type = (CustomerType)Enum.Parse(typeof(CustomerType), customerType);
-
AzureBackupContainerType containerType = 0;
+ CustomerType customerType = CustomerType.Invalid;
- switch (type)
+ if (Enum.TryParse(customerTypeString, out customerType))
{
- case CustomerType.DPM:
- containerType = AzureBackupContainerType.SCDPM;
- break;
- case CustomerType.InMage:
- break;
- case CustomerType.Invalid:
- break;
- case CustomerType.ManagedContainer:
- break;
- case CustomerType.OBS:
- containerType = AzureBackupContainerType.Windows;
- break;
- case CustomerType.SBS:
- containerType = AzureBackupContainerType.Windows;
- break;
- case CustomerType.SqlPaaS:
- break;
- default:
- break;
+ switch (customerType)
+ {
+ case CustomerType.DPM:
+ containerType = AzureBackupContainerType.SCDPM;
+ break;
+ case CustomerType.OBS:
+ containerType = AzureBackupContainerType.Windows;
+ break;
+ case CustomerType.SBS:
+ containerType = AzureBackupContainerType.Windows;
+ break;
+ case CustomerType.DPMVenus:
+ containerType = AzureBackupContainerType.AzureBackupServer;
+ break;
+ case CustomerType.Invalid:
+ break;
+ default:
+ containerType = AzureBackupContainerType.Other;
+ break;
+ }
+ }
+ else if (!string.IsNullOrEmpty(customerTypeString))
+ {
+ containerType = AzureBackupContainerType.Other;
}
return containerType;
diff --git a/src/ResourceManager/AzureBackup/Commands.AzureBackup/Microsoft.Azure.Commands.AzureBackup.dll-help.psd1 b/src/ResourceManager/AzureBackup/Commands.AzureBackup/Microsoft.Azure.Commands.AzureBackup.dll-help.psd1
index 7abd2c521bb9..0a5fbe79cd1d 100644
--- a/src/ResourceManager/AzureBackup/Commands.AzureBackup/Microsoft.Azure.Commands.AzureBackup.dll-help.psd1
+++ b/src/ResourceManager/AzureBackup/Commands.AzureBackup/Microsoft.Azure.Commands.AzureBackup.dll-help.psd1
@@ -21,7 +21,7 @@ Author = 'Microsoft Corporation'
CompanyName = 'Microsoft Corporation'
# Copyright statement for this module
-Copyright = '© Microsoft Corporation. All rights reserved.'
+Copyright = 'Microsoft Corporation. All rights reserved.'
# Description of the functionality provided by this module
Description = ''
diff --git a/src/ResourceManager/AzureBackup/Commands.AzureBackup/Models/AzureBackupEnums.cs b/src/ResourceManager/AzureBackup/Commands.AzureBackup/Models/AzureBackupEnums.cs
index a4c6156f6d8c..a5e33721c26c 100644
--- a/src/ResourceManager/AzureBackup/Commands.AzureBackup/Models/AzureBackupEnums.cs
+++ b/src/ResourceManager/AzureBackup/Commands.AzureBackup/Models/AzureBackupEnums.cs
@@ -25,6 +25,8 @@ public enum AzureBackupContainerType
Windows = 1,
SCDPM,
AzureVM,
+ AzureBackupServer,
+ Other,
}
public enum DataSourceType
diff --git a/src/ResourceManager/AzureBackup/Commands.AzureBackup/packages.config b/src/ResourceManager/AzureBackup/Commands.AzureBackup/packages.config
index ec875e2b5092..eec44ee711d4 100644
--- a/src/ResourceManager/AzureBackup/Commands.AzureBackup/packages.config
+++ b/src/ResourceManager/AzureBackup/Commands.AzureBackup/packages.config
@@ -4,7 +4,7 @@
-
+
diff --git a/src/ResourceManager/AzureBatch/AzureRM.Batch.psd1 b/src/ResourceManager/AzureBatch/AzureRM.Batch.psd1
index 6c0804d62743..18db766319dd 100644
--- a/src/ResourceManager/AzureBatch/AzureRM.Batch.psd1
+++ b/src/ResourceManager/AzureBatch/AzureRM.Batch.psd1
@@ -9,7 +9,7 @@
@{
# Version number of this module.
-ModuleVersion = '0.9.8'
+ModuleVersion = '0.9.10'
# ID used to uniquely identify this module
GUID = 'a8f00f40-1c1a-49b5-9db3-24076b75c3cf'
@@ -21,7 +21,7 @@ Author = 'Microsoft Corporation'
CompanyName = 'Microsoft Corporation'
# Copyright statement for this module
-Copyright = '� Microsoft Corporation. All rights reserved.'
+Copyright = 'Microsoft Corporation. All rights reserved.'
# Description of the functionality provided by this module
Description = 'Microsoft Azure PowerShell - Batch'
@@ -45,7 +45,7 @@ CLRVersion='4.0'
ProcessorArchitecture = 'None'
# Modules that must be imported into the global environment prior to importing this module
-RequiredModules = @( @{ ModuleName = 'AzureRM.Profile'; ModuleVersion = '0.9.8' })
+RequiredModules = @( @{ ModuleName = 'AzureRM.Profile'; ModuleVersion = '0.9.10' })
# Assemblies that must be loaded prior to importing this module
RequiredAssemblies = @()
diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/BatchTestHelpers.cs b/src/ResourceManager/AzureBatch/Commands.Batch.Test/BatchTestHelpers.cs
index c1ee935411bd..ae97b2d4de8d 100644
--- a/src/ResourceManager/AzureBatch/Commands.Batch.Test/BatchTestHelpers.cs
+++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/BatchTestHelpers.cs
@@ -12,16 +12,15 @@
// limitations under the License.
// ----------------------------------------------------------------------------------
-using System.Linq;
-using System.Net;
-using System.Threading.Tasks;
using Microsoft.Azure.Batch;
using Microsoft.Azure.Batch.Protocol;
using Microsoft.Azure.Management.Batch.Models;
using System;
using System.Collections;
using System.Collections.Generic;
+using System.Net;
using System.Reflection;
+using System.Threading.Tasks;
using Xunit;
using ProxyModels = Microsoft.Azure.Batch.Protocol.Models;
diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/Commands.Batch.Test.csproj b/src/ResourceManager/AzureBatch/Commands.Batch.Test/Commands.Batch.Test.csproj
index 30baf1aaffef..91c6b1476f32 100644
--- a/src/ResourceManager/AzureBatch/Commands.Batch.Test/Commands.Batch.Test.csproj
+++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/Commands.Batch.Test.csproj
@@ -280,6 +280,9 @@
Always
+
+ Always
+
Always
@@ -382,6 +385,9 @@
Always
+
+ Always
+
Always
@@ -415,6 +421,9 @@
Always
+
+ Always
+
Always
@@ -472,6 +481,9 @@
Always
+
+ Always
+
Always
@@ -511,6 +523,9 @@
Always
+
+ Always
+
Always
diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/ComputeNodes/GetBatchComputeNodeCommandTests.cs b/src/ResourceManager/AzureBatch/Commands.Batch.Test/ComputeNodes/GetBatchComputeNodeCommandTests.cs
index d4c9999bb166..4e49f74e66c5 100644
--- a/src/ResourceManager/AzureBatch/Commands.Batch.Test/ComputeNodes/GetBatchComputeNodeCommandTests.cs
+++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/ComputeNodes/GetBatchComputeNodeCommandTests.cs
@@ -21,6 +21,7 @@
using System.Collections.Generic;
using System.Linq;
using System.Management.Automation;
+using System.Threading.Tasks;
using Xunit;
using BatchClient = Microsoft.Azure.Commands.Batch.Models.BatchClient;
@@ -72,39 +73,63 @@ public void GetBatchComputeNodeTest()
[Fact]
[Trait(Category.AcceptanceType, Category.CheckIn)]
- public void ListBatchComputeNodesByODataFilterTest()
+ public void GetBatchComputeNodeODataTest()
{
- // Setup cmdlet to list vms using an OData filter.
+ // Setup cmdlet to get a single compute node
BatchAccountContext context = BatchTestHelpers.CreateBatchContextWithKeys();
cmdlet.BatchContext = context;
- cmdlet.PoolId = "pool";
- cmdlet.Id = null;
- cmdlet.Filter = "state -eq 'idle'";
+ cmdlet.PoolId = "testPool";
+ cmdlet.Id = "computeNode1";
+ cmdlet.Select = "id,state";
- string[] idsOfConstructedComputeNodes = new[] { "computeNode1", "computeNode2" };
+ string requestSelect = null;
- // Build some compute nodes instead of querying the service on a List ComputeNodes call
- ComputeNodeListResponse response = BatchTestHelpers.CreateComputeNodeListResponse(idsOfConstructedComputeNodes);
- RequestInterceptor interceptor = BatchTestHelpers.CreateFakeServiceResponseInterceptor(response);
- cmdlet.AdditionalBehaviors = new List() { interceptor };
+ // Fetch the OData clauses off the request. The OData clauses are applied after user provided RequestInterceptors, so a ResponseInterceptor is used.
+ ComputeNodeGetResponse getResponse = BatchTestHelpers.CreateComputeNodeGetResponse(cmdlet.Id);
+ RequestInterceptor requestInterceptor = BatchTestHelpers.CreateFakeServiceResponseInterceptor(getResponse);
+ ResponseInterceptor responseInterceptor = new ResponseInterceptor((response, request) =>
+ {
+ requestSelect = request.Parameters.DetailLevel.SelectClause;
- // Setup the cmdlet to write pipeline output to a list that can be examined later
- List pipeline = new List();
- commandRuntimeMock.Setup(r =>
- r.WriteObject(It.IsAny()))
- .Callback