public NetworkInterface(AzureContext azureContext, Arm.NetworkInterface networkInterface, List <VirtualNetwork> virtualNetworks, List <NetworkSecurityGroup> networkSecurityGroups) { _AzureContext = azureContext; _SourceNetworkInterface = networkInterface; this.TargetName = networkInterface.Name; this.IsPrimary = networkInterface.IsPrimary; foreach (Arm.NetworkInterfaceIpConfiguration armNetworkInterfaceIpConfiguration in networkInterface.NetworkInterfaceIpConfigurations) { MigrationTarget.NetworkInterfaceIpConfiguration targetNetworkInterfaceIpConfiguration = new NetworkInterfaceIpConfiguration(azureContext, armNetworkInterfaceIpConfiguration, virtualNetworks); this.TargetNetworkInterfaceIpConfigurations.Add(targetNetworkInterfaceIpConfiguration); } if (networkInterface.NetworkSecurityGroup != null) { this.NetworkSecurityGroup = NetworkSecurityGroup.SeekNetworkSecurityGroup(networkSecurityGroups, networkInterface.NetworkSecurityGroup.ToString()); } }
public NetworkInterface(Asm.VirtualMachine virtualMachine, Asm.NetworkInterface networkInterface, List <VirtualNetwork> virtualNetworks, List <NetworkSecurityGroup> networkSecurityGroups, TargetSettings targetSettings) { _SourceNetworkInterface = networkInterface; this.SetTargetName(networkInterface.Name, targetSettings); this.IsPrimary = networkInterface.IsPrimary; this.EnableIPForwarding = networkInterface.EnableIpForwarding; foreach (Asm.NetworkInterfaceIpConfiguration asmNetworkInterfaceIpConfiguration in networkInterface.NetworkInterfaceIpConfigurations) { NetworkInterfaceIpConfiguration migrationNetworkInterfaceIpConfiguration = new NetworkInterfaceIpConfiguration(asmNetworkInterfaceIpConfiguration, virtualNetworks, targetSettings); this.TargetNetworkInterfaceIpConfigurations.Add(migrationNetworkInterfaceIpConfiguration); } if (virtualMachine.NetworkSecurityGroup != null) { this.NetworkSecurityGroup = NetworkSecurityGroup.SeekNetworkSecurityGroup(networkSecurityGroups, virtualMachine.NetworkSecurityGroup.ToString()); } }
public NetworkInterface(Arm.NetworkInterface networkInterface, List <MigrationTarget.VirtualNetwork> armVirtualNetworks, List <MigrationTarget.NetworkSecurityGroup> armNetworkSecurityGroups, TargetSettings targetSettings) { _SourceNetworkInterface = networkInterface; this.SetTargetName(networkInterface.Name, targetSettings); this.IsPrimary = networkInterface.IsPrimary; this.EnableIPForwarding = networkInterface.EnableIPForwarding; foreach (Arm.NetworkInterfaceIpConfiguration armNetworkInterfaceIpConfiguration in networkInterface.NetworkInterfaceIpConfigurations) { NetworkInterfaceIpConfiguration targetNetworkInterfaceIpConfiguration = new NetworkInterfaceIpConfiguration(armNetworkInterfaceIpConfiguration, armVirtualNetworks, targetSettings); this.TargetNetworkInterfaceIpConfigurations.Add(targetNetworkInterfaceIpConfiguration); } if (networkInterface.NetworkSecurityGroup != null) { this.NetworkSecurityGroup = NetworkSecurityGroup.SeekNetworkSecurityGroup(armNetworkSecurityGroups, networkInterface.NetworkSecurityGroup.ToString()); } }
public NetworkInterface(AzureContext azureContext, Arm.NetworkInterface networkInterface) { _AzureContext = azureContext; _SourceNetworkInterface = networkInterface; this.TargetName = networkInterface.Name; this.IsPrimary = networkInterface.IsPrimary; this.EnableIPForwarding = networkInterface.EnableIPForwarding; foreach (Arm.NetworkInterfaceIpConfiguration armNetworkInterfaceIpConfiguration in networkInterface.NetworkInterfaceIpConfigurations) { MigrationTarget.NetworkInterfaceIpConfiguration targetNetworkInterfaceIpConfiguration = new NetworkInterfaceIpConfiguration(azureContext, armNetworkInterfaceIpConfiguration, azureContext.AzureRetriever.ArmTargetVirtualNetworks); this.TargetNetworkInterfaceIpConfigurations.Add(targetNetworkInterfaceIpConfiguration); } if (networkInterface.NetworkSecurityGroup != null) { this.NetworkSecurityGroup = NetworkSecurityGroup.SeekNetworkSecurityGroup(azureContext.AzureRetriever.ArmTargetNetworkSecurityGroups, networkInterface.NetworkSecurityGroup.ToString()); } }