keyPath = "{keyPath}" pool_name = "tank" ha = {ha} scale = {scale} update = {update} dev_test = {dev_test} """ cfg_file = open("auto_config.py", 'w') cfg_file.writelines(cfg_content) cfg_file.close() from functions import setup_ssh_agent, create_key, add_ssh_key, get_file from functions import SSH_TEST # Setup ssh agent before starting test. setup_ssh_agent() if os.path.isdir(dotsshPath) is False: os.makedirs(dotsshPath) if os.path.exists(keyPath) is False: create_key(keyPath) add_ssh_key(keyPath) f = open(keyPath + '.pub', 'r') Key = f.readlines()[0].rstrip() cfg_file = open("auto_config.py", 'a') cfg_file.writelines(f'sshKey = "{Key}"\n') cfg_file.close() call([ f"pytest-{version}", "-v", "-o", "junit_family=xunit2", "--junitxml",
interface = "%s" ntpServer = "10.20.20.122" localHome = "%s" %s keyPath = "%s" results_xml = "%s" """ % (passwd, ip, api, interface, localHome, disk, keyPath, results_xml) cfg_file = open("auto_config.py", 'w') cfg_file.writelines(cfg_content) cfg_file.close() from functions import setup_ssh_agent, create_key, add_ssh_key # Setup ssh agent befor starting test. setup_ssh_agent() if path.isdir(dotsshPath) is False: makedirs(dotsshPath) if path.exists(keyPath) is False: create_key(keyPath) add_ssh_key(keyPath) f = open(keyPath + '.pub', 'r') Key = f.readlines()[0].rstrip() cfg_file = open("auto_config.py", 'a') cfg_file.writelines('sshKey = "%s"\n' % Key) cfg_file.close() def get_tests():