blob: ba73d6cab54dc82276f63d809168b2961933fd0c [file] [log] [blame]
Oleksii Butenko3b3bab12019-05-23 17:30:15 +03001#!/usr/bin/env python
2
3import os
4import sys
5
6sys.path.append(os.getcwd())
7try:
8 from tcp_tests.fixtures import config_fixtures
9 from tcp_tests.managers import underlay_ssh_manager
10 from tcp_tests.managers import saltmanager as salt_manager
11except 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
18def main():
19 tests_configs = os.environ.get('TESTS_CONFIGS', None)
20 if not tests_configs or not os.path.isfile(tests_configs):
21 print("Please set TESTS_CONFIGS environment variable whith"
22 "the path to INI file with lab metadata.")
23 return 1
24 config = config_fixtures.config()
25 underlay = underlay_ssh_manager.UnderlaySSHManager(config)
26 saltmanager = salt_manager.SaltManager(config, underlay)
27 saltmanager.create_env_jenkins_cicd()
28 saltmanager.create_env_k8s()
29
30
31if __name__ == '__main__':
32 sys.exit(main())