Class: PalletOps::Compute

Inherits:
Object
  • Object
show all
Defined in:
lib/pallet-ops/compute.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(service) ⇒ Compute

Returns a new instance of Compute.



8
9
10
# File 'lib/pallet-ops/compute.rb', line 8

def initialize(service)
  self.service = service
end

Instance Attribute Details

#serviceObject

Returns the value of attribute service.



6
7
8
# File 'lib/pallet-ops/compute.rb', line 6

def service
  @service
end

Class Method Details

.load_configObject



16
17
18
19
20
21
22
23
24
# File 'lib/pallet-ops/compute.rb', line 16

def self.load_config
  config = File.join(Java::java::lang::System.getProperty("user.home"),
                     ".pallet","config.yml")
  begin
    YAML.load_file(config)
  rescue
    nil
  end
end

Instance Method Details

#nodesObject



12
13
14
# File 'lib/pallet-ops/compute.rb', line 12

def nodes
  PalletOps::Clojure::COMPUTE_NODES.invoke(self.service)
end