datapath-windows: Add functionality to return OVSPortName given a VM
authorAlin Serdean <aserdean@cloudbasesolutions.com>
Tue, 11 Nov 2014 18:45:32 +0000 (18:45 +0000)
committerBen Pfaff <blp@nicira.com>
Wed, 12 Nov 2014 16:50:31 +0000 (08:50 -0800)
commita22a9529fb86aa906a6a4e1f014826380f4e81d0
tree32c5380d5bbbe3e9c370d482903f3f041ad03537
parentf71a0f8308754b483708938901a48a0623ba242d
datapath-windows: Add functionality to return OVSPortName given a VM

This commit adds functionality to return the ElementName of all the VNIC of a
given virtual machine name.

The function returns all the allocated ports including the ones which the OVS
port name was not set.

The default OVS port name that is set is the following:
"ElementName             : Dynamic Ethernet Switch Port".

Example of usage:
Import-Module OVS.psm1
Get-VMNetworkAdapterWithOvsPort test_ubuntu_1
$a = Get-VMNetworkAdapterWithOvsPort test_2_1
$a | findstr ElementName

Requested-by: Nithin Raju <nithin@vmware.com>
Reported-at: https://github.com/openvswitch/ovs-issues/issues/51
Signed-off-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com>
Tested-by: Nithin Raju <nithin@vmware.com>
Acked-by: Nithin Raju <nithin@vmware.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
datapath-windows/misc/OVS.psm1