pyxecm 1.5__py3-none-any.whl → 2.0.0__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.
Potentially problematic release.
This version of pyxecm might be problematic. Click here for more details.
- pyxecm/__init__.py +6 -2
- pyxecm/avts.py +1492 -0
- pyxecm/coreshare.py +1075 -960
- pyxecm/customizer/__init__.py +16 -4
- pyxecm/customizer/__main__.py +58 -0
- pyxecm/customizer/api/__init__.py +5 -0
- pyxecm/customizer/api/__main__.py +6 -0
- pyxecm/customizer/api/app.py +914 -0
- pyxecm/customizer/api/auth.py +154 -0
- pyxecm/customizer/api/metrics.py +92 -0
- pyxecm/customizer/api/models.py +13 -0
- pyxecm/customizer/api/payload_list.py +865 -0
- pyxecm/customizer/api/settings.py +103 -0
- pyxecm/customizer/browser_automation.py +332 -139
- pyxecm/customizer/customizer.py +1075 -1057
- pyxecm/customizer/exceptions.py +35 -0
- pyxecm/customizer/guidewire.py +322 -0
- pyxecm/customizer/k8s.py +787 -338
- pyxecm/customizer/log.py +107 -0
- pyxecm/customizer/m365.py +3424 -2270
- pyxecm/customizer/nhc.py +1169 -0
- pyxecm/customizer/openapi.py +258 -0
- pyxecm/customizer/payload.py +18201 -7030
- pyxecm/customizer/pht.py +1047 -210
- pyxecm/customizer/salesforce.py +836 -727
- pyxecm/customizer/sap.py +58 -41
- pyxecm/customizer/servicenow.py +851 -383
- pyxecm/customizer/settings.py +442 -0
- pyxecm/customizer/successfactors.py +408 -346
- pyxecm/customizer/translate.py +83 -48
- pyxecm/helper/__init__.py +5 -2
- pyxecm/helper/assoc.py +98 -38
- pyxecm/helper/data.py +2482 -742
- pyxecm/helper/logadapter.py +27 -0
- pyxecm/helper/web.py +229 -101
- pyxecm/helper/xml.py +528 -172
- pyxecm/maintenance_page/__init__.py +5 -0
- pyxecm/maintenance_page/__main__.py +6 -0
- pyxecm/maintenance_page/app.py +51 -0
- pyxecm/maintenance_page/settings.py +28 -0
- pyxecm/maintenance_page/static/favicon.avif +0 -0
- pyxecm/maintenance_page/templates/maintenance.html +165 -0
- pyxecm/otac.py +234 -140
- pyxecm/otawp.py +2689 -0
- pyxecm/otcs.py +12344 -7547
- pyxecm/otds.py +3166 -2219
- pyxecm/otiv.py +36 -21
- pyxecm/otmm.py +1363 -296
- pyxecm/otpd.py +231 -127
- pyxecm-2.0.0.dist-info/METADATA +145 -0
- pyxecm-2.0.0.dist-info/RECORD +54 -0
- {pyxecm-1.5.dist-info → pyxecm-2.0.0.dist-info}/WHEEL +1 -1
- pyxecm-1.5.dist-info/METADATA +0 -51
- pyxecm-1.5.dist-info/RECORD +0 -30
- {pyxecm-1.5.dist-info → pyxecm-2.0.0.dist-info/licenses}/LICENSE +0 -0
- {pyxecm-1.5.dist-info → pyxecm-2.0.0.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
"""Settings for Customizer execution."""
|
|
2
|
+
|
|
3
|
+
import os
|
|
4
|
+
import tempfile
|
|
5
|
+
from typing import Literal
|
|
6
|
+
|
|
7
|
+
from pydantic import Field
|
|
8
|
+
from pydantic_settings import (
|
|
9
|
+
BaseSettings,
|
|
10
|
+
SettingsConfigDict,
|
|
11
|
+
)
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## Customzer Settings
|
|
15
|
+
class CustomizerAPISettings(BaseSettings):
|
|
16
|
+
"""Settings for the Customizer API."""
|
|
17
|
+
|
|
18
|
+
api_token: str | None = Field(
|
|
19
|
+
default=None,
|
|
20
|
+
description="Optional token that can be specified that has access to the Customizer API, bypassing the OTDS authentication.",
|
|
21
|
+
)
|
|
22
|
+
bind_address: str = Field(default="0.0.0.0", description="Interface to bind the Customizer API.") # noqa: S104
|
|
23
|
+
bind_port: int = Field(default=8000, description="Port to bind the Customizer API to")
|
|
24
|
+
|
|
25
|
+
import_payload: bool = Field(default=False)
|
|
26
|
+
payload: str = Field(
|
|
27
|
+
default="/payload/payload.yml.gz.b64",
|
|
28
|
+
description="Path to a single Payload file to be loaded.",
|
|
29
|
+
)
|
|
30
|
+
payload_dir: str = Field(
|
|
31
|
+
default="/payload-external/",
|
|
32
|
+
description="Path to a directory of Payload files. All files in this directory will be loaded in alphabetical order and dependencies will be added automatically on the previous object. So all payload in this folder will be processed sequentially in alphabetical oder.",
|
|
33
|
+
)
|
|
34
|
+
payload_dir_optional: str = Field(
|
|
35
|
+
default="/payload-optional/",
|
|
36
|
+
description="Path of Payload files to be loaded. No additional logic for dependencies will be applied, they need to be managed within the payloadSetitings section of each payload. See -> payloadOptions in the Payload Syntax documentation.",
|
|
37
|
+
)
|
|
38
|
+
|
|
39
|
+
temp_dir: str = Field(
|
|
40
|
+
default=os.path.join(tempfile.gettempdir(), "customizer"),
|
|
41
|
+
description="location of the temp folder. Used for temporary files during the payload execution",
|
|
42
|
+
)
|
|
43
|
+
|
|
44
|
+
loglevel: Literal["INFO", "DEBUG", "WARNING", "ERROR"] = "INFO"
|
|
45
|
+
logfolder: str = Field(
|
|
46
|
+
default=os.path.join(tempfile.gettempdir(), "customizer"),
|
|
47
|
+
description="Logfolder for Customizer logfiles",
|
|
48
|
+
)
|
|
49
|
+
logfile: str = Field(
|
|
50
|
+
default="customizer.log",
|
|
51
|
+
description="Logfile for Customizer API. This logfile also contains the execution of every payload.",
|
|
52
|
+
)
|
|
53
|
+
|
|
54
|
+
namespace: str = Field(
|
|
55
|
+
default="default",
|
|
56
|
+
description="Namespace to use for otxecm resource lookups",
|
|
57
|
+
)
|
|
58
|
+
maintenance_mode: bool = Field(
|
|
59
|
+
default=True,
|
|
60
|
+
description="Automatically enable and disable the maintenance mode during payload deployments.",
|
|
61
|
+
)
|
|
62
|
+
|
|
63
|
+
trusted_origins: list[str] = Field(
|
|
64
|
+
default=[
|
|
65
|
+
"http://localhost",
|
|
66
|
+
"http://localhost:5173",
|
|
67
|
+
"http://localhost:8080",
|
|
68
|
+
"https://manager.develop.terrarium.cloud",
|
|
69
|
+
"https://manager.terrarium.cloud",
|
|
70
|
+
],
|
|
71
|
+
)
|
|
72
|
+
|
|
73
|
+
otds_protocol: str = Field(default="http", alias="OTDS_PROTOCOL")
|
|
74
|
+
otds_host: str = Field(default="otds", alias="OTDS_HOSTNAME")
|
|
75
|
+
otds_port: int = Field(default=80, alias="OTDS_SERVICE_PORT_OTDS")
|
|
76
|
+
otds_url: str | None = Field(default=None, alias="OTDS_URL")
|
|
77
|
+
|
|
78
|
+
metrics: bool = Field(
|
|
79
|
+
default=True,
|
|
80
|
+
description="Enable or disable the /metrics endpoint for Prometheus",
|
|
81
|
+
)
|
|
82
|
+
|
|
83
|
+
victorialogs_host: str = Field(
|
|
84
|
+
default="",
|
|
85
|
+
description="Hostname of the VictoriaLogs Server",
|
|
86
|
+
)
|
|
87
|
+
victorialogs_port: int = Field(
|
|
88
|
+
default=9428,
|
|
89
|
+
description="Port of the VictoriaLogs Server",
|
|
90
|
+
)
|
|
91
|
+
|
|
92
|
+
model_config = SettingsConfigDict(env_prefix="CUSTOMIZER_")
|
|
93
|
+
|
|
94
|
+
def __init__(self, **data: any) -> None:
|
|
95
|
+
"""Class initializer."""
|
|
96
|
+
|
|
97
|
+
super().__init__(**data)
|
|
98
|
+
if self.otds_url is None:
|
|
99
|
+
self.otds_url = f"{self.otds_protocol}://{self.otds_host}:{self.otds_port}"
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
# Create Instance of settings
|
|
103
|
+
api_settings = CustomizerAPISettings()
|