-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add the sync cac content task to push local change to remote
Signed-off-by: Sophia Wang <huiwang@redhat.com>
- Loading branch information
1 parent
cfa689d
commit f1e4148
Showing
2 changed files
with
48 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# SPDX-License-Identifier: Apache-2.0 | ||
# Copyright (c) 2023 Red Hat, Inc. | ||
|
||
|
||
"""Trestle Bot Rule Transform Tasks""" | ||
|
||
from typing import Optional | ||
|
||
import trestlebot.const as const | ||
from trestlebot.tasks.base_task import ModelFilter, TaskBase | ||
|
||
|
||
class SyncCacContentTask(TaskBase): | ||
""" | ||
Transform rules into OSCAL content. | ||
""" | ||
|
||
def __init__( | ||
self, | ||
working_dir: str, | ||
model_filter: Optional[ModelFilter] = None, | ||
) -> None: | ||
""" | ||
Initialize transform task. | ||
Args: | ||
working_dir: Working directory to complete operations in | ||
model_filter: Optional filter to apply to the task to include or exclude models | ||
from processing. | ||
""" | ||
super().__init__(working_dir, model_filter) | ||
|
||
def execute(self) -> int: | ||
"""Execute task""" | ||
return const.SUCCESS_EXIT_CODE |