Skip to content

Commit 56701bd

Browse files
committed
Revert "Get/Set AzureRmRecoveryServices changes"
This reverts commit f16d5cd.
1 parent 09899c2 commit 56701bd

File tree

12 files changed

+20
-129
lines changed

12 files changed

+20
-129
lines changed

src/Common/Commands.Common/Commands.Common.csproj

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
<RestorePackages>true</RestorePackages>
1616
<CodeAnalysisAdditionalOptions>/assemblyCompareMode:StrongNameIgnoringVersion</CodeAnalysisAdditionalOptions>
1717
<NuGetPackageImportStamp>06e19c11</NuGetPackageImportStamp>
18-
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\ResourceManager\RecoveryServices\</SolutionDir>
1918
</PropertyGroup>
2019
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
2120
<DebugSymbols>true</DebugSymbols>
@@ -190,11 +189,4 @@
190189
</ItemGroup>
191190
<ItemGroup />
192191
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
193-
<Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" />
194-
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
195-
<PropertyGroup>
196-
<ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
197-
</PropertyGroup>
198-
<Error Condition="!Exists('$(SolutionDir)\.nuget\NuGet.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\.nuget\NuGet.targets'))" />
199-
</Target>
200192
</Project>

src/ResourceManager/Common/Commands.ResourceManager.Common/Commands.ResourceManager.Common.csproj

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -295,11 +295,4 @@
295295
</ProjectReference>
296296
</ItemGroup>
297297
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
298-
<Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" />
299-
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
300-
<PropertyGroup>
301-
<ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
302-
</PropertyGroup>
303-
<Error Condition="!Exists('$(SolutionDir)\.nuget\NuGet.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\.nuget\NuGet.targets'))" />
304-
</Target>
305298
</Project>

src/ResourceManager/Common/Commands.ScenarioTests.ResourceManager.Common/Commands.ScenarioTests.ResourceManager.Common.csproj

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -171,11 +171,4 @@
171171
</ProjectReference>
172172
</ItemGroup>
173173
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
174-
<Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" />
175-
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
176-
<PropertyGroup>
177-
<ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
178-
</PropertyGroup>
179-
<Error Condition="!Exists('$(SolutionDir)\.nuget\NuGet.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\.nuget\NuGet.targets'))" />
180-
</Target>
181174
</Project>

src/ResourceManager/Profile/Commands.Profile/Commands.Profile.csproj

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -204,11 +204,4 @@
204204
</ItemGroup>
205205
<ItemGroup />
206206
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
207-
<Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" />
208-
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
209-
<PropertyGroup>
210-
<ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
211-
</PropertyGroup>
212-
<Error Condition="!Exists('$(SolutionDir)\.nuget\NuGet.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\.nuget\NuGet.targets'))" />
213-
</Target>
214207
</Project>

src/ResourceManager/RecoveryServices/Commands.RecoveryServices.Test/Commands.RecoveryServices.Test.csproj

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@
4848
<HintPath>..\..\..\packages\Microsoft.Azure.Common.2.1.0\lib\net45\Microsoft.Azure.Common.NetFramework.dll</HintPath>
4949
</Reference>
5050
<Reference Include="Microsoft.Azure.Management.RecoveryServices, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
51-
<SpecificVersion>False</SpecificVersion>
52-
<HintPath>..\..\..\..\..\..\SafeHaven-1604\dll\Microsoft.Azure.Management.RecoveryServices.dll</HintPath>
51+
<HintPath>..\..\..\packages\Microsoft.Azure.Management.RecoveryServices.1.0.2-preview\lib\net40\Microsoft.Azure.Management.RecoveryServices.dll</HintPath>
52+
<Private>True</Private>
5353
</Reference>
5454
<Reference Include="Microsoft.Azure.ResourceManager, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
5555
<SpecificVersion>False</SpecificVersion>
@@ -166,11 +166,4 @@
166166
</ItemGroup>
167167
<ItemGroup />
168168
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
169-
<Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" />
170-
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
171-
<PropertyGroup>
172-
<ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
173-
</PropertyGroup>
174-
<Error Condition="!Exists('$(SolutionDir)\.nuget\NuGet.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\.nuget\NuGet.targets'))" />
175-
</Target>
176169
</Project>

src/ResourceManager/RecoveryServices/Commands.RecoveryServices.Test/ScenarioTests/RecoveryServicesTestsBase.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ public static T GetServiceClient<T>() where T : class
8484
if (testEnvironment.UsesCustomUri())
8585
{
8686
client = new RecoveryServicesManagementClient(
87-
"Microsoft.RecoveryServicesBVTD",
87+
"Microsoft.RecoveryServicesBVTD2",
8888
testEnvironment.Credentials as SubscriptionCloudCredentials,
8989
testEnvironment.BaseUri);
9090
}

