Code Review
/
bottlenecks.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Change PTL informatin in INFO
[bottlenecks.git]
/
utils
/
infra_setup
/
heat
/
template.py
diff --git
a/utils/infra_setup/heat/template.py
b/utils/infra_setup/heat/template.py
index
cc652fb
..
98a68f7
100755
(executable)
--- a/
utils/infra_setup/heat/template.py
+++ b/
utils/infra_setup/heat/template.py
@@
-7,7
+7,9
@@
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################
-"""Heat template and stack management"""
+"""Heat template and stack management,
+This file could manage stack include the function:
+create stack delete stack and so on"""
import time
import sys
import time
import sys
@@
-131,7
+133,11
@@
class HeatStack(HeatObject):
class HeatTemplate(HeatObject):
'''Describes a Heat template and a method to deploy template to a stack'''
class HeatTemplate(HeatObject):
'''Describes a Heat template and a method to deploy template to a stack'''
- def __init__(self, name, template_file=None, heat_parameters=None):
+ def __init__(self,
+ name,
+ template_file=None,
+ heat_parameters=None,
+ heat_template=None):
super(HeatTemplate, self).__init__()
self.name = name
self.state = "NOT_CREATED"
super(HeatTemplate, self).__init__()
self.name = name
self.state = "NOT_CREATED"
@@
-151,7
+157,10
@@
class HeatTemplate(HeatObject):
self._template = template_str
self._parameters = heat_parameters
else:
self._template = template_str
self._parameters = heat_parameters
else:
- sys.exit("\nno such template file.")
+ if heat_template:
+ self._template = heat_template
+ else:
+ sys.exit("can't init template file!")
# holds results of requested output after deployment
self.outputs = {}
# holds results of requested output after deployment
self.outputs = {}