Class: Fog::Orchestration::OpenStack::Stack

Inherits:
Fog::OpenStack::Model show all
Defined in:
lib/fog/orchestration/openstack/models/stack.rb

Instance Attribute Summary

Attributes inherited from Fog::OpenStack::Model

#project

Instance Method Summary collapse

Methods inherited from Fog::OpenStack::Model

#initialize

Constructor Details

This class inherits a constructor from Fog::OpenStack::Model

Instance Method Details

#abandonObject



63
64
65
# File 'lib/fog/orchestration/openstack/models/stack.rb', line 63

def abandon
  service.abandon_stack(self)
end

#cancel_updateObject



67
68
69
# File 'lib/fog/orchestration/openstack/models/stack.rb', line 67

def cancel_update
  service.cancel_update(self)
end

#createObject

Deprecated



24
25
26
27
28
# File 'lib/fog/orchestration/openstack/models/stack.rb', line 24

def create
  Fog::Logger.deprecation("#create is deprecated, use #save(options) instead [light_black](#{caller.first})[/]")
  requires :stack_name
  service.stacks.create(default_options)
end

#deleteObject Also known as: destroy



42
43
44
# File 'lib/fog/orchestration/openstack/models/stack.rb', line 42

def delete
  service.delete_stack(self)
end

#detailsObject



47
48
49
# File 'lib/fog/orchestration/openstack/models/stack.rb', line 47

def details
  @details ||= service.stacks.get(stack_name, id)
end

#events(options = {}) ⇒ Object



55
56
57
# File 'lib/fog/orchestration/openstack/models/stack.rb', line 55

def events(options = {})
  @events ||= service.events.all(self, options)
end

#patch(options = {}) ⇒ Object



37
38
39
40
# File 'lib/fog/orchestration/openstack/models/stack.rb', line 37

def patch(options = {})
  requires :stack_name
  service.patch_stack(self, options).body['stack']
end

#resources(options = {}) ⇒ Object



51
52
53
# File 'lib/fog/orchestration/openstack/models/stack.rb', line 51

def resources(options = {})
  @resources ||= service.resources.all({:stack => self}.merge(options))
end

#save(options = {}) ⇒ Object



15
16
17
18
19
20
21
# File 'lib/fog/orchestration/openstack/models/stack.rb', line 15

def save(options = {})
  if persisted?
    service.update_stack(self, default_options.merge(options)).body['stack']
  else
    service.stacks.create(default_options.merge(options))
  end
end

#templateObject



59
60
61
# File 'lib/fog/orchestration/openstack/models/stack.rb', line 59

def template
  @template ||= service.templates.get(self)
end

#template=(content) ⇒ Object

Deprecated



84
85
86
87
# File 'lib/fog/orchestration/openstack/models/stack.rb', line 84

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_urlObject

Deprecated



72
73
74
75
# File 'lib/fog/orchestration/openstack/models/stack.rb', line 72

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



78
79
80
81
# File 'lib/fog/orchestration/openstack/models/stack.rb', line 78

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_minutesObject

Deprecated



90
91
92
93
# File 'lib/fog/orchestration/openstack/models/stack.rb', line 90

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



96
97
98
99
# File 'lib/fog/orchestration/openstack/models/stack.rb', line 96

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

#updateObject

Deprecated



31
32
33
34
35
# File 'lib/fog/orchestration/openstack/models/stack.rb', line 31

def update
  Fog::Logger.deprecation("#update is deprecated, use #save(options) instead [light_black](#{caller.first})[/]")
  requires :stack_name
  service.update_stack(self, default_options).body['stack']
end