Skip to content

Commit 8cc512b

Browse files
scoopexMarc Schöchlindependabot[bot]
authored
Default profile dir (#30)
config improvements - set no password as default (enforces to choose one) - provide the possibility to configure a default search path --------- Signed-off-by: Marc Schöchlin <[email protected]> Co-authored-by: Marc Schöchlin <[email protected]> Signed-off-by: Marc Schöchlin <[email protected]> * Add profiles from my coworkers Signed-off-by: Marc Schöchlin <[email protected]> * Use random passwords by default and output them Signed-off-by: Marc Schöchlin <[email protected]> * reformat Signed-off-by: Marc Schöchlin <[email protected]> * shorten line Signed-off-by: Marc Schöchlin <[email protected]> * Bump requests from 2.32.2 to 2.32.4 in the pip group across 1 directory (#27) Bumps the pip group with 1 update in the / directory: [requests](https://github.com/psf/requests). Updates `requests` from 2.32.2 to 2.32.4 - [Release notes](https://github.com/psf/requests/releases) - [Changelog](https://github.com/psf/requests/blob/main/HISTORY.md) - [Commits](psf/requests@v2.32.2...v2.32.4) --- updated-dependencies: - dependency-name: requests dependency-version: 2.32.4 dependency-type: direct:production dependency-group: pip ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Marc Schöchlin <[email protected]> Signed-off-by: Marc Schöchlin <[email protected]> * reformat Signed-off-by: Marc Schöchlin <[email protected]> * remove random logic Signed-off-by: Marc Schöchlin <[email protected]> * revert Signed-off-by: Marc Schöchlin <[email protected]> * revert Signed-off-by: Marc Schöchlin <[email protected]> * revert Signed-off-by: Marc Schöchlin <[email protected]> * config improvements - set no password as default (enforces to choose one) - provide the possibility to configure a default search path Signed-off-by: Marc Schöchlin <[email protected]> * reformat Signed-off-by: Marc Schöchlin <[email protected]> * type check Signed-off-by: Marc Schöchlin <[email protected]> --------- Signed-off-by: Marc Schöchlin <[email protected]> Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: Marc Schöchlin <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
1 parent 6b1ea8c commit 8cc512b

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

src/openstack_workload_generator/__main__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,8 @@
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

7677
exclusive_group_domain = parser.add_mutually_exclusive_group(required=True)

src/openstack_workload_generator/entities/helpers.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import os
44
import sys
55
from datetime import datetime
6+
from pathlib import Path
67
from typing import Tuple, Any
78
import coloredlogs
89

@@ -66,6 +67,18 @@ 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(
72+
Path(
73+
os.getenv("OPENSTACK_WORKLOAD_MANAGER_PROFILES", "NONE")
74+
) # satisfy type-check
75+
/ Path(config_file)
76+
)
77+
LOGGER.info(
78+
"Environment variable OPENSTACK_WORKLOAD_MANAGER_PROFILES set,"
79+
f" searching for potential {potential_profile_file}"
80+
)
81+
6982
if os.path.exists(config_file):
7083
Config._file = config_file
7184
elif not str(config_file).startswith("/") and os.path.exists(

0 commit comments

Comments
 (0)