Skip to content

Commit

Permalink
Merge pull request #2 from MabOneSdk/anudeeb
Browse files Browse the repository at this point in the history
DownloadVaultCredentials cmdlet (testing pending)
  • Loading branch information
Samuel Anudeep committed Jun 4, 2015
2 parents 54fb8f6 + f3bcd97 commit 9aa47a0
Show file tree
Hide file tree
Showing 15 changed files with 932 additions and 17 deletions.
9 changes: 8 additions & 1 deletion src/ResourceManagement/AzureBackup/AzureBackup.sln
Original file line number Diff line number Diff line change
@@ -1,14 +1,21 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2013
VisualStudioVersion = 12.0.21005.1
VisualStudioVersion = 12.0.31101.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BackupServicesManagment", "BackupServicesManagment\BackupServicesManagment.csproj", "{38A6741C-77A3-42A8-A846-83373BE57C7F}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestDependencies", "..\..\TestDependencies\TestDependencies.csproj", "{40F35645-00EE-4DF2-B66E-7624546B66DF}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BackupServices.Tests", "BackupServices.Tests\BackupServices.Tests.csproj", "{472DDC1D-318A-477C-949B-10811FDA6730}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", "{2C5BD9EC-5B75-46B0-B84E-29A1F1F9909D}"
ProjectSection(SolutionItems) = preProject
.nuget\NuGet.Config = .nuget\NuGet.Config
.nuget\NuGet.exe = .nuget\NuGet.exe
.nuget\NuGet.targets = .nuget\NuGet.targets
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Net40-Debug|Any CPU = Net40-Debug|Any CPU
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,49 @@
</PropertyGroup>
<Import Project="..\..\..\..\tools\Library.Settings.targets" />
<ItemGroup>
<Compile Include="Generated\**\*.cs" />
<Compile Include="Generated\BackupServicesManagementClient.cs" />
<Compile Include="Generated\BackupServicesManagementClientExtensions.cs" />
<Compile Include="Generated\IBackupServicesManagementClient.cs" />
<Compile Include="Generated\IJobOperations.cs" />
<Compile Include="Generated\IProtectionPolicyOperations.cs" />
<Compile Include="Generated\IVaultCredentialOperations.cs" />
<Compile Include="Generated\JobOperations.cs" />
<Compile Include="Generated\JobOperationsExtensions.cs" />
<Compile Include="Generated\JobQueryParameter.cs" />
<Compile Include="Generated\JobResponse.cs" />
<Compile Include="Generated\Models\BackupSchedule.cs" />
<Compile Include="Generated\Models\CustomRequestHeaders.cs" />
<Compile Include="Generated\Models\Job.cs" />
<Compile Include="Generated\Models\JobByIdResponse.cs" />
<Compile Include="Generated\Models\JobListResponse.cs" />
<Compile Include="Generated\Models\JobProperties.cs" />
<Compile Include="Generated\Models\JobSupportedAction.cs" />
<Compile Include="Generated\Models\JobTaskDetails.cs" />
<Compile Include="Generated\Models\ManagementBaseObject.cs" />
<Compile Include="Generated\Models\ManagementResponseObject.cs" />
<Compile Include="Generated\Models\ProtectionPolicyInfo.cs" />
<Compile Include="Generated\Models\ProtectionPolicyInfoResponse.cs" />
<Compile Include="Generated\Models\ProtectionPolicyListResponse.cs" />
<Compile Include="Generated\Models\RawCertificateData.cs" />
<Compile Include="Generated\Models\RecoveryPointInfo.cs" />
<Compile Include="Generated\Models\RecoveryPointListResponse.cs" />
<Compile Include="Generated\Models\ResourceCertificateAndACSDetails.cs" />
<Compile Include="Generated\Models\RetentionDurationType.cs" />
<Compile Include="Generated\Models\RetentionPolicy.cs" />
<Compile Include="Generated\Models\VaultCredUploadCertRequest.cs" />
<Compile Include="Generated\Models\VaultCredUploadCertResponse.cs" />
<Compile Include="Generated\ProtectionPolicyOperations.cs" />
<Compile Include="Generated\ProtectionPolicyOperationsExtensions.cs" />
<Compile Include="Generated\VaultCredentialOperations.cs" />
<Compile Include="Generated\VaultCredentialOperationsExtensions.cs" />
<Compile Include="Generated\Models\RecoveryPointInfoResponse.cs" />
<Compile Include="Generated\BackUpOperations.cs" />
<Compile Include="Generated\BackUpOperationsExtensions.cs" />
<Compile Include="Generated\IBackUpOperations.cs" />
<Compile Include="Generated\IRecoveryPointOperations.cs" />
<Compile Include="Generated\OperationResponse.cs" />
<Compile Include="Generated\RecoveryPointOperations.cs" />
<Compile Include="Generated\RecoveryPointOperationsExtensions.cs" />
</ItemGroup>
<ItemGroup>
<None Include="Microsoft.WindowsAzure.Management.BackupServices.nuget.proj">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,16 @@ public string ResourceName
set { this._resourceName = value; }
}

