Module: DeltaCloud

Defined in:
lib/deltacloud.rb,
doc/deltacloud.rb,
doc/deltacloud.rb,
doc/deltacloud.rb,
doc/deltacloud.rb,
doc/deltacloud.rb,
doc/deltacloud.rb,
lib/plain_formatter.rb

Defined Under Namespace

Modules: HWP, InstanceState, PlainFormatter Classes: API, Documentation

Class Method Summary (collapse)

Class Method Details

+ (Object) classes



53
54
55
56
# File 'lib/deltacloud.rb', line 53

def self.classes
  puts "----> \n#{@defined_classes.join(',')}\n"
  @defined_classes || []
end

+ (Object) define_class(name)



43
44
45
46
47
48
49
50
51
# File 'lib/deltacloud.rb', line 43

def self.define_class(name)
  @defined_classes ||= []
  if @defined_classes.include?(name)
    self.module_eval("API::#{name}")
  else
    @defined_classes << name unless @defined_classes.include?(name)
    API.const_set(name, Class.new)
  end
end

+ (Object) driver_name(url)

Return a API driver for specified URL

Parameters:

  • (String, url) API

    URL (eg. http://localhost:3001/api)



39
40
41
# File 'lib/deltacloud.rb', line 39

def self.driver_name(url)
  API.new(nil, nil, url).driver_name
end

+ (DeltaCloud::API) new(user_name, password, api_url, &block)

Get a new API client instance

Parameters:

  • (String, user_name) API

    user name

  • (String, password) API

    password

  • (String, user_name) API

    URL (eg. http://localhost:3001/api)

Returns:



32
33
34
# File 'lib/deltacloud.rb', line 32

def self.new(user_name, password, api_url, &block)
  API.new(user_name, password, api_url, &block)
end