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: query

Inherited from helpers.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)
  built_packages = db.Column(db.Text)
  pkg_version = 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 0xb4b08870; 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
  has_unfinished_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.
  repeatable
Find out if this build is repeatable.
  deletable
Find out if this build is deletable.

Inherited from helpers.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('built_packages', Text(), table=<build>), Column('pkg_\
version', Text(), table=<build>), Column('canceled', Boolean(), table=\
<build>, default=ColumnDefault(False)), Column('repos', Text(), table=\
<build>), Column('submitted_on', Integer(), table=<build>, nullable=Fa\
lse), Column('started_on', Integer(), table=<build>), Column('ended_on\
', Integer(), table=<build>), Column('results', Text(), table=<build>)\
...

_sa_class_manager

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

Property Details [hide private]

chroot_states

Get Method:
unreachable.chroot_states(self)

has_pending_chroot

Get Method:
unreachable.has_pending_chroot(self)

has_unfinished_chroot

Get Method:
unreachable.has_unfinished_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.

Build is cancelabel only when it's pending (not started)

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

repeatable

Find out if this build is repeatable.

Build is repeatable only if it's not pending, starting or running

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

deletable

Find out if this build is deletable.

Build is deletable only when it's finished. (also means cancelled) It is important to remember that "failed" state doesn't ultimately mean it's finished - so we need to check whether the "ended_on" property has been set.

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