python3-core-api-client 1.0.6__tar.gz → 1.1.0__tar.gz
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.
- {python3_core_api_client-1.0.6 → python3_core_api_client-1.1.0}/PKG-INFO +5 -5
- {python3_core_api_client-1.0.6 → python3_core_api_client-1.1.0}/README.md +4 -4
- {python3_core_api_client-1.0.6 → python3_core_api_client-1.1.0}/pyproject.toml +1 -1
- {python3_core_api_client-1.0.6 → python3_core_api_client-1.1.0}/src/cyberfusion/CoreApiClient/models.py +425 -53
- {python3_core_api_client-1.0.6 → python3_core_api_client-1.1.0}/src/cyberfusion/CoreApiClient/resources/clusters.py +26 -0
- {python3_core_api_client-1.0.6 → python3_core_api_client-1.1.0}/src/cyberfusion/CoreApiClient/resources/daemons.py +22 -0
- {python3_core_api_client-1.0.6 → python3_core_api_client-1.1.0}/src/cyberfusion/CoreApiClient/resources/database_user_grants.py +13 -0
- python3_core_api_client-1.1.0/src/cyberfusion/CoreApiClient/resources/logs.py +96 -0
- {python3_core_api_client-1.0.6 → python3_core_api_client-1.1.0}/src/cyberfusion/CoreApiClient/resources/passenger_apps.py +2 -1
- {python3_core_api_client-1.0.6 → python3_core_api_client-1.1.0}/src/python3_core_api_client.egg-info/PKG-INFO +5 -5
- python3_core_api_client-1.0.6/src/cyberfusion/CoreApiClient/resources/logs.py +0 -50
- {python3_core_api_client-1.0.6 → python3_core_api_client-1.1.0}/setup.cfg +0 -0
- {python3_core_api_client-1.0.6 → python3_core_api_client-1.1.0}/src/cyberfusion/CoreApiClient/__init__.py +0 -0
- {python3_core_api_client-1.0.6 → python3_core_api_client-1.1.0}/src/cyberfusion/CoreApiClient/_encoders.py +0 -0
- {python3_core_api_client-1.0.6 → python3_core_api_client-1.1.0}/src/cyberfusion/CoreApiClient/connector.py +0 -0
- {python3_core_api_client-1.0.6 → python3_core_api_client-1.1.0}/src/cyberfusion/CoreApiClient/exceptions.py +0 -0
- {python3_core_api_client-1.0.6 → python3_core_api_client-1.1.0}/src/cyberfusion/CoreApiClient/http.py +0 -0
- {python3_core_api_client-1.0.6 → python3_core_api_client-1.1.0}/src/cyberfusion/CoreApiClient/interfaces.py +0 -0
- {python3_core_api_client-1.0.6 → python3_core_api_client-1.1.0}/src/cyberfusion/CoreApiClient/resources/__init__.py +0 -0
- {python3_core_api_client-1.0.6 → python3_core_api_client-1.1.0}/src/cyberfusion/CoreApiClient/resources/basic_authentication_realms.py +0 -0
- {python3_core_api_client-1.0.6 → python3_core_api_client-1.1.0}/src/cyberfusion/CoreApiClient/resources/borg_archives.py +0 -0
- {python3_core_api_client-1.0.6 → python3_core_api_client-1.1.0}/src/cyberfusion/CoreApiClient/resources/borg_repositories.py +0 -0
- {python3_core_api_client-1.0.6 → python3_core_api_client-1.1.0}/src/cyberfusion/CoreApiClient/resources/certificate_managers.py +0 -0
- {python3_core_api_client-1.0.6 → python3_core_api_client-1.1.0}/src/cyberfusion/CoreApiClient/resources/certificates.py +0 -0
- {python3_core_api_client-1.0.6 → python3_core_api_client-1.1.0}/src/cyberfusion/CoreApiClient/resources/cmses.py +0 -0
- {python3_core_api_client-1.0.6 → python3_core_api_client-1.1.0}/src/cyberfusion/CoreApiClient/resources/crons.py +0 -0
- {python3_core_api_client-1.0.6 → python3_core_api_client-1.1.0}/src/cyberfusion/CoreApiClient/resources/custom_config_snippets.py +0 -0
- {python3_core_api_client-1.0.6 → python3_core_api_client-1.1.0}/src/cyberfusion/CoreApiClient/resources/custom_configs.py +0 -0
- {python3_core_api_client-1.0.6 → python3_core_api_client-1.1.0}/src/cyberfusion/CoreApiClient/resources/customers.py +0 -0
- {python3_core_api_client-1.0.6 → python3_core_api_client-1.1.0}/src/cyberfusion/CoreApiClient/resources/database_users.py +0 -0
- {python3_core_api_client-1.0.6 → python3_core_api_client-1.1.0}/src/cyberfusion/CoreApiClient/resources/databases.py +0 -0
- {python3_core_api_client-1.0.6 → python3_core_api_client-1.1.0}/src/cyberfusion/CoreApiClient/resources/domain_routers.py +0 -0
- {python3_core_api_client-1.0.6 → python3_core_api_client-1.1.0}/src/cyberfusion/CoreApiClient/resources/firewall_groups.py +0 -0
- {python3_core_api_client-1.0.6 → python3_core_api_client-1.1.0}/src/cyberfusion/CoreApiClient/resources/firewall_rules.py +0 -0
- {python3_core_api_client-1.0.6 → python3_core_api_client-1.1.0}/src/cyberfusion/CoreApiClient/resources/fpm_pools.py +0 -0
- {python3_core_api_client-1.0.6 → python3_core_api_client-1.1.0}/src/cyberfusion/CoreApiClient/resources/ftp_users.py +0 -0
- {python3_core_api_client-1.0.6 → python3_core_api_client-1.1.0}/src/cyberfusion/CoreApiClient/resources/haproxy_listens.py +0 -0
- {python3_core_api_client-1.0.6 → python3_core_api_client-1.1.0}/src/cyberfusion/CoreApiClient/resources/haproxy_listens_to_nodes.py +0 -0
- {python3_core_api_client-1.0.6 → python3_core_api_client-1.1.0}/src/cyberfusion/CoreApiClient/resources/health.py +0 -0
- {python3_core_api_client-1.0.6 → python3_core_api_client-1.1.0}/src/cyberfusion/CoreApiClient/resources/hosts_entries.py +0 -0
- {python3_core_api_client-1.0.6 → python3_core_api_client-1.1.0}/src/cyberfusion/CoreApiClient/resources/htpasswd_files.py +0 -0
- {python3_core_api_client-1.0.6 → python3_core_api_client-1.1.0}/src/cyberfusion/CoreApiClient/resources/htpasswd_users.py +0 -0
- {python3_core_api_client-1.0.6 → python3_core_api_client-1.1.0}/src/cyberfusion/CoreApiClient/resources/login.py +0 -0
- {python3_core_api_client-1.0.6 → python3_core_api_client-1.1.0}/src/cyberfusion/CoreApiClient/resources/mail_accounts.py +0 -0
- {python3_core_api_client-1.0.6 → python3_core_api_client-1.1.0}/src/cyberfusion/CoreApiClient/resources/mail_aliases.py +0 -0
- {python3_core_api_client-1.0.6 → python3_core_api_client-1.1.0}/src/cyberfusion/CoreApiClient/resources/mail_domains.py +0 -0
- {python3_core_api_client-1.0.6 → python3_core_api_client-1.1.0}/src/cyberfusion/CoreApiClient/resources/mail_hostnames.py +0 -0
- {python3_core_api_client-1.0.6 → python3_core_api_client-1.1.0}/src/cyberfusion/CoreApiClient/resources/malwares.py +0 -0
- {python3_core_api_client-1.0.6 → python3_core_api_client-1.1.0}/src/cyberfusion/CoreApiClient/resources/mariadb_encryption_keys.py +0 -0
- {python3_core_api_client-1.0.6 → python3_core_api_client-1.1.0}/src/cyberfusion/CoreApiClient/resources/node_add_ons.py +0 -0
- {python3_core_api_client-1.0.6 → python3_core_api_client-1.1.0}/src/cyberfusion/CoreApiClient/resources/nodes.py +0 -0
- {python3_core_api_client-1.0.6 → python3_core_api_client-1.1.0}/src/cyberfusion/CoreApiClient/resources/redis_instances.py +0 -0
- {python3_core_api_client-1.0.6 → python3_core_api_client-1.1.0}/src/cyberfusion/CoreApiClient/resources/root_ssh_keys.py +0 -0
- {python3_core_api_client-1.0.6 → python3_core_api_client-1.1.0}/src/cyberfusion/CoreApiClient/resources/security_txt_policies.py +0 -0
- {python3_core_api_client-1.0.6 → python3_core_api_client-1.1.0}/src/cyberfusion/CoreApiClient/resources/sites.py +0 -0
- {python3_core_api_client-1.0.6 → python3_core_api_client-1.1.0}/src/cyberfusion/CoreApiClient/resources/ssh_keys.py +0 -0
- {python3_core_api_client-1.0.6 → python3_core_api_client-1.1.0}/src/cyberfusion/CoreApiClient/resources/task_collections.py +0 -0
- {python3_core_api_client-1.0.6 → python3_core_api_client-1.1.0}/src/cyberfusion/CoreApiClient/resources/tombstones.py +0 -0
- {python3_core_api_client-1.0.6 → python3_core_api_client-1.1.0}/src/cyberfusion/CoreApiClient/resources/unix_users.py +0 -0
- {python3_core_api_client-1.0.6 → python3_core_api_client-1.1.0}/src/cyberfusion/CoreApiClient/resources/url_redirects.py +0 -0
- {python3_core_api_client-1.0.6 → python3_core_api_client-1.1.0}/src/cyberfusion/CoreApiClient/resources/virtual_hosts.py +0 -0
- {python3_core_api_client-1.0.6 → python3_core_api_client-1.1.0}/src/python3_core_api_client.egg-info/SOURCES.txt +0 -0
- {python3_core_api_client-1.0.6 → python3_core_api_client-1.1.0}/src/python3_core_api_client.egg-info/dependency_links.txt +0 -0
- {python3_core_api_client-1.0.6 → python3_core_api_client-1.1.0}/src/python3_core_api_client.egg-info/requires.txt +0 -0
- {python3_core_api_client-1.0.6 → python3_core_api_client-1.1.0}/src/python3_core_api_client.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: python3-core-api-client
|
|
3
|
-
Version: 1.0
|
|
3
|
+
Version: 1.1.0
|
|
4
4
|
Summary: Python client for Core API.
|
|
5
5
|
Author-email: Cyberfusion <support@cyberfusion.io>
|
|
6
6
|
Project-URL: Source, https://github.com/CyberfusionIO/python3-core-api-client
|
|
@@ -13,7 +13,7 @@ Requires-Dist: pydantic[dotenv,email]==1.10.4
|
|
|
13
13
|
|
|
14
14
|
Python client for Core API.
|
|
15
15
|
|
|
16
|
-
This client was built for and tested on the **1.
|
|
16
|
+
This client was built for and tested on the **1.248** version of the API.
|
|
17
17
|
|
|
18
18
|
## Support
|
|
19
19
|
|
|
@@ -250,11 +250,11 @@ To raise `cyberfusion.CoreApiClient.exceptions.CallException` in case of an unex
|
|
|
250
250
|
|
|
251
251
|
Auto-generate models as follows:
|
|
252
252
|
|
|
253
|
-
datamodel-codegen --input-file-type openapi --
|
|
253
|
+
datamodel-codegen --input-file-type openapi --url http://127.0.0.1:22190/openapi.json --output temp_models.py --target-python-version 3.11
|
|
254
254
|
|
|
255
|
-
|
|
255
|
+
This adds models to `temp_models.py`. Merge it with `models.py`.
|
|
256
256
|
|
|
257
|
-
|
|
257
|
+
To not use a local Core API instance, replace `--url` by `--input`. Pass the path to the OpenAPI spec (JSON).
|
|
258
258
|
|
|
259
259
|
# Test strategy
|
|
260
260
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Python client for Core API.
|
|
4
4
|
|
|
5
|
-
This client was built for and tested on the **1.
|
|
5
|
+
This client was built for and tested on the **1.248** version of the API.
|
|
6
6
|
|
|
7
7
|
## Support
|
|
8
8
|
|
|
@@ -239,11 +239,11 @@ To raise `cyberfusion.CoreApiClient.exceptions.CallException` in case of an unex
|
|
|
239
239
|
|
|
240
240
|
Auto-generate models as follows:
|
|
241
241
|
|
|
242
|
-
datamodel-codegen --input-file-type openapi --
|
|
242
|
+
datamodel-codegen --input-file-type openapi --url http://127.0.0.1:22190/openapi.json --output temp_models.py --target-python-version 3.11
|
|
243
243
|
|
|
244
|
-
|
|
244
|
+
This adds models to `temp_models.py`. Merge it with `models.py`.
|
|
245
245
|
|
|
246
|
-
|
|
246
|
+
To not use a local Core API instance, replace `--url` by `--input`. Pass the path to the OpenAPI spec (JSON).
|
|
247
247
|
|
|
248
248
|
# Test strategy
|
|
249
249
|
|
|
@@ -38,6 +38,28 @@ class RootModelCollectionMixin:
|
|
|
38
38
|
return self.__root__.items()
|
|
39
39
|
|
|
40
40
|
|
|
41
|
+
class ObjectLogTypeEnum(StrEnum):
|
|
42
|
+
Create = "Create"
|
|
43
|
+
Update = "Update"
|
|
44
|
+
Delete = "Delete"
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
class CauserTypeEnum(StrEnum):
|
|
48
|
+
API_User = "API User"
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
class HTTPMethod(StrEnum):
|
|
52
|
+
CONNECT = "CONNECT"
|
|
53
|
+
DELETE = "DELETE"
|
|
54
|
+
GET = "GET"
|
|
55
|
+
HEAD = "HEAD"
|
|
56
|
+
OPTIONS = "OPTIONS"
|
|
57
|
+
PATCH = "PATCH"
|
|
58
|
+
POST = "POST"
|
|
59
|
+
PUT = "PUT"
|
|
60
|
+
TRACE = "TRACE"
|
|
61
|
+
|
|
62
|
+
|
|
41
63
|
class APIUserAuthenticationMethod(StrEnum):
|
|
42
64
|
API_KEY = "API Key"
|
|
43
65
|
JWT_TOKEN = "JWT Token"
|
|
@@ -510,7 +532,7 @@ class CronCreateRequest(CoreApiModel):
|
|
|
510
532
|
title="Locking Enabled",
|
|
511
533
|
)
|
|
512
534
|
is_active: bool = Field(..., title="Is Active")
|
|
513
|
-
memory_limit: Optional[conint(ge=256
|
|
535
|
+
memory_limit: Optional[conint(ge=256)] = Field(
|
|
514
536
|
None,
|
|
515
537
|
description="In MB.\n\nWhen the memory limit is reached, the daemon is restarted.\n\nUse this to prevent a daemon from overloading an entire cluster ('noisy neighbour effect'). Also see `cpu_limit`.",
|
|
516
538
|
title="Memory Limit",
|
|
@@ -599,7 +621,7 @@ class CronUpdateRequest(CoreApiModel):
|
|
|
599
621
|
title="Locking Enabled",
|
|
600
622
|
)
|
|
601
623
|
is_active: Optional[bool] = Field(None, title="Is Active")
|
|
602
|
-
memory_limit: Optional[conint(ge=256
|
|
624
|
+
memory_limit: Optional[conint(ge=256)] = Field(
|
|
603
625
|
None,
|
|
604
626
|
description="In MB.\n\nWhen the memory limit is reached, the daemon is restarted.\n\nUse this to prevent a daemon from overloading an entire cluster ('noisy neighbour effect'). Also see `cpu_limit`.",
|
|
605
627
|
title="Memory Limit",
|
|
@@ -609,6 +631,11 @@ class CronUpdateRequest(CoreApiModel):
|
|
|
609
631
|
description="Each step of `100` means 1 CPU core. For example, a value of `200` means 2 CPU cores.\n\nUse this to prevent a daemon from overloading an entire cluster ('noisy neighbour effect'). Also see `memory_limit`.",
|
|
610
632
|
title="Cpu Limit",
|
|
611
633
|
)
|
|
634
|
+
node_id: Optional[int] = Field(
|
|
635
|
+
None,
|
|
636
|
+
description="The node this cron will run on.\n\nDefaults to node with Admin group.",
|
|
637
|
+
title="Node Id",
|
|
638
|
+
)
|
|
612
639
|
|
|
613
640
|
|
|
614
641
|
class CustomConfigServerSoftwareNameEnum(StrEnum):
|
|
@@ -692,7 +719,7 @@ class DaemonCreateRequest(CoreApiModel):
|
|
|
692
719
|
..., title="Command"
|
|
693
720
|
)
|
|
694
721
|
nodes_ids: List[int] = Field(..., min_items=1, title="Nodes Ids", unique_items=True)
|
|
695
|
-
memory_limit: Optional[conint(ge=256
|
|
722
|
+
memory_limit: Optional[conint(ge=256)] = Field(
|
|
696
723
|
None,
|
|
697
724
|
description="In MB.\n\nWhen the memory limit is reached, the daemon is restarted.\n\nUse this to prevent a daemon from overloading an entire cluster ('noisy neighbour effect'). Also see `cpu_limit`.",
|
|
698
725
|
title="Memory Limit",
|
|
@@ -722,7 +749,7 @@ class DaemonUpdateRequest(CoreApiModel):
|
|
|
722
749
|
Field(None, title="Command")
|
|
723
750
|
)
|
|
724
751
|
nodes_ids: Optional[List[int]] = Field(None, title="Nodes Ids")
|
|
725
|
-
memory_limit: Optional[conint(ge=256
|
|
752
|
+
memory_limit: Optional[conint(ge=256)] = Field(
|
|
726
753
|
None,
|
|
727
754
|
description="In MB.\n\nWhen the memory limit is reached, the daemon is restarted.\n\nUse this to prevent a daemon from overloading an entire cluster ('noisy neighbour effect'). Also see `cpu_limit`.",
|
|
728
755
|
title="Memory Limit",
|
|
@@ -939,7 +966,7 @@ class FPMPoolCreateRequest(CoreApiModel):
|
|
|
939
966
|
description="Apply multiple security measures, most notably:\n\n- Dedicated special devices (`/dev/`)\n- When the cluster UNIX user home directory is `/home`, other directories are hidden. This ensures usernames of other UNIX users are not leaked.\n\nThis setting is recommended for shared environments in which users are not trusted.\n",
|
|
940
967
|
title="Is Namespaced",
|
|
941
968
|
)
|
|
942
|
-
memory_limit: Optional[conint(ge=256
|
|
969
|
+
memory_limit: Optional[conint(ge=256)] = Field(
|
|
943
970
|
None,
|
|
944
971
|
description="In MB.\n\nWhen the memory limit is reached, the FPM pool is restarted.\n\nUse this to prevent an FPM pool from overloading an entire cluster ('noisy neighbour effect'). Also see `cpu_limit`.",
|
|
945
972
|
title="Memory Limit",
|
|
@@ -1023,7 +1050,7 @@ class FPMPoolUpdateRequest(CoreApiModel):
|
|
|
1023
1050
|
description="Apply multiple security measures, most notably:\n\n- Dedicated special devices (`/dev/`)\n- When the cluster UNIX user home directory is `/home`, other directories are hidden. This ensures usernames of other UNIX users are not leaked.\n\nThis setting is recommended for shared environments in which users are not trusted.\n",
|
|
1024
1051
|
title="Is Namespaced",
|
|
1025
1052
|
)
|
|
1026
|
-
memory_limit: Optional[conint(ge=256
|
|
1053
|
+
memory_limit: Optional[conint(ge=256)] = Field(
|
|
1027
1054
|
None,
|
|
1028
1055
|
description="In MB.\n\nWhen the memory limit is reached, the FPM pool is restarted.\n\nUse this to prevent an FPM pool from overloading an entire cluster ('noisy neighbour effect'). Also see `cpu_limit`.",
|
|
1029
1056
|
title="Memory Limit",
|
|
@@ -1425,9 +1452,9 @@ class NodeAddOnProduct(CoreApiModel):
|
|
|
1425
1452
|
name: constr(regex=r"^[a-zA-Z0-9 ]+$", min_length=1, max_length=64) = Field(
|
|
1426
1453
|
..., title="Name"
|
|
1427
1454
|
)
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1455
|
+
memory_gib: Optional[int] = Field(..., title="Memory Gib")
|
|
1456
|
+
cpu_cores: Optional[int] = Field(..., title="Cpu Cores")
|
|
1457
|
+
disk_gib: Optional[int] = Field(..., title="Disk Gib")
|
|
1431
1458
|
price: confloat(ge=0.0) = Field(..., title="Price")
|
|
1432
1459
|
period: constr(regex=r"^[A-Z0-9]+$", min_length=2, max_length=2) = Field(
|
|
1433
1460
|
..., title="Period"
|
|
@@ -1483,9 +1510,9 @@ class NodeProduct(CoreApiModel):
|
|
|
1483
1510
|
name: constr(regex=r"^[A-Z]+$", min_length=1, max_length=2) = Field(
|
|
1484
1511
|
..., title="Name"
|
|
1485
1512
|
)
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1513
|
+
memory_gib: int = Field(..., title="Memory Gib")
|
|
1514
|
+
cpu_cores: int = Field(..., title="Cpu Cores")
|
|
1515
|
+
disk_gib: int = Field(..., title="Disk Gib")
|
|
1489
1516
|
allow_upgrade_to: List[constr(regex=r"^[A-Z]+$", min_length=1, max_length=2)] = (
|
|
1490
1517
|
Field(..., title="Allow Upgrade To")
|
|
1491
1518
|
)
|
|
@@ -1577,6 +1604,7 @@ class PHPExtensionEnum(StrEnum):
|
|
|
1577
1604
|
MAILPARSE = "mailparse"
|
|
1578
1605
|
UV = "uv"
|
|
1579
1606
|
AMQP = "amqp"
|
|
1607
|
+
MONGODB = "mongodb"
|
|
1580
1608
|
|
|
1581
1609
|
|
|
1582
1610
|
class PHPSettings(CoreApiModel):
|
|
@@ -1634,9 +1662,7 @@ class RedisInstanceCreateRequest(CoreApiModel):
|
|
|
1634
1662
|
password: constr(regex=r"^[a-zA-Z0-9]+$", min_length=24, max_length=255) = Field(
|
|
1635
1663
|
..., title="Password"
|
|
1636
1664
|
)
|
|
1637
|
-
memory_limit: conint(ge=8
|
|
1638
|
-
..., description="In MB.", title="Memory Limit"
|
|
1639
|
-
)
|
|
1665
|
+
memory_limit: conint(ge=8) = Field(..., description="In MB.", title="Memory Limit")
|
|
1640
1666
|
max_databases: int = Field(..., title="Max Databases")
|
|
1641
1667
|
eviction_policy: RedisEvictionPolicyEnum = Field(
|
|
1642
1668
|
...,
|
|
@@ -1654,9 +1680,7 @@ class RedisInstanceUpdateDeprecatedRequest(CoreApiModel):
|
|
|
1654
1680
|
password: constr(regex=r"^[a-zA-Z0-9]+$", min_length=24, max_length=255) = Field(
|
|
1655
1681
|
..., title="Password"
|
|
1656
1682
|
)
|
|
1657
|
-
memory_limit: conint(ge=8
|
|
1658
|
-
..., description="In MB.", title="Memory Limit"
|
|
1659
|
-
)
|
|
1683
|
+
memory_limit: conint(ge=8) = Field(..., description="In MB.", title="Memory Limit")
|
|
1660
1684
|
max_databases: int = Field(..., title="Max Databases")
|
|
1661
1685
|
eviction_policy: RedisEvictionPolicyEnum = Field(
|
|
1662
1686
|
...,
|
|
@@ -1668,7 +1692,7 @@ class RedisInstanceUpdateRequest(CoreApiModel):
|
|
|
1668
1692
|
password: Optional[
|
|
1669
1693
|
constr(regex=r"^[a-zA-Z0-9]+$", min_length=24, max_length=255)
|
|
1670
1694
|
] = Field(None, title="Password")
|
|
1671
|
-
memory_limit: Optional[conint(ge=8
|
|
1695
|
+
memory_limit: Optional[conint(ge=8)] = Field(
|
|
1672
1696
|
None, description="In MB.", title="Memory Limit"
|
|
1673
1697
|
)
|
|
1674
1698
|
max_databases: Optional[int] = Field(None, title="Max Databases")
|
|
@@ -3872,7 +3896,7 @@ class IPAddressProduct(CoreApiModel):
|
|
|
3872
3896
|
)
|
|
3873
3897
|
|
|
3874
3898
|
|
|
3875
|
-
class
|
|
3899
|
+
class WebServerLogAccessResource(CoreApiModel):
|
|
3876
3900
|
remote_address: str = Field(..., title="Remote Address")
|
|
3877
3901
|
raw_message: constr(min_length=1, max_length=65535) = Field(
|
|
3878
3902
|
..., title="Raw Message"
|
|
@@ -3884,7 +3908,7 @@ class LogAccessResource(CoreApiModel):
|
|
|
3884
3908
|
bytes_sent: conint(ge=0) = Field(..., title="Bytes Sent")
|
|
3885
3909
|
|
|
3886
3910
|
|
|
3887
|
-
class
|
|
3911
|
+
class WebServerLogErrorResource(CoreApiModel):
|
|
3888
3912
|
remote_address: str = Field(..., title="Remote Address")
|
|
3889
3913
|
raw_message: constr(min_length=1, max_length=65535) = Field(
|
|
3890
3914
|
..., title="Raw Message"
|
|
@@ -3917,6 +3941,25 @@ class MariaDBEncryptionKeyResource(CoreApiModel):
|
|
|
3917
3941
|
includes: MariaDBEncryptionKeyIncludes
|
|
3918
3942
|
|
|
3919
3943
|
|
|
3944
|
+
class NodeGroupDependency(CoreApiModel):
|
|
3945
|
+
is_dependency: bool = Field(
|
|
3946
|
+
...,
|
|
3947
|
+
description="Will the service become unavailable when this node is unreachable?",
|
|
3948
|
+
title="Is Dependency",
|
|
3949
|
+
)
|
|
3950
|
+
impact: Optional[str] = Field(
|
|
3951
|
+
...,
|
|
3952
|
+
description="What impact will this node becoming unreachable have?",
|
|
3953
|
+
title="Impact",
|
|
3954
|
+
)
|
|
3955
|
+
reason: str = Field(
|
|
3956
|
+
...,
|
|
3957
|
+
description="Why will the node being unreachable have impact?",
|
|
3958
|
+
title="Reason",
|
|
3959
|
+
)
|
|
3960
|
+
group: NodeGroupEnum
|
|
3961
|
+
|
|
3962
|
+
|
|
3920
3963
|
class NodeGroupsProperties(CoreApiModel):
|
|
3921
3964
|
Redis: Optional[NodeRedisGroupProperties]
|
|
3922
3965
|
MariaDB: Optional[NodeMariaDBGroupProperties]
|
|
@@ -4161,9 +4204,7 @@ class RedisInstanceResource(CoreApiModel):
|
|
|
4161
4204
|
password: constr(regex=r"^[a-zA-Z0-9]+$", min_length=24, max_length=255) = Field(
|
|
4162
4205
|
..., title="Password"
|
|
4163
4206
|
)
|
|
4164
|
-
memory_limit: conint(ge=8
|
|
4165
|
-
..., description="In MB.", title="Memory Limit"
|
|
4166
|
-
)
|
|
4207
|
+
memory_limit: conint(ge=8) = Field(..., description="In MB.", title="Memory Limit")
|
|
4167
4208
|
max_databases: int = Field(..., title="Max Databases")
|
|
4168
4209
|
eviction_policy: RedisEvictionPolicyEnum = Field(
|
|
4169
4210
|
...,
|
|
@@ -4564,7 +4605,7 @@ class CronResource(CoreApiModel):
|
|
|
4564
4605
|
title="Locking Enabled",
|
|
4565
4606
|
)
|
|
4566
4607
|
is_active: bool = Field(..., title="Is Active")
|
|
4567
|
-
memory_limit: Optional[conint(ge=256
|
|
4608
|
+
memory_limit: Optional[conint(ge=256)] = Field(
|
|
4568
4609
|
..., description="In MB.", title="Memory Limit"
|
|
4569
4610
|
)
|
|
4570
4611
|
cpu_limit: Optional[int] = Field(
|
|
@@ -4593,7 +4634,7 @@ class DaemonResource(CoreApiModel):
|
|
|
4593
4634
|
..., title="Command"
|
|
4594
4635
|
)
|
|
4595
4636
|
nodes_ids: List[int] = Field(..., min_items=1, title="Nodes Ids", unique_items=True)
|
|
4596
|
-
memory_limit: Optional[conint(ge=256
|
|
4637
|
+
memory_limit: Optional[conint(ge=256)] = Field(
|
|
4597
4638
|
..., description="In MB.", title="Memory Limit"
|
|
4598
4639
|
)
|
|
4599
4640
|
cpu_limit: Optional[int] = Field(
|
|
@@ -4683,7 +4724,7 @@ class FPMPoolResource(CoreApiModel):
|
|
|
4683
4724
|
description="Apply multiple security measures, most notably:\n\n- Dedicated special devices (`/dev/`)\n- When the cluster UNIX user home directory is `/home`, other directories are hidden. This ensures usernames of other UNIX users are not leaked.\n\nThis setting is recommended for shared environments in which users are not trusted.\n",
|
|
4684
4725
|
title="Is Namespaced",
|
|
4685
4726
|
)
|
|
4686
|
-
memory_limit: Optional[conint(ge=256
|
|
4727
|
+
memory_limit: Optional[conint(ge=256)] = Field(
|
|
4687
4728
|
..., description="In MB.", title="Memory Limit"
|
|
4688
4729
|
)
|
|
4689
4730
|
includes: FPMPoolIncludes
|
|
@@ -4932,6 +4973,63 @@ class NodeCreateRequest(CoreApiModel):
|
|
|
4932
4973
|
)
|
|
4933
4974
|
|
|
4934
4975
|
|
|
4976
|
+
class NodeCronDependency(CoreApiModel):
|
|
4977
|
+
is_dependency: bool = Field(
|
|
4978
|
+
...,
|
|
4979
|
+
description="Will the service become unavailable when this node is unreachable?",
|
|
4980
|
+
title="Is Dependency",
|
|
4981
|
+
)
|
|
4982
|
+
impact: Optional[str] = Field(
|
|
4983
|
+
...,
|
|
4984
|
+
description="What impact will this node becoming unreachable have?",
|
|
4985
|
+
title="Impact",
|
|
4986
|
+
)
|
|
4987
|
+
reason: str = Field(
|
|
4988
|
+
...,
|
|
4989
|
+
description="Why will the node being unreachable have impact?",
|
|
4990
|
+
title="Reason",
|
|
4991
|
+
)
|
|
4992
|
+
cron: CronResource
|
|
4993
|
+
|
|
4994
|
+
|
|
4995
|
+
class NodeDaemonDependency(CoreApiModel):
|
|
4996
|
+
is_dependency: bool = Field(
|
|
4997
|
+
...,
|
|
4998
|
+
description="Will the service become unavailable when this node is unreachable?",
|
|
4999
|
+
title="Is Dependency",
|
|
5000
|
+
)
|
|
5001
|
+
impact: Optional[str] = Field(
|
|
5002
|
+
...,
|
|
5003
|
+
description="What impact will this node becoming unreachable have?",
|
|
5004
|
+
title="Impact",
|
|
5005
|
+
)
|
|
5006
|
+
reason: str = Field(
|
|
5007
|
+
...,
|
|
5008
|
+
description="Why will the node being unreachable have impact?",
|
|
5009
|
+
title="Reason",
|
|
5010
|
+
)
|
|
5011
|
+
daemon: DaemonResource
|
|
5012
|
+
|
|
5013
|
+
|
|
5014
|
+
class NodeHostsEntryDependency(CoreApiModel):
|
|
5015
|
+
is_dependency: bool = Field(
|
|
5016
|
+
...,
|
|
5017
|
+
description="Will the service become unavailable when this node is unreachable?",
|
|
5018
|
+
title="Is Dependency",
|
|
5019
|
+
)
|
|
5020
|
+
impact: Optional[str] = Field(
|
|
5021
|
+
...,
|
|
5022
|
+
description="What impact will this node becoming unreachable have?",
|
|
5023
|
+
title="Impact",
|
|
5024
|
+
)
|
|
5025
|
+
reason: str = Field(
|
|
5026
|
+
...,
|
|
5027
|
+
description="Why will the node being unreachable have impact?",
|
|
5028
|
+
title="Reason",
|
|
5029
|
+
)
|
|
5030
|
+
hosts_entry: HostsEntryResource
|
|
5031
|
+
|
|
5032
|
+
|
|
4935
5033
|
class PassengerAppIncludes(CoreApiModel):
|
|
4936
5034
|
unix_user: UNIXUserResource
|
|
4937
5035
|
cluster: ClusterResource
|
|
@@ -5264,16 +5362,156 @@ class MailAliasResource(CoreApiModel):
|
|
|
5264
5362
|
includes: MailAliasIncludes
|
|
5265
5363
|
|
|
5266
5364
|
|
|
5267
|
-
class
|
|
5268
|
-
|
|
5365
|
+
class NodeDomainRouterDependency(CoreApiModel):
|
|
5366
|
+
is_dependency: bool = Field(
|
|
5367
|
+
...,
|
|
5368
|
+
description="Will the service become unavailable when this node is unreachable?",
|
|
5369
|
+
title="Is Dependency",
|
|
5370
|
+
)
|
|
5371
|
+
impact: Optional[str] = Field(
|
|
5372
|
+
...,
|
|
5373
|
+
description="What impact will this node becoming unreachable have?",
|
|
5374
|
+
title="Impact",
|
|
5375
|
+
)
|
|
5376
|
+
reason: str = Field(
|
|
5377
|
+
...,
|
|
5378
|
+
description="Why will the node being unreachable have impact?",
|
|
5379
|
+
title="Reason",
|
|
5380
|
+
)
|
|
5381
|
+
domain_router: DomainRouterResource
|
|
5269
5382
|
|
|
5270
5383
|
|
|
5271
|
-
class
|
|
5272
|
-
|
|
5273
|
-
|
|
5384
|
+
class TombstoneDataCertificateIncludes(BaseModel):
|
|
5385
|
+
pass
|
|
5386
|
+
|
|
5387
|
+
|
|
5388
|
+
class TombstoneDataDaemonIncludes(BaseModel):
|
|
5389
|
+
pass
|
|
5390
|
+
|
|
5391
|
+
|
|
5392
|
+
class TombstoneDataDatabaseIncludes(BaseModel):
|
|
5393
|
+
pass
|
|
5394
|
+
|
|
5395
|
+
|
|
5396
|
+
class TombstoneDataFPMPoolIncludes(BaseModel):
|
|
5397
|
+
pass
|
|
5398
|
+
|
|
5399
|
+
|
|
5400
|
+
class TombstoneDataPassengerAppIncludes(BaseModel):
|
|
5401
|
+
pass
|
|
5402
|
+
|
|
5403
|
+
|
|
5404
|
+
class TombstoneDataRedisInstanceIncludes(BaseModel):
|
|
5405
|
+
pass
|
|
5406
|
+
|
|
5407
|
+
|
|
5408
|
+
class TombstoneDataUNIXUserIncludes(BaseModel):
|
|
5409
|
+
pass
|
|
5410
|
+
|
|
5411
|
+
|
|
5412
|
+
class TombstoneDataUNIXUserRabbitMQCredentialsIncludes(BaseModel):
|
|
5413
|
+
pass
|
|
5414
|
+
|
|
5415
|
+
|
|
5416
|
+
class TombstoneDataVirtualHostIncludes(BaseModel):
|
|
5417
|
+
pass
|
|
5418
|
+
|
|
5419
|
+
|
|
5420
|
+
class TombstoneDataDatabaseUserIncludes(BaseModel):
|
|
5421
|
+
pass
|
|
5422
|
+
|
|
5423
|
+
|
|
5424
|
+
class TombstoneDataDomainRouterIncludes(BaseModel):
|
|
5425
|
+
pass
|
|
5426
|
+
|
|
5427
|
+
|
|
5428
|
+
class TombstoneDataRootSSHKeyIncludes(BaseModel):
|
|
5429
|
+
pass
|
|
5430
|
+
|
|
5431
|
+
|
|
5432
|
+
class TombstoneDataSSHKeyIncludes(BaseModel):
|
|
5433
|
+
pass
|
|
5434
|
+
|
|
5435
|
+
|
|
5436
|
+
class TombstoneDataMailHostnameIncludes(BaseModel):
|
|
5437
|
+
pass
|
|
5438
|
+
|
|
5439
|
+
|
|
5440
|
+
class TombstoneDataDatabaseUser(BaseModel):
|
|
5441
|
+
data_type: Literal["database_user"] = Field(..., const=True, title="Data Type")
|
|
5442
|
+
name: constr(regex=r"^[a-z0-9-_]+$", min_length=1, max_length=63) = Field(
|
|
5274
5443
|
..., title="Name"
|
|
5275
5444
|
)
|
|
5276
|
-
|
|
5445
|
+
host: Optional[HostEnum]
|
|
5446
|
+
server_software_name: DatabaseServerSoftwareNameEnum
|
|
5447
|
+
includes: TombstoneDataDatabaseUserIncludes
|
|
5448
|
+
|
|
5449
|
+
|
|
5450
|
+
class TombstoneDataDatabase(CoreApiModel):
|
|
5451
|
+
data_type: Literal["database"] = Field(..., title="Data Type")
|
|
5452
|
+
name: constr(regex=r"^[a-z0-9-_]+$", min_length=1, max_length=63) = Field(
|
|
5453
|
+
..., title="Name"
|
|
5454
|
+
)
|
|
5455
|
+
server_software_name: DatabaseServerSoftwareNameEnum
|
|
5456
|
+
delete_on_cluster: Optional[bool] = Field(False, title="Delete On Cluster")
|
|
5457
|
+
includes: TombstoneDataDatabaseIncludes
|
|
5458
|
+
|
|
5459
|
+
|
|
5460
|
+
class TombstoneDataDatabaseUserGrantIncludes(BaseModel):
|
|
5461
|
+
database: Union[DatabaseResource, TombstoneDataDatabase] = Field(
|
|
5462
|
+
..., title="Database"
|
|
5463
|
+
)
|
|
5464
|
+
database_user: Union[DatabaseUserResource, TombstoneDataDatabaseUser] = Field(
|
|
5465
|
+
..., title="Database User"
|
|
5466
|
+
)
|
|
5467
|
+
|
|
5468
|
+
|
|
5469
|
+
class TombstoneDataDatabaseUserGrant(BaseModel):
|
|
5470
|
+
data_type: Literal["database_user_grant"] = Field(
|
|
5471
|
+
..., const=True, title="Data Type"
|
|
5472
|
+
)
|
|
5473
|
+
table_name: Optional[
|
|
5474
|
+
constr(regex=r"^[a-zA-Z0-9-_]+$", min_length=1, max_length=64)
|
|
5475
|
+
] = Field(..., title="Table Name")
|
|
5476
|
+
privilege_name: MariaDBPrivilegeEnum
|
|
5477
|
+
database_id: int = Field(..., title="Database Id")
|
|
5478
|
+
database_user_id: int = Field(..., title="Database User Id")
|
|
5479
|
+
includes: TombstoneDataDatabaseUserGrantIncludes
|
|
5480
|
+
|
|
5481
|
+
|
|
5482
|
+
class TombstoneDataDomainRouter(BaseModel):
|
|
5483
|
+
data_type: Literal["domain_router"] = Field(..., const=True, title="Data Type")
|
|
5484
|
+
domain: str = Field(..., title="Domain")
|
|
5485
|
+
includes: TombstoneDataDomainRouterIncludes
|
|
5486
|
+
|
|
5487
|
+
|
|
5488
|
+
class TombstoneDataRootSSHKey(BaseModel):
|
|
5489
|
+
data_type: Literal["root_ssh_key"] = Field(..., const=True, title="Data Type")
|
|
5490
|
+
name: constr(regex=r"^[a-zA-Z0-9-_]+$", min_length=1, max_length=64) = Field(
|
|
5491
|
+
..., title="Name"
|
|
5492
|
+
)
|
|
5493
|
+
is_private_key: bool = Field(..., title="Is Private Key")
|
|
5494
|
+
includes: TombstoneDataRootSSHKeyIncludes
|
|
5495
|
+
|
|
5496
|
+
|
|
5497
|
+
class TombstoneDataSSHKey(BaseModel):
|
|
5498
|
+
data_type: Literal["ssh_key"] = Field(..., const=True, title="Data Type")
|
|
5499
|
+
name: constr(regex=r"^[a-zA-Z0-9-_]+$", min_length=1, max_length=64) = Field(
|
|
5500
|
+
..., title="Name"
|
|
5501
|
+
)
|
|
5502
|
+
identity_file_path: Optional[str] = Field(..., title="Identity File Path")
|
|
5503
|
+
includes: TombstoneDataSSHKeyIncludes
|
|
5504
|
+
|
|
5505
|
+
|
|
5506
|
+
class TombstoneDataMailHostname(BaseModel):
|
|
5507
|
+
data_type: Literal["mail_hostname"] = Field(..., const=True, title="Data Type")
|
|
5508
|
+
domain: str = Field(..., title="Domain")
|
|
5509
|
+
includes: TombstoneDataMailHostnameIncludes
|
|
5510
|
+
|
|
5511
|
+
|
|
5512
|
+
class TombstoneDataCertificate(CoreApiModel):
|
|
5513
|
+
data_type: Literal["certificate"] = Field(..., title="Data Type")
|
|
5514
|
+
includes: TombstoneDataCertificateIncludes
|
|
5277
5515
|
|
|
5278
5516
|
|
|
5279
5517
|
class TombstoneDataDaemon(CoreApiModel):
|
|
@@ -5281,6 +5519,8 @@ class TombstoneDataDaemon(CoreApiModel):
|
|
|
5281
5519
|
name: constr(regex=r"^[a-z0-9-_]+$", min_length=1, max_length=64) = Field(
|
|
5282
5520
|
..., title="Name"
|
|
5283
5521
|
)
|
|
5522
|
+
nodes_ids: List[int] = Field(..., min_items=1, title="Nodes Ids", unique_items=True)
|
|
5523
|
+
includes: TombstoneDataDaemonIncludes
|
|
5284
5524
|
|
|
5285
5525
|
|
|
5286
5526
|
class TombstoneDataFPMPool(CoreApiModel):
|
|
@@ -5289,17 +5529,7 @@ class TombstoneDataFPMPool(CoreApiModel):
|
|
|
5289
5529
|
name: constr(regex=r"^[a-z0-9-_]+$", min_length=1, max_length=64) = Field(
|
|
5290
5530
|
..., title="Name"
|
|
5291
5531
|
)
|
|
5292
|
-
|
|
5293
|
-
|
|
5294
|
-
class TombstoneDataMailAccount(CoreApiModel):
|
|
5295
|
-
data_type: Literal["mail_account"] = Field(..., title="Data Type")
|
|
5296
|
-
local_part: constr(regex=r"^[a-z0-9-.]+$", min_length=1, max_length=64) = Field(
|
|
5297
|
-
...,
|
|
5298
|
-
description="May not be in use by mail alias in the same mail domain.",
|
|
5299
|
-
title="Local Part",
|
|
5300
|
-
)
|
|
5301
|
-
mail_domain_id: int = Field(..., title="Mail Domain Id")
|
|
5302
|
-
delete_on_cluster: Optional[bool] = Field(False, title="Delete On Cluster")
|
|
5532
|
+
includes: TombstoneDataFPMPoolIncludes
|
|
5303
5533
|
|
|
5304
5534
|
|
|
5305
5535
|
class TombstoneDataPassengerApp(CoreApiModel):
|
|
@@ -5307,6 +5537,9 @@ class TombstoneDataPassengerApp(CoreApiModel):
|
|
|
5307
5537
|
name: constr(regex=r"^[a-z0-9-_]+$", min_length=1, max_length=64) = Field(
|
|
5308
5538
|
..., title="Name"
|
|
5309
5539
|
)
|
|
5540
|
+
app_root: str = Field(..., title="App Root")
|
|
5541
|
+
delete_on_cluster: Optional[bool] = Field(False, title="Delete On Cluster")
|
|
5542
|
+
includes: TombstoneDataPassengerAppIncludes
|
|
5310
5543
|
|
|
5311
5544
|
|
|
5312
5545
|
class TombstoneDataRedisInstance(CoreApiModel):
|
|
@@ -5315,12 +5548,76 @@ class TombstoneDataRedisInstance(CoreApiModel):
|
|
|
5315
5548
|
..., title="Name"
|
|
5316
5549
|
)
|
|
5317
5550
|
delete_on_cluster: Optional[bool] = Field(False, title="Delete On Cluster")
|
|
5551
|
+
includes: TombstoneDataRedisInstanceIncludes
|
|
5318
5552
|
|
|
5319
5553
|
|
|
5320
5554
|
class TombstoneDataUNIXUser(CoreApiModel):
|
|
5321
5555
|
data_type: Literal["unix_user"] = Field(..., title="Data Type")
|
|
5322
5556
|
home_directory: str = Field(..., title="Home Directory")
|
|
5557
|
+
mail_domains_directory: Optional[str] = Field(..., title="Mail Domains Directory")
|
|
5323
5558
|
delete_on_cluster: Optional[bool] = Field(False, title="Delete On Cluster")
|
|
5559
|
+
includes: TombstoneDataUNIXUserIncludes
|
|
5560
|
+
|
|
5561
|
+
|
|
5562
|
+
class TombstoneDataCronIncludes(BaseModel):
|
|
5563
|
+
node: NodeResource
|
|
5564
|
+
unix_user: Union[TombstoneDataUNIXUser, UNIXUserResource] = Field(
|
|
5565
|
+
..., title="Unix User"
|
|
5566
|
+
)
|
|
5567
|
+
|
|
5568
|
+
|
|
5569
|
+
class TombstoneDataHtpasswdFileIncludes(BaseModel):
|
|
5570
|
+
unix_user: Union[UNIXUserResource, TombstoneDataUNIXUser] = Field(
|
|
5571
|
+
..., title="Unix User"
|
|
5572
|
+
)
|
|
5573
|
+
|
|
5574
|
+
|
|
5575
|
+
class TombstoneDataHtpasswdFile(BaseModel):
|
|
5576
|
+
data_type: Literal["htpasswd_file"] = Field(..., const=True, title="Data Type")
|
|
5577
|
+
unix_user_id: int = Field(..., title="Unix User Id")
|
|
5578
|
+
includes: TombstoneDataHtpasswdFileIncludes
|
|
5579
|
+
|
|
5580
|
+
|
|
5581
|
+
class TombstoneDataMailDomainIncludes(BaseModel):
|
|
5582
|
+
unix_user: Union[UNIXUserResource, TombstoneDataUNIXUser] = Field(
|
|
5583
|
+
..., title="Unix User"
|
|
5584
|
+
)
|
|
5585
|
+
|
|
5586
|
+
|
|
5587
|
+
class TombstoneDataMailDomain(BaseModel):
|
|
5588
|
+
data_type: Literal["mail_domain"] = Field(..., const=True, title="Data Type")
|
|
5589
|
+
domain: str = Field(..., title="Domain")
|
|
5590
|
+
unix_user_id: int = Field(..., title="Unix User Id")
|
|
5591
|
+
delete_on_cluster: Optional[bool] = Field(False, title="Delete On Cluster")
|
|
5592
|
+
includes: TombstoneDataMailDomainIncludes
|
|
5593
|
+
|
|
5594
|
+
|
|
5595
|
+
class TombstoneDataMailAccountIncludes(BaseModel):
|
|
5596
|
+
mail_domain: Union[MailDomainResource, TombstoneDataMailDomain] = Field(
|
|
5597
|
+
..., title="Mail Domain"
|
|
5598
|
+
)
|
|
5599
|
+
|
|
5600
|
+
|
|
5601
|
+
class TombstoneDataMailAccount(CoreApiModel):
|
|
5602
|
+
data_type: Literal["mail_account"] = Field(..., title="Data Type")
|
|
5603
|
+
local_part: constr(regex=r"^[a-z0-9-.]+$", min_length=1, max_length=64) = Field(
|
|
5604
|
+
...,
|
|
5605
|
+
description="May not be in use by mail alias in the same mail domain.",
|
|
5606
|
+
title="Local Part",
|
|
5607
|
+
)
|
|
5608
|
+
mail_domain_id: int = Field(..., title="Mail Domain Id")
|
|
5609
|
+
delete_on_cluster: Optional[bool] = Field(False, title="Delete On Cluster")
|
|
5610
|
+
includes: TombstoneDataMailAccountIncludes
|
|
5611
|
+
|
|
5612
|
+
|
|
5613
|
+
class TombstoneDataCron(CoreApiModel):
|
|
5614
|
+
data_type: Literal["cron"] = Field(..., title="Data Type")
|
|
5615
|
+
node_id: int = Field(..., title="Node Id")
|
|
5616
|
+
name: constr(regex=r"^[a-z0-9-_]+$", min_length=1, max_length=64) = Field(
|
|
5617
|
+
..., title="Name"
|
|
5618
|
+
)
|
|
5619
|
+
unix_user_id: int = Field(..., title="Unix User Id")
|
|
5620
|
+
includes: TombstoneDataCronIncludes
|
|
5324
5621
|
|
|
5325
5622
|
|
|
5326
5623
|
class TombstoneDataUNIXUserRabbitMQCredentials(CoreApiModel):
|
|
@@ -5328,27 +5625,20 @@ class TombstoneDataUNIXUserRabbitMQCredentials(CoreApiModel):
|
|
|
5328
5625
|
rabbitmq_virtual_host_name: constr(
|
|
5329
5626
|
regex=r"^[a-z0-9-.]+$", min_length=1, max_length=32
|
|
5330
5627
|
) = Field(..., title="Rabbitmq Virtual Host Name")
|
|
5628
|
+
includes: TombstoneDataUNIXUserRabbitMQCredentialsIncludes
|
|
5331
5629
|
|
|
5332
5630
|
|
|
5333
5631
|
class TombstoneDataVirtualHost(CoreApiModel):
|
|
5334
5632
|
data_type: Literal["virtual_host"] = Field(..., title="Data Type")
|
|
5335
5633
|
domain_root: str = Field(..., title="Domain Root")
|
|
5336
5634
|
delete_on_cluster: Optional[bool] = Field(False, title="Delete On Cluster")
|
|
5635
|
+
includes: TombstoneDataVirtualHostIncludes
|
|
5337
5636
|
|
|
5338
5637
|
|
|
5339
5638
|
class TombstoneIncludes(CoreApiModel):
|
|
5340
5639
|
cluster: ClusterResource
|
|
5341
5640
|
|
|
5342
5641
|
|
|
5343
|
-
class TombstoneDataDatabase(CoreApiModel):
|
|
5344
|
-
data_type: Literal["database"] = Field(..., title="Data Type")
|
|
5345
|
-
name: constr(regex=r"^[a-z0-9-_]+$", min_length=1, max_length=63) = Field(
|
|
5346
|
-
..., title="Name"
|
|
5347
|
-
)
|
|
5348
|
-
server_software_name: DatabaseServerSoftwareNameEnum
|
|
5349
|
-
delete_on_cluster: Optional[bool] = Field(False, title="Delete On Cluster")
|
|
5350
|
-
|
|
5351
|
-
|
|
5352
5642
|
class TombstoneResource(CoreApiModel):
|
|
5353
5643
|
id: int = Field(..., title="Id")
|
|
5354
5644
|
created_at: datetime = Field(..., title="Created At")
|
|
@@ -5365,6 +5655,14 @@ class TombstoneResource(CoreApiModel):
|
|
|
5365
5655
|
TombstoneDataMailAccount,
|
|
5366
5656
|
TombstoneDataRedisInstance,
|
|
5367
5657
|
TombstoneDataVirtualHost,
|
|
5658
|
+
TombstoneDataDatabaseUser,
|
|
5659
|
+
TombstoneDataDatabaseUserGrant,
|
|
5660
|
+
TombstoneDataDomainRouter,
|
|
5661
|
+
TombstoneDataHtpasswdFile,
|
|
5662
|
+
TombstoneDataRootSSHKey,
|
|
5663
|
+
TombstoneDataSSHKey,
|
|
5664
|
+
TombstoneDataMailDomain,
|
|
5665
|
+
TombstoneDataMailHostname,
|
|
5368
5666
|
] = Field(..., discriminator="data_type", title="Data")
|
|
5369
5667
|
object_id: int = Field(..., title="Object Id")
|
|
5370
5668
|
object_model_name: ObjectModelNameEnum
|
|
@@ -5372,4 +5670,78 @@ class TombstoneResource(CoreApiModel):
|
|
|
5372
5670
|
includes: TombstoneIncludes
|
|
5373
5671
|
|
|
5374
5672
|
|
|
5673
|
+
class NodeDependenciesResource(CoreApiModel):
|
|
5674
|
+
hostname: str = Field(..., title="Hostname")
|
|
5675
|
+
groups: List[NodeGroupDependency] = Field(..., title="Groups")
|
|
5676
|
+
domain_routers: List[NodeDomainRouterDependency] = Field(
|
|
5677
|
+
..., title="Domain Routers"
|
|
5678
|
+
)
|
|
5679
|
+
daemons: List[NodeDaemonDependency] = Field(..., title="Daemons")
|
|
5680
|
+
crons: List[NodeCronDependency] = Field(..., title="Crons")
|
|
5681
|
+
hosts_entries: List[NodeHostsEntryDependency] = Field(..., title="Hosts Entries")
|
|
5682
|
+
|
|
5683
|
+
|
|
5684
|
+
class DaemonLogResource(BaseModel):
|
|
5685
|
+
application_name: constr(min_length=1, max_length=65535) = Field(
|
|
5686
|
+
..., title="Application Name"
|
|
5687
|
+
)
|
|
5688
|
+
priority: int = Field(..., title="Priority")
|
|
5689
|
+
pid: int = Field(..., title="Pid")
|
|
5690
|
+
message: constr(min_length=1, max_length=65535) = Field(..., title="Message")
|
|
5691
|
+
node_hostname: str = Field(..., title="Node Hostname")
|
|
5692
|
+
timestamp: datetime = Field(..., title="Timestamp")
|
|
5693
|
+
|
|
5694
|
+
|
|
5695
|
+
class NodeSpecificationsResource(BaseModel):
|
|
5696
|
+
hostname: str = Field(..., title="Hostname")
|
|
5697
|
+
memory_mib: int = Field(..., title="Memory Mib")
|
|
5698
|
+
cpu_cores: int = Field(..., title="Cpu Cores")
|
|
5699
|
+
disk_gib: int = Field(..., title="Disk Gib")
|
|
5700
|
+
usable_cpu_cores: int = Field(..., title="Usable Cpu Cores")
|
|
5701
|
+
usable_memory_mib: int = Field(..., title="Usable Memory Mib")
|
|
5702
|
+
usable_disk_gib: int = Field(..., title="Usable Disk Gib")
|
|
5703
|
+
|
|
5704
|
+
|
|
5705
|
+
class RequestLogIncludes(BaseModel):
|
|
5706
|
+
pass
|
|
5707
|
+
|
|
5708
|
+
|
|
5709
|
+
class RequestLogResource(BaseModel):
|
|
5710
|
+
id: int = Field(..., title="Id")
|
|
5711
|
+
created_at: datetime = Field(..., title="Created At")
|
|
5712
|
+
updated_at: datetime = Field(..., title="Updated At")
|
|
5713
|
+
ip_address: str = Field(..., title="Ip Address")
|
|
5714
|
+
path: str = Field(..., title="Path")
|
|
5715
|
+
method: HTTPMethod
|
|
5716
|
+
query_parameters: Dict[str, str] = Field(..., title="Query Parameters")
|
|
5717
|
+
body: Any = Field(
|
|
5718
|
+
...,
|
|
5719
|
+
description="JSON body if specified and valid on request. Null if no JSON specified, or invalid.",
|
|
5720
|
+
title="Body",
|
|
5721
|
+
)
|
|
5722
|
+
api_user_id: int = Field(..., title="Api User Id")
|
|
5723
|
+
request_id: UUID4 = Field(..., title="Request Id")
|
|
5724
|
+
includes: Optional[RequestLogIncludes] = None
|
|
5725
|
+
|
|
5726
|
+
|
|
5727
|
+
class ObjectLogIncludes(BaseModel):
|
|
5728
|
+
customer: Optional[CustomerResource]
|
|
5729
|
+
|
|
5730
|
+
|
|
5731
|
+
class ObjectLogResource(BaseModel):
|
|
5732
|
+
id: int = Field(..., title="Id")
|
|
5733
|
+
created_at: datetime = Field(..., title="Created At")
|
|
5734
|
+
updated_at: datetime = Field(..., title="Updated At")
|
|
5735
|
+
object_id: int = Field(..., title="Object Id")
|
|
5736
|
+
object_model_name: Optional[
|
|
5737
|
+
constr(regex=r"^[a-zA-Z]+$", min_length=1, max_length=255)
|
|
5738
|
+
] = Field(..., title="Object Model Name")
|
|
5739
|
+
request_id: Optional[UUID4] = Field(..., title="Request Id")
|
|
5740
|
+
type: ObjectLogTypeEnum
|
|
5741
|
+
causer_type: Optional[CauserTypeEnum]
|
|
5742
|
+
causer_id: Optional[int] = Field(..., title="Causer Id")
|
|
5743
|
+
customer_id: Optional[int] = Field(..., title="Customer Id")
|
|
5744
|
+
includes: Optional[ObjectLogIncludes] = None
|
|
5745
|
+
|
|
5746
|
+
|
|
5375
5747
|
NestedPathsDict.update_forward_refs()
|
|
@@ -2,6 +2,10 @@ from cyberfusion.CoreApiClient import models
|
|
|
2
2
|
from typing import Optional, List
|
|
3
3
|
|
|
4
4
|
from cyberfusion.CoreApiClient.interfaces import Resource
|
|
5
|
+
from cyberfusion.CoreApiClient.models import (
|
|
6
|
+
NodeDependenciesResource,
|
|
7
|
+
NodeSpecificationsResource,
|
|
8
|
+
)
|
|
5
9
|
|
|
6
10
|
|
|
7
11
|
class Clusters(Resource):
|
|
@@ -220,3 +224,25 @@ class Clusters(Resource):
|
|
|
220
224
|
},
|
|
221
225
|
).json
|
|
222
226
|
]
|
|
227
|
+
|
|
228
|
+
def list_nodes_dependencies(self, *, id_: int) -> list[NodeDependenciesResource]:
|
|
229
|
+
return [
|
|
230
|
+
models.NodeDependenciesResource.parse_obj(model)
|
|
231
|
+
for model in self.api_connector.send_or_fail(
|
|
232
|
+
"GET",
|
|
233
|
+
f"/api/v1/clusters/{id_}/nodes-dependencies",
|
|
234
|
+
data=None,
|
|
235
|
+
query_parameters={},
|
|
236
|
+
).json
|
|
237
|
+
]
|
|
238
|
+
|
|
239
|
+
def get_nodes_specifications(self, *, id_: int) -> list[NodeSpecificationsResource]:
|
|
240
|
+
return [
|
|
241
|
+
models.NodeSpecificationsResource.parse_obj(model)
|
|
242
|
+
for model in self.api_connector.send_or_fail(
|
|
243
|
+
"GET",
|
|
244
|
+
f"/api/v1/clusters/{id_}/nodes-specifications",
|
|
245
|
+
data=None,
|
|
246
|
+
query_parameters={},
|
|
247
|
+
).json
|
|
248
|
+
]
|
|
@@ -77,3 +77,25 @@ class Daemons(Resource):
|
|
|
77
77
|
"DELETE", f"/api/v1/daemons/{id_}", data=None, query_parameters={}
|
|
78
78
|
).json
|
|
79
79
|
)
|
|
80
|
+
|
|
81
|
+
def list_logs(
|
|
82
|
+
self,
|
|
83
|
+
*,
|
|
84
|
+
daemon_id: int,
|
|
85
|
+
timestamp: Optional[str] = None,
|
|
86
|
+
sort: Optional[str] = None,
|
|
87
|
+
limit: Optional[int] = None,
|
|
88
|
+
) -> list[models.DaemonLogResource]:
|
|
89
|
+
return [
|
|
90
|
+
models.DaemonLogResource.parse_obj(model)
|
|
91
|
+
for model in self.api_connector.send_or_fail(
|
|
92
|
+
"GET",
|
|
93
|
+
f"/api/v1/daemons/{daemon_id}/logs",
|
|
94
|
+
data=None,
|
|
95
|
+
query_parameters={
|
|
96
|
+
"timestamp": timestamp,
|
|
97
|
+
"sort": sort,
|
|
98
|
+
"limit": limit,
|
|
99
|
+
},
|
|
100
|
+
).json
|
|
101
|
+
]
|
|
@@ -64,3 +64,16 @@ class DatabaseUserGrants(Resource):
|
|
|
64
64
|
},
|
|
65
65
|
).json
|
|
66
66
|
]
|
|
67
|
+
|
|
68
|
+
def delete_database_user_grant(
|
|
69
|
+
self,
|
|
70
|
+
*,
|
|
71
|
+
id_: int,
|
|
72
|
+
) -> models.DetailMessage:
|
|
73
|
+
return models.DetailMessage.parse_obj(
|
|
74
|
+
self.api_connector.send_or_fail(
|
|
75
|
+
"DELETE",
|
|
76
|
+
f"/api/v1/database-user-grants/{id_}",
|
|
77
|
+
data=None,
|
|
78
|
+
).json
|
|
79
|
+
)
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
from cyberfusion.CoreApiClient import models
|
|
2
|
+
from typing import Optional, List
|
|
3
|
+
|
|
4
|
+
from cyberfusion.CoreApiClient.interfaces import Resource
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
class Logs(Resource):
|
|
8
|
+
def list_access_logs(
|
|
9
|
+
self,
|
|
10
|
+
*,
|
|
11
|
+
virtual_host_id: int,
|
|
12
|
+
timestamp: Optional[str] = None,
|
|
13
|
+
sort: Optional[str] = None,
|
|
14
|
+
limit: Optional[int] = None,
|
|
15
|
+
) -> list[models.WebServerLogAccessResource]:
|
|
16
|
+
return [
|
|
17
|
+
models.WebServerLogAccessResource.parse_obj(model)
|
|
18
|
+
for model in self.api_connector.send_or_fail(
|
|
19
|
+
"GET",
|
|
20
|
+
f"/api/v1/logs/access/{virtual_host_id}",
|
|
21
|
+
data=None,
|
|
22
|
+
query_parameters={
|
|
23
|
+
"timestamp": timestamp,
|
|
24
|
+
"sort": sort,
|
|
25
|
+
"limit": limit,
|
|
26
|
+
},
|
|
27
|
+
).json
|
|
28
|
+
]
|
|
29
|
+
|
|
30
|
+
def list_error_logs(
|
|
31
|
+
self,
|
|
32
|
+
*,
|
|
33
|
+
virtual_host_id: int,
|
|
34
|
+
timestamp: Optional[str] = None,
|
|
35
|
+
sort: Optional[str] = None,
|
|
36
|
+
limit: Optional[int] = None,
|
|
37
|
+
) -> list[models.WebServerLogErrorResource]:
|
|
38
|
+
return [
|
|
39
|
+
models.WebServerLogErrorResource.parse_obj(model)
|
|
40
|
+
for model in self.api_connector.send_or_fail(
|
|
41
|
+
"GET",
|
|
42
|
+
f"/api/v1/logs/error/{virtual_host_id}",
|
|
43
|
+
data=None,
|
|
44
|
+
query_parameters={
|
|
45
|
+
"timestamp": timestamp,
|
|
46
|
+
"sort": sort,
|
|
47
|
+
"limit": limit,
|
|
48
|
+
},
|
|
49
|
+
).json
|
|
50
|
+
]
|
|
51
|
+
|
|
52
|
+
def list_object_logs(
|
|
53
|
+
self,
|
|
54
|
+
*,
|
|
55
|
+
skip: Optional[int] = None,
|
|
56
|
+
limit: Optional[int] = None,
|
|
57
|
+
filter_: Optional[List[str]] = None,
|
|
58
|
+
sort: Optional[List[str]] = None,
|
|
59
|
+
) -> list[models.ObjectLogResource]:
|
|
60
|
+
return [
|
|
61
|
+
models.ObjectLogResource.parse_obj(model)
|
|
62
|
+
for model in self.api_connector.send_or_fail(
|
|
63
|
+
"GET",
|
|
64
|
+
"/api/v1/object-logs",
|
|
65
|
+
data=None,
|
|
66
|
+
query_parameters={
|
|
67
|
+
"skip": skip,
|
|
68
|
+
"limit": limit,
|
|
69
|
+
"filter": filter_,
|
|
70
|
+
"sort": sort,
|
|
71
|
+
},
|
|
72
|
+
).json
|
|
73
|
+
]
|
|
74
|
+
|
|
75
|
+
def list_request_logs(
|
|
76
|
+
self,
|
|
77
|
+
*,
|
|
78
|
+
skip: Optional[int] = None,
|
|
79
|
+
limit: Optional[int] = None,
|
|
80
|
+
filter_: Optional[List[str]] = None,
|
|
81
|
+
sort: Optional[List[str]] = None,
|
|
82
|
+
) -> list[models.RequestLogResource]:
|
|
83
|
+
return [
|
|
84
|
+
models.RequestLogResource.parse_obj(model)
|
|
85
|
+
for model in self.api_connector.send_or_fail(
|
|
86
|
+
"GET",
|
|
87
|
+
"/api/v1/request-logs",
|
|
88
|
+
data=None,
|
|
89
|
+
query_parameters={
|
|
90
|
+
"skip": skip,
|
|
91
|
+
"limit": limit,
|
|
92
|
+
"filter": filter_,
|
|
93
|
+
"sort": sort,
|
|
94
|
+
},
|
|
95
|
+
).json
|
|
96
|
+
]
|
|
@@ -71,13 +71,14 @@ class PassengerApps(Resource):
|
|
|
71
71
|
self,
|
|
72
72
|
*,
|
|
73
73
|
id_: int,
|
|
74
|
+
delete_on_cluster: Optional[bool] = None,
|
|
74
75
|
) -> models.DetailMessage:
|
|
75
76
|
return models.DetailMessage.parse_obj(
|
|
76
77
|
self.api_connector.send_or_fail(
|
|
77
78
|
"DELETE",
|
|
78
79
|
f"/api/v1/passenger-apps/{id_}",
|
|
79
80
|
data=None,
|
|
80
|
-
query_parameters={},
|
|
81
|
+
query_parameters={"delete_on_cluster": delete_on_cluster},
|
|
81
82
|
).json
|
|
82
83
|
)
|
|
83
84
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: python3-core-api-client
|
|
3
|
-
Version: 1.0
|
|
3
|
+
Version: 1.1.0
|
|
4
4
|
Summary: Python client for Core API.
|
|
5
5
|
Author-email: Cyberfusion <support@cyberfusion.io>
|
|
6
6
|
Project-URL: Source, https://github.com/CyberfusionIO/python3-core-api-client
|
|
@@ -13,7 +13,7 @@ Requires-Dist: pydantic[dotenv,email]==1.10.4
|
|
|
13
13
|
|
|
14
14
|
Python client for Core API.
|
|
15
15
|
|
|
16
|
-
This client was built for and tested on the **1.
|
|
16
|
+
This client was built for and tested on the **1.248** version of the API.
|
|
17
17
|
|
|
18
18
|
## Support
|
|
19
19
|
|
|
@@ -250,11 +250,11 @@ To raise `cyberfusion.CoreApiClient.exceptions.CallException` in case of an unex
|
|
|
250
250
|
|
|
251
251
|
Auto-generate models as follows:
|
|
252
252
|
|
|
253
|
-
datamodel-codegen --input-file-type openapi --
|
|
253
|
+
datamodel-codegen --input-file-type openapi --url http://127.0.0.1:22190/openapi.json --output temp_models.py --target-python-version 3.11
|
|
254
254
|
|
|
255
|
-
|
|
255
|
+
This adds models to `temp_models.py`. Merge it with `models.py`.
|
|
256
256
|
|
|
257
|
-
|
|
257
|
+
To not use a local Core API instance, replace `--url` by `--input`. Pass the path to the OpenAPI spec (JSON).
|
|
258
258
|
|
|
259
259
|
# Test strategy
|
|
260
260
|
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
from cyberfusion.CoreApiClient import models
|
|
2
|
-
from typing import Optional
|
|
3
|
-
|
|
4
|
-
from cyberfusion.CoreApiClient.interfaces import Resource
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
class Logs(Resource):
|
|
8
|
-
def list_access_logs(
|
|
9
|
-
self,
|
|
10
|
-
*,
|
|
11
|
-
virtual_host_id: int,
|
|
12
|
-
timestamp: Optional[str] = None,
|
|
13
|
-
sort: Optional[models.LogAccessResource] = None,
|
|
14
|
-
limit: Optional[int] = None,
|
|
15
|
-
) -> list[models.LogAccessResource]:
|
|
16
|
-
return [
|
|
17
|
-
models.LogAccessResource.parse_obj(model)
|
|
18
|
-
for model in self.api_connector.send_or_fail(
|
|
19
|
-
"GET",
|
|
20
|
-
f"/api/v1/logs/access/{virtual_host_id}",
|
|
21
|
-
data=None,
|
|
22
|
-
query_parameters={
|
|
23
|
-
"timestamp": timestamp,
|
|
24
|
-
"sort": sort,
|
|
25
|
-
"limit": limit,
|
|
26
|
-
},
|
|
27
|
-
).json
|
|
28
|
-
]
|
|
29
|
-
|
|
30
|
-
def list_error_logs(
|
|
31
|
-
self,
|
|
32
|
-
*,
|
|
33
|
-
virtual_host_id: int,
|
|
34
|
-
timestamp: Optional[str] = None,
|
|
35
|
-
sort: Optional[models.LogErrorResource] = None,
|
|
36
|
-
limit: Optional[int] = None,
|
|
37
|
-
) -> list[models.LogErrorResource]:
|
|
38
|
-
return [
|
|
39
|
-
models.LogErrorResource.parse_obj(model)
|
|
40
|
-
for model in self.api_connector.send_or_fail(
|
|
41
|
-
"GET",
|
|
42
|
-
f"/api/v1/logs/error/{virtual_host_id}",
|
|
43
|
-
data=None,
|
|
44
|
-
query_parameters={
|
|
45
|
-
"timestamp": timestamp,
|
|
46
|
-
"sort": sort,
|
|
47
|
-
"limit": limit,
|
|
48
|
-
},
|
|
49
|
-
).json
|
|
50
|
-
]
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|