Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
rwm
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Radoslav Bodó
rwm
Commits
7b953a6c
Commit
7b953a6c
authored
1 year ago
by
Radoslav Bodó
Browse files
Options
Downloads
Patches
Plain Diff
rwm: fix class order
parent
6a6cfa4e
No related branches found
No related tags found
No related merge requests found
Pipeline
#7685
failed
1 year ago
Stage: code_quality
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
rwm.py
+29
-29
29 additions, 29 deletions
rwm.py
with
29 additions
and
29 deletions
rwm.py
+
29
−
29
View file @
7b953a6c
...
...
@@ -68,6 +68,35 @@ def size_fmt(num):
return
f
'
{
num
:
0.1
f
}
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
"""
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment