opentf-toolkit-nightly 0.63.0.dev1397__py3-none-any.whl → 0.63.0.dev1404__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- opentf/scripts/startup.py +15 -14
- {opentf_toolkit_nightly-0.63.0.dev1397.dist-info → opentf_toolkit_nightly-0.63.0.dev1404.dist-info}/METADATA +1 -1
- {opentf_toolkit_nightly-0.63.0.dev1397.dist-info → opentf_toolkit_nightly-0.63.0.dev1404.dist-info}/RECORD +6 -6
- {opentf_toolkit_nightly-0.63.0.dev1397.dist-info → opentf_toolkit_nightly-0.63.0.dev1404.dist-info}/WHEEL +1 -1
- {opentf_toolkit_nightly-0.63.0.dev1397.dist-info → opentf_toolkit_nightly-0.63.0.dev1404.dist-info}/licenses/LICENSE +0 -0
- {opentf_toolkit_nightly-0.63.0.dev1397.dist-info → opentf_toolkit_nightly-0.63.0.dev1404.dist-info}/top_level.txt +0 -0
opentf/scripts/startup.py
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
|
|
15
15
|
"""Startup script for allinone images."""
|
|
16
16
|
|
|
17
|
-
from typing import Any, Dict, List, Optional, Tuple, Union
|
|
17
|
+
from typing import Any, Dict, List, Optional, Set, Tuple, Union
|
|
18
18
|
|
|
19
19
|
from datetime import datetime
|
|
20
20
|
from importlib.metadata import version
|
|
@@ -64,6 +64,7 @@ ENVIRONMENT_VARIABLES = {
|
|
|
64
64
|
'OPENTF_BASE_URL': None,
|
|
65
65
|
'OPENTF_CONTEXT': 'allinone',
|
|
66
66
|
'OPENTF_DEBUG': 'INFO',
|
|
67
|
+
'OPENTF_DISABLED_PLUGINS': None,
|
|
67
68
|
'OPENTF_EVENTBUS_WARMUPDELAY': 2,
|
|
68
69
|
'OPENTF_EVENTBUS_WARMUPURL': 'http://127.0.0.1:38368/subscriptions',
|
|
69
70
|
'OPENTF_EVENTBUSCONFIG': 'conf/eventbus.yaml',
|
|
@@ -220,7 +221,7 @@ SERVICES = set()
|
|
|
220
221
|
|
|
221
222
|
|
|
222
223
|
def parse_and_start(
|
|
223
|
-
paths: List[str], item: str, disabled: Optional[
|
|
224
|
+
paths: List[str], item: str, disabled: Optional[Set[str]] = None
|
|
224
225
|
) -> List[Any]:
|
|
225
226
|
"""Lookup item manifests and start them if not disabled."""
|
|
226
227
|
result = []
|
|
@@ -301,7 +302,7 @@ def maybe_start_otelcol():
|
|
|
301
302
|
else ''
|
|
302
303
|
)
|
|
303
304
|
cmd = '"/usr/local/bin/otelcol --config=file:/app/otelcol-config.yaml $OTELCOL_EXTRA_OPTIONS"'
|
|
304
|
-
logging.info(
|
|
305
|
+
logging.info('Starting OpenTelemetry Collector%s...', options_msg)
|
|
305
306
|
pid = subprocess.Popen(f'sh -c {cmd}', shell=True)
|
|
306
307
|
logging.debug('(pid is %d.)', pid.pid)
|
|
307
308
|
return [pid]
|
|
@@ -389,17 +390,17 @@ def start_services(conf: Dict[str, Any]) -> List[Any]:
|
|
|
389
390
|
|
|
390
391
|
def start_plugins(conf: Dict[str, Any]) -> List[Any]:
|
|
391
392
|
"""Lookup plugins and start them."""
|
|
392
|
-
|
|
393
|
-
disabled = [plugin.lower() for plugin in disabled]
|
|
394
|
-
else:
|
|
395
|
-
disabled = []
|
|
393
|
+
disabled = set(conf.get('disabled', {}))
|
|
396
394
|
if (v := _get_env('OPENTF_ALLURE_ENABLED')) is None or (
|
|
397
395
|
v.lower() not in ('true', 'yes', 'on', '1')
|
|
398
396
|
):
|
|
399
|
-
disabled.
|
|
400
|
-
disabled.
|
|
397
|
+
disabled.add('allure.collector')
|
|
398
|
+
disabled.add('result.aggregator')
|
|
399
|
+
if v := _get_env('OPENTF_DISABLED_PLUGINS'):
|
|
400
|
+
disabled |= set(v.split(','))
|
|
401
401
|
if aggregated := conf.get('aggregated'):
|
|
402
|
-
disabled
|
|
402
|
+
disabled |= set(aggregated)
|
|
403
|
+
disabled = {plugin.strip().lower() for plugin in disabled if plugin.strip()}
|
|
403
404
|
plugins = []
|
|
404
405
|
for entry in conf['plugins']:
|
|
405
406
|
plugins += parse_and_start(_expand(entry), PLUGIN_DESCRIPTOR, disabled)
|
|
@@ -523,10 +524,10 @@ def _ensure_abac_if_defined(name, value):
|
|
|
523
524
|
if value:
|
|
524
525
|
if not OPENTF_AUTHORIZATION_MODE:
|
|
525
526
|
logging.error(
|
|
526
|
-
'
|
|
527
|
-
' OPENTF_AUTHORIZATION_MODE must include "ABAC" to use
|
|
528
|
-
|
|
529
|
-
|
|
527
|
+
'%s is defined but OPENTF_AUTHORIZATION_MODE is undefined.'
|
|
528
|
+
' OPENTF_AUTHORIZATION_MODE must include "ABAC" to use %s.',
|
|
529
|
+
name,
|
|
530
|
+
name,
|
|
530
531
|
)
|
|
531
532
|
sys.exit(1)
|
|
532
533
|
if 'ABAC' not in OPENTF_AUTHORIZATION_MODE.split(','):
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: opentf-toolkit-nightly
|
|
3
|
-
Version: 0.63.0.
|
|
3
|
+
Version: 0.63.0.dev1404
|
|
4
4
|
Summary: OpenTestFactory Orchestrator Toolkit
|
|
5
5
|
Home-page: https://gitlab.com/henixdevelopment/open-source/opentestfactory/python-toolkit
|
|
6
6
|
Author: Martin Lafaix
|
|
@@ -56,13 +56,13 @@ opentf/schemas/opentestfactory.org/v1beta1/ServiceConfig.json,sha256=m5ZgWAKbutu
|
|
|
56
56
|
opentf/schemas/opentestfactory.org/v1beta1/Workflow.json,sha256=QZ8mM9PhzsI9gTmwmKTWYNoRn--rtcM3L0PzgnPBfMU,15424
|
|
57
57
|
opentf/schemas/opentestfactory.org/v1beta2/ServiceConfig.json,sha256=rEvK2YWL5lG94_qYgR_GnLWNsaQhaQ-2kuZdWJr5NnY,3517
|
|
58
58
|
opentf/scripts/launch_java_service.sh,sha256=S0jAaCuv2sZy0Gf2NGBuPX-eD531rcM-b0fNyhmzSjw,2423
|
|
59
|
-
opentf/scripts/startup.py,sha256=
|
|
59
|
+
opentf/scripts/startup.py,sha256=DLanDaXutUTYcG2PwoJ34QH-5G0TwfLUY_xy1VkVOqA,23202
|
|
60
60
|
opentf/toolkit/__init__.py,sha256=YnH66dmePAIU7dq_xWFYTIEUrsL9qV9f82LRDiBzbzs,22057
|
|
61
61
|
opentf/toolkit/channels.py,sha256=7uHpQUCWCzSxcQifeUL9SB9fvsq6_9cZt_8IdBgw8FQ,26272
|
|
62
62
|
opentf/toolkit/core.py,sha256=jMBDIYZ8Qn3BvsysfKoG0iTtjOnZsggetpH3eXygCsI,9636
|
|
63
63
|
opentf/toolkit/models.py,sha256=PNfXVQbeyOwDfaNrLjcfhYm6duMSlNWBtZsWZcs53ag,6583
|
|
64
|
-
opentf_toolkit_nightly-0.63.0.
|
|
65
|
-
opentf_toolkit_nightly-0.63.0.
|
|
66
|
-
opentf_toolkit_nightly-0.63.0.
|
|
67
|
-
opentf_toolkit_nightly-0.63.0.
|
|
68
|
-
opentf_toolkit_nightly-0.63.0.
|
|
64
|
+
opentf_toolkit_nightly-0.63.0.dev1404.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
65
|
+
opentf_toolkit_nightly-0.63.0.dev1404.dist-info/METADATA,sha256=e5Yk6R0U0-fHJQtr-EBn1kD1EqdiUVBpSnCvYBoTiLA,2215
|
|
66
|
+
opentf_toolkit_nightly-0.63.0.dev1404.dist-info/WHEEL,sha256=0CuiUZ_p9E4cD6NyLD6UG80LBXYyiSYZOKDm5lp32xk,91
|
|
67
|
+
opentf_toolkit_nightly-0.63.0.dev1404.dist-info/top_level.txt,sha256=_gPuE6GTT6UNXy1DjtmQSfCcZb_qYA2vWmjg7a30AGk,7
|
|
68
|
+
opentf_toolkit_nightly-0.63.0.dev1404.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|