This repository has been archived on 2024-05-31. You can view files and clone it, but cannot push or open issues or pull requests.
devicehub-teal/ereuse_devicehub/resources/event/__init__.py

33 lines
625 B
Python
Raw Normal View History

from ereuse_devicehub.resources.event.schemas import Add, Event, Remove, Snapshot, Test, \
TestHardDrive
2018-04-27 17:16:43 +00:00
from ereuse_devicehub.resources.event.views import EventView, SnapshotView
from teal.resource import Converters, Resource
2018-04-10 15:06:39 +00:00
class EventDef(Resource):
2018-04-27 17:16:43 +00:00
SCHEMA = Event
2018-04-10 15:06:39 +00:00
VIEW = EventView
2018-04-27 17:16:43 +00:00
AUTH = True
ID_CONVERTER = Converters.int
class AddDef(EventDef):
SCHEMA = Add
class RemoveDef(EventDef):
SCHEMA = Remove
2018-04-27 17:16:43 +00:00
class SnapshotDef(EventDef):
SCHEMA = Snapshot
VIEW = SnapshotView
class TestDef(EventDef):
SCHEMA = Test
class TestHardDriveDef(TestDef):
SCHEMA = TestHardDrive