Class: Fog::OpenStack::Orchestration::Stacks
- Inherits:
-
Collection
- Object
- Collection
- Collection
- Fog::OpenStack::Orchestration::Stacks
- Defined in:
- lib/fog/openstack/orchestration/models/stacks.rb
Instance Attribute Summary
Attributes inherited from Collection
Instance Method Summary collapse
- #adopt(options = {}) ⇒ Object
- #all(options = {}) ⇒ Object
- #build_info ⇒ Object
- #create(options = {}) ⇒ Object
- #find_by_id(id) ⇒ Object
- #get(arg1, arg2 = nil) ⇒ Object
- #preview(options = {}) ⇒ Object
- #summary(options = {}) ⇒ Object
Methods inherited from Collection
Instance Method Details
#adopt(options = {}) ⇒ Object
46 47 48 |
# File 'lib/fog/openstack/orchestration/models/stacks.rb', line 46 def adopt( = {}) service.create_stack() end |
#all(options = {}) ⇒ Object
10 11 12 13 14 15 16 |
# File 'lib/fog/openstack/orchestration/models/stacks.rb', line 10 def all( = {}) # TODO(lsmola) we can uncomment this when https://bugs.launchpad.net/heat/+bug/1468318 is fixed, till then # we will use non detailed list # data = service.list_stack_data_detailed(options).body['stacks'] data = service.list_stack_data() load_response(data, 'stacks') end |
#build_info ⇒ Object
59 60 61 |
# File 'lib/fog/openstack/orchestration/models/stacks.rb', line 59 def build_info service.build_info.body end |
#create(options = {}) ⇒ Object
50 51 52 |
# File 'lib/fog/openstack/orchestration/models/stacks.rb', line 50 def create( = {}) service.create_stack().body['stack'] end |
#find_by_id(id) ⇒ Object
23 24 25 26 27 28 |
# File 'lib/fog/openstack/orchestration/models/stacks.rb', line 23 def find_by_id(id) data = service.show_stack(id).body['stack'] new(data) rescue Fog::OpenStack::Orchestration::NotFound nil end |
#get(arg1, arg2 = nil) ⇒ Object
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 |
# File 'lib/fog/openstack/orchestration/models/stacks.rb', line 30 def get(arg1, arg2 = nil) if arg2.nil? # Deprecated: get(id) Fog::Logger.deprecation("#get(id) is deprecated, use #get(name, id) instead [light_black](#{caller.first})[/]") return find_by_id(arg1) end # Normal use: get(name, id) name = arg1 id = arg2 data = service.show_stack_details(name, id).body['stack'] new(data) rescue Fog::OpenStack::Compute::NotFound nil end |
#preview(options = {}) ⇒ Object
54 55 56 57 |
# File 'lib/fog/openstack/orchestration/models/stacks.rb', line 54 def preview( = {}) data = service.preview_stack().body['stack'] new(data) end |
#summary(options = {}) ⇒ Object
18 19 20 21 |
# File 'lib/fog/openstack/orchestration/models/stacks.rb', line 18 def summary( = {}) data = service.list_stack_data() load_response(data, 'stacks') end |