Move resources into separate folder

Change-Id: I9e5617a6f3c8ff00c415599e1ed5092feed51d98
This commit is contained in:
Ilya Shakhat 2015-03-03 16:04:37 +03:00
parent ecbe78c989
commit f9e44d5202
6 changed files with 23 additions and 7 deletions

View File

@ -45,8 +45,8 @@
# Scenario file name (string value)
#scenario = <None>
# Report template file name (Jinja format) (string value)
#report_template = shaker/engine/report.template
# Report template in Jinja format (string value)
#report_template = shaker/resources/report_template.html
# Report file name. If not specified print to stdout (string value)
#report = <None>
@ -58,6 +58,13 @@
# Agent unique id (string value)
#agent_id = <None>
#
# From shaker.engine.config
#
# Heat template for the image builder. (string value)
#image_builder_template = shaker/resources/image_builder_template.yaml
#
# From shaker.openstack.common.log
#

View File

@ -26,8 +26,8 @@ packages =
console_scripts =
shaker = shaker.engine.server:main
shaker-agent = shaker.agent.agent:main
shaker-image-builder = shaker.engine.installer:build_image
shaker-cleanup = shaker.engine.installer:cleanup
shaker-image-builder = shaker.engine.image_builder:build_image
shaker-cleanup = shaker.engine.image_builder:cleanup
oslo.config.opts =
shaker.openstack.common.log = shaker.openstack.common.log:list_opts

View File

@ -64,8 +64,8 @@ SERVER_OPTS = [
help='Scenario file name'),
cfg.StrOpt('report-template',
default='shaker/engine/report.template',
help='Report template file name (Jinja format)'),
default='shaker/resources/report_template.html',
help='Report template in Jinja format'),
cfg.StrOpt('report',
help='Report file name. If not specified print to stdout'),
]
@ -76,9 +76,16 @@ AGENT_OPTS = [
help='Agent unique id'),
]
IMAGE_BUILDER_OPTS = [
cfg.StrOpt('image-builder-template',
default='shaker/resources/image_builder_template.yaml',
help='Heat template for the image builder.'),
]
def list_opts():
yield (None, copy.deepcopy(COMMON_OPTS))
yield (None, copy.deepcopy(OPENSTACK_OPTS))
yield (None, copy.deepcopy(SERVER_OPTS))
yield (None, copy.deepcopy(AGENT_OPTS))
yield (None, copy.deepcopy(IMAGE_BUILDER_OPTS))

View File

@ -34,7 +34,9 @@ def init():
# init conf and logging
conf = cfg.CONF
conf.register_cli_opts(config.OPENSTACK_OPTS)
conf.register_cli_opts(config.IMAGE_BUILDER_OPTS)
conf.register_opts(config.OPENSTACK_OPTS)
conf.register_opts(config.IMAGE_BUILDER_OPTS)
conf(project='shaker')
logging.setup('shaker')
@ -68,7 +70,7 @@ def build_image():
'stack_name': 'shaker_%s' % uuid.uuid4(),
'parameters': {'external_net': external_net,
'flavor': flavor_name},
'template': utils.read_file('shaker/engine/installer.yaml'),
'template': utils.read_file(cfg.CONF.image_builder_template),
}
stack = openstack_client.heat.stacks.create(**stack_params)['stack']