Class: Fog::Compute::GoGrid::Passwords
- Inherits:
-
Fog::Collection
- Object
- Array
- Fog::Collection
- Fog::Compute::GoGrid::Passwords
- Defined in:
- lib/fog/compute/models/go_grid/passwords.rb
Instance Attribute Summary
Attributes inherited from Fog::Collection
Instance Method Summary collapse
Methods inherited from Fog::Collection
#clear, #create, #initialize, #inspect, #load, model, #model, #new, #reload, #table, #to_json
Methods included from Attributes::ClassMethods
#_load, #aliases, #attribute, #attributes, #identity, #ignore_attributes, #ignored_attributes
Methods included from Attributes::InstanceMethods
#_dump, #attributes, #dup, #identity, #identity=, #merge_attributes, #new_record?, #requires, #requires_one
Constructor Details
This class inherits a constructor from Fog::Collection
Instance Method Details
#all ⇒ Object
12 13 14 15 |
# File 'lib/fog/compute/models/go_grid/passwords.rb', line 12 def all data = connection.support_password_list.body['list'] load(data) end |
#bootstrap(new_attributes = {}) ⇒ Object
17 18 19 20 21 |
# File 'lib/fog/compute/models/go_grid/passwords.rb', line 17 def bootstrap(new_attributes = {}) password = create(new_attributes) password.wait_for { ready? } password end |
#get(id) ⇒ Object
23 24 25 26 27 28 29 30 |
# File 'lib/fog/compute/models/go_grid/passwords.rb', line 23 def get(id) #if server_id && server = connection.grid_server_get(server_id).body['list'] if id && server = connection.support_password_get(id).body['list'] new(server) end rescue Fog::Compute::GoGrid::NotFound nil end |