stackit-git 0.5.0__tar.gz → 0.5.1__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.
- {stackit_git-0.5.0 → stackit_git-0.5.1}/PKG-INFO +1 -1
- {stackit_git-0.5.0 → stackit_git-0.5.1}/pyproject.toml +1 -1
- {stackit_git-0.5.0 → stackit_git-0.5.1}/src/stackit/git/models/instance.py +14 -0
- {stackit_git-0.5.0 → stackit_git-0.5.1}/LICENSE.md +0 -0
- {stackit_git-0.5.0 → stackit_git-0.5.1}/NOTICE.txt +0 -0
- {stackit_git-0.5.0 → stackit_git-0.5.1}/README.md +0 -0
- {stackit_git-0.5.0 → stackit_git-0.5.1}/src/stackit/git/__init__.py +0 -0
- {stackit_git-0.5.0 → stackit_git-0.5.1}/src/stackit/git/api/__init__.py +0 -0
- {stackit_git-0.5.0 → stackit_git-0.5.1}/src/stackit/git/api/default_api.py +0 -0
- {stackit_git-0.5.0 → stackit_git-0.5.1}/src/stackit/git/api_client.py +0 -0
- {stackit_git-0.5.0 → stackit_git-0.5.1}/src/stackit/git/api_response.py +0 -0
- {stackit_git-0.5.0 → stackit_git-0.5.1}/src/stackit/git/configuration.py +0 -0
- {stackit_git-0.5.0 → stackit_git-0.5.1}/src/stackit/git/exceptions.py +0 -0
- {stackit_git-0.5.0 → stackit_git-0.5.1}/src/stackit/git/models/__init__.py +0 -0
- {stackit_git-0.5.0 → stackit_git-0.5.1}/src/stackit/git/models/create_instance_payload.py +0 -0
- {stackit_git-0.5.0 → stackit_git-0.5.1}/src/stackit/git/models/flavor.py +0 -0
- {stackit_git-0.5.0 → stackit_git-0.5.1}/src/stackit/git/models/generic_error_response.py +0 -0
- {stackit_git-0.5.0 → stackit_git-0.5.1}/src/stackit/git/models/internal_server_error_response.py +0 -0
- {stackit_git-0.5.0 → stackit_git-0.5.1}/src/stackit/git/models/list_flavors.py +0 -0
- {stackit_git-0.5.0 → stackit_git-0.5.1}/src/stackit/git/models/list_instances.py +0 -0
- {stackit_git-0.5.0 → stackit_git-0.5.1}/src/stackit/git/models/patch_operation.py +0 -0
- {stackit_git-0.5.0 → stackit_git-0.5.1}/src/stackit/git/models/unauthorized_response.py +0 -0
- {stackit_git-0.5.0 → stackit_git-0.5.1}/src/stackit/git/py.typed +0 -0
- {stackit_git-0.5.0 → stackit_git-0.5.1}/src/stackit/git/rest.py +0 -0
|
@@ -16,6 +16,7 @@ from __future__ import annotations
|
|
|
16
16
|
|
|
17
17
|
import json
|
|
18
18
|
import pprint
|
|
19
|
+
import re # noqa: F401
|
|
19
20
|
from datetime import datetime
|
|
20
21
|
from typing import Any, ClassVar, Dict, List, Optional, Set
|
|
21
22
|
|
|
@@ -61,6 +62,19 @@ class Instance(BaseModel):
|
|
|
61
62
|
"version",
|
|
62
63
|
]
|
|
63
64
|
|
|
65
|
+
@field_validator("created", mode="before")
|
|
66
|
+
def created_change_year_zero_to_one(cls, value):
|
|
67
|
+
"""Workaround which prevents year 0 issue"""
|
|
68
|
+
if isinstance(value, str):
|
|
69
|
+
# Check for year "0000" at the beginning of the string
|
|
70
|
+
# This assumes common date formats like YYYY-MM-DDTHH:MM:SS+00:00 or YYYY-MM-DDTHH:MM:SSZ
|
|
71
|
+
if value.startswith("0000-01-01T") and re.match(
|
|
72
|
+
r"^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\+\d{2}:\d{2}|Z)$", value
|
|
73
|
+
):
|
|
74
|
+
# Workaround: Replace "0000" with "0001"
|
|
75
|
+
return "0001" + value[4:] # Take "0001" and append the rest of the string
|
|
76
|
+
return value
|
|
77
|
+
|
|
64
78
|
@field_validator("state")
|
|
65
79
|
def state_validate_enum(cls, value):
|
|
66
80
|
"""Validates the enum"""
|
|
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
|
{stackit_git-0.5.0 → stackit_git-0.5.1}/src/stackit/git/models/internal_server_error_response.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|