Skip to content

Commit 0a05b20

Browse files
subashchandra31nilgupta6
authored andcommitted
mulltiple ip per nic - cmdlet changes
review changes code review changes moved validaton to nicConfig cmdlet and review changes minor fix handled review comments parameter validation changes, logs design review changes subash's multiple IP per NIC PR changes
1 parent 2154cd0 commit 0a05b20

File tree

6 files changed

+306
-278
lines changed

6 files changed

+306
-278
lines changed

src/RecoveryServices/RecoveryServices.SiteRecovery/Models/PSObjects.cs

Lines changed: 4 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -934,42 +934,22 @@ public ASRVMNicDetails(
934934
this.ReplicaNicId = vMNicDetails.ReplicaNicId;
935935
this.SourceNicArmId = vMNicDetails.SourceNicArmId;
936936
this.VMNetworkName = vMNicDetails.VMNetworkName;
937-
this.VMSubnetName = vMNicDetails.VMSubnetName;
938937
this.RecoveryVMNetworkId = vMNicDetails.RecoveryVMNetworkId;
939938
this.RecoveryNicName = vMNicDetails.RecoveryNicName;
940939
this.RecoveryNicResourceGroupName = vMNicDetails.RecoveryNicResourceGroupName;
941940
this.ReuseExistingNic = vMNicDetails.ReuseExistingNic;
942-
this.RecoveryVMSubnetName = vMNicDetails.RecoveryVMSubnetName;
943-
this.ReplicaNicStaticIPAddress = vMNicDetails.ReplicaNicStaticIPAddress;
944-
this.IpAddressType = vMNicDetails.IpAddressType;
945941
this.SelectionType = vMNicDetails.SelectionType;
946-
this.PrimaryNicStaticIPAddress = vMNicDetails.PrimaryNicStaticIPAddress;
947-
this.RecoveryNicIpAddressType = vMNicDetails.RecoveryNicIpAddressType;
948942
this.EnableAcceleratedNetworkingOnRecovery = vMNicDetails.EnableAcceleratedNetworkingOnRecovery;
949-
this.RecoveryPublicIPAddressId = vMNicDetails.RecoveryPublicIpAddressId;
950943
this.RecoveryNetworkSecurityGroupId = vMNicDetails.RecoveryNetworkSecurityGroupId;
951-
this.RecoveryLBBackendAddressPoolId =
952-
vMNicDetails.RecoveryLBBackendAddressPoolIds?.ToList() ?? new List<string>();
944+
this.IpConfigs = vMNicDetails.IpConfigs;
953945
this.TfoVMNetworkId = vMNicDetails.TfoVMNetworkId;
954946
this.TfoNicName = vMNicDetails.TfoRecoveryNicName;
955947
this.TfoNicResourceGroupName = vMNicDetails.TfoRecoveryNicResourceGroupName;
956948
this.TfoReuseExistingNic = vMNicDetails.TfoReuseExistingNic;
957-
this.TfoVMSubnetName = vMNicDetails.TfoVMSubnetName;
958949
this.TfoNetworkSecurityGroupId = vMNicDetails.TfoNetworkSecurityGroupId;
959-
this.TfoIPConfigs = vMNicDetails.TfoIPConfigs?.ToList() ?? new List<IPConfig>();
960950
this.EnableAcceleratedNetworkingOnTfo = vMNicDetails.EnableAcceleratedNetworkingOnTfo;
961951
}
962952

963-
//
964-
// Summary:
965-
// Gets or sets primary nic static IP address.
966-
public string PrimaryNicStaticIPAddress { get; set; }
967-
968-
//
969-
// Summary:
970-
// Gets or sets IP allocation type for recovery VM.
971-
public string RecoveryNicIpAddressType { get; set; }
972-
973953
//
974954
// Summary:
975955
// Gets or sets Enable Accelerated Networking On Recovery.
@@ -985,11 +965,6 @@ public ASRVMNicDetails(
985965
// Gets or sets the source nic ARM Id.
986966
public string SourceNicArmId { get; set; }
987967

988-
/// <summary>
989-
/// Gets or sets ipv4 address type.
990-
/// </summary>
991-
public string IpAddressType { get; set; }
992-
993968
/// <summary>
994969
/// Gets or sets the nic Id.
995970
/// </summary>
@@ -1015,16 +990,6 @@ public ASRVMNicDetails(
1015990
/// </summary>
1016991
public string RecoveryVMNetworkId { get; set; }
1017992

1018-
/// <summary>
1019-
/// Gets or sets recovery VM subnet name.
1020-
/// </summary>
1021-
public string RecoveryVMSubnetName { get; set; }
1022-
1023-
/// <summary>
1024-
/// Gets or sets replica nic static IP address.
1025-
/// </summary>
1026-
public string ReplicaNicStaticIPAddress { get; set; }
1027-
1028993
/// <summary>
1029994
/// Gets or sets selection type for failover.
1030995
/// </summary>
@@ -1035,26 +1000,11 @@ public ASRVMNicDetails(
10351000
/// </summary>
10361001
public string VMNetworkName { get; set; }
10371002

1038-
/// <summary>
1039-
/// Gets or sets VM subnet name.
1040-
/// </summary>
1041-
public string VMSubnetName { get; set; }
1042-
1043-
/// <summary>
1044-
/// Gets or sets the id of the public IP address resource associated with the NIC.
1045-
/// </summary>
1046-
public string RecoveryPublicIPAddressId { get; set; }
1047-
10481003
/// <summary>
10491004
/// Gets or sets the id of the NSG associated with the NIC.
10501005
/// </summary>
10511006
public string RecoveryNetworkSecurityGroupId { get; set; }
10521007

1053-
/// <summary>
1054-
/// Gets or sets the target backend address pools for the NIC.
1055-
/// </summary>
1056-
public List<string> RecoveryLBBackendAddressPoolId { get; set; }
1057-
10581008
/// <summary>
10591009
/// Gets or sets test failover network Id.
10601010
/// </summary>
@@ -1075,21 +1025,15 @@ public ASRVMNicDetails(
10751025
/// </summary>
10761026
public bool? TfoReuseExistingNic { get; set; }
10771027

1078-
/// <summary>
1079-
/// Gets or sets test failover subnet name.
1080-
/// </summary>
1081-
public string TfoVMSubnetName { get; set; }
1082-
10831028
/// <summary>
10841029
/// Gets or sets the id of the NSG associated with the test failover NIC.
10851030
/// </summary>
10861031
public string TfoNetworkSecurityGroupId { get; set; }
10871032

10881033
/// <summary>
1089-
/// Gets or sets the IP configuration details for test failover NIC.
1034+
/// Gets or sets the IP configuration details of a NIC.
10901035
/// </summary>
1091-
public List<IPConfig> TfoIPConfigs { get; set; }
1092-
1036+
public IList<IPConfigDetails> IpConfigs { get; set; }
10931037
//
10941038
// Summary:
10951039
// Gets or sets whether accelerated networking is enabled on test failover NIC.
@@ -2394,12 +2338,6 @@ public class ASRVMNicConfig
23942338
[DataMember]
23952339
public bool ReuseExistingNic { get; set; }
23962340

2397-
/// <summary>
2398-
/// Gets or sets the name of the recovery VM subnet.
2399-
/// </summary>
2400-
[DataMember]
2401-
public string RecoveryVMSubnetName { get; set; }
2402-
24032341
/// <summary>
24042342
/// Gets or sets the id of the NSG associated with the recovery NIC.
24052343
/// </summary>
@@ -2410,7 +2348,7 @@ public class ASRVMNicConfig
24102348
/// Gets or sets the IP configuration details for the recovery NIC.
24112349
/// </summary>
24122350
[DataMember]
2413-
public List<IPConfig> RecoveryIPConfigs { get; set; }
2351+
public List<IPConfigInputDetails> IPConfigs { get; set; }
24142352

24152353
/// <summary>
24162354
/// Gets or sets whether the recovery NIC has accelerated networking enabled.
@@ -2442,24 +2380,12 @@ public class ASRVMNicConfig
24422380
[DataMember]
24432381
public bool TfoReuseExistingNic { get; set; }
24442382

2445-
/// <summary>
2446-
/// Gets or sets the name of the test failover VM subnet.
2447-
/// </summary>
2448-
[DataMember]
2449-
public string TfoVMSubnetName { get; set; }
2450-
24512383
/// <summary>
24522384
/// Gets or sets the id of the NSG associated with the test failover NIC.
24532385
/// </summary>
24542386
[DataMember]
24552387
public string TfoNetworkSecurityGroupId { get; set; }
24562388

2457-
/// <summary>
2458-
/// Gets or sets the IP configuration details for the test failover NIC.
2459-
/// </summary>
2460-
[DataMember]
2461-
public List<IPConfig> TfoIPConfigs { get; set; }
2462-
24632389
/// <summary>
24642390
/// Gets or sets whether the test failover NIC has accelerated networking enabled.
24652391
/// </summary>

0 commit comments

Comments
 (0)