Class: Fog::Orchestration::OpenStack::Stack
Instance Attribute Summary
#project
Instance Method Summary
collapse
#initialize
Instance Method Details
#abandon ⇒ Object
67
68
69
|
# File 'lib/fog/orchestration/openstack/models/stack.rb', line 67
def abandon
service.abandon_stack(self)
end
|
#cancel_update ⇒ Object
71
72
73
|
# File 'lib/fog/orchestration/openstack/models/stack.rb', line 71
def cancel_update
service.cancel_update(self)
end
|
#create ⇒ Object
28
29
30
31
32
|
# File 'lib/fog/orchestration/openstack/models/stack.rb', line 28
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
|
#delete ⇒ Object
Also known as:
destroy
46
47
48
|
# File 'lib/fog/orchestration/openstack/models/stack.rb', line 46
def delete
service.delete_stack(self)
end
|
#details ⇒ Object
51
52
53
|
# File 'lib/fog/orchestration/openstack/models/stack.rb', line 51
def details
@details ||= service.stacks.get(stack_name, id)
end
|
#events(options = {}) ⇒ Object
59
60
61
|
# File 'lib/fog/orchestration/openstack/models/stack.rb', line 59
def events(options = {})
@events ||= service.events.all(self, options)
end
|
#patch(options = {}) ⇒ Object
41
42
43
44
|
# File 'lib/fog/orchestration/openstack/models/stack.rb', line 41
def patch(options = {})
requires :stack_name
service.patch_stack(self, options).body['stack']
end
|
#resources(options = {}) ⇒ Object
55
56
57
|
# File 'lib/fog/orchestration/openstack/models/stack.rb', line 55
def resources(options = {})
@resources ||= service.resources.all({:stack => self}.merge(options))
end
|
#save(options = {}) ⇒ Object
15
16
17
18
19
20
21
22
23
24
25
|
# File 'lib/fog/orchestration/openstack/models/stack.rb', line 15
def save(options = {})
if persisted?
stack_default_options = default_options
if (options.key?(:template_url))
stack_default_options.delete(:template)
end
service.update_stack(self, stack_default_options.merge(options)).body['stack']
else
service.stacks.create(default_options.merge(options))
end
end
|
#template ⇒ Object
63
64
65
|
# File 'lib/fog/orchestration/openstack/models/stack.rb', line 63
def template
@template ||= service.templates.get(self)
end
|
#template=(content) ⇒ Object
88
89
90
91
|
# File 'lib/fog/orchestration/openstack/models/stack.rb', line 88
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
76
77
78
79
|
# File 'lib/fog/orchestration/openstack/models/stack.rb', line 76
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
82
83
84
85
|
# File 'lib/fog/orchestration/openstack/models/stack.rb', line 82
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
94
95
96
97
|
# File 'lib/fog/orchestration/openstack/models/stack.rb', line 94
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
100
101
102
103
|
# File 'lib/fog/orchestration/openstack/models/stack.rb', line 100
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
35
36
37
38
39
|
# File 'lib/fog/orchestration/openstack/models/stack.rb', line 35
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
|