Skip to content

Commit

Permalink
Change schema of remote in and outboxes.
Browse files Browse the repository at this point in the history
  • Loading branch information
nathandf committed Feb 23, 2024
1 parent 29da043 commit 6b20e4b
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions src/api/src/backend/views/http/tapis_etl.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from typing import List

from pydantic import BaseModel, validator, Extra
from pydantic import BaseModel, validator, Extra, root_validator

from .requests import Pipeline

Expand All @@ -9,29 +9,33 @@
EnumManifestPriority,
IOSystem
)


class TapisIOBox(IOSystem):
system_id: str
writable_system_id: str = None
data_transfer_system_id: str = None

class TapisLocalIOBox(IOSystem):
writable_system_id: str
data_transfer_system_id: str
@root_validator
def validate_system_ids(cls, values):
if (
values.get("writable_system_id") == None
and values.get("data_transfer_system_id") == None
):
raise ValueError("Must define one or both of the following properties: ['writable_system_id', 'data_transfer_system_id']")

class TapisRemoteOutbox(TapisIOBox):
manifest_generation_policy: EnumManifestGenerationPolicy = None
manifest_priority: EnumManifestPriority = EnumManifestPriority.Oldest
data_path: str = "/ETL/REMOTE-OUTBOX/DATA"
manifests_path: str = "/ETL/REMOTE-OUTBOX/MANFIFESTS"

class TapisLocalInbox(TapisLocalIOBox):
class TapisLocalInbox(TapisIOBox):
manifest_generation_policy: EnumManifestGenerationPolicy = EnumManifestGenerationPolicy.AutoOnePerFile
manifest_priority: EnumManifestPriority = EnumManifestPriority.Oldest
data_path: str = "/ETL/LOCAL-INBOX/DATA"
manifests_path: str = "/ETL/LOCAL-INBOX/MANFIFESTS"
inbound_transfer_manifests_path: str = "/ETL/LOCAL-INBOX/"

class TapisLocalOutbox(TapisLocalIOBox):
class TapisLocalOutbox(TapisIOBox):
manifest_generation_policy: EnumManifestGenerationPolicy = EnumManifestGenerationPolicy.AutoOneForAll
manifest_priority: EnumManifestPriority = EnumManifestPriority.Oldest
data_path: str = "/ETL/LOCAL-INBOX/DATA"
Expand Down

0 comments on commit 6b20e4b

Please sign in to comment.