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

Class Build

source code


Representation of one build in one copr

Instance Methods [hide private]
 
__init__(self, *args, **kwargs) source code
 
user_name(self) source code
 
group_name(self) source code
 
copr_name(self) source code
 
fail_type_text(self) source code
 
is_older_results_naming_used(self) source code
 
repos_list(self) source code
 
task_id(self) source code
 
id_fixed_width(self) source code
 
import_log_urls(self) source code
 
import_log_url_distgit(self) source code
 
import_log_url_backend(self) source code
 
result_dir_name(self) source code
 
source_json_dict(self) source code
 
started_on(self) source code
 
min_started_on(self) source code
 
ended_on(self) source code
 
max_ended_on(self) source code
 
chroots_started_on(self) source code
 
chroots_ended_on(self) source code
 
source_type_text(self) source code
 
source_metadata(self) source code
 
chroot_states(self) source code
 
get_chroots_by_status(self, statuses=None)
Get build chroots with states which present in `states` list If states == None, function returns build_chroots
source code
 
chroots_dict_by_name(self) source code
 
status(self)
Return build status.
source code
 
state(self)
Return text representation of status of this build.
source code
 
cancelable(self)
Find out if this build is cancelable.
source code
 
repeatable(self)
Find out if this build is repeatable.
source code
 
finished(self)
Find out if this build is in finished state.
source code
 
persistent(self)
Find out if this build is persistent.
source code
 
src_pkg_name(self)
Extract source package name from source name or url.
source code
 
package_name(self) source code
 
to_dict(self, options=None, with_chroot_states=False)
Usage:
source code

Inherited from helpers.Serializer: serializable_attributes

Class Variables [hide private]
  __table_args__ = db.Index('build_canceled', "canceled"), db.In...
  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)
  results = db.Column(db.Text)
  memory_reqs = db.Column(db.Integer, default= constants.DEFAULT...
  timeout = db.Column(db.Integer, default= constants.DEFAULT_BUI...
  enable_net = db.Column(db.Boolean, default= False, server_defa...
  source_type = db.Column(db.Integer, default= helpers.BuildSour...
  source_json = db.Column(db.Text)
  fail_type = db.Column(db.Integer, default= helpers.FailTypeEnu...
  is_background = db.Column(db.Boolean, default= False, server_d...
  source_status = db.Column(db.Integer, default= StatusEnum("wai...
  srpm_url = db.Column(db.Text)
  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"))
  package_id = db.Column(db.Integer, db.ForeignKey("package.id"))
  package = db.relationship("Package")
  chroots = association_proxy("build_chroots", "mock_chroot")
  batch_id = db.Column(db.Integer, db.ForeignKey("batch.id"))
  batch = db.relationship("Batch", backref= db.backref("builds"))
  module_id = db.Column(db.Integer, db.ForeignKey("module.id"), ...
  module = db.relationship("Module", backref= db.backref("builds"))
Method Details [hide private]

__init__(self, *args, **kwargs)
(Constructor)

source code 
Overrides: object.__init__
(inherited documentation)

user_name(self)

source code 
Decorators:
  • @property

group_name(self)

source code 
Decorators:
  • @property

copr_name(self)

source code 
Decorators:
  • @property

fail_type_text(self)

source code 
Decorators:
  • @property

is_older_results_naming_used(self)

source code 
Decorators:
  • @property

repos_list(self)

source code 
Decorators:
  • @property

task_id(self)

source code 
Decorators:
  • @property

id_fixed_width(self)

source code 
Decorators:
  • @property

import_log_urls(self)

source code 
Decorators:
  • @property

import_log_url_distgit(self)

source code 
Decorators:
  • @property

import_log_url_backend(self)

source code 
Decorators:
  • @property

result_dir_name(self)

source code 
Decorators:
  • @property

source_json_dict(self)

source code 
Decorators:
  • @property

started_on(self)

source code 
Decorators:
  • @property

min_started_on(self)

source code 
Decorators:
  • @property

ended_on(self)

source code 
Decorators:
  • @property

max_ended_on(self)

source code 
Decorators:
  • @property

chroots_started_on(self)

source code 
Decorators:
  • @property

chroots_ended_on(self)

source code 
Decorators:
  • @property

source_type_text(self)

source code 
Decorators:
  • @property

source_metadata(self)

source code 
Decorators:
  • @property

chroot_states(self)

source code 
Decorators:
  • @property

chroots_dict_by_name(self)

source code 
Decorators:
  • @property

status(self)

source code 

Return build status.

Decorators:
  • @property

state(self)

source code 

Return text representation of status of this build.

Decorators:
  • @property

cancelable(self)

source code 

Find out if this build is cancelable.

Decorators:
  • @property

repeatable(self)

source code 

Find out if this build is repeatable.

Build is repeatable only if sources has been imported.

Decorators:
  • @property

finished(self)

source code 

Find out if this build is in finished state.

Build is finished only if all its build_chroots are in finished state or the build was canceled.

Decorators:
  • @property

persistent(self)

source code 

Find out if this build is persistent.

This property is inherited from the project.

Decorators:
  • @property

src_pkg_name(self)

source code 

Extract source package name from source name or url. todo: obsolete

Decorators:
  • @property

package_name(self)

source code 
Decorators:
  • @property

to_dict(self, options=None, with_chroot_states=False)

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 fields 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)

Class Variable Details [hide private]

__table_args__

Value:
db.Index('build_canceled', "canceled"), db.Index('build_order', "is_ba\
ckground", "id"), db.Index('build_filter', "source_type", "canceled")

memory_reqs

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

timeout

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

enable_net

Value:
db.Column(db.Boolean, default= False, server_default= "0", nullable= F\
alse)

source_type

Value:
db.Column(db.Integer, default= helpers.BuildSourceEnum("unset"))

fail_type

Value:
db.Column(db.Integer, default= helpers.FailTypeEnum("unset"))

is_background

Value:
db.Column(db.Boolean, default= False, server_default= "0", nullable= F\
alse)

source_status

Value:
db.Column(db.Integer, default= StatusEnum("waiting"))

module_id

Value:
db.Column(db.Integer, db.ForeignKey("module.id"), index= True)