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

Class Build

source code


Representation of one build in one copr

Nested Classes [hide private]

Inherited from flask_sqlalchemy.Model: query_class

Instance Methods [hide private]
 
__init__(self, **kwargs)
A simple constructor that allows initialization from kwargs.
source code

Inherited from unreachable.Model: __mapper_cls__, query

Inherited from Serializer: to_dict

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

Class Variables [hide private]
  id = db.Column(db.Integer, primary_key= True)
  pkgs = db.Column(db.Text)
  canceled = db.Column(db.Boolean, default= False)
  repos = db.Column(db.Text)
  submitted_on = db.Column(db.Integer, nullable= False)
  started_on = db.Column(db.Integer)
  ended_on = db.Column(db.Integer)
  results = db.Column(db.Text)
  memory_reqs = db.Column(db.Integer, default= constants.DEFAULT...
  timeout = db.Column(db.Integer, default= constants.DEFAULT_BUI...
  user_id = db.Column(db.Integer, db.ForeignKey('user.id'))
  user = db.relationship('User', backref= db.backref('builds'))
  copr_id = db.Column(db.Integer, db.ForeignKey('copr.id'))
  copr = db.relationship('Copr', backref= db.backref('builds'))
  chroots = association_proxy('build_chroots', 'mock_chroot')
  __mapper__ = <Mapper at 0x2038d50; Build>
  __table__ = Table('build', MetaData(bind=None), Column('id', I...
  __tablename__ = 'build'
  _sa_class_manager = <ClassManager of <class 'coprs.models.Buil...

Inherited from unreachable.Model: metadata

Inherited from unreachable.Model (private): _decl_class_registry

Properties [hide private]
  chroot_states
  has_pending_chroot
  status
Return build status according to build status of its chroots
  state
Return text representation of status of this build
  cancelable
Find out if this build is cancelable.

Inherited from Serializer: serializable_attributes

Inherited from object: __class__

Method Details [hide private]

__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]

memory_reqs

Value:
db.Column(db.Integer, default= constants.DEFAULT_BUILD_MEMORY)

timeout

Value:
db.Column(db.Integer, default= constants.DEFAULT_BUILD_TIMEOUT)

__table__

Value:
Table('build', MetaData(bind=None), Column('id', Integer(), table=<bui\
ld>, primary_key=True, nullable=False), Column('pkgs', Text(), table=<\
build>), Column('canceled', Boolean(), table=<build>, default=ColumnDe\
fault(False)), Column('repos', Text(), table=<build>), Column('submitt\
ed_on', Integer(), table=<build>, nullable=False), Column('started_on'\
, Integer(), table=<build>), Column('ended_on', Integer(), table=<buil\
d>), Column('results', Text(), table=<build>), Column('memory_reqs', I\
nteger(), table=<build>, default=ColumnDefault(2048)), Column('timeout\
...

_sa_class_manager

Value:
<ClassManager of <class 'coprs.models.Build'> at 20a9340>

Property Details [hide private]

chroot_states

Get Method:
unreachable.chroot_states(self)

has_pending_chroot

Get Method:
unreachable.has_pending_chroot(self)

status

Return build status according to build status of its chroots

Get Method:
unreachable.status(self) - Return build status according to build status of its chroots

state

Return text representation of status of this build

Get Method:
unreachable.state(self) - Return text representation of status of this build

cancelable

Find out if this build is cancelable.

ATM, build is cancelable only if it wasn't grabbed by backend.

Get Method:
unreachable.cancelable(self) - Find out if this build is cancelable.