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