Class: Fog::Orchestration::OpenStack::Stack
- Inherits:
-
Model
- Object
- Model
- Fog::Orchestration::OpenStack::Stack
- Defined in:
- lib/fog/openstack/models/orchestration/stack.rb
Instance Method Summary collapse
- #abandon ⇒ Object
-
#create ⇒ Object
Deprecated.
- #delete ⇒ Object (also: #destroy)
- #details ⇒ Object
- #events(options = {}) ⇒ Object
-
#initialize(attributes) ⇒ Stack
constructor
A new instance of Stack.
- #resources(options = {}) ⇒ Object
- #save(options = {}) ⇒ Object
- #template ⇒ Object
-
#template=(content) ⇒ Object
Deprecated.
-
#template_url ⇒ Object
Deprecated.
-
#template_url=(url) ⇒ Object
Deprecated.
-
#timeout_in_minutes ⇒ Object
Deprecated.
-
#timeout_in_minutes=(minutes) ⇒ Object
Deprecated.
-
#update ⇒ Object
Deprecated.
Constructor Details
#initialize(attributes) ⇒ Stack
Returns a new instance of Stack.
14 15 16 17 18 |
# File 'lib/fog/openstack/models/orchestration/stack.rb', line 14 def initialize(attributes) # Old 'connection' is renamed as service and should be used instead prepare_service_value(attributes) super end |
Instance Method Details
#abandon ⇒ Object
63 64 65 |
# File 'lib/fog/openstack/models/orchestration/stack.rb', line 63 def abandon service.abandon_stack(self) end |
#create ⇒ Object
Deprecated
29 30 31 32 33 |
# File 'lib/fog/openstack/models/orchestration/stack.rb', line 29 def create Fog::Logger.deprecation("#create is deprecated, use #save(options) instead [light_black](#{caller.first})[/]") requires :stack_name service.stacks.create() end |
#delete ⇒ Object Also known as: destroy
42 43 44 |
# File 'lib/fog/openstack/models/orchestration/stack.rb', line 42 def delete service.delete_stack(self) end |
#details ⇒ Object
47 48 49 |
# File 'lib/fog/openstack/models/orchestration/stack.rb', line 47 def details @details ||= service.stacks.get(self.stack_name, self.id) end |
#events(options = {}) ⇒ Object
55 56 57 |
# File 'lib/fog/openstack/models/orchestration/stack.rb', line 55 def events(={}) @events ||= service.events.all(self, ) end |
#resources(options = {}) ⇒ Object
51 52 53 |
# File 'lib/fog/openstack/models/orchestration/stack.rb', line 51 def resources(={}) @resources ||= service.resources.all(self, ) end |
#save(options = {}) ⇒ Object
20 21 22 23 24 25 26 |
# File 'lib/fog/openstack/models/orchestration/stack.rb', line 20 def save(={}) if persisted? service.update_stack(self, .merge()).body['stack'] else service.stacks.create(.merge()) end end |
#template ⇒ Object
59 60 61 |
# File 'lib/fog/openstack/models/orchestration/stack.rb', line 59 def template @template ||= service.templates.get(self) end |
#template=(content) ⇒ Object
Deprecated
81 82 83 84 |
# File 'lib/fog/openstack/models/orchestration/stack.rb', line 81 def template=(content) Fog::Logger.deprecation("#template=(content) is deprecated, use it in options for #save(options) instead [light_black](#{caller.first})[/]") @template = content end |
#template_url ⇒ Object
Deprecated
69 70 71 72 |
# File 'lib/fog/openstack/models/orchestration/stack.rb', line 69 def template_url Fog::Logger.deprecation("#template_url is deprecated, use it in options for #save(options) instead [light_black](#{caller.first})[/]") @template_url end |
#template_url=(url) ⇒ Object
Deprecated
75 76 77 78 |
# File 'lib/fog/openstack/models/orchestration/stack.rb', line 75 def template_url=(url) Fog::Logger.deprecation("#template_url= is deprecated, use it in options for #save(options) instead [light_black](#{caller.first})[/]") @template_url = url end |
#timeout_in_minutes ⇒ Object
Deprecated
87 88 89 90 |
# File 'lib/fog/openstack/models/orchestration/stack.rb', line 87 def timeout_in_minutes Fog::Logger.deprecation("#timeout_in_minutes is deprecated, set timeout_mins in options for save(options) instead [light_black](#{caller.first})[/]") timeout_mins end |
#timeout_in_minutes=(minutes) ⇒ Object
Deprecated
93 94 95 96 |
# File 'lib/fog/openstack/models/orchestration/stack.rb', line 93 def timeout_in_minutes=(minutes) Fog::Logger.deprecation("#timeout_in_minutes=(minutes) is deprecated, set timeout_mins in options for save(options) instead [light_black](#{caller.first})[/]") timeout_mins = minutes end |
#update ⇒ Object
Deprecated
36 37 38 39 40 |
# File 'lib/fog/openstack/models/orchestration/stack.rb', line 36 def update Fog::Logger.deprecation("#update is deprecated, use #save(options) instead [light_black](#{caller.first})[/]") requires :stack_name service.update_stack(self, ).body['stack'] end |