diff --git a/src/ResourceManager/RecoveryServices/Commands.RecoveryServices.Test/Commands.RecoveryServices.Test.csproj b/src/ResourceManager/RecoveryServices/Commands.RecoveryServices.Test/Commands.RecoveryServices.Test.csproj
index 960ebc10ea2d..ca2b10360287 100644
--- a/src/ResourceManager/RecoveryServices/Commands.RecoveryServices.Test/Commands.RecoveryServices.Test.csproj
+++ b/src/ResourceManager/RecoveryServices/Commands.RecoveryServices.Test/Commands.RecoveryServices.Test.csproj
@@ -47,9 +47,9 @@
..\..\..\packages\Microsoft.Azure.Common.2.1.0\lib\net45\Microsoft.Azure.Common.NetFramework.dll
-
- False
- ..\..\..\..\..\..\SafeHaven-1604\dll\Microsoft.Azure.Management.RecoveryServices.dll
+
+ ..\..\..\packages\Microsoft.Azure.Management.RecoveryServices.1.0.2-preview\lib\net40\Microsoft.Azure.Management.RecoveryServices.dll
+ True
False
diff --git a/src/ResourceManager/RecoveryServices/Commands.RecoveryServices.Test/ScenarioTests/RecoveryServicesTests.ps1 b/src/ResourceManager/RecoveryServices/Commands.RecoveryServices.Test/ScenarioTests/RecoveryServicesTests.ps1
index dd9e2fdfe942..4cac83a7cf00 100644
--- a/src/ResourceManager/RecoveryServices/Commands.RecoveryServices.Test/ScenarioTests/RecoveryServicesTests.ps1
+++ b/src/ResourceManager/RecoveryServices/Commands.RecoveryServices.Test/ScenarioTests/RecoveryServicesTests.ps1
@@ -21,7 +21,7 @@ Recovery Services Vault CRUD Tests
function Test-RecoveryServicesVaultCRUDTests
{
# Create vault
- $vaultCreationResponse = New-AzureRmRecoveryServicesVault -Name rsv1 -ResourceGroupName vishakintdrg -Location westus
+ $vaultCreationResponse = New-AzureRmRecoveryServicesVault -Name rsv1 -ResourceGroupName S91-1 -Location westus
Assert-NotNull($vaultCreationResponse.Name)
Assert-NotNull($vaultCreationResponse.ID)
Assert-NotNull($vaultCreationResponse.Type)
@@ -37,19 +37,14 @@ function Test-RecoveryServicesVaultCRUDTests
Assert-NotNull($vault.Type)
}
- $vaultBackupProperties = Get-AzureRmRecoveryServicesBackupProperties -Vault $vaultCreationResponse
- Assert-NotNull($vaultBackupProperties.BackupStorageRedundancy)
-
- Set-AzureRmRecoveryServicesBackupProperties -Vault $vaultCreationResponse -BackupStorageRedundancy "LocallyRedundant"
-
# Get the created vault
- $vaultToBeRemoved = Get-AzureRmRecoveryServicesVault -ResourceGroupName vishakintdrg -Name rsv1
+ $vaultToBeRemoved = Get-AzureRmRecoveryServicesVault -ResourceGroupName S91-1 -Name rsv1
Assert-NotNull($vaultToBeRemoved.Name)
Assert-NotNull($vaultToBeRemoved.ID)
Assert-NotNull($vaultToBeRemoved.Type)
# Remove Vault
Remove-AzureRmRecoveryServicesVault -Vault $vaultToBeRemoved
- $vaults = Get-AzureRmRecoveryServicesVault -ResourceGroupName vishakintdrg -Name rsv1
+ $vaults = Get-AzureRmRecoveryServicesVault -ResourceGroupName S91-1 -Name rsv1
Assert-True { $vaults.Count -eq 0 }
}
\ No newline at end of file
diff --git a/src/ResourceManager/RecoveryServices/Commands.RecoveryServices.Test/ScenarioTests/RecoveryServicesTestsBase.cs b/src/ResourceManager/RecoveryServices/Commands.RecoveryServices.Test/ScenarioTests/RecoveryServicesTestsBase.cs
index cba40c0dffd2..2a8198936a63 100644
--- a/src/ResourceManager/RecoveryServices/Commands.RecoveryServices.Test/ScenarioTests/RecoveryServicesTestsBase.cs
+++ b/src/ResourceManager/RecoveryServices/Commands.RecoveryServices.Test/ScenarioTests/RecoveryServicesTestsBase.cs
@@ -84,7 +84,7 @@ public static T GetServiceClient() where T : class
if (testEnvironment.UsesCustomUri())
{
client = new RecoveryServicesManagementClient(
- "Microsoft.RecoveryServicesBVTD",
+ "Microsoft.RecoveryServicesBVTD2",
testEnvironment.Credentials as SubscriptionCloudCredentials,
testEnvironment.BaseUri);
}
diff --git a/src/ResourceManager/RecoveryServices/Commands.RecoveryServices/Commands.RecoveryServices.csproj b/src/ResourceManager/RecoveryServices/Commands.RecoveryServices/Commands.RecoveryServices.csproj
index bea93b771751..183533657d2f 100644
--- a/src/ResourceManager/RecoveryServices/Commands.RecoveryServices/Commands.RecoveryServices.csproj
+++ b/src/ResourceManager/RecoveryServices/Commands.RecoveryServices/Commands.RecoveryServices.csproj
@@ -51,9 +51,9 @@
False
..\..\..\packages\Microsoft.Azure.Common.2.1.0\lib\net45\Microsoft.Azure.Common.NetFramework.dll
-
- False
- ..\..\..\..\..\..\SafeHaven-1604\dll\Microsoft.Azure.Management.RecoveryServices.dll
+
+ ..\..\..\packages\Microsoft.Azure.Management.RecoveryServices.1.0.2-preview\lib\net40\Microsoft.Azure.Management.RecoveryServices.dll
+ True
..\..\..\packages\Microsoft.IdentityModel.Clients.ActiveDirectory.2.18.206251556\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.dll
@@ -129,12 +129,10 @@
-
-
diff --git a/src/ResourceManager/RecoveryServices/Commands.RecoveryServices/Common/PSRecoveryServicesVaultClient.cs b/src/ResourceManager/RecoveryServices/Commands.RecoveryServices/Common/PSRecoveryServicesVaultClient.cs
index 1a3e8997a771..c26cfee45a96 100644
--- a/src/ResourceManager/RecoveryServices/Commands.RecoveryServices/Common/PSRecoveryServicesVaultClient.cs
+++ b/src/ResourceManager/RecoveryServices/Commands.RecoveryServices/Common/PSRecoveryServicesVaultClient.cs
@@ -63,31 +63,5 @@ public ResourceGroupListResponse GetResouceGroups()
{
return this.GetRecoveryServicesClient.ResourceGroup.List();
}
-
-
- ///
- /// Method to Update Azure Recovery Services Vault Backup Properties
- ///
- /// Name of the resouce group
- /// Name of the vault
- /// Backup Properties Update
- /// Azure Operation response object.
- public AzureOperationResponse UpdateVaultStorageType(string resouceGroupName, string vaultName, UpdateVaultStorageTypeRequest vaultStorageUpdateRequest)
- {
- return this.recoveryServicesClient.Vaults.UpdateStorageType(resouceGroupName, vaultName,
- vaultStorageUpdateRequest, this.GetRequestHeaders());
- }
-
- ///
- /// Method to Get Azure Recovery Services Vault Backup Properties
- ///
- /// Name of the resouce group
- /// Name of the vault
- /// Azure Resource Storage response object.
- public GetResourceStorageConfigResponse GetVaultStorageType(string resouceGroupName, string vaultName)
- {
- return this.recoveryServicesClient.Vaults.GetResourceStorageConfig(resouceGroupName, vaultName, this.GetRequestHeaders());
- }
-
}
}
diff --git a/src/ResourceManager/RecoveryServices/Commands.RecoveryServices/Models/PSContracts.cs b/src/ResourceManager/RecoveryServices/Commands.RecoveryServices/Models/PSContracts.cs
index 1f56c04372a6..dacd4704d87e 100644
--- a/src/ResourceManager/RecoveryServices/Commands.RecoveryServices/Models/PSContracts.cs
+++ b/src/ResourceManager/RecoveryServices/Commands.RecoveryServices/Models/PSContracts.cs
@@ -520,10 +520,9 @@ public class AcsNamespace
/// authenticating service Details name
public AcsNamespace(UploadCertificateResponse acsDetails)
{
- this.HostName = (acsDetails.Properties as ACSCertificateProperties).GlobalAcsHostName;
- this.Namespace = (acsDetails.Properties as ACSCertificateProperties).GlobalAcsNamespace;
- this.ResourceProviderRealm = (acsDetails.Properties as ACSCertificateProperties).GlobalAcsRPRealm;
-
+ this.HostName = acsDetails.Properties.GlobalAcsHostName;
+ this.Namespace = acsDetails.Properties.GlobalAcsNamespace;
+ this.ResourceProviderRealm = acsDetails.Properties.GlobalAcsRPRealm;
}
///
diff --git a/src/ResourceManager/RecoveryServices/Commands.RecoveryServices/Models/PSObjects.cs b/src/ResourceManager/RecoveryServices/Commands.RecoveryServices/Models/PSObjects.cs
index e89150a3072e..d9e62e254fd9 100644
--- a/src/ResourceManager/RecoveryServices/Commands.RecoveryServices/Models/PSObjects.cs
+++ b/src/ResourceManager/RecoveryServices/Commands.RecoveryServices/Models/PSObjects.cs
@@ -135,7 +135,7 @@ public ARSVault(VaultCreateResponse vault)
public class ASRVaultProperties
{
#region Properties
-
+
///
/// Gets or sets Provisioning State.
///
@@ -144,18 +144,6 @@ public class ASRVaultProperties
#endregion
}
- public class ASRVaultBackupProperties
- {
- #region Properties
-
- ///
- /// Gets or sets BackupStorageRedundancy type.
- ///
- public string BackupStorageRedundancy { get; set; }
-
- #endregion
- }
-
///
/// Class to define the output of the vault settings file generation.
///
diff --git a/src/ResourceManager/RecoveryServices/Commands.RecoveryServices/Vault/GetAzureRmRecoveryServicesBackupProperties.cs b/src/ResourceManager/RecoveryServices/Commands.RecoveryServices/Vault/GetAzureRmRecoveryServicesBackupProperties.cs
deleted file mode 100644
index caefde49a5dd..000000000000
--- a/src/ResourceManager/RecoveryServices/Commands.RecoveryServices/Vault/GetAzureRmRecoveryServicesBackupProperties.cs
+++ /dev/null
@@ -1,59 +0,0 @@
-// ----------------------------------------------------------------------------------
-//
-// Copyright Microsoft Corporation
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-// http://www.apache.org/licenses/LICENSE-2.0
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-// ----------------------------------------------------------------------------------
-
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Management.Automation;
-using Microsoft.Azure.Management.RecoveryServices.Models;
-
-namespace Microsoft.Azure.Commands.RecoveryServices
-{
- ///
- /// Retrieves Azure Recovery Services Vault.
- ///
- [Cmdlet(VerbsCommon.Get, "AzureRmRecoveryServicesBackupProperties")]
- [OutputType(typeof(ASRVaultBackupProperties))]
- public class GetAzureRmRecoveryServicesBackupProperties : RecoveryServicesCmdletBase
- {
- #region Parameters
-
- ///
- /// Gets or sets vault Object.
- ///
- [Parameter(Mandatory = true, ValueFromPipeline = true)]
- [ValidateNotNullOrEmpty]
- public ARSVault Vault { get; set; }
-
- #endregion
-
- ///
- /// ProcessRecord of the command.
- ///
- public override void ExecuteCmdlet()
- {
- try
- {
- GetResourceStorageConfigResponse getStorageResponse = RecoveryServicesClient.GetVaultStorageType(this.Vault.ResouceGroupName, this.Vault.Name);
- ASRVaultBackupProperties vaultBackupProperties = new ASRVaultBackupProperties();
- vaultBackupProperties.BackupStorageRedundancy = getStorageResponse.Properties.StorageType;
- this.WriteObject(vaultBackupProperties);
- }
- catch (Exception exception)
- {
- this.HandleException(exception);
- }
- }
- }
-}
diff --git a/src/ResourceManager/RecoveryServices/Commands.RecoveryServices/Vault/SetAzureRmRecoveryServicesBackupProperties.cs b/src/ResourceManager/RecoveryServices/Commands.RecoveryServices/Vault/SetAzureRmRecoveryServicesBackupProperties.cs
deleted file mode 100644
index 74e943fe61d2..000000000000
--- a/src/ResourceManager/RecoveryServices/Commands.RecoveryServices/Vault/SetAzureRmRecoveryServicesBackupProperties.cs
+++ /dev/null
@@ -1,65 +0,0 @@
-// ----------------------------------------------------------------------------------
-//
-// Copyright Microsoft Corporation
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-// http://www.apache.org/licenses/LICENSE-2.0
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-// ----------------------------------------------------------------------------------
-
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Management.Automation;
-using Microsoft.Azure.Management.RecoveryServices.Models;
-
-namespace Microsoft.Azure.Commands.RecoveryServices
-{
- ///
- /// Retrieves Azure Recovery Services Vault.
- ///
- [Cmdlet(VerbsCommon.Set, "AzureRmRecoveryServicesBackupProperties")]
- public class SetAzureRmRecoveryServicesBackupProperties : RecoveryServicesCmdletBase
- {
- #region Parameters
- ///
- /// Gets or sets vault Object.
- ///
- [Parameter(Mandatory = true, ValueFromPipeline = true)]
- [ValidateNotNullOrEmpty]
- public ARSVault Vault { get; set; }
- ///
- /// Gets or sets BackupStorageRedundancy type.
- ///
- [Parameter(Mandatory = false)]
- public string BackupStorageRedundancy { get; set; }
-
- #endregion Parameters
-
- ///
- /// ProcessRecord of the command.
- ///
- public override void ExecuteCmdlet()
- {
- try
- {
- if (!string.IsNullOrEmpty(this.BackupStorageRedundancy))
- {
- UpdateVaultStorageTypeRequest vaultStorageRequest = new UpdateVaultStorageTypeRequest();
- vaultStorageRequest.Properties = new StorageTypeProperties();
- vaultStorageRequest.Properties.StorageModelType = BackupStorageRedundancy;
- AzureOperationResponse storageResponse = RecoveryServicesClient.UpdateVaultStorageType(this.Vault.ResouceGroupName, this.Vault.Name, vaultStorageRequest);
- }
- }
- catch (Exception exception)
- {
- this.HandleException(exception);
- }
- }
- }
-}