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!"); } }
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; }