Skip to content

Commit 7781601

Browse files
committed
updated help files
1 parent 93b88dd commit 7781601

File tree

91 files changed

+1859803
-11299
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

91 files changed

+1859803
-11299
lines changed

src/RecoveryServices/RecoveryServices.Backup.Helpers/Conversions/ConversionHelpers.cs

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -457,8 +457,8 @@ private static ItemBase GetAzureVmWorkloadItemModel(ServiceClientModel.Protected
457457

458458
itemModel = new AzureWorkloadSQLDatabaseProtectedItem(
459459
protectedItem,
460-
IdUtils.GetNameFromUri(containerUri),
461-
ContainerType.AzureWorkload,
460+
containerUri,
461+
ContainerType.AzureVMAppContainer,
462462
policyName);
463463
return itemModel;
464464
}
@@ -566,8 +566,8 @@ private static ProtectableItemBase GetAzureWorkloadProtectableItemModel(ServiceC
566566

567567
itemModel = new AzureWorkloadProtectableItem(
568568
protectableItem,
569-
IdUtils.GetNameFromUri(containerUri),
570-
ContainerType.AzureWorkload);
569+
containerUri,
570+
ContainerType.AzureVMAppContainer);
571571

572572
return itemModel;
573573
}
@@ -587,16 +587,6 @@ public static List<ItemBase> GetItemModelList(IEnumerable<ServiceClientModel.Pro
587587
return itemModels;
588588
}
589589