private IBackUpOperations _backUp;

/// <summary>
/// Definition of BackUp operations for the Azure Backup extension.
/// </summary>
public virtual IBackUpOperations BackUp
{
get { return this._backUp; }
}

private IJobOperations _job;

/// <summary>
Expand All @@ -122,15 +132,40 @@ public virtual IProtectionPolicyOperations ProtectionPolicy
get { return this._protectionPolicy; }
}

private IRecoveryPointOperations _recoveryPoint;

/// <summary>
/// Definition of Recovery Point operations for the Azure Backup
/// extension.
/// </summary>
public virtual IRecoveryPointOperations RecoveryPoint
{
get { return this._recoveryPoint; }
}

private IVaultCredentialOperations _vaultCredentials;

/// <summary>
/// Definition of Vault credential-related operations for the Azure
/// Backup extension.
/// </summary>
public virtual IVaultCredentialOperations VaultCredentials
{
get { return this._vaultCredentials; }
}

/// <summary>
/// Initializes a new instance of the BackupServicesManagementClient
/// class.
/// </summary>
public BackupServicesManagementClient()
: base()
{
this._backUp = new BackUpOperations(this);
this._job = new JobOperations(this);
this._protectionPolicy = new ProtectionPolicyOperations(this);
this._recoveryPoint = new RecoveryPointOperations(this);
this._vaultCredentials = new VaultCredentialOperations(this);
this._apiVersion = "2013-03-01";
this._longRunningOperationInitialTimeout = -1;
this._longRunningOperationRetryTimeout = -1;
Expand Down Expand Up @@ -231,8 +266,11 @@ public BackupServicesManagementClient(string resourceName, string resourceGroupN
public BackupServicesManagementClient(HttpClient httpClient)
: base(httpClient)
{
this._backUp = new BackUpOperations(this);
this._job = new JobOperations(this);
this._protectionPolicy = new ProtectionPolicyOperations(this);
this._recoveryPoint = new RecoveryPointOperations(this);
this._vaultCredentials = new VaultCredentialOperations(this);
this._apiVersion = "2013-03-01";
this._longRunningOperationInitialTimeout = -1;
this._longRunningOperationRetryTimeout = -1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,14 @@ string ResourceName
get; set;
}

/// <summary>
/// Definition of BackUp operations for the Azure Backup extension.
/// </summary>
IBackUpOperations BackUp
{
get;
}

/// <summary>
/// Definition of Protection Policy operations for the Azure Backup
/// extension.
Expand All @@ -97,5 +105,23 @@ IProtectionPolicyOperations ProtectionPolicy
{
get;
}

/// <summary>
/// Definition of Recovery Point operations for the Azure Backup
/// extension.
/// </summary>
IRecoveryPointOperations RecoveryPoint
{
get;
}

/// <summary>
/// Definition of Vault credential-related operations for the Azure
/// Backup extension.
/// </summary>
IVaultCredentialOperations VaultCredentials
{
get;
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
//
// Copyright (c) Microsoft and contributors. All rights reserved.
//
// 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.
//

// Warning: This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if the
// code is regenerated.

using System;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.Azure.Management.BackupServices.Models;

namespace Microsoft.Azure.Management.BackupServices
{
/// <summary>
/// Definition of Vault credential-related operations for the Azure Backup
/// extension.
/// </summary>
public partial interface IVaultCredentialOperations
{
/// <summary>
/// Uploads vault credential certificate.
/// </summary>
/// <param name='certificateName'>
/// Name of the certificate.
/// </param>
/// <param name='vaultCredUploadCertRequest'>
/// Certificate parameters.
/// </param>
/// <param name='customRequestHeaders'>
/// Request header parameters.
/// </param>
/// <param name='cancellationToken'>
/// Cancellation token.
/// </param>
/// <returns>
/// The definition of a certificate response.
/// </returns>
Task<VaultCredUploadCertResponse> UploadCertificateAsync(string certificateName, VaultCredUploadCertRequest vaultCredUploadCertRequest, CustomRequestHeaders customRequestHeaders, CancellationToken cancellationToken);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ public async Task<JobListResponse> ListAsync(JobQueryParameter parameters, Custo
url = url + "/Subscriptions/";
if (this.Client.Credentials.SubscriptionId != null)
{
url = url + Uri.EscapeDataString(this.Client.Credentials.SubscriptionId.ToString());
url = url + Uri.EscapeDataString(this.Client.Credentials.SubscriptionId);
}
url = url + "/resourceGroups/";
url = url + Uri.EscapeDataString(this.Client.ResourceGroupName);
Expand Down Expand Up @@ -162,7 +162,6 @@ public async Task<JobListResponse> ListAsync(JobQueryParameter parameters, Custo

// Set Headers
httpRequest.Headers.Add("Accept-Language", "en-us");
httpRequest.Headers.Add("x-ms-client-request-id", customRequestHeaders.ClientRequestId);

// Set Credentials
cancellationToken.ThrowIfCancellationRequested();
Expand Down Expand Up @@ -319,6 +318,10 @@ public async Task<JobListResponse> ListAsync(JobQueryParameter parameters, Custo

}
result.StatusCode = statusCode;
if (httpResponse.Headers.Contains("x-ms-client-request-id"))
{
customRequestHeaders.ClientRequestId = httpResponse.Headers.GetValues("x-ms-client-request-id").FirstOrDefault();
}

if (shouldTrace)
{
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
//
// Copyright (c) Microsoft and contributors. All rights reserved.
//
// 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.
//

// Warning: This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if the
// code is regenerated.

using System;
using System.Linq;

namespace Microsoft.Azure.Management.BackupServices.Models
{
/// <summary>
/// Model for raw certificate data.
/// </summary>
public partial class RawCertificateData
{
private string _certificate;

/// <summary>
/// Optional. Gets or sets the base64 encoded certificate raw data
/// string.
/// </summary>
public string Certificate
{
get { return this._certificate; }
set { this._certificate = value; }
}

/// <summary>
/// Initializes a new instance of the RawCertificateData class.
/// </summary>
public RawCertificateData()
{
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
//
// Copyright (c) Microsoft and contributors. All rights reserved.
//
// 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.
//

// Warning: This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if the
// code is regenerated.

using System;
using System.Linq;
using Microsoft.Azure.Management.BackupServices.Models;

namespace Microsoft.Azure.Management.BackupServices.Models
{
/// <summary>
/// The definition of a RecoveryPoint Info object.
/// </summary>
public partial class RecoveryPointInfo : ManagementResponseObject
{
private string _recoveryPointAdditionalInfo;

/// <summary>
/// Optional. RecoveryPointAdditionalInfo of RecoveryPointInfo.
/// </summary>
public string RecoveryPointAdditionalInfo
{
get { return this._recoveryPointAdditionalInfo; }
set { this._recoveryPointAdditionalInfo = value; }
}

private DateTime _recoveryPointTime;

/// <summary>
/// Optional. RecoveryPointTime of RecoveryPointInfo.
/// </summary>
public DateTime RecoveryPointTime
{
get { return this._recoveryPointTime; }
set { this._recoveryPointTime = value; }
}

private string _recoveryPointType;

/// <summary>
/// Optional. RecoveryPointType of RecoveryPointInfo.
/// </summary>
public string RecoveryPointType
{
get { return this._recoveryPointType; }
set { this._recoveryPointType = value; }
}

/// <summary>
/// Initializes a new instance of the RecoveryPointInfo class.
/// </summary>
public RecoveryPointInfo()
{
}
}
}
Loading

0 comments on commit 9aa47a0

Please sign in to comment.