Skip to content

Commit 43484d5

Browse files
committed
Merge dev1
2 parents 3f90bde + 58c371c commit 43484d5

File tree

35 files changed

+417
-190
lines changed

35 files changed

+417
-190
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
using System.Text;
1919
using System.Threading.Tasks;
2020
using Microsoft.Azure.Commands.RecoveryServices.Backup.Cmdlets.Models;
21+
using CmdletModels = Microsoft.Azure.Commands.RecoveryServices.Backup.Cmdlets.Models;
2122
using Microsoft.Azure.Commands.RecoveryServices.Backup.Properties;
2223
using ServiceClientModel = Microsoft.Azure.Management.RecoveryServices.Backup.Models;
2324

src/ResourceManager/RecoveryServices.Backup/Commands.RecoveryServices.Backup.Helpers/Conversions/JobConversions.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// ----------------------------------------------------------------------------------
22
//
3-
// Copyright Microsoft Corporation
3+
// Copyright Microsoft CorporationMicrosoft.Azure.Managemen
44
// Licensed under the Apache License, Version 2.0 (the "License");
55
// you may not use this file except in compliance with the License.
66
// You may obtain a copy of the License at
@@ -95,7 +95,8 @@ private static CmdletModel.AzureVmJob GetPSAzureVmJob(JobResource serviceClientJ
9595
response.VmVersion = vmJob.VirtualMachineVersion;
9696
response.WorkloadName = vmJob.EntityFriendlyName;
9797
response.ActivityId = vmJob.ActivityId;
98-
response.BackupManagementType = CmdletModel.EnumUtils.GetEnum<CmdletModel.BackupManagementType>(GetPSBackupManagementType(vmJob.BackupManagementType));
98+
response.BackupManagementType = CmdletModel.EnumUtils.GetEnum<CmdletModel.BackupManagementType>(
99+
GetPSBackupManagementType(vmJob.BackupManagementType));
99100
response.Operation = vmJob.Operation;
100101

101102
if (vmJob.ErrorDetails != null)

src/ResourceManager/RecoveryServices.Backup/Commands.RecoveryServices.Backup.Helpers/Conversions/RecoveryPointConversions.cs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ public class RecoveryPointConversions
2525
{
2626
public static List<RecoveryPointBase> GetPSAzureRecoveryPoints(ServiceClientModel.RecoveryPointListResponse rpList, AzureVmItem item)
2727
{
28-
if (rpList == null || rpList.RecoveryPointList == null || rpList.RecoveryPointList.RecoveryPoints == null)
28+
if (rpList == null || rpList.RecoveryPointList == null ||
29+
rpList.RecoveryPointList.RecoveryPoints == null)
2930
{
3031
throw new ArgumentNullException("RPList");
3132
}
@@ -71,7 +72,10 @@ public static RecoveryPointBase GetPSAzureRecoveryPoints(ServiceClientModel.Reco
7172
Dictionary<UriEnums, string> uriDict = HelperUtils.ParseUri(item.Id);
7273
string containerUri = HelperUtils.GetContainerUri(uriDict, item.Id);
7374
string protectedItemName = HelperUtils.GetProtectedItemUri(uriDict, item.Id);
74-
DateTime recPointTime = DateTime.ParseExact(recPoint.RecoveryPointTime, @"MM/dd/yyyy HH:mm:ss", CultureInfo.InvariantCulture);
75+
DateTime recPointTime = DateTime.ParseExact(
76+
recPoint.RecoveryPointTime,
77+
@"MM/dd/yyyy HH:mm:ss",
78+
CultureInfo.InvariantCulture);
7579

7680
AzureVmRecoveryPoint result = new AzureVmRecoveryPoint()
7781
{

src/ResourceManager/RecoveryServices.Backup/Commands.RecoveryServices.Backup.Helpers/HelperUtils.cs

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,8 @@ public static List<string> GetStringListFromEnumList<T>(IList<T> enumList)
6464
/// <returns>dictionary of UriEnum as key and value as value of corresponding URI enum</returns>
6565
public static Dictionary<CmdletModel.UriEnums, string> ParseUri(string id)
6666
{
67-
Dictionary<CmdletModel.UriEnums, string> keyValuePairDict = new Dictionary<CmdletModel.UriEnums, string>();
67+
Dictionary<CmdletModel.UriEnums, string> keyValuePairDict =
68+
new Dictionary<CmdletModel.UriEnums, string>();
6869
if (!string.IsNullOrEmpty(id))
6970
{
7071
string idPattern = @"/[a-zA-Z]*/[a-zA-Z0-9-;.]*";
@@ -76,7 +77,10 @@ public static List<string> GetStringListFromEnumList<T>(IList<T> enumList)
7677

7778
while (match.Success)
7879
{
79-
string[] keyValuePair = match.Value.Split(new string[] { uriPattern }, StringSplitOptions.RemoveEmptyEntries);
80+
string[] keyValuePair = match.Value.Split(
81+
new string[] { uriPattern },
82+
StringSplitOptions.RemoveEmptyEntries
83+
);
8084
CmdletModel.UriEnums key;
8185
CmdletModel.UriEnums value;
8286
if (keyValuePair.Length == 2)
@@ -93,7 +97,10 @@ public static List<string> GetStringListFromEnumList<T>(IList<T> enumList)
9397
return keyValuePairDict;
9498
}
9599

96-
public static string GetContainerUri(Dictionary<CmdletModel.UriEnums, string> keyValuePairDict, string id)
100+
public static string GetContainerUri(
101+
Dictionary<CmdletModel.UriEnums, string> keyValuePairDict,
102+
string id
103+
)
97104
{
98105
string containerUri = string.Empty;
99106

@@ -109,7 +116,10 @@ public static string GetContainerUri(Dictionary<CmdletModel.UriEnums, string> ke
109116
return containerUri;
110117
}
111118

112-
public static string GetProtectedItemUri(Dictionary<CmdletModel.UriEnums, string> keyValuePairDict, string id)
119+
public static string GetProtectedItemUri(
120+
Dictionary<CmdletModel.UriEnums, string> keyValuePairDict,
121+
string id
122+
)
113123
{
114124
string itemUri = string.Empty;
115125

@@ -125,7 +135,10 @@ public static string GetProtectedItemUri(Dictionary<CmdletModel.UriEnums, string
125135
return itemUri;
126136
}
127137

128-
public static string GetProtectableItemUri(Dictionary<CmdletModel.UriEnums, string> keyValuePairDict, string id)
138+
public static string GetProtectableItemUri(
139+
Dictionary<CmdletModel.UriEnums, string> keyValuePairDict,
140+
string id
141+
)
129142
{
130143
string protectableItemUri = string.Empty;
131144

@@ -141,7 +154,10 @@ public static string GetProtectableItemUri(Dictionary<CmdletModel.UriEnums, stri
141154
return protectableItemUri;
142155
}
143156

144-
public static string GetPolicyNameFromPolicyId(Dictionary<CmdletModel.UriEnums, string> keyValuePairDict, string id)
157+
public static string GetPolicyNameFromPolicyId(
158+
Dictionary<CmdletModel.UriEnums, string> keyValuePairDict,
159+
string id
160+
)
145161
{
146162
string policyName = string.Empty;
147163

src/ResourceManager/RecoveryServices.Backup/Commands.RecoveryServices.Backup.Helpers/ServiceClientHelpers.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
using System.Collections.Specialized;
1717
using System.Web;
1818
using CmdletModel = Microsoft.Azure.Commands.RecoveryServices.Backup.Cmdlets.Models;
19-
using Microsoft.Azure.Management.RecoveryServices.Backup.Models;
19+
using ServiceClientModel = Microsoft.Azure.Management.RecoveryServices.Backup.Models;
2020

2121
namespace Microsoft.Azure.Commands.RecoveryServices.Backup.Helpers
2222
{
@@ -34,7 +34,7 @@ public static string GetServiceClientProviderType(CmdletModel.ContainerType cont
3434
switch (containerType)
3535
{
3636
case CmdletModel.ContainerType.AzureVM:
37-
providerType = Microsoft.Azure.Management.RecoveryServices.Backup.Models.BackupManagementType.AzureIaasVM.ToString();
37+
providerType = ServiceClientModel.BackupManagementType.AzureIaasVM.ToString();
3838
break;
3939
default:
4040
break;
@@ -50,7 +50,7 @@ public static string GetServiceClientProviderType(CmdletModel.WorkloadType workl
5050
switch (workloadType)
5151
{
5252
case CmdletModel.WorkloadType.AzureVM:
53-
providerType = Microsoft.Azure.Management.RecoveryServices.Backup.Models.BackupManagementType.AzureIaasVM.ToString();
53+
providerType = ServiceClientModel.BackupManagementType.AzureIaasVM.ToString();
5454
break;
5555
default:
5656
break;
@@ -105,7 +105,7 @@ public static string GetServiceClientContainerType(CmdletModel.ContainerType con
105105
switch (containerType)
106106
{
107107
case CmdletModel.ContainerType.AzureVM:
108-
serviceClientContainerType = ContainerType.IaasVMContainer.ToString();
108+
serviceClientContainerType = ServiceClientModel.ContainerType.IaasVMContainer.ToString();
109109
break;
110110
default:
111111
break;
@@ -121,7 +121,7 @@ public static string GetServiceClientWorkloadType(CmdletModel.WorkloadType workl
121121
switch (workloadType)
122122
{
123123
case CmdletModel.WorkloadType.AzureVM:
124-
serviceClientWorkloadType = WorkloadType.VM.ToString();
124+
serviceClientWorkloadType = ServiceClientModel.WorkloadType.VM.ToString();
125125
break;
126126
default:
127127
break;

0 commit comments

Comments
 (0)