Class: Fog::Compute::GoGrid::Passwords

Inherits:
Fog::Collection
  • Object
show all
Defined in:
lib/fog/go_grid/models/compute/passwords.rb

Instance Method Summary collapse

Instance Method Details

#allObject



10
11
12
13
# File 'lib/fog/go_grid/models/compute/passwords.rb', line 10

def all
  data = service.support_password_list.body['list']
  load(data)
end

#bootstrap(new_attributes = {}) ⇒ Object



15
16
17
18
19
# File 'lib/fog/go_grid/models/compute/passwords.rb', line 15

def bootstrap(new_attributes = {})
  password = create(new_attributes)
  password.wait_for { ready? }
  password
end

#get(id) ⇒ Object



21
22
23
24
25
26
27
28
# File 'lib/fog/go_grid/models/compute/passwords.rb', line 21

def get(id)
  #if server_id && server = service.grid_server_get(server_id).body['list']
  if id && server = service.support_password_get(id).body['list']
    new(server)
  end
rescue Fog::Compute::GoGrid::NotFound
  nil
end