Skip to content
Snippets Groups Projects
Hardware.py 382 B
Newer Older
  • Learn to ignore specific revisions
  • from sqlalchemy import Column, Integer, ForeignKey, Boolean
    
    from pilab.database import Base
    
    class SwitchType(Base):
        __tablename__ = "switches"
        host_id = Column(Integer, ForeignKey('hosts.id'), primary_key=True)
    
        poe = Column(Boolean)
    
    class ControllerType(Base):
        __tablename__ = "controllers"
        host_id = Column(Integer, ForeignKey('hosts.id'), primary_key=True)