Class: Fog::Compute::Ecloud::Rows
- Inherits:
-
Ecloud::Collection
- Object
- Fog::Collection
- Ecloud::Collection
- Fog::Compute::Ecloud::Rows
- Defined in:
- lib/fog/ecloud/models/compute/rows.rb
Instance Method Summary collapse
Methods inherited from Ecloud::Collection
Instance Method Details
#all ⇒ Object
11 12 13 14 |
# File 'lib/fog/ecloud/models/compute/rows.rb', line 11 def all data = service.get_layout(href).body[:Rows][:Row] load(data) end |
#create(options = {}) ⇒ Object
27 28 29 30 31 |
# File 'lib/fog/ecloud/models/compute/rows.rb', line 27 def create( = {}) [:uri] = "#{service.base_path}/layoutRows/environments/#{environment_id}/action/createLayoutRow" data = service.rows_create().body new(data) end |
#environment_id ⇒ Object
33 34 35 |
# File 'lib/fog/ecloud/models/compute/rows.rb', line 33 def environment_id href.scan(/\d+/)[0] end |
#get(uri) ⇒ Object
16 17 18 19 20 21 22 23 24 25 |
# File 'lib/fog/ecloud/models/compute/rows.rb', line 16 def get(uri) data = service.get_row(uri).body if data == "" nil else new(data) end rescue Excon::Errors::NotFound nil end |