Dennis Dmitriev | 3ec2e53 | 2018-06-08 04:33:34 +0300 | [diff] [blame] | 1 | #!/usr/bin/env python |
| 2 | |
| 3 | import os |
| 4 | import sys |
| 5 | |
| 6 | sys.path.append(os.getcwd()) |
| 7 | try: |
| 8 | from tcp_tests.helpers import ext |
| 9 | from tcp_tests.fixtures import config_fixtures |
| 10 | from tcp_tests.managers import envmanager_devops |
| 11 | except ImportError: |
| 12 | print("ImportError: Run the application from the tcp-qa directory or " |
| 13 | "set the PYTHONPATH environment variable to directory which contains" |
| 14 | " ./tcp_tests") |
| 15 | sys.exit(1) |
| 16 | |
| 17 | |
| 18 | def main(): |
| 19 | """Create fuel-devops environment from template""" |
| 20 | config = config_fixtures.config() |
| 21 | env = envmanager_devops.EnvironmentManager(config=config) |
| 22 | if not env.has_snapshot(ext.SNAPSHOT.hardware): |
| 23 | env.create_snapshot(ext.SNAPSHOT.hardware) |
| 24 | |
| 25 | |
| 26 | if __name__ == '__main__': |
| 27 | sys.exit(main()) |