class Nchosts::Collector
Constants
- ENDPOINTS
Attributes
clients[RW]
Public Class Methods
new(account)
click to toggle source
# File lib/nchosts/collector.rb, line 9 def initialize(account) @clients = [] ENDPOINTS.each do |endpoint| @clients << AceClient::Niftycloud::Computing.build_client( endpoint: endpoint, path: '/api/', access_key_id: account['access_key_id'], secret_access_key: account['secret_access_key'] ) end end
Public Instance Methods
collect() { |region, instance| ... }
click to toggle source
# File lib/nchosts/collector.rb, line 21 def collect @clients.each do |client| client.regions.each do |region| client.endpoint = region['regionEndpoint'] client.instances.each do |instance| yield region, instance end end end end