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

93 lines
1.7 KiB
Python
Raw Normal View History

2018-06-20 21:18:15 +00:00
from ereuse_devicehub.resources.device.schemas import Component, Computer, ComputerMonitor, \
DataStorage, Desktop, Device, GraphicCard, HardDrive, Laptop, Microtower, Motherboard, Netbook, \
NetworkAdapter, Processor, RamModule, Server, SolidStateDrive
2018-04-10 15:06:39 +00:00
from ereuse_devicehub.resources.device.views import DeviceView
2018-04-27 17:16:43 +00:00
from teal.resource import Converters, Resource
2018-04-10 15:06:39 +00:00
class DeviceDef(Resource):
SCHEMA = Device
VIEW = DeviceView
ID_CONVERTER = Converters.int
2018-04-27 17:16:43 +00:00
AUTH = True
class ComputerDef(DeviceDef):
VIEW = None
2018-04-27 17:16:43 +00:00
SCHEMA = Computer
class DesktopDef(ComputerDef):
VIEW = None
2018-04-27 17:16:43 +00:00
SCHEMA = Desktop
class LaptopDef(ComputerDef):
VIEW = None
2018-04-27 17:16:43 +00:00
SCHEMA = Laptop
class NetbookDef(ComputerDef):
VIEW = None
2018-04-27 17:16:43 +00:00
SCHEMA = Netbook
class ServerDef(ComputerDef):
VIEW = None
2018-04-27 17:16:43 +00:00
SCHEMA = Server
class MicrotowerDef(ComputerDef):
VIEW = None
2018-04-27 17:16:43 +00:00
SCHEMA = Microtower
2018-06-20 21:18:15 +00:00
class ComputerMonitorDef(DeviceDef):
VIEW = None
2018-06-20 21:18:15 +00:00
SCHEMA = ComputerMonitor
2018-04-27 17:16:43 +00:00
class ComponentDef(DeviceDef):
VIEW = None
2018-04-27 17:16:43 +00:00
SCHEMA = Component
class GraphicCardDef(ComponentDef):
VIEW = None
2018-04-27 17:16:43 +00:00
SCHEMA = GraphicCard
2018-06-10 16:47:49 +00:00
class DataStorageDef(ComponentDef):
VIEW = None
2018-06-10 16:47:49 +00:00
SCHEMA = DataStorage
class HardDriveDef(DataStorageDef):
VIEW = None
2018-04-27 17:16:43 +00:00
SCHEMA = HardDrive
2018-06-10 16:47:49 +00:00
class SolidStateDriveDef(DataStorageDef):
VIEW = None
2018-06-10 16:47:49 +00:00
SCHEMA = SolidStateDrive
2018-04-27 17:16:43 +00:00
class MotherboardDef(ComponentDef):
VIEW = None
2018-04-27 17:16:43 +00:00
SCHEMA = Motherboard
class NetworkAdapterDef(ComponentDef):
VIEW = None
2018-04-27 17:16:43 +00:00
SCHEMA = NetworkAdapter
class RamModuleDef(ComponentDef):
VIEW = None
2018-04-27 17:16:43 +00:00
SCHEMA = RamModule
class ProcessorDef(ComponentDef):
VIEW = None
SCHEMA = Processor