private void validateDVPortGroupForVNicConnection()

in src/com/vmware/vim25/mox/VirtualMachineDeviceManager.java [550:567]


  private void validateDVPortGroupForVNicConnection(DistributedVirtualPortgroupInfo dvPortgroupInfo) 
  {
    if (dvPortgroupInfo.uplinkPortgroup) 
    {
      throw new RuntimeException("The vDS portgroup's uplinkPortgroup should not be null");
    }

    DistributedVirtualPortgroupPortgroupType portgroupType = DistributedVirtualPortgroupPortgroupType.valueOf(dvPortgroupInfo.portgroupType);

    String prodLineId = vm.getServerConnection().getServiceInstance().getAboutInfo().getProductLineId();
    // standalone host cannot do early or late binding 
    if (prodLineId.indexOf("ESX")!=-1 &&
        (portgroupType == DistributedVirtualPortgroupPortgroupType.earlyBinding ||
        portgroupType == DistributedVirtualPortgroupPortgroupType.lateBinding)) 
    {
      throw new RuntimeException("ESX does not support early or late binding!");
     }
  }