Skip to content

Commit

Permalink
Merge pull request #31 from MabOneSdk/panbha10
Browse files Browse the repository at this point in the history
Panbha10
  • Loading branch information
panbha committed Jun 13, 2015
2 parents 3c86ee5 + 5dadbe2 commit 64da44a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 26 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ function BackUpAzureBackUpItemTest
$azureBackUpItem.ContainerType = $ContainerType
$azureBackUpItem.DataSourceId = $DataSourceId
$azureBackUpItem.Type = $DataSourceType
$operationId = Backup-AzureBackupItem -item $azureBackUpItem
$jobId = Backup-AzureBackupItem -item $azureBackUpItem
}


Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ namespace Microsoft.Azure.Commands.AzureBackup.Cmdlets
/// <summary>
/// Get list of containers
/// </summary>
[Cmdlet(VerbsData.Backup, "AzureBackupItem"), OutputType(typeof(MBS.OperationResponse))]
[Cmdlet(VerbsData.Backup, "AzureBackupItem"), OutputType(typeof(Guid))]
public class TriggerAzureBackup : AzureBackupDSCmdletBase
{
public override void ExecuteCmdlet()
Expand All @@ -41,7 +41,7 @@ public override void ExecuteCmdlet()
ExecutionBlock(() =>
{
WriteVerbose("Making client call");

Guid jobId = Guid.Empty;
MBS.OperationResponse triggerBackUpInfo =
AzureBackupClient.BackUp.TriggerBackUpAsync(GetCustomRequestHeaders(),
item.ContainerUniqueName,
Expand All @@ -52,27 +52,9 @@ public override void ExecuteCmdlet()
WriteVerbose("Received backup response");

WriteVerbose("Converting response");
WriteAzureBackupOperationId(triggerBackUpInfo);
jobId = triggerBackUpInfo.OperationId;
this.WriteObject(jobId);
});
}

public void WriteAzureBackupOperationId(MBS.OperationResponse sourceOperationResponse)
{
// this needs to be uncommented once we have proper constructor
// this.WriteObject(new AzureBackupRecoveryPoint(ResourceGroupName, ResourceName, sourceOperationResponse));
}

public void WriteAzureBackupOperationId(IEnumerable<MBS.OperationResponse> sourceOperationResponseList)
{
List<MBS.OperationResponse> targetList = new List<MBS.OperationResponse>();

foreach (var sourceOperationResponse in sourceOperationResponseList)
{
// this needs to be uncommented once we have proper constructor
//targetList.Add(new TriggerBackUpInfo(ResourceGroupName, ResourceName, sourceOperationResponse));
}

this.WriteObject(targetList, true);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,8 @@
<Reference Include="Microsoft.WindowsAzure.Management">
<HintPath>..\..\..\packages\Microsoft.WindowsAzure.Management.4.1.1\lib\net40\Microsoft.WindowsAzure.Management.dll</HintPath>
</Reference>
<Reference Include="Microsoft.WindowsAzure.Management.BackupServicesManagment, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\..\azure-sdk-for-net\src\ResourceManagement\AzureBackup\BackupServicesManagment\bin\Net45-Release\Microsoft.WindowsAzure.Management.BackupServicesManagment.dll</HintPath>
<Reference Include="Microsoft.WindowsAzure.Management.BackupServicesManagment">
<HintPath>..\..\..\..\..\..\azure-sdk-for-net\src\ResourceManagement\AzureBackup\BackupServicesManagment\bin\Net40-Debug\Microsoft.WindowsAzure.Management.BackupServicesManagment.dll</HintPath>
</Reference>
<Reference Include="Microsoft.WindowsAzure.Management.Common, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
Expand Down

0 comments on commit 64da44a

Please sign in to comment.