Sha256: 7455beab9f9d5ae7ce7ff95ff3750a7ac28c755995e480c7b6e47c4757286ac6

Contents?: true

Size: 608 Bytes

Versions: 3

Compression:

Stored size: 608 Bytes

Contents

module Opsicle
  class CloneableLayer
    attr_accessor :name, :layer_id, :instances, :opsworks, :cli, :agent_version, :ami_id

    def initialize(name, layer_id, opsworks, cli)
      self.name = name
      self.layer_id = layer_id
      self.opsworks = opsworks
      self.cli = cli
      self.instances = []
    end

    def get_cloneable_instances
      ops_instances = @opsworks.describe_instances({ :layer_id => layer_id }).instances
      ops_instances.each do |instance|
        self.instances << CloneableInstance.new(instance, self, @opsworks, @cli)
      end
      self.instances
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
opsicle-2.4.0 lib/opsicle/cloneable_layer.rb
opsicle-2.3.1 lib/opsicle/cloneable_layer.rb
opsicle-2.3.0 lib/opsicle/cloneable_layer.rb