<s> from rack . openstack . common . db . sqlalchemy import models <EOL> from sqlalchemy import Boolean , Column , ForeignKey , Integer , String <EOL> from sqlalchemy import Text , schema <EOL> from sqlalchemy . ext . declarative import declarative_base <EOL> from sqlalchemy . orm import relationship <EOL> Base = declarative_base ( ) <EOL> class Group ( models . SoftDeleteMixin , <EOL> models . TimestampMixin , <EOL> models . ModelBase , <EOL> Base ) : <EOL> __tablename__ = '<STR_LIT>' <EOL> securitygroups = relationship ( "<STR_LIT>" ) <EOL> processes = relationship ( "<STR_LIT>" ) <EOL> gid = Column ( String ( <NUM_LIT> ) , primary_key = True ) <EOL> user_id = Column ( String ( <NUM_LIT:255> ) ) <EOL> project_id = Column ( String ( <NUM_LIT:255> ) ) <EOL> display_name = Column ( String ( <NUM_LIT:255> ) ) <EOL> display_description = Column ( String ( <NUM_LIT:255> ) ) <EOL> status = Column ( String ( <NUM_LIT:255> ) ) <EOL> class Service ( models . SoftDeleteMixin , <EOL> models . TimestampMixin , <EOL> models . ModelBase , <EOL> Base ) : <EOL> """<STR_LIT>""" <EOL> __tablename__ = '<STR_LIT>' <EOL> __table_args__ = ( <EOL> schema . UniqueConstraint ( "<STR_LIT:host>" , "<STR_LIT>" , "<STR_LIT>" , <EOL> name = "<STR_LIT>" ) , <EOL> schema . UniqueConstraint ( "<STR_LIT:host>" , "<STR_LIT>" , "<STR_LIT>" , <EOL> name = "<STR_LIT>" ) <EOL> ) <EOL> id = Column ( Integer , primary_key = True ) <EOL> host = Column ( String ( <NUM_LIT:255> ) ) <EOL> binary = Column ( String ( <NUM_LIT:255> ) ) <EOL> topic = Column ( String ( <NUM_LIT:255> ) ) <EOL> report_count = Column ( Integer , nullable = False , default = <NUM_LIT:0> ) <EOL> disabled = Column ( Boolean , default = False ) <EOL> disabled_reason = Column ( String ( <NUM_LIT:255> ) ) <EOL> class Network ( models . SoftDeleteMixin , <EOL> models . TimestampMixin , <EOL> models . ModelBase , <EOL> Base ) : <EOL> __tablename__ = '<STR_LIT>' <EOL> network_id = Column ( String ( <NUM_LIT:255> ) , primary_key = True ) <EOL> gid = Column ( String ( <NUM_LIT:255> ) ) <EOL> neutron_network_id = Column ( String ( <NUM_LIT:255> ) ) <EOL> is_admin = Column ( Boolean , default = False ) <EOL> cidr = Column ( String ( <NUM_LIT:255> ) ) <EOL> ext_router = Column ( String ( <NUM_LIT:255> ) ) <EOL> user_id = Column ( String ( <NUM_LIT:255> ) ) <EOL> project_id = Column ( String ( <NUM_LIT:255> ) ) <EOL> display_name = Column ( String ( <NUM_LIT:255> ) ) <EOL> class Keypair ( models . SoftDeleteMixin , <EOL> models . TimestampMixin , <EOL> models . ModelBase , <EOL> Base ) : <EOL> __tablename__ = '<STR_LIT>' <EOL> keypair_id = Column ( String ( <NUM_LIT> ) , primary_key = True ) <EOL> gid = Column ( String ( <NUM_LIT> ) , ForeignKey ( '<STR_LIT>' ) , nullable = False ) <EOL> user_id = Column ( String ( <NUM_LIT:255> ) ) <EOL> project_id = Column ( String ( <NUM_LIT:255> ) ) <EOL> nova_keypair_id = Column ( String ( <NUM_LIT:255> ) ) <EOL> private_key = Column ( Text ) <EOL> display_name = Column ( String ( <NUM_LIT:255> ) ) <EOL> is_default = Column ( Boolean , default = False ) <EOL> class Securitygroup ( models . SoftDeleteMixin , <EOL> models . TimestampMixin , <EOL> models . ModelBase , <EOL> Base ) : <EOL> __tablename__ = '<STR_LIT>' <EOL> deleted = Column ( Integer , nullable = False , default = <NUM_LIT:0> ) <EOL> securitygroup_id = Column ( String ( <NUM_LIT> ) , primary_key = True ) <EOL> gid = Column ( String ( <NUM_LIT> ) , ForeignKey ( '<STR_LIT>' ) ) <EOL> neutron_securitygroup_id = Column ( String ( <NUM_LIT> ) ) <EOL> is_default = Column ( Boolean , default = False ) <EOL> user_id = Column ( String ( <NUM_LIT:255> ) ) <EOL> project_id = Column ( String ( <NUM_LIT:255> ) ) <EOL> display_name = Column ( String ( <NUM_LIT:255> ) ) <EOL> group = relationship ( "<STR_LIT>" , <EOL> foreign_keys = gid , <EOL> primaryjoin = '<STR_LIT>' <EOL> '<STR_LIT>' <EOL> '<STR_LIT>' <EOL> '<STR_LIT>' ) <EOL> class Process ( models . SoftDeleteMixin , <EOL> models . TimestampMixin , <EOL> models . ModelBase , <EOL> Base ) : <EOL> __tablename__ = '<STR_LIT>' <EOL> deleted = Column ( Integer , nullable = False , default = <NUM_LIT:0> ) <EOL> gid = Column ( String ( <NUM_LIT> ) , ForeignKey ( '<STR_LIT>' ) , nullable = False ) <EOL> keypair_id = Column ( String ( <NUM_LIT> ) , ForeignKey ( '<STR_LIT>' ) ) <EOL> pid = Column ( String ( <NUM_LIT> ) , primary_key = True ) <EOL> ppid = Column ( String ( <NUM_LIT> ) , ForeignKey ( '<STR_LIT>' ) ) <EOL> nova_instance_id = Column ( String ( <NUM_LIT> ) ) <EOL> glance_image_id = Column ( String ( <NUM_LIT> ) ) <EOL> nova_flavor_id = Column ( Integer ) <EOL> user_id = Column ( String ( <NUM_LIT:255> ) ) <EOL> project_id = Column ( String ( <NUM_LIT:255> ) ) <EOL> display_name = Column ( String ( <NUM_LIT:255> ) ) <EOL> is_proxy = Column ( Boolean ( ) , default = False ) <EOL> shm_endpoint = Column ( Text ) <EOL> ipc_endpoint = Column ( Text ) <EOL> fs_endpoint = Column ( Text ) <EOL> args = Column ( Text ) <EOL> userdata = Column ( Text ) <EOL> app_status = Column ( Text ) <EOL> group = relationship ( "<STR_LIT>" , <EOL> foreign_keys = gid , <EOL> primaryjoin = '<STR_LIT>' <EOL> '<STR_LIT>' <EOL> '<STR_LIT>' <EOL> '<STR_LIT>' ) <EOL> securitygroups = relationship ( "<STR_LIT>" , <EOL> secondary = "<STR_LIT>" , <EOL> primaryjoin = '<STR_LIT>' <EOL> '<STR_LIT>' <EOL> '<STR_LIT>' , <EOL> secondaryjoin = '<STR_LIT>' <EOL> '<STR_LIT>' <EOL> '<STR_LIT>' <EOL> '<STR_LIT>' , <EOL> backref = "<STR_LIT>" ) <EOL> networks = relationship ( "<STR_LIT>" , <EOL> secondary = "<STR_LIT>" , <EOL> primaryjoin = '<STR_LIT>' <EOL> '<STR_LIT>' <EOL> '<STR_LIT>' , <EOL> secondaryjoin = '<STR_LIT>' <EOL> '<STR_LIT>' <EOL> '<STR_LIT>' , <EOL> backref = "<STR_LIT>" ) <EOL> class ProcessSecuritygroup ( models . ModelBase , Base ) : <EOL> __tablename__ = '<STR_LIT>' <EOL> pid = Column ( String ( <NUM_LIT> ) , ForeignKey ( <EOL> '<STR_LIT>' ) , nullable = False , primary_key = True ) <EOL> securitygroup_id = Column ( String ( <NUM_LIT> ) , ForeignKey ( <EOL> '<STR_LIT>' ) , nullable = False , primary_key = True ) <EOL> class ProcessNetwork ( models . ModelBase , Base ) : <EOL> __tablename__ = '<STR_LIT>' <EOL> pid = Column ( String ( <NUM_LIT> ) , ForeignKey ( <EOL> '<STR_LIT>' ) , nullable = False , primary_key = True ) <EOL> network_id = Column ( String ( <NUM_LIT> ) , ForeignKey ( <EOL> '<STR_LIT>' ) , nullable = False , primary_key = True ) </s>
