class Fog::Compute::OpenStack::Servers
Public Class Methods
new(attributes)
click to toggle source
Calls superclass method
Fog::Collection::new
# File lib/fog/openstack/models/compute/servers.rb, line 14 def initialize(attributes) self.filters ||= {} super end
Public Instance Methods
all(filters = filters)
click to toggle source
# File lib/fog/openstack/models/compute/servers.rb, line 19 def all(filters = filters) self.filters = filters data = service.list_servers_detail(filters).body['servers'] load(data) end
bootstrap(new_attributes = {})
click to toggle source
# File lib/fog/openstack/models/compute/servers.rb, line 25 def bootstrap(new_attributes = {}) server = create(new_attributes) server.wait_for { ready? } server.setup(:password => server.password) server end
get(server_id)
click to toggle source
# File lib/fog/openstack/models/compute/servers.rb, line 32 def get(server_id) if server = service.get_server_details(server_id).body['server'] new(server) end rescue Fog::Compute::OpenStack::NotFound nil end