src/ResourceManager/RecoveryServices/Commands.RecoveryServices/Commands.RecoveryServices.csproj

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@
5252
<HintPath>..\..\..\packages\Microsoft.Azure.Common.2.1.0\lib\net45\Microsoft.Azure.Common.NetFramework.dll</HintPath>
5353
</Reference>
5454
<Reference Include="Microsoft.Azure.Management.RecoveryServices, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
55-
<SpecificVersion>False</SpecificVersion>
56-
<HintPath>..\..\..\..\..\..\SafeHaven-1604\dll\Microsoft.Azure.Management.RecoveryServices.dll</HintPath>
55+
<HintPath>..\..\..\packages\Microsoft.Azure.Management.RecoveryServices.1.0.2-preview\lib\net40\Microsoft.Azure.Management.RecoveryServices.dll</HintPath>
56+
<Private>True</Private>
5757
</Reference>
5858
<Reference Include="Microsoft.IdentityModel.Clients.ActiveDirectory, Version=2.18.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
5959
<HintPath>..\..\..\packages\Microsoft.IdentityModel.Clients.ActiveDirectory.2.18.206251556\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.dll</HintPath>
@@ -129,7 +129,6 @@
129129
</Compile>
130130
<Compile Include="Utilities\CertUtils.cs" />
131131
<Compile Include="Utilities\Utilities.cs" />
132-
<Compile Include="Vault\SetAzureRmRecoveryServicesVaults.cs" />
133132
<Compile Include="Vault\GetAzureRmRecoveryServicesVaults.cs" />
134133
<Compile Include="Vault\GetAzureRmRecoveryServicesVaultSettingsFile.cs" />
135134
<Compile Include="Vault\NewAzureRmRecoveryServicesVault.cs" />
@@ -166,11 +165,4 @@
166165
</Content>
167166
</ItemGroup>
168167
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
169-
<Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" />
170-
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
171-
<PropertyGroup>
172-
<ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
173-
</PropertyGroup>
174-
<Error Condition="!Exists('$(SolutionDir)\.nuget\NuGet.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\.nuget\NuGet.targets'))" />
175-
</Target>
176168
</Project>

src/ResourceManager/RecoveryServices/Commands.RecoveryServices/Common/PSRecoveryServicesVaultClient.cs

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -63,29 +63,5 @@ public ResourceGroupListResponse GetResouceGroups()
6363
{
6464
return this.GetRecoveryServicesClient.ResourceGroup.List();
6565
}
66-
67-
/// <summary>
68-
/// Method to Update Azure Recovery Services Vault Backup Properties
69-
/// </summary>
70-
/// <param name="resouceGroupName">Name of the resouce group</param>
71-
/// <param name="vaultName">Name of the vault</param>
72-
/// <param name="vaultStorageUpdateRequest">Backup Properties Update</param>
73-
/// <returns>Azure Operation response object.</returns>
74-
public AzureOperationResponse UpdateVaultStorageType(string resouceGroupName, string vaultName, UpdateVaultStorageTypeRequest vaultStorageUpdateRequest)
75-
{
76-
return this.recoveryServicesClient.Vaults.UpdateStorageType(resouceGroupName, vaultName,
77-
vaultStorageUpdateRequest, this.GetRequestHeaders());
78-
}
79-
80-
/// <summary>
81-
/// Method to Get Azure Recovery Services Vault Backup Properties
82-
/// </summary>
83-
/// <param name="resouceGroupName">Name of the resouce group</param>
84-
/// <param name="vaultName">Name of the vault</param>
85-
/// <returns>Azure Resource Storage response object.</returns>
86-
public GetResourceStorageConfigResponse GetVaultStorageType(string resouceGroupName, string vaultName)
87-
{
88-
return this.recoveryServicesClient.Vaults.GetResourceStorageConfig(resouceGroupName, vaultName, this.GetRequestHeaders());
89-
}
9066
}
9167
}

src/ResourceManager/RecoveryServices/Commands.RecoveryServices/Models/PSContracts.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -520,9 +520,9 @@ public class AcsNamespace
520520
/// <param name="acsDetails">authenticating service Details name</param>
521521
public AcsNamespace(UploadCertificateResponse acsDetails)
522522
{
523-
this.HostName = (acsDetails.Properties as ACSCertificateProperties).GlobalAcsHostName;
524-
this.Namespace = (acsDetails.Properties as ACSCertificateProperties).GlobalAcsNamespace;
525-
this.ResourceProviderRealm = (acsDetails.Properties as ACSCertificateProperties).GlobalAcsRPRealm;
523+
this.HostName = acsDetails.Properties.GlobalAcsHostName;
524+
this.Namespace = acsDetails.Properties.GlobalAcsNamespace;
525+
this.ResourceProviderRealm = acsDetails.Properties.GlobalAcsRPRealm;
526526
}
527527

528528
/// <summary>

