File tree Expand file tree Collapse file tree 2 files changed +10
-3
lines changed
src/openstack_workload_generator Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Original file line number Diff line number Diff line change 7070 type = str ,
7171 default = "default.yaml" ,
7272 help = "The config file for environment creation, define a path to the"
73- " yaml file or a subpath in the profiles folder" ,
73+ " yaml file or a subpath in the profiles folder of the tool "
74+ "(you can overload the search path by setting the OPENSTACK_WORKLOAD_MANAGER_PROFILES environment variable)"
7475)
7576
7677exclusive_group_domain = parser .add_mutually_exclusive_group (required = True )
Original file line number Diff line number Diff line change 33import os
44import sys
55from datetime import datetime
6+ from pathlib import Path
67from typing import Tuple , Any
78import coloredlogs
89
1617
1718class Config :
1819 _config : dict [str , str | dict [str , str ] | None ] = {
19- "admin_domain_password" : "yolobanana " ,
20- "admin_vm_password" : "yolobanana " ,
20+ "admin_domain_password" : "" ,
21+ "admin_vm_password" : "" ,
2122 "admin_vm_ssh_key" : "" ,
2223 "admin_vm_ssh_keypair_name" : "my_ssh_public_key" ,
2324 "project_ipv4_subnet" : "192.168.200.0/24" ,
@@ -66,6 +67,11 @@ def load_config(config_file: str):
6667 + f"/../../../profiles/{ config_file } "
6768 )
6869
70+ if os .getenv ("OPENSTACK_WORKLOAD_MANAGER_PROFILES" ,None ):
71+ potential_profile_file = str (Path (os .getenv ("OPENSTACK_WORKLOAD_MANAGER_PROFILES" )) / Path (config_file ))
72+ LOGGER .info ("Environment variable OPENSTACK_WORKLOAD_MANAGER_PROFILES set,"
73+ f" searching for potential { potential_profile_file } " )
74+
6975 if os .path .exists (config_file ):
7076 Config ._file = config_file
7177 elif not str (config_file ).startswith ("/" ) and os .path .exists (
You can’t perform that action at this time.
0 commit comments