Class: Cyclid::API::Plugins::BuildHost

Inherits:
Hash
  • Object
show all
Defined in:
app/cyclid/plugins/builder.rb

Overview

Base class for BuildHost

Direct Known Subclasses

DockerHost, GoogleHost

Instance Method Summary collapse

Methods inherited from Hash

#%, #hmap

Constructor Details

#initialize(args) ⇒ BuildHost

Returns a new instance of BuildHost.



24
25
26
27
28
# File 'app/cyclid/plugins/builder.rb', line 24

def initialize(args)
  args.each do |key, value|
    self[key.to_sym] = value
  end
end

Instance Method Details

#connect_infoObject

Return the information needed (hostname/IP, username, password & key if there are any) to create a Transport to this host, in a normalized form.



32
33
34
# File 'app/cyclid/plugins/builder.rb', line 32

def connect_info
  [self[:host], self[:username], self[:password], self[:key]]
end

#context_infoObject

Return free-form data about this host that may be useful to the build process and can be merged into the Job context. This may be a subset of the data for this BuildHost, or the full set.



46
47
48
# File 'app/cyclid/plugins/builder.rb', line 46

def context_info
  dup
end

#transportsObject

Return a list of acceptable Transports that can be used to connect to this host.



38
39
40
41
# File 'app/cyclid/plugins/builder.rb', line 38

def transports
  # XXX Maybe create some constants for "well known" Transports such as 'ssh'
  []
end