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
- #create ⇒ Object
- #destroy ⇒ Object
-
#initialize(attributes) ⇒ Stack
constructor
A new instance of Stack.
- #save ⇒ Object
- #update ⇒ Object
Constructor Details
#initialize(attributes) ⇒ Stack
Returns a new instance of Stack.
21 22 23 24 25 |
# File 'lib/fog/openstack/models/orchestration/stack.rb', line 21 def initialize(attributes) # Old 'connection' is renamed as service and should be used instead prepare_service_value(attributes) super end |
Instance Method Details
#create ⇒ Object
32 33 34 35 36 |
# File 'lib/fog/openstack/models/orchestration/stack.rb', line 32 def create requires :stack_name service.create_stack(stack_name, self.attributes) self end |
#destroy ⇒ Object
44 45 46 47 48 |
# File 'lib/fog/openstack/models/orchestration/stack.rb', line 44 def destroy requires :id service.delete_stack(self.stack_name, self.id) true end |
#save ⇒ Object
27 28 29 30 |
# File 'lib/fog/openstack/models/orchestration/stack.rb', line 27 def save requires :stack_name identity ? update : create end |
#update ⇒ Object
38 39 40 41 42 |
# File 'lib/fog/openstack/models/orchestration/stack.rb', line 38 def update requires :stack_name service.update_stack(stack_name, self.attributes) self end |