Class: Ironfan::Provider::Ec2::PlacementGroup

Inherits:
Resource show all
Defined in:
lib/ironfan/provider/ec2/placement_group.rb,
lib/ironfan/headers.rb

Overview

Fog::AWS doesn't seem to have native models for PlacementGroup,

using Hash semantics instead

Instance Attribute Summary

Attributes inherited from Resource

#owner, #users

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Resource

aggregate!, #bogus?, create!, destroy!, forget, forget!, handle, known, multiple?, #on_correlate, patiently, prepare!, recall, recall?, receive, register, remember, save!, shared?, validate_computer!, validate_resources!

Methods inherited from Builder

ui, #ui

Class Method Details

.load!(cluster = nil) ⇒ Object


18
19
20
21
22
23
# File 'lib/ironfan/provider/ec2/placement_group.rb', line 18

def self.load!(cluster=nil)
  result = Ec2.connection.describe_placement_groups
  result.body["placementGroupSet"].each do |group|
    register group unless group.blank?
  end
end

Instance Method Details

#nameObject


10
11
12
# File 'lib/ironfan/provider/ec2/placement_group.rb', line 10

def name()
  self["groupName"]
end

#to_sObject


14
15
16
# File 'lib/ironfan/provider/ec2/placement_group.rb', line 14

def to_s
  "<%-15s %-12s %-12s>" % [ self.class.handle, '', name ]
end