forked from Azure/azure-powershell
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9a9cd0e
commit 1ac99e4
Showing
6 changed files
with
279 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
93 changes: 93 additions & 0 deletions
93
...mands.RecoveryServices.Backup.Providers/Commands.RecoveryServices.Backup.Providers.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<Import Project="..\..\..\..\tools\Common.Dependencies.targets" /> | ||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> | ||
<PropertyGroup> | ||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | ||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> | ||
<ProjectGuid>{02234E90-BCDE-4B20-B1F5-01B1005821DB}</ProjectGuid> | ||
<OutputType>Library</OutputType> | ||
<AppDesignerFolder>Properties</AppDesignerFolder> | ||
<RootNamespace>Microsoft.Azure.Commands.RecoveryServices.Backup.Providers</RootNamespace> | ||
<AssemblyName>Microsoft.Azure.Commands.RecoveryServices.Backup.Providers</AssemblyName> | ||
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion> | ||
<FileAlignment>512</FileAlignment> | ||
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> | ||
<DebugSymbols>true</DebugSymbols> | ||
<DebugType>full</DebugType> | ||
<Optimize>false</Optimize> | ||
<OutputPath>bin\Debug\</OutputPath> | ||
<DefineConstants>DEBUG;TRACE</DefineConstants> | ||
<ErrorReport>prompt</ErrorReport> | ||
<WarningLevel>4</WarningLevel> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> | ||
<DebugType>pdbonly</DebugType> | ||
<Optimize>true</Optimize> | ||
<OutputPath>bin\Release\</OutputPath> | ||
<ErrorReport>prompt</ErrorReport> | ||
<WarningLevel>4</WarningLevel> | ||
<DefineConstants>TRACE;SIGN</DefineConstants> | ||
<SignAssembly>true</SignAssembly> | ||
<AssemblyOriginatorKeyFile>MSSharedLibKey.snk</AssemblyOriginatorKeyFile> | ||
<DelaySign>true</DelaySign> | ||
<Prefer32Bit>false</Prefer32Bit> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<Reference Include="Microsoft.Azure.Management.RecoveryServices.Backup, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"> | ||
<SpecificVersion>False</SpecificVersion> | ||
<HintPath>..\..\..\packages\Microsoft.Azure.Management.RecoveryServices.Backup.3.0.1-preview\lib\net452\Microsoft.Azure.Management.RecoveryServices.Backup.dll</HintPath> | ||
</Reference> | ||
<Reference Include="System" /> | ||
<Reference Include="System.Core" /> | ||
<Reference Include="System.Net" /> | ||
<Reference Include="System.Net.Http" /> | ||
<Reference Include="System.ServiceProcess" /> | ||
<Reference Include="System.Xml.Linq" /> | ||
<Reference Include="System.Data.DataSetExtensions" /> | ||
<Reference Include="Microsoft.CSharp" /> | ||
<Reference Include="System.Data" /> | ||
<Reference Include="System.Xml" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<Compile Include="AzureWorkloadProviderHelper.cs" /> | ||
<Compile Include="IPsBackupProvider.cs" /> | ||
<Compile Include="Properties\AssemblyInfo.cs" /> | ||
<Compile Include="Providers\AzureFilesPsBackupProvider.cs" /> | ||
<Compile Include="Providers\AzureSqlPsBackupProvider.cs" /> | ||
<Compile Include="Providers\AzureWorkloadPsBackupProvider.cs" /> | ||
<Compile Include="Providers\DpmPsBackupProvider.cs" /> | ||
<Compile Include="Providers\MabPsBackupProvider.cs" /> | ||
<Compile Include="PsBackupProviderManager.cs" /> | ||
<Compile Include="Providers\IaasVmPsBackupProvider.cs" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<ProjectReference Include="..\..\Profile\Commands.Profile\Commands.Profile.csproj"> | ||
<Project>{142d7b0b-388a-4ceb-a228-7f6d423c5c2e}</Project> | ||
<Name>Commands.Profile</Name> | ||
</ProjectReference> | ||
<ProjectReference Include="..\Commands.RecoveryServices.Backup.Helpers\Commands.RecoveryServices.Backup.Helpers.csproj"> | ||
<Project>{0e1d3f36-e6c8-4764-8c7d-6f9ee537490c}</Project> | ||
<Name>Commands.RecoveryServices.Backup.Helpers</Name> | ||
</ProjectReference> | ||
<ProjectReference Include="..\Commands.RecoveryServices.Backup.Logger\Commands.RecoveryServices.Backup.Logger.csproj"> | ||
<Project>{5e675749-6139-464a-904c-59c0ffdfec82}</Project> | ||
<Name>Commands.RecoveryServices.Backup.Logger</Name> | ||
</ProjectReference> | ||
<ProjectReference Include="..\Commands.RecoveryServices.Backup.Models\Commands.RecoveryServices.Backup.Models.csproj"> | ||
<Project>{30b92759-50b3-494e-b9f0-ec9a2ce9d57b}</Project> | ||
<Name>Commands.RecoveryServices.Backup.Models</Name> | ||
</ProjectReference> | ||
<ProjectReference Include="..\Commands.RecoveryServices.Backup.ServiceClientAdapter\Commands.RecoveryServices.Backup.ServiceClientAdapter.csproj"> | ||
<Project>{b758fec1-35c1-4f93-a954-66dd33f6e0ec}</Project> | ||
<Name>Commands.RecoveryServices.Backup.ServiceClientAdapter</Name> | ||
</ProjectReference> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<None Include="MSSharedLibKey.snk" /> | ||
<None Include="packages.config" /> | ||
</ItemGroup> | ||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> | ||
</Project> |
138 changes: 138 additions & 0 deletions
138
...ces/Commands.RecoveryServices.Backup.Providers/Providers/AzureWorkloadPsBackupProvider.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,138 @@ | ||
// ---------------------------------------------------------------------------------- | ||
// | ||
// 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 Microsoft.Azure.Commands.RecoveryServices.Backup.Cmdlets.Models; | ||
using Microsoft.Azure.Commands.RecoveryServices.Backup.Cmdlets.ServiceClientAdapterNS; | ||
using Microsoft.Azure.Management.RecoveryServices.Backup.Models; | ||
using System; | ||
using System.Collections.Generic; | ||
using CmdletModel = Microsoft.Azure.Commands.RecoveryServices.Backup.Cmdlets.Models; | ||
using RestAzureNS = Microsoft.Rest.Azure; | ||
using Microsoft.Azure.Commands.RecoveryServices.Backup.Properties; | ||
using ServiceClientModel = Microsoft.Azure.Management.RecoveryServices.Backup.Models; | ||
using Microsoft.Azure.Commands.RecoveryServices.Backup.Helpers; | ||
|
||
namespace Microsoft.Azure.Commands.RecoveryServices.Backup.Cmdlets.ProviderModel | ||
{ | ||
/// <summary> | ||
/// This class implements methods for azure DB Workload backup provider | ||
/// </summary> | ||
public class AzureWorkloadPsBackupProvider : IPsBackupProvider | ||
{ | ||
private const int defaultOperationStatusRetryTimeInMilliSec = 5 * 1000; // 5 sec | ||
private const string separator = ";"; | ||
private const CmdletModel.RetentionDurationType defaultFileRetentionType = | ||
CmdletModel.RetentionDurationType.Days; | ||
private const int defaultFileRetentionCount = 30; | ||
Dictionary<Enum, object> ProviderData { get; set; } | ||
ServiceClientAdapter ServiceClientAdapter { get; set; } | ||
AzureWorkloadProviderHelper AzureWorkloadProviderHelper { get; set; } | ||
/// <summary> | ||
/// Initializes the provider with the data recieved from the cmdlet layer | ||
/// </summary> | ||
/// <param name="providerData">Data from the cmdlet layer intended for the provider</param> | ||
/// <param name="serviceClientAdapter">Service client adapter for communicating with the backend service</param> | ||
public void Initialize(Dictionary<Enum, object> providerData, ServiceClientAdapter serviceClientAdapter) | ||
{ | ||
ProviderData = providerData; | ||
ServiceClientAdapter = serviceClientAdapter; | ||
AzureWorkloadProviderHelper = new AzureWorkloadProviderHelper(ServiceClientAdapter); | ||
} | ||
|
||
public ResourceBackupStatus CheckBackupStatus() | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
|
||
public ProtectionPolicyResource CreatePolicy() | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
|
||
public RestAzureNS.AzureOperationResponse DisableProtection() | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
|
||
public RestAzureNS.AzureOperationResponse EnableProtection() | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
|
||
public RetentionPolicyBase GetDefaultRetentionPolicyObject() | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
|
||
public SchedulePolicyBase GetDefaultSchedulePolicyObject() | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
|
||
public ProtectedItemResource GetProtectedItem() | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
|
||
public RecoveryPointBase GetRecoveryPointDetails() | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
|
||
public List<CmdletModel.BackupEngineBase> ListBackupManagementServers() | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
|
||
public List<ItemBase> ListProtectedItems() | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
|
||
public List<ContainerBase> ListProtectionContainers() | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
|
||
public List<RecoveryPointBase> ListRecoveryPoints() | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
|
||
public RestAzureNS.AzureOperationResponse<ProtectionPolicyResource> ModifyPolicy() | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
|
||
public RPMountScriptDetails ProvisionItemLevelRecoveryAccess() | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
|
||
public void RevokeItemLevelRecoveryAccess() | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
|
||
public RestAzureNS.AzureOperationResponse TriggerBackup() | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
|
||
public RestAzureNS.AzureOperationResponse TriggerRestore() | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
} | ||
} |
Oops, something went wrong.