> +         public boolean apply(VirtualAppliance input) {
> +            return input.getName().equals(group);
> +         }
> +      });
> +
> +      // Create the group if still does not exist
> +      if (!vapp.isPresent()) {
> +         logger.debug(">> Creating group %s", group);
> +         VirtualAppliance newVapp = VirtualAppliance.builder(context, 
> vdc).name(group).build();
> +         newVapp.save();
> +         logger.debug("<< group(%s) created", newVapp.getId());
> +      } else {
> +         logger.debug(">> Using existing group(%s)", vapp.get().getId());
> +      }
> +
> +      return super.execute(group, count, template, goodNodes, badNodes, 
> customizationResponses);

OK, so the only other thing I can imagine here is that you put the `vapp` and 
`vdc` in the template somehow, and use that object to pass them through to the 
eventual `createNode...` call.

I don't know what promises we make about the template object and how evil we 
consider that to be, but since that's the "recipe" for making the object and 
`vapp` and `vdc` seem to be part of that recipe (albeit not things the user 
knows about) the would seem to be the closest possible fit..?

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

Reply via email to