Class: Fog::Compute::GoGrid::Password
- Inherits:
-
Model
- Object
- Model
- Fog::Compute::GoGrid::Password
show all
- Defined in:
- lib/fog/go_grid/models/compute/password.rb
Instance Attribute Summary
Attributes inherited from Model
#collection, #connection
Instance Method Summary
collapse
Methods inherited from Model
#inspect, #reload, #to_json, #wait_for
#_load, #aliases, #attribute, #attributes, #identity, #ignore_attributes, #ignored_attributes
#_dump, #attributes, #dup, #identity, #identity=, #merge_attributes, #new_record?, #requires, #requires_one
Constructor Details
#initialize(attributes = {}) ⇒ Password
18
19
20
|
# File 'lib/fog/go_grid/models/compute/password.rb', line 18
def initialize(attributes={})
super
end
|
Instance Method Details
#destroy ⇒ Object
22
23
24
25
26
|
# File 'lib/fog/go_grid/models/compute/password.rb', line 22
def destroy
requires :id
connection.grid_server_destroy(id)
true
end
|
#image ⇒ Object
28
29
30
31
|
# File 'lib/fog/go_grid/models/compute/password.rb', line 28
def image
requires :image_id
connection.grid_image_get(image_id)
end
|
#ready? ⇒ Boolean
33
34
35
|
# File 'lib/fog/go_grid/models/compute/password.rb', line 33
def ready?
@state == 'On'
end
|
#save ⇒ Object
37
38
39
40
41
42
43
|
# File 'lib/fog/go_grid/models/compute/password.rb', line 37
def save
raise Fog::Errors::Error.new('Resaving an existing object may create a duplicate') if identity
requires :password_id
data = connection.support_password_list()
merge_attributes(data.body)
true
end
|