This module has been deprecated. Although the code is still working for our oldest model, it is not expected to work with the new Bastion API. Please use the new genvid-sdk tool.

class genvid.toolbox.ProjectTool(**kwargs)

Bases: genvid.toolbox.consul_template.ConsulTemplateTool

Tool for managing project files.

LOGS = {'command': {'loglevel': True, 'task': 'command', 'stdout': False, 'job': 'services'}, 'disco': {'loglevel': True, 'task': 'disco', 'stdout': False, 'job': 'services'}, 'compose': {'loglevel': True, 'task': 'compose', 'stdout': False, 'job': 'services'}, 'root': {'loglevel': True, 'task': 'root', 'stdout': False, 'job': 'services'}, 'gvencode': {'loglevel': True, 'task': 'gvencode', 'stdout': False, 'job': 'services'}, 'nats': {'loglevel': False, 'task': 'nats', 'stdout': False, 'job': 'services'}, 'events': {'loglevel': True, 'task': 'events', 'stdout': False, 'job': 'services'}, 'leaf': {'loglevel': True, 'task': 'leaf', 'stdout': False, 'job': 'services'}}

The default list of logs.


Return a project file.

The argument can be either a directory or a project file. If it is a directory, the following files will be searched in this order inside the directory: genvid.hcl, genvid.json.

load_project(dir_or_file, **kwargs)

Load a project file.

The function calls get_project_file() to fill in the first parameter for the project file.

Then it sets PROJECTDIR to the folder containing the project file.

Finally, it calls consul_template() to evaluate the file as a Consul template using any kwargs passed as argument.


The Consul server doesn’t need to run if your file doesn’t require anything from Consul. The result is parsed as either a JSON file if the extension is .json or an HCL file, otherwise.

update_project(project, _islocal=None)

This method tries to update a project to the newer Genvid version.

The update runs after the template engines are run, so could lose some information.

class project.ProjectTool

Implementation of genvid.toolbox.ProjectTool