class RightApiHelper::Instances

Public Class Methods

new(right_api_client) click to toggle source
Calls superclass method RightApiHelper::Base::new
# File lib/right_api_helper/instances.rb, line 21
def initialize(right_api_client)
  super(right_api_client)
  @api_shim = RightApiHelper::API15.new(right_api_client)
end

Public Instance Methods

get_instances() click to toggle source

Get all instances for all clouds registered in account

# File lib/right_api_helper/instances.rb, line 27
def get_instances
  instances = [ ]
  get_clouds.each do |cloud|
    instances += cloud.instances.index(:filter => [], :view => 'tiny')
  end
  instances
end
get_unmanaged_instances() click to toggle source
# File lib/right_api_helper/instances.rb, line 35
def get_unmanaged_instances
  get_instances.reject { |i| i.respond_to?(:deployment) }
end

Private Instance Methods

get_clouds() click to toggle source
# File lib/right_api_helper/instances.rb, line 41
def get_clouds
  @client.clouds.index
end