> +function Set-VMNetworkAdapterOVSPortDirect { > + [CmdletBinding()] > + param > + ( > + [parameter(Mandatory=$true)] > + [string]$vmName, > + > + [parameter(Mandatory=$true)] > + [ValidateLength(1, 48)] > + [string]$OVSPortName > + ) > + process > + { > + $vnic = 0 > + > + if ($vmName)
Since you have declared $vmName as mandatory, is this check required? Also, if the check is not required, we need not set $vnic = 0. > + { > + $vnic = Get-VMNetworkAdapter -VMName $vmName > + } > + $vnic[0] | Set-VMNetworkAdapterOVSPort -OVSPortName $OVSPortName > + } > +} Here, there's an assumption that we'll set it only on the first VIF and ignore the rest. Is that the right thing? Can we document this somewhere? -- Nithin _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev