Skip to content

Commit 495817a

Browse files
committed
Taking in CR comments to keep the extended info separate from vaul operation and temporarily adding the hydra test dll
1 parent 5df449e commit 495817a

File tree

4 files changed

+56
-30
lines changed

4 files changed

+56
-30
lines changed

src/ServiceManagement/RecoveryServices/Commands.RecoveryServices/Commands.RecoveryServices.csproj

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,6 @@
7070
<SpecificVersion>False</SpecificVersion>
7171
<HintPath>..\..\..\packages\Microsoft.WindowsAzure.Common.1.4.0\lib\net45\Microsoft.WindowsAzure.Common.NetFramework.dll</HintPath>
7272
</Reference>
73-
<Reference Include="Microsoft.WindowsAzure.Management.SiteRecovery, Version=0.9.0.0, Culture=neutral, PublicKeyToken=c66ce9294aae1300, processorArchitecture=MSIL">
74-
<SpecificVersion>False</SpecificVersion>
75-
<HintPath>..\..\..\packages\Microsoft.Azure.Management.RecoveryServices.0.2.2-preview\lib\net40\Microsoft.WindowsAzure.Management.SiteRecovery.dll</HintPath>
76-
</Reference>
7773
<Reference Include="Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
7874
<SpecificVersion>False</SpecificVersion>
7975
<HintPath>..\..\..\packages\Newtonsoft.Json.6.0.4\lib\net45\Newtonsoft.Json.dll</HintPath>
@@ -126,6 +122,7 @@
126122
<Compile Include="PSRecoveryServicesClient\PSRecoveryServicesNetworkMappingClient.cs" />
127123
<Compile Include="PSRecoveryServicesClient\PSRecoveryServicesNetworkClient.cs" />
128124
<Compile Include="PSRecoveryServicesClient\PSRecoveryServicesVaultClient.cs" />
125+
<Compile Include="PSRecoveryServicesClient\PSRecoveryServicesVaultExtendedInfoClient.cs" />
129126
<Compile Include="PSRecoveryServicesClient\PSRecoveryServicesVMGroupClient.cs" />
130127
<Compile Include="PSRecoveryServicesClient\PSRecoveryServicesPEClient.cs" />
131128
<Compile Include="PSRecoveryServicesClient\PSRecoveryServicesClient.cs">
@@ -177,7 +174,12 @@
177174
</ProjectReference>
178175
</ItemGroup>
179176
<ItemGroup>
180-
<Content Include="lib\Security.Cryptography.dll" />
177+
<Content Include="lib\Microsoft.Azure.RecoveryServices.dll">
178+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
179+
</Content>
180+
<Content Include="lib\Security.Cryptography.dll">
181+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
182+
</Content>
181183
<Content Include="Microsoft.Azure.Commands.RecoveryServices.dll-help.xml">
182184
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
183185
</Content>

src/ServiceManagement/RecoveryServices/Commands.RecoveryServices/PSRecoveryServicesClient/PSRecoveryServicesVaultClient.cs

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,8 @@
1212
// limitations under the License.
1313
// ----------------------------------------------------------------------------------
1414

15-
using System;
1615
using System.Threading.Tasks;
1716
using Microsoft.WindowsAzure;
18-
using Microsoft.WindowsAzure.Management.SiteRecovery;
1917
using Microsoft.WindowsAzure.Management.SiteRecovery.Models;
2018

2119
namespace Microsoft.Azure.Commands.RecoveryServices
@@ -25,29 +23,6 @@ namespace Microsoft.Azure.Commands.RecoveryServices
2523
/// </summary>
2624
public partial class PSRecoveryServicesClient
2725
{
28-
/// <summary>
29-
/// Gets Vault Extended Information
30-
/// </summary>
31-
/// <returns>ResourceExtendedInformationResponse</returns>
32-
public async Task<ResourceExtendedInformation> GetExtendedInfo()
33-
{
34-
ResourceExtendedInformationResponse response = await this.GetSiteRecoveryClient().Vaults.GetExtendedInfoAsync(this.GetRequestHeaders(false));
35-
36-
return response.ResourceExtendedInformation;
37-
}
38-
39-
/// <summary>
40-
/// Creates the extended information for the vault
41-
/// </summary>
42-
/// <param name="extendedInfoArgs">extneded info to be created</param>
43-
/// <returns>ResourceExtendedInformation</returns>
44-
public async Task<ResourceExtendedInformation> CreateExtendedInfo(ResourceExtendedInformationArgs extendedInfoArgs)
45-
{
46-
ResourceExtendedInformationResponse response = await this.GetSiteRecoveryClient().Vaults.CreateExtendedInfoAsync(extendedInfoArgs, this.GetRequestHeaders(false));
47-
48-
return response.ResourceExtendedInformation;
49-
}
50-
5126
/// <summary>
5227
/// Updates the vault certificate
5328
/// </summary>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
// ----------------------------------------------------------------------------------
2+
//
3+
// Copyright Microsoft Corporation
4+
// Licensed under the Apache License, Version 2.0 (the "License");
5+
// you may not use this file except in compliance with the License.
6+
// You may obtain a copy of the License at
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
// Unless required by applicable law or agreed to in writing, software
9+
// distributed under the License is distributed on an "AS IS" BASIS,
10+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11+
// See the License for the specific language governing permissions and
12+
// limitations under the License.
13+
// ----------------------------------------------------------------------------------
14+
15+
using System.Threading.Tasks;
16+
using Microsoft.WindowsAzure;
17+
using Microsoft.WindowsAzure.Management.SiteRecovery.Models;
18+
19+
namespace Microsoft.Azure.Commands.RecoveryServices
20+
{
21+
/// <summary>
22+
/// Recovery services convenience client.
23+
/// </summary>
24+
public partial class PSRecoveryServicesClient
25+
{
26+
/// <summary>
27+
/// Gets Vault Extended Information
28+
/// </summary>
29+
/// <returns>ResourceExtendedInformationResponse</returns>
30+
public async Task<ResourceExtendedInformation> GetExtendedInfo()
31+
{
32+
ResourceExtendedInformationResponse response = await this.GetSiteRecoveryClient().VaultExtendedInfo.GetExtendedInfoAsync(this.GetRequestHeaders(false));
33+
34+
return response.ResourceExtendedInformation;
35+
}
36+
37+
/// <summary>
38+
/// Creates the extended information for the vault
39+
/// </summary>
40+
/// <param name="extendedInfoArgs">extneded info to be created</param>
41+
/// <returns>ResourceExtendedInformation</returns>
42+
public async Task<ResourceExtendedInformation> CreateExtendedInfo(ResourceExtendedInformationArgs extendedInfoArgs)
43+
{
44+
ResourceExtendedInformationResponse response = await this.GetSiteRecoveryClient().VaultExtendedInfo.CreateExtendedInfoAsync(extendedInfoArgs, this.GetRequestHeaders(false));
45+
46+
return response.ResourceExtendedInformation;
47+
}
48+
}
49+
}

0 commit comments

Comments
 (0)