module VagrantPlugins module Skytap module Command module Helpers def target_vms @target_vms ||= [].tap do |ret| with_target_vms{|machine| ret << machine} end end def fetch_environment if machine = target_vms.first @environment ||= machine.action(:fetch_environment)[:environment] end end def target_skytap_vms fetch_environment.get_vms_by_id(target_vms.collect(&:id)) end def machine_names(vm_ids) target_vms.select{|m| vm_ids.include?(m.id)}.collect{|m| m.name.to_s} end end end end end