Class: Fog::Orchestration::OpenStack::Stacks
- Inherits:
-
Collection
- Object
- Collection
- Fog::Orchestration::OpenStack::Stacks
- Defined in:
- lib/fog/openstack/models/orchestration/stacks.rb
Instance Method Summary collapse
- #adopt(options = {}) ⇒ Object
- #all(options = {}) ⇒ Object
- #build_info ⇒ Object
- #create(options = {}) ⇒ Object
-
#find_by_id(id) ⇒ Object
Deprecated.
- #get(arg1, arg2 = nil) ⇒ Object
- #preview(options = {}) ⇒ Object
Instance Method Details
#adopt(options = {}) ⇒ Object
36 37 38 |
# File 'lib/fog/openstack/models/orchestration/stacks.rb', line 36 def adopt(={}) service.create_stack() end |
#all(options = {}) ⇒ Object
9 10 11 12 |
# File 'lib/fog/openstack/models/orchestration/stacks.rb', line 9 def all(={}) data = service.list_stack_data().body['stacks'] load(data) end |
#build_info ⇒ Object
49 50 51 |
# File 'lib/fog/openstack/models/orchestration/stacks.rb', line 49 def build_info service.build_info.body end |
#create(options = {}) ⇒ Object
40 41 42 |
# File 'lib/fog/openstack/models/orchestration/stacks.rb', line 40 def create(={}) service.create_stack().body['stack'] end |
#find_by_id(id) ⇒ Object
Deprecated
15 16 17 18 |
# File 'lib/fog/openstack/models/orchestration/stacks.rb', line 15 def find_by_id(id) Fog::Logger.deprecation("#find_by_id(id) is deprecated, use #get(name, id) instead [light_black](#{caller.first})[/]") self.find {|stack| stack.id == id} end |
#get(arg1, arg2 = nil) ⇒ Object
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/fog/openstack/models/orchestration/stacks.rb', line 20 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::Compute::OpenStack::NotFound nil end |
#preview(options = {}) ⇒ Object
44 45 46 47 |
# File 'lib/fog/openstack/models/orchestration/stacks.rb', line 44 def preview(={}) data = service.preview_stack().body['stack'] new(data) end |