> + boolean localDiskFlag = checkNotNull(virtualGuest.isLocalDiskFlag(),
> "localDiskFlag");
> + String datacenterName =
> checkNotNull(virtualGuest.getDatacenter().getName(), "datacenterName");
> + Set<NetworkComponent> networkComponents =
> getNetworkComponents(virtualGuest);
> + if(virtualGuest.getOperatingSystem() != null) {
> + String operatingSystemReferenceCode =
> checkNotNull(virtualGuest.getOperatingSystem()
> + .getOperatingSystemReferenceCode(),
> "operatingSystemReferenceCode");
> + templateObject = new TemplateObject(hostname, domain, startCpus,
> maxMemory, true,
> + operatingSystemReferenceCode, null, localDiskFlag, new
> Datacenter(datacenterName), networkComponents,
> + getBlockDevices(virtualGuest));
> + } else if(virtualGuest.getVirtualGuestBlockDeviceTemplateGroup() !=
> null) {
> + String globalIdentifier =
> checkNotNull(virtualGuest.getVirtualGuestBlockDeviceTemplateGroup()
> + .getGlobalIdentifier(),
> "blockDeviceTemplateGroup.globalIdentifier");
> + templateObject = new TemplateObject(hostname, domain, startCpus,
> maxMemory, true, null,
> + new BlockDeviceTemplateGroup(globalIdentifier),
> localDiskFlag, new Datacenter(datacenterName),
> + networkComponents, null);
> + }
it can't happen as an `imageId` is always passed and so operating system or a
blockDeviceTemplateGroup will be always set
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/296/files#r13794555