Class: Eipmap::Client
- Inherits:
-
Object
- Object
- Eipmap::Client
- Includes:
- Logger::Helper
- Defined in:
- lib/eipmap/client.rb
Instance Method Summary collapse
- #apply(file) ⇒ Object
- #export ⇒ Object
-
#initialize(options = {}) ⇒ Client
constructor
A new instance of Client.
Methods included from Logger::Helper
Constructor Details
Instance Method Details
#apply(file) ⇒ Object
22 23 24 |
# File 'lib/eipmap/client.rb', line 22 def apply(file) walk(file) end |
#export ⇒ Object
11 12 13 14 15 16 17 18 19 20 |
# File 'lib/eipmap/client.rb', line 11 def export exported = Eipmap::Exporter.export(@ec2, @options) instance_ids = exported.map {|domain, ips| ips.map {|ip, attrs| attrs[:instance_id] } }.flatten.select {|i| i } instance_names = @driver.describe_instance_names(instance_ids) Eipmap::DSL.convert(exported, @options.merge(:instance_names => instance_names)) end |