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/device/__init__.py

122 lines
2.1 KiB
Python
Raw Normal View History

2018-09-07 10:38:02 +00:00
from teal.resource import Converters, Resource
from ereuse_devicehub.resources.device import schemas
2018-04-10 15:06:39 +00:00
from ereuse_devicehub.resources.device.views import DeviceView
class DeviceDef(Resource):
SCHEMA = schemas.Device
2018-04-10 15:06:39 +00:00
VIEW = DeviceView
ID_CONVERTER = Converters.int
2018-04-27 17:16:43 +00:00
AUTH = True
class ComputerDef(DeviceDef):
VIEW = None
SCHEMA = schemas.Computer
2018-04-27 17:16:43 +00:00
class DesktopDef(ComputerDef):
VIEW = None
SCHEMA = schemas.Desktop
2018-04-27 17:16:43 +00:00
class LaptopDef(ComputerDef):
VIEW = None
SCHEMA = schemas.Laptop
2018-04-27 17:16:43 +00:00
class ServerDef(ComputerDef):
VIEW = None
SCHEMA = schemas.Server
2018-04-27 17:16:43 +00:00
2018-06-26 13:35:13 +00:00
class MonitorDef(DeviceDef):
VIEW = None
SCHEMA = schemas.Monitor
2018-04-27 17:16:43 +00:00
2018-06-26 13:35:13 +00:00
class ComputerMonitorDef(MonitorDef):
VIEW = None
SCHEMA = schemas.ComputerMonitor
2018-06-20 21:18:15 +00:00
2018-06-26 13:35:13 +00:00
class TelevisionSetDef(MonitorDef):
VIEW = None
SCHEMA = schemas.TelevisionSet
2018-06-26 13:35:13 +00:00
class MobileDef(DeviceDef):
VIEW = None
SCHEMA = schemas.Mobile
2018-06-26 13:35:13 +00:00
class SmartphoneDef(MobileDef):
VIEW = None
SCHEMA = schemas.Smartphone
2018-06-26 13:35:13 +00:00
class TabletDef(MobileDef):
VIEW = None
SCHEMA = schemas.Tablet
2018-06-26 13:35:13 +00:00
class CellphoneDef(MobileDef):
VIEW = None
SCHEMA = schemas.Cellphone
2018-06-26 13:35:13 +00:00
2018-04-27 17:16:43 +00:00
class ComponentDef(DeviceDef):
VIEW = None
SCHEMA = schemas.Component
2018-04-27 17:16:43 +00:00
class GraphicCardDef(ComponentDef):
VIEW = None
SCHEMA = schemas.GraphicCard
2018-04-27 17:16:43 +00:00
2018-06-10 16:47:49 +00:00
class DataStorageDef(ComponentDef):
VIEW = None
SCHEMA = schemas.DataStorage
2018-06-10 16:47:49 +00:00
class HardDriveDef(DataStorageDef):
VIEW = None
SCHEMA = schemas.HardDrive
2018-04-27 17:16:43 +00:00
2018-06-10 16:47:49 +00:00
class SolidStateDriveDef(DataStorageDef):
VIEW = None
SCHEMA = schemas.SolidStateDrive
2018-06-10 16:47:49 +00:00
2018-04-27 17:16:43 +00:00
class MotherboardDef(ComponentDef):
VIEW = None
SCHEMA = schemas.Motherboard
2018-04-27 17:16:43 +00:00
class NetworkAdapterDef(ComponentDef):
VIEW = None
SCHEMA = schemas.NetworkAdapter
2018-04-27 17:16:43 +00:00
class RamModuleDef(ComponentDef):
VIEW = None
SCHEMA = schemas.RamModule
class ProcessorDef(ComponentDef):
VIEW = None
SCHEMA = schemas.Processor
2018-06-26 13:35:13 +00:00
2018-07-02 10:52:54 +00:00
class SoundCardDef(ComponentDef):
VIEW = None
SCHEMA = schemas.SoundCard
2018-07-02 10:52:54 +00:00
2018-06-26 13:35:13 +00:00
class DisplayDef(ComponentDef):
VIEW = None
SCHEMA = schemas.Display