class Omc::Stack

Attributes

account[R]
attributes[R]

Public Class Methods

new(account, attributes) click to toggle source
# File lib/omc/stack.rb, line 14
def initialize account, attributes
  @account = account
  @attributes = attributes
end

Public Instance Methods

apps() click to toggle source
# File lib/omc/stack.rb, line 23
def apps
  @apps ||= describe(:apps).map{ |app| App.new(self, app) }
end
execute_recipes(app, recipes: [], name: "execute_recipes") click to toggle source
# File lib/omc/stack.rb, line 31
def execute_recipes(app, recipes: [], name: "execute_recipes")
  client.create_deployment(
    stack_id: self[:stack_id],
    app_id: app[:app_id],
    command: {
      name: name,
      args: {
        "recipes" => recipes
      }
    }
  )
end
instances() click to toggle source
# File lib/omc/stack.rb, line 19
def instances
  @instances ||= describe(:instances).map{ |instance| Instance.new(self, instance) }
end
layers() click to toggle source
# File lib/omc/stack.rb, line 27
def layers
  @layers ||= describe(:layers).map{ |layer| Layer.new(self, layer) }
end

Private Instance Methods

describe(object) click to toggle source
# File lib/omc/stack.rb, line 46
def describe(object)
  client.public_send("describe_#{object}", stack_id: self[:stack_id])[object]
end