src/ResourceManager/RecoveryServices/Commands.RecoveryServices/Models/PSObjects.cs

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -135,22 +135,12 @@ public ARSVault(VaultCreateResponse vault)
135135
public class ASRVaultProperties
136136
{
137137
#region Properties
138-
138+
139139
/// <summary>
140140
/// Gets or sets Provisioning State.
141141
/// </summary>
142142
public string ProvisioningState { get; set; }
143143

144-
/// <summary>
145-
/// Gets or sets BackupStorageRedundancy type.
146-
/// </summary>
147-
public string BackupStorageRedundancy { get; set; }
148-
149-
/// <summary>
150-
/// Gets or sets BackupStorageDeduplication type.
151-
/// </summary>
152-
public string BackupStorageDeduplication { get; set; }
153-
154144
#endregion
155145
}
156146

src/ResourceManager/RecoveryServices/Commands.RecoveryServices/Vault/GetAzureRmRecoveryServicesVaults.cs

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -94,15 +94,18 @@ private void GetVaultsUnderAllResourceGroups()
9494
/// <param name="vaults">List of Vaults</param>
9595
private void WriteVaults(IList<Vault> vaults)
9696
{
97-
foreach (Vault vault in vaults)
97+
if (string.IsNullOrEmpty(this.Name))
9898
{
99-
if (0 == string.Compare(this.Name, vault.Name, true))
99+
this.WriteObject(vaults.Select(v => new ARSVault(v)), true);
100+
}
101+
else
102+
{
103+
foreach (Vault vault in vaults)
100104
{
101-
ARSVault rsVault = new ARSVault(vault);
102-
GetResourceStorageConfigResponse getStorageResponse = RecoveryServicesClient.GetVaultStorageType(this.ResourceGroupName, vault.Name);
103-
rsVault.Properties.BackupStorageRedundancy = getStorageResponse.Properties.StorageType;
104-
rsVault.Properties.BackupStorageDeduplication = getStorageResponse.Properties.DedupState;
105-
this.WriteObject(new ARSVault(vault));
105+
if (0 == string.Compare(this.Name, vault.Name, true))
106+
{
107+
this.WriteObject(new ARSVault(vault));
108+
}
106109
}
107110
}
108111
}

src/ResourceManager/RecoveryServices/Commands.RecoveryServices/Vault/NewAzureRMRecoveryServicesVault.cs

Lines changed: 1 addition & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -47,19 +47,6 @@ public class NewAzureRmRecoveryServicesVault : RecoveryServicesCmdletBase
4747
[ValidateNotNullOrEmpty]
4848
public string Location { get; set; }
4949

50-
/// <summary>
51-
/// Gets or sets BackupStorageRedundancy type
52-
/// </summary>
53-
[Parameter(Mandatory = false)]
54-
public string BackupStorageRedundancy { get; set; }
55-
56-
/// <summary>
57-
/// Gets or sets BackupStorageDeduplication type
58-
/// </summary>
59-
[Parameter(Mandatory = false)]
60-
public string BackupStorageDeduplication { get; set; }
61-
62-
6350
#endregion
6451

6552
/// <summary>
@@ -77,28 +64,7 @@ public override void ExecuteCmdlet()
7764

7865
VaultCreateResponse response = RecoveryServicesClient.CreateVault(this.ResourceGroupName, this.Name, vaultCreateArgs);
7966

80-
if (!(string.IsNullOrEmpty(this.BackupStorageRedundancy) && string.IsNullOrEmpty(this.BackupStorageDeduplication)))
81-
{
82-
UpdateVaultStorageTypeRequest vaultStorageRequest = new UpdateVaultStorageTypeRequest();
83-
vaultStorageRequest.Properties = new StorageTypeProperties();
84-
vaultStorageRequest.Properties.StorageModelType = this.BackupStorageRedundancy;
85-
vaultStorageRequest.Properties.DedupState = this.BackupStorageDeduplication;
86-
AzureOperationResponse storageResponse = RecoveryServicesClient.UpdateVaultStorageType(this.ResourceGroupName, this.Name, vaultStorageRequest);
87-
}
88-
89-
VaultListResponse vaultList = RecoveryServicesClient.GetVaultsInResouceGroup(this.ResourceGroupName);
90-
foreach (Vault vault in vaultList.Vaults)
91-
{
92-
if (vault.Name.Equals(this.Name, StringComparison.InvariantCultureIgnoreCase))
93-
{
94-
ARSVault rsVault = new ARSVault(vault);
95-
GetResourceStorageConfigResponse getStorageResponse = RecoveryServicesClient.GetVaultStorageType(this.ResourceGroupName, this.Name);
96-
rsVault.Properties.BackupStorageRedundancy = getStorageResponse.Properties.StorageType;
97-
rsVault.Properties.BackupStorageDeduplication = getStorageResponse.Properties.DedupState;
98-
this.WriteObject(rsVault);
99-
break;
100-
}
101-
}
67+
this.WriteObject(new ARSVault(response));
10268
}
10369
catch (Exception exception)
10470
{

0 commit comments

Comments
 (0)