Revision ec8bc030 ci/utils.py
b/ci/utils.py | ||
---|---|---|
429 | 429 |
_run(cmd, False) |
430 | 430 |
|
431 | 431 |
@_check_fabric |
432 |
def deploy_synnefo(self): |
|
432 |
def deploy_synnefo(self, schema=None):
|
|
433 | 433 |
"""Deploy Synnefo using snf-deploy""" |
434 | 434 |
self.logger.info("Deploy Synnefo..") |
435 |
schema = self.config.get('Global', 'schema')
|
|
436 |
schema_files = os.path.join(self.ci_dir, "schemas/%s/*" % schema)
|
|
435 |
if schema is None:
|
|
436 |
schema = self.config.get('Global', 'schema')
|
|
437 | 437 |
self.logger.debug("Will use %s schema" % schema) |
438 | 438 |
|
439 |
schema_dir = os.path.join(self.ci_dir, "schemas/%s" % schema) |
|
440 |
if not (os.path.exists(schema_dir) and os.path.isdir(schema_dir)): |
|
441 |
raise ValueError("Unknown schema: %s" % schema) |
|
442 |
|
|
439 | 443 |
self.logger.debug("Upload schema files to server") |
440 | 444 |
with fabric.quiet(): |
441 |
fabric.put(schema_files, "/etc/snf-deploy/")
|
|
445 |
fabric.put(os.path.join(schema_dir, "*"), "/etc/snf-deploy/")
|
|
442 | 446 |
|
443 | 447 |
self.logger.debug("Change password in nodes.conf file") |
444 | 448 |
cmd = """ |
Also available in: Unified diff