Class: Fog::Compute::Ecloud::Row
Instance Attribute Summary
#loaded
Attributes inherited from Model
#collection, #connection
Instance Method Summary
collapse
#load_unless_loaded!, #reload
Methods inherited from Model
#initialize, #inspect, #reload, #symbolize_keys, #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
This class inherits a constructor from Fog::Model
Instance Method Details
#create_group(options = {}) ⇒ Object
35
36
37
38
39
40
41
|
# File 'lib/rackspace-fog/ecloud/models/compute/row.rb', line 35
def create_group(options = {})
options[:uri] = "/cloudapi/ecloud/layoutGroups/environments/#{environment_id}/action/createLayoutGroup"
options[:row_name] = name
options[:href] = href
data = connection.groups_create(options).body
group = Fog::Compute::Ecloud::Groups.new(:connection => connection, :href => data[:href])[0]
end
|
#delete ⇒ Object
31
32
33
|
# File 'lib/rackspace-fog/ecloud/models/compute/row.rb', line 31
def delete
connection.rows_delete(href).body
end
|
#edit(options) ⇒ Object
16
17
18
19
|
# File 'lib/rackspace-fog/ecloud/models/compute/row.rb', line 16
def edit(options)
options[:uri] = href
connection.rows_edit(options).body
end
|
#environment_id ⇒ Object
43
44
45
|
# File 'lib/rackspace-fog/ecloud/models/compute/row.rb', line 43
def environment_id
other_links[:Link][:href].scan(/\d+/)[0]
end
|
#groups ⇒ Object
12
13
14
|
# File 'lib/rackspace-fog/ecloud/models/compute/row.rb', line 12
def groups
@groups = Fog::Compute::Ecloud::Groups.new(:connection => connection, :href => href)
end
|
#id ⇒ Object
47
48
49
|
# File 'lib/rackspace-fog/ecloud/models/compute/row.rb', line 47
def id
href.scan(/\d+/)[0]
end
|
#move_down(options) ⇒ Object
26
27
28
29
|
# File 'lib/rackspace-fog/ecloud/models/compute/row.rb', line 26
def move_down(options)
options[:uri] = href + "/action/movedown"
connection.rows_movedown(options).body
end
|
#move_up(options) ⇒ Object
21
22
23
24
|
# File 'lib/rackspace-fog/ecloud/models/compute/row.rb', line 21
def move_up(options)
options[:uri] = href + "/action/moveup"
connection.rows_moveup(options).body
end
|