Java 类com.vmware.vim25.DistributedVirtualPortgroupPortgroupType 实例源码

项目:vijava    文件:VirtualMachineDeviceManager.java   
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!");
   }
}
项目:photon-model    文件:CreatePortgroupFlow.java   
private DVPortgroupConfigSpec createDefaultPortgroupSpec() {
    DVPortgroupConfigSpec res = new DVPortgroupConfigSpec();
    res.setName(this.subnetState.name);
    res.setDescription("Created from " + this.subnetState.documentSelfLink);
    res.setType(DistributedVirtualPortgroupPortgroupType.EPHEMERAL.value());
    return res;
}