> +                                   BlockUntilJobCompletesAndReturnResult 
> blockUntilJobCompletesAndReturnResult,
> +                                   Predicate<String> jobComplete) {
> +      this.client = checkNotNull(client, "client");
> +      this.userExecutor = checkNotNull(userExecutor, "userExecutor");
> +      this.locations = checkNotNull(locations, "locations");
> +      this.imageAvailablePredicate = checkNotNull(imageAvailablePredicate, 
> "imageAvailablePredicate");
> +      this.blockUntilJobCompletesAndReturnResult = 
> checkNotNull(blockUntilJobCompletesAndReturnResult,
> +                                                                
> "blockUntilJobCompletesAndReturnResult");
> +      this.jobComplete = checkNotNull(jobComplete, "jobComplete");
> +   }
> +
> +   @Override
> +   public ImageTemplate buildImageTemplateFromNode(String name, final String 
> id) {
> +      VirtualMachine vm = 
> client.getVirtualMachineClient().getVirtualMachine(id);
> +      if (vm == null)
> +         throw new NoSuchElementException("Cannot find vm with id: " + id);

Consistency in behavior with EC2ImageExtension and NovaImageExtension - they 
both throw a NoSuchElementException as well, and I'd like to have the same 
behavior across the board.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/43/files#r4848229

Reply via email to