Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.Azure.Management.BackupServicesManagement, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\Microsoft.Azure.Management.BackupServices.1.0.4-preview\lib\net40\Microsoft.Azure.Management.BackupServicesManagement.dll</HintPath>
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\packages\Microsoft.Azure.Management.BackupServices.1.0.5-preview\lib\net40\Microsoft.Azure.Management.BackupServicesManagement.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Azure.ResourceManager, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<package id="Microsoft.Azure.Common" version="2.1.0" targetFramework="net45" />
<package id="Microsoft.Azure.Common.Authentication" version="1.3.1-preview" targetFramework="net45" />
<package id="Microsoft.Azure.Common.Dependencies" version="1.0.0" targetFramework="net45" />
<package id="Microsoft.Azure.Management.BackupServices" version="1.0.4-preview" targetFramework="net45" />
<package id="Microsoft.Azure.Management.BackupServices" version="1.0.5-preview" targetFramework="net45" />
<package id="Microsoft.Azure.Management.Resources" version="2.18.7-preview" targetFramework="net45" />
<package id="Microsoft.Azure.Test.Framework" version="1.0.5715.36130-prerelease" targetFramework="net45" />
<package id="Microsoft.Azure.Test.HttpRecorder" version="1.0.5715.36130-prerelease" targetFramework="net45" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ protected override void ProcessRecord()
{
case AzureBackupContainerType.Windows:
case AzureBackupContainerType.SCDPM:
case AzureBackupContainerType.AzureBackupServer:
case AzureBackupContainerType.Other:
AzureBackupClient.EnableMachineContainerReregistration(Container.ResourceGroupName, Container.ResourceName, Container.Id);
break;
default:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ protected override void ProcessRecord()
{
case AzureBackupContainerType.Windows:
case AzureBackupContainerType.SCDPM:
case AzureBackupContainerType.AzureBackupServer:
case AzureBackupContainerType.Other:
containers.AddRange(GetMachineContainers(Vault.ResourceGroupName, Vault.Name));
break;
case AzureBackupContainerType.AzureVM:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ protected override void ProcessRecord()
{
case AzureBackupContainerType.Windows:
case AzureBackupContainerType.SCDPM:
case AzureBackupContainerType.AzureBackupServer:
case AzureBackupContainerType.Other:
DeleteServer();
break;
case AzureBackupContainerType.AzureVM:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@
<HintPath>..\..\..\packages\Microsoft.Azure.Common.2.1.0\lib\net45\Microsoft.Azure.Common.NetFramework.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Azure.Management.BackupServicesManagement, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\Microsoft.Azure.Management.BackupServices.1.0.4-preview\lib\net40\Microsoft.Azure.Management.BackupServicesManagement.dll</HintPath>
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\packages\Microsoft.Azure.Management.BackupServices.1.0.5-preview\lib\net40\Microsoft.Azure.Management.BackupServicesManagement.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Azure.ResourceManager, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,33 +38,37 @@ internal class ContainerHelpers
{
private static readonly Regex ResourceGroupRegex = new Regex(@"/subscriptions/(?<subscriptionsId>.+)/resourceGroups/(?<resourceGroupName>.+)/providers/(?<providersName>.+)/BackupVault/(?<BackupVaultName>.+)/containers/(?<containersName>.+)", RegexOptions.Compiled);

internal static AzureBackupContainerType GetContainerType(string customerType)
internal static AzureBackupContainerType GetContainerType(string customerTypeString)
{
CustomerType type = (CustomerType)Enum.Parse(typeof(CustomerType), customerType);

AzureBackupContainerType containerType = 0;
CustomerType customerType = CustomerType.Invalid;

switch (type)
if (Enum.TryParse<CustomerType>(customerTypeString, out customerType))
{
case CustomerType.DPM:
containerType = AzureBackupContainerType.SCDPM;
break;
case CustomerType.InMage:
break;
case CustomerType.Invalid:
break;
case CustomerType.ManagedContainer:
break;
case CustomerType.OBS:
containerType = AzureBackupContainerType.Windows;
break;
case CustomerType.SBS:
containerType = AzureBackupContainerType.Windows;
break;
case CustomerType.SqlPaaS:
break;
default:
break;
switch (customerType)
{
case CustomerType.DPM:
containerType = AzureBackupContainerType.SCDPM;
break;
case CustomerType.OBS:
containerType = AzureBackupContainerType.Windows;
break;
case CustomerType.SBS:
containerType = AzureBackupContainerType.Windows;
break;
case CustomerType.DPMVenus:
containerType = AzureBackupContainerType.AzureBackupServer;
break;
case CustomerType.Invalid:
break;
default:
containerType = AzureBackupContainerType.Other;
break;
}
}
else if (!string.IsNullOrEmpty(customerTypeString))
{
containerType = AzureBackupContainerType.Other;
}

return containerType;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ public enum AzureBackupContainerType
Windows = 1,
SCDPM,
AzureVM,
AzureBackupServer,
Other,
}

public enum DataSourceType
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<package id="Microsoft.Azure.Common" version="2.1.0" targetFramework="net45" />
<package id="Microsoft.Azure.Common.Authentication" version="1.3.1-preview" targetFramework="net45" />
<package id="Microsoft.Azure.Common.Dependencies" version="1.0.0" targetFramework="net45" />
<package id="Microsoft.Azure.Management.BackupServices" version="1.0.4-preview" targetFramework="net45" />
<package id="Microsoft.Azure.Management.BackupServices" version="1.0.5-preview" targetFramework="net45" />
<package id="Microsoft.Azure.Management.Resources" version="2.18.7-preview" targetFramework="net45" />
<package id="Microsoft.Bcl" version="1.1.9" targetFramework="net45" />
<package id="Microsoft.Bcl.Async" version="1.0.168" targetFramework="net45" />
Expand Down