590-
public static SettingsBase GetPSPolicySetting(ServiceClientModel.Settings policySettings)
591-
{
592-
SettingsBase settings = new SettingsBase();
593-
settings.IsCompression = policySettings.IsCompression;
594-
settings.Issqlcompression = policySettings.Issqlcompression;
595-
settings.TimeZone = policySettings.TimeZone;
596-
597-
return settings;
598-
}
599-
600590
public static void GetPSSubProtectionPolicy(AzureVmWorkloadPolicy azureVmWorkloadPolicyModel,
601591
ServiceClientModel.ProtectionPolicyResource serviceClientResponse, string timeZone)
602592
{

src/RecoveryServices/RecoveryServices.Backup.Helpers/RecoveryServices.Backup.Helpers.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
</PropertyGroup>
1313

1414
<ItemGroup>
15-
<PackageReference Include="Microsoft.Azure.Management.RecoveryServices.Backup" Version="3.0.1-preview" />
15+
<PackageReference Include="Microsoft.Azure.Management.RecoveryServices.Backup" Version="3.1.0-preview" />
1616
</ItemGroup>
1717

1818
<ItemGroup>

src/RecoveryServices/RecoveryServices.Backup.Models/AzureVmWorkloadModels/AzureVmWorkloadContainer.cs

Lines changed: 60 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
// ----------------------------------------------------------------------------------
1414

1515
using Microsoft.Azure.Management.RecoveryServices.Backup.Models;
16+
using System.Collections.Generic;
1617

1718
namespace Microsoft.Azure.Commands.RecoveryServices.Backup.Cmdlets.Models
1819
{
@@ -21,12 +22,70 @@ namespace Microsoft.Azure.Commands.RecoveryServices.Backup.Cmdlets.Models
2122
/// </summary>
2223
public class AzureVmWorkloadContainer : AzureContainer
2324
{
25+
/// <summary>
26+
/// Gets resource Id represents the complete path to the resource.
27+
/// </summary>
28+
public string Id { get; set; }
29+
30+
/// <summary>
31+
/// Gets or sets ARM ID of the virtual machine represented by this Azure Workload
32+
/// </summary>
33+
public string SourceResourceId { get; set; }
34+
35+
/// <summary>
36+
/// Gets or sets status of health of the container.
37+
/// </summary>
38+
public string HealthStatus { get; set; }
39+
40+
/// <summary>
41+
/// Gets or sets additional details of a workload container.
42+
/// </summary>
43+
public List<AzureVmWorkloadContainerExtendedInfo> ExtendedInfo { get; set; }
44+
45+
public string WorkloadsPresent { get; set; }
46+
2447
/// <summary>
2548
/// Constructor. Takes the service client object representing the container
2649
/// and converts it in to the PS container model
2750
/// </summary>
2851
/// <param name="protectionContainerResource">Service client object representing the container</param>
2952
public AzureVmWorkloadContainer(ProtectionContainerResource protectionContainerResource)
30-
: base(protectionContainerResource) { }
53+
: base(protectionContainerResource)
54+
{
55+
AzureVMAppContainerProtectionContainer protectionContainer = (AzureVMAppContainerProtectionContainer)protectionContainerResource.Properties;
56+
Id = protectionContainerResource.Id;
57+
SourceResourceId = protectionContainer.SourceResourceId;
58+
HealthStatus = protectionContainer.HealthStatus;
59+
ExtendedInfo = new List<AzureVmWorkloadContainerExtendedInfo>();
60+
WorkloadsPresent = "";
61+
foreach (var inquiryDetail in protectionContainer.ExtendedInfo.InquiryInfo.InquiryDetails)
62+
{
63+
ExtendedInfo.Add(new AzureVmWorkloadContainerExtendedInfo()
64+
{
65+
InquiryStatus = inquiryDetail.InquiryValidation.Status,
66+
WorkloadItems = inquiryDetail.ItemCount,
67+
WorkloadType = inquiryDetail.Type
68+
});
69+
WorkloadsPresent += inquiryDetail.Type + ",";
70+
}
71+
WorkloadsPresent = WorkloadsPresent.Remove(WorkloadsPresent.Length - 1);
72+
}
73+
}
74+
public class AzureVmWorkloadContainerExtendedInfo
75+
{
76+
/// <summary>
77+
/// Gets or sets status for the Inquiry Validation.
78+
/// </summary>
79+
public string InquiryStatus { get; set; }
80+
81+
/// <summary>
82+
/// Gets or sets contains the protectable item Count inside this Container.
83+
/// </summary>
84+
public string WorkloadType { get; set; }
85+
86+
/// <summary>
87+
/// Gets or sets type of the Workload such as SQL, Oracle etc.
88+
/// </summary>
89+
public long? WorkloadItems { get; set; }
3190
}
3291
}

src/RecoveryServices/RecoveryServices.Backup.Models/AzureVmWorkloadModels/AzureWorkloadProtectableItem.cs

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,16 @@ namespace Microsoft.Azure.Commands.RecoveryServices.Backup.Cmdlets.Models
2222
/// </summary>
2323
public class AzureWorkloadProtectableItem : ProtectableItemBase
2424
{
25+
/// <summary>
26+
/// Gets or sets friendly name of the backup item.
27+
/// </summary>
28+
public string FriendlyName { get; set; }
29+
30+
/// <summary>
31+
/// Gets or sets state of the back up item
32+
/// </summary>
33+
public string ProtectionState { get; set; }
34+
2535
/// <summary>
2636
/// Type of protectable item
2737
/// </summary>
@@ -75,6 +85,8 @@ public AzureWorkloadProtectableItem(WorkloadProtectableItemResource workloadProt
7585
: base(workloadProtectableItemResource, containerName, containerType)
7686
{
7787
AzureVmWorkloadProtectableItem protectedItem = (AzureVmWorkloadProtectableItem)workloadProtectableItemResource.Properties;
88+
FriendlyName = protectedItem.FriendlyName;
89+
ProtectionState = protectedItem.ProtectionState;
7890
ParentName = protectedItem.ParentName;
7991
ParentUniqueName = protectedItem.ParentUniqueName;
8092
ServerName = protectedItem.ServerName;
@@ -83,7 +95,7 @@ public AzureWorkloadProtectableItem(WorkloadProtectableItemResource workloadProt
8395
Subprotectableitemcount = protectedItem.Subprotectableitemcount;
8496
Prebackupvalidation = protectedItem.Prebackupvalidation;
8597
ProtectableItemType = workloadProtectableItemResource.Properties.GetType().ToString();
86-
if(workloadProtectableItemResource.Properties.GetType() == typeof(AzureVmWorkloadSQLAvailabilityGroupProtectableItem))
98+
if (workloadProtectableItemResource.Properties.GetType() == typeof(AzureVmWorkloadSQLAvailabilityGroupProtectableItem))
8799
{
88100
ProtectableItemType = CmdletModel.ProtectableItemType.SQLAvailabilityGroup.ToString();
89101
}

src/RecoveryServices/RecoveryServices.Backup.Models/BaseObjects.cs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,15 @@ public ContainerBase(ServiceClientModel.ProtectionContainerResource protectionCo
107107
protectionContainer.Properties.BackupManagementType),
108108
protectionContainer.Properties.BackupManagementType)
109109
{
110-
Name = IdUtils.GetNameFromUri(protectionContainer.Name);
110+
if (string.Compare(protectionContainer.Properties.BackupManagementType,
111+
ServiceClientModel.BackupManagementType.AzureWorkload) == 0)
112+
{
113+
Name = protectionContainer.Name;
114+
}
115+
else
116+
{
117+
Name = IdUtils.GetNameFromUri(protectionContainer.Name);
118+
}
111119
}
112120
}
113121

src/RecoveryServices/RecoveryServices.Backup.Models/CommonModels/Enums.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public enum ContainerType
4242
/// <summary>
4343
/// Represents Azure Workload
4444
/// </summary>
45-
AzureWorkload
45+
AzureVMAppContainer
4646
}
4747

4848
/// <summary>

src/RecoveryServices/RecoveryServices.Backup.Models/CommonModels/Utils.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ public static ContainerType GetPsContainerType(string containerType)
253253
else if (containerType ==
254254
ServiceClientModel.BackupManagementType.AzureWorkload)
255255
{
256-
return ContainerType.AzureWorkload;
256+
return ContainerType.AzureVMAppContainer;
257257
}
258258
else
259259
{

0 commit comments

Comments
 (0)