Skip to content
Snippets Groups Projects
Commit 7b953a6c authored by Radoslav Bodó's avatar Radoslav Bodó
Browse files

rwm: fix class order

parent 6a6cfa4e
No related branches found
No related tags found
No related merge requests found
Pipeline #7685 failed
......@@ -68,6 +68,35 @@ def size_fmt(num):
return f'{num:0.1f} YiB'
class BackupConfig(BaseModel):
"""Configuration for backup operations.
Attributes:
filesdirs:
REQUIRED. List of files and directories to be backed up.
excludes:
List of patterns for `--exclude` options for `restic backup` commmand. Defaults to an empty list.
extras:
Additional options for the `restic backup` commmand. Defaults to an empty list.
prerun:
List of shell commands to execute before backup. Defaults to an empty list.
postrun:
List of shell commands to execute after backup. Defaults to an empty list.
"""
model_config = ConfigDict(extra='forbid')
filesdirs: List[str]
excludes: List[str] = []
extras: List[str] = []
prerun: List[str] = []
postrun: List[str] = []
class RWMConfig(BaseModel):
"""Main configuration for RWM. Configuration file format is YAML.
......@@ -106,35 +135,6 @@ class RWMConfig(BaseModel):
retention: Dict[str, str] = {}
class BackupConfig(BaseModel):
"""Configuration for backup operations.
Attributes:
filesdirs:
REQUIRED. List of files and directories to be backed up.
excludes:
List of patterns for `--exclude` options for `restic backup` commmand. Defaults to an empty list.
extras:
Additional options for the `restic backup` commmand. Defaults to an empty list.
prerun:
List of shell commands to execute before backup. Defaults to an empty list.
postrun:
List of shell commands to execute after backup. Defaults to an empty list.
"""
model_config = ConfigDict(extra='forbid')
filesdirs: List[str]
excludes: List[str] = []
extras: List[str] = []
prerun: List[str] = []
postrun: List[str] = []
class RwmJSONEncoder(json.JSONEncoder):
"""json encoder"""
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment