Modified GetExternalVirtSwitch to take the switchname param and return the same or default one

This commit is contained in:
Rajesh Battala 2013-11-21 14:29:54 +05:30
parent 6aafb9c50d
commit 8c6840e489

View File

@ -1168,7 +1168,7 @@ namespace HypervResource
/// With V2 API, there are two kinds of lan endpoint: one on the computer system and one on the switch /// With V2 API, there are two kinds of lan endpoint: one on the computer system and one on the switch
/// e.g. Msvm_ExternalEthernetPort -> LANEndpoint -> LANEdnpoint -> EthernetSwitchPort -> VirtualEthernetSwitch /// e.g. Msvm_ExternalEthernetPort -> LANEndpoint -> LANEdnpoint -> EthernetSwitchPort -> VirtualEthernetSwitch
/// </remarks> /// </remarks>
public static VirtualEthernetSwitch GetExternalVirtSwitch() public static VirtualEthernetSwitch GetExternalVirtSwitch(String vSwitchName)
{ {
// Work back from the first *bound* external NIC we find. // Work back from the first *bound* external NIC we find.
var externNICs = ExternalEthernetPort.GetInstances("IsBound = TRUE"); var externNICs = ExternalEthernetPort.GetInstances("IsBound = TRUE");