Skip to content

NIC renaming changes for TFO/FO #12207

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Jun 30, 2020
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 @@ -132,6 +132,11 @@ function getRecoveryCacheStorageAccountName{
function getRecoveryResourceGroupName{
return "recRG"+ $seed;
}

function getRecoveryNicName{
return "A2ArecNICName"+ $seed;
}

function Get-RandomSuffix(
[int] $size = 8)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,13 @@ public void A2AReplicateProximityPlacementGroupVm()
this.RunPowerShellTest(_logger, Constants.NewModel, "Test-ReplicateProximityPlacementGroupVm");
}

[Fact]
[Trait(Category.AcceptanceType, Category.CheckIn)]
public void A2AVMNicConfig()
{
this.RunPowerShellTest(_logger, Constants.NewModel, "Test-VMNicConfig");
}

[Fact]
[Trait(Category.AcceptanceType, Category.CheckIn)]
public void A2AZoneToZoneRecoveryPlanReplication()
Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -936,6 +936,9 @@ public ASRVMNicDetails(
this.VMNetworkName = vMNicDetails.VMNetworkName;
this.VMSubnetName = vMNicDetails.VMSubnetName;
this.RecoveryVMNetworkId = vMNicDetails.RecoveryVMNetworkId;
this.RecoveryNicName = vMNicDetails.RecoveryNicName;
this.RecoveryNicResourceGroupName = vMNicDetails.RecoveryNicResourceGroupName;
this.ReuseExistingNic = vMNicDetails.ReuseExistingNic;
this.RecoveryVMSubnetName = vMNicDetails.RecoveryVMSubnetName;
this.ReplicaNicStaticIPAddress = vMNicDetails.ReplicaNicStaticIPAddress;
this.IpAddressType = vMNicDetails.IpAddressType;
Expand All @@ -948,6 +951,9 @@ public ASRVMNicDetails(
this.RecoveryLBBackendAddressPoolId =
vMNicDetails.RecoveryLBBackendAddressPoolIds?.ToList() ?? new List<string>();
this.TfoVMNetworkId = vMNicDetails.TfoVMNetworkId;
this.TfoNicName = vMNicDetails.TfoRecoveryNicName;
this.TfoNicResourceGroupName = vMNicDetails.TfoRecoveryNicResourceGroupName;
this.TfoReuseExistingNic = vMNicDetails.TfoReuseExistingNic;
this.TfoVMSubnetName = vMNicDetails.TfoVMSubnetName;
this.TfoNetworkSecurityGroupId = vMNicDetails.TfoNetworkSecurityGroupId;
this.TfoIPConfigs = vMNicDetails.TfoIPConfigs?.ToList() ?? new List<IPConfig>();
Expand Down Expand Up @@ -989,6 +995,21 @@ public ASRVMNicDetails(
/// </summary>
public string NicId { get; set; }

/// <summary>
/// Gets or sets the name of the recovery NIC.
/// </summary>
public string RecoveryNicName { get; set; }

/// <summary>
/// Gets or sets the name of the recovery NIC resource group name.
/// </summary>
public string RecoveryNicResourceGroupName { get; set; }

/// <summary>
/// Gets or sets whether an existing Nic can be used during failover.
/// </summary>
public bool? ReuseExistingNic { get; set; }

/// <summary>
/// Gets or sets recovery VM network Id.
/// </summary>
Expand Down Expand Up @@ -1039,6 +1060,21 @@ public ASRVMNicDetails(
/// </summary>
public string TfoVMNetworkId { get; set; }

/// <summary>
/// Gets or sets name of the TFO Nic.
/// </summary>
public string TfoNicName { get; set; }

/// <summary>
/// Gets or sets name of the TFO Nic resource group name.
/// </summary>
public string TfoNicResourceGroupName { get; set; }

/// <summary>
/// Gets or sets whether an existing Nic can be used during TFO .
/// </summary>
public bool? TfoReuseExistingNic { get; set; }

/// <summary>
/// Gets or sets test failover subnet name.
/// </summary>
Expand Down Expand Up @@ -2340,6 +2376,24 @@ public class ASRVMNicConfig
[DataMember]
public string RecoveryVMNetworkId { get; set; }

/// <summary>
/// Gets or sets the name of the recovery NIC.
/// </summary>
[DataMember]
public string RecoveryNicName { get; set; }

/// <summary>
/// Gets or sets the name of the recovery NIC resource group name.
/// </summary>
[DataMember]
public string RecoveryNicResourceGroupName { get; set; }

/// <summary>
/// Gets or sets whether an existing Nic can be used during failover.
/// </summary>
[DataMember]
public bool ReuseExistingNic { get; set; }

/// <summary>
/// Gets or sets the name of the recovery VM subnet.
/// </summary>
Expand Down Expand Up @@ -2370,6 +2424,24 @@ public class ASRVMNicConfig
[DataMember]
public string TfoVMNetworkId { get; set; }

/// <summary>
/// Gets or sets name of the TFO Nic.
/// </summary>
[DataMember]
public string TfoNicName { get; set; }

/// <summary>
/// Gets or sets name of the TFO Nic resource group name.
/// </summary>
[DataMember]
public string TfoNicResourceGroupName { get; set; }

/// <summary>
/// Gets or sets whether an existing Nic can be used during TFO .
/// </summary>
[DataMember]
public bool TfoReuseExistingNic { get; set; }

/// <summary>
/// Gets or sets the name of the test failover VM subnet.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,33 @@ public class NewAzureRmAsrVmNicConfig : SiteRecoveryCmdletBase
[ValidateNotNullOrEmpty]
public string RecoveryVMNetworkId { get; set; }

/// <summary>
/// Gets or sets name of the recovery NIC.
/// </summary>
[Parameter(ParameterSetName = ASRParameterSets.AzureToAzure,
Mandatory = false,
HelpMessage = "Specifies the name of the recovery NIC.")]
[ValidateNotNullOrEmpty]
public string RecoveryNicName { get; set; }

/// <summary>
/// Gets or sets name of the recovery NIC resource group name.
/// </summary>
[Parameter(ParameterSetName = ASRParameterSets.AzureToAzure,
Mandatory = false,
HelpMessage = "Specifies the name of the recovery NIC resource group.")]
[ValidateNotNullOrEmpty]
public string RecoveryNicResourceGroupName { get; set; }

/// <summary>
/// Gets or sets whether an existing NIC can be used during failover.
/// </summary>
[Parameter(ParameterSetName = ASRParameterSets.AzureToAzure,
Mandatory = false,
HelpMessage = "Specifies whether an existing NIC can be used during failover.")]
[ValidateNotNullOrEmpty]
public SwitchParameter ReuseExistingNic { get; set; }

/// <summary>
/// Gets or sets the name of the recovery VM subnet.
/// </summary>
Expand Down Expand Up @@ -119,6 +146,33 @@ public class NewAzureRmAsrVmNicConfig : SiteRecoveryCmdletBase
[ValidateNotNullOrEmpty]
public string TfoVMNetworkId { get; set; }

/// <summary>
/// Gets or sets name of the test failover NIC.
/// </summary>
[Parameter(ParameterSetName = ASRParameterSets.AzureToAzure,
Mandatory = false,
HelpMessage = "Specifies the name of the test failover NIC.")]
[ValidateNotNullOrEmpty]
public string TfoNicName { get; set; }

/// <summary>
/// Gets or sets name of the test failover NIC resource group.
/// </summary>
[Parameter(ParameterSetName = ASRParameterSets.AzureToAzure,
Mandatory = false,
HelpMessage = "Specifies the name of the test failover NIC resource group.")]
[ValidateNotNullOrEmpty]
public string TfoNicResourceGroupName { get; set; }

/// <summary>
/// Gets or sets whether an existing NIC can be reused during test failover.
/// </summary>
[Parameter(ParameterSetName = ASRParameterSets.AzureToAzure,
Mandatory = false,
HelpMessage = "Specifies whether an existing NIC can be used during test failover.")]
[ValidateNotNullOrEmpty]
public SwitchParameter TfoReuseExistingNic { get; set; }

/// <summary>
/// Gets or sets the name of the test failover subnet.
/// </summary>
Expand Down Expand Up @@ -338,6 +392,9 @@ public override void ExecuteSiteRecoveryCmdlet()
{
NicId = this.NicId,
RecoveryVMNetworkId = this.RecoveryVMNetworkId,
RecoveryNicName = this.RecoveryNicName,
RecoveryNicResourceGroupName = this.RecoveryNicResourceGroupName,
ReuseExistingNic = this.ReuseExistingNic,
RecoveryVMSubnetName = this.RecoveryVMSubnetName,
RecoveryNetworkSecurityGroupId = this.RecoveryNetworkSecurityGroupId,
EnableAcceleratedNetworkingOnRecovery =
Expand All @@ -356,6 +413,9 @@ public override void ExecuteSiteRecoveryCmdlet()
},

TfoVMNetworkId = this.TfoVMNetworkId,
TfoNicName = this.TfoNicName,
TfoNicResourceGroupName = this.TfoNicResourceGroupName,
TfoReuseExistingNic = this.TfoReuseExistingNic,
TfoVMSubnetName = this.TfoVMSubnetName,
TfoNetworkSecurityGroupId = this.TfoNetworkSecurityGroupId,
EnableAcceleratedNetworkingOnTfo = this.EnableAcceleratedNetworkingOnTfo,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -723,6 +723,9 @@ private List<VMNicInputDetails> getNicListToUpdate(IList<VMNicDetails> vmNicList
var vMNicInputDetails = new VMNicInputDetails();

vMNicInputDetails.NicId = nic.NicId;
vMNicInputDetails.RecoveryNicName = nic.RecoveryNicName;
vMNicInputDetails.RecoveryNicResourceGroupName = nic.RecoveryNicResourceGroupName;
vMNicInputDetails.ReuseExistingNic = nic.ReuseExistingNic;
vMNicInputDetails.RecoveryVMSubnetName = nic.RecoveryVMSubnetName;
vMNicInputDetails.EnableAcceleratedNetworkingOnRecovery =
nic.EnableAcceleratedNetworkingOnRecovery;
Expand All @@ -735,6 +738,9 @@ private List<VMNicInputDetails> getNicListToUpdate(IList<VMNicDetails> vmNicList
vMNicInputDetails.RecoveryLBBackendAddressPoolIds =
nic.RecoveryIPConfigs?.FirstOrDefault()?.LBBackendAddressPoolIds;

vMNicInputDetails.TfoNicName = nic.TfoNicName;
vMNicInputDetails.TfoNicResourceGroupName = nic.TfoNicResourceGroupName;
vMNicInputDetails.TfoReuseExistingNic = nic.TfoReuseExistingNic;
vMNicInputDetails.TfoVMSubnetName = nic.TfoVMSubnetName;
vMNicInputDetails.EnableAcceleratedNetworkingOnTfo =
nic.EnableAcceleratedNetworkingOnTfo;
Expand Down
1 change: 1 addition & 0 deletions src/RecoveryServices/RecoveryServices/ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@

## Version 2.10.0
* Azure Backup added support for fetching MAB items.
* Azure Site Recovery support to update failover and test failover NIC names, existing NIC reuse.
* Azure Site Recovery supports disk type "StandardSSD_LRS"

## Version 2.9.1
Expand Down
Loading