Package coprs :: Module models :: Class CoprChroot
[hide private]
[frames] | no frames]

Class CoprChroot

source code


Representation of Copr<->MockChroot relation

Nested Classes [hide private]

Inherited from flask_sqlalchemy.Model: query_class

Instance Methods [hide private]
 
update_comps(self, comps_xml) source code
 
update_module_md(self, module_md_yaml) source code
 
to_dict(self)
Usage:
source code
 
__init__(self, **kwargs)
A simple constructor that allows initialization from kwargs.
source code

Inherited from unreachable.Model: query

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]
  buildroot_pkgs = db.Column(db.Text)
  repos = db.Column(db.Text, default= "", server_default= "", nu...
  mock_chroot_id = db.Column(db.Integer, db.ForeignKey("mock_chr...
  mock_chroot = db.relationship("MockChroot", backref= db.backre...
  copr_id = db.Column(db.Integer, db.ForeignKey("copr.id"), prim...
  copr = db.relationship("Copr", backref= db.backref("copr_chroo...
  comps_zlib = db.Column(db.LargeBinary(), nullable= True)
  comps_name = db.Column(db.String(127), nullable= True)
  module_md_zlib = db.Column(db.LargeBinary(), nullable= True)
  module_md_name = db.Column(db.String(127), nullable= True)
  __mapper__ = <Mapper at 0x7fee48ef9990; CoprChroot>
  __table__ = Table('copr_chroot', MetaData(bind=None), Column('...
  __tablename__ = 'copr_chroot'
  _sa_class_manager = <ClassManager of <class 'coprs.models.Copr...

Inherited from unreachable.Model: metadata

Inherited from unreachable.Model (private): _decl_class_registry

Properties [hide private]
  buildroot_pkgs_list
  repos_list
  comps
  module_md
  comps_len
  module_md_len
  name
  is_active

Inherited from helpers.Serializer: serializable_attributes

Inherited from object: __class__

Method Details [hide private]

to_dict(self)

source code 

Usage:

SQLAlchObject.to_dict() => returns a flat dict of the object
SQLAlchObject.to_dict({"foo": {}}) => returns a dict of the object
    and will include a flat dict of object foo inside of that
SQLAlchObject.to_dict({"foo": {"bar": {}}, "spam": {}}) => returns
    a dict of the object, which will include dict of foo
    (which will include dict of bar) and dict of spam.

Options can also contain two special values: __columns_only__
and __columns_except__

If present, the first makes only specified fiels appear,
the second removes specified fields. Both of these fields
must be either strings (only works for one field) or lists
(for one and more fields).

SQLAlchObject.to_dict({"foo": {"__columns_except__": ["id"]},
    "__columns_only__": "name"}) =>

The SQLAlchObject will only put its "name" into the resulting dict,
while "foo" all of its fields except "id".

Options can also specify whether to include foo_id when displaying
related foo object (__included_ids__, defaults to True).
This doesn"t apply when __columns_only__ is specified.

Overrides: helpers.Serializer.to_dict
(inherited documentation)

__init__(self, **kwargs)
(Constructor)

source code 

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in ``kwargs``.

Only keys that are present as attributes of the instance's class are allowed. These could be, for example, any mapped columns or relationships.

Overrides: object.__init__

Class Variable Details [hide private]

repos

Value:
db.Column(db.Text, default= "", server_default= "", nullable= False)

mock_chroot_id

Value:
db.Column(db.Integer, db.ForeignKey("mock_chroot.id"), primary_key= Tr\
ue)

mock_chroot

Value:
db.relationship("MockChroot", backref= db.backref("copr_chroots"))

copr_id

Value:
db.Column(db.Integer, db.ForeignKey("copr.id"), primary_key= True)

copr

Value:
db.relationship("Copr", backref= db.backref("copr_chroots", single_par\
ent= True, cascade= "all,delete,delete-orphan"))

__table__

Value:
Table('copr_chroot', MetaData(bind=None), Column('buildroot_pkgs', Tex\
t(), table=<copr_chroot>), Column('repos', Text(), table=<copr_chroot>\
, nullable=False, default=ColumnDefault(''), server_default=DefaultCla\
use('', for_update=False)), Column('mock_chroot_id', Integer(), Foreig\
nKey('mock_chroot.id'), table=<copr_chroot>, primary_key=True, nullabl\
e=False), Column('copr_id', Integer(), ForeignKey('copr.id'), table=<c\
opr_chroot>, primary_key=True, nullable=False), Column('comps_zlib', L\
argeBinary(), table=<copr_chroot>), Column('comps_name', String(length\
...

_sa_class_manager

Value:
<ClassManager of <class 'coprs.models.CoprChroot'> at 7fee48ed5e30>

Property Details [hide private]

buildroot_pkgs_list

Get Method:
unreachable.buildroot_pkgs_list(self)

repos_list

Get Method:
unreachable.repos_list(self)

comps

Get Method:
unreachable.comps(self)

module_md

Get Method:
unreachable.module_md(self)

comps_len

Get Method:
unreachable.comps_len(self)

module_md_len

Get Method:
unreachable.module_md_len(self)

name

Get Method:
unreachable.name(self)

is_active

Get Method:
unreachable.is_active(self)