mini_buildd.models.daemon module

class mini_buildd.models.daemon.Daemon(id, extra_options, pickled_data, status, last_checked, auto_reactivate, identity, hostname, email_address, gnupg_template, gnupg_keyserver, ftpd_bind, ftpd_options, build_queue_size, sbuild_jobs, smtp_server, allow_emails_to, custom_hooks_directory, show_last_packages, show_last_builds, wait_for_build_results, keep_build_results)

Bases: mini_buildd.models.base.StatusModel

identity

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

hostname

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

email_address

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

gnupg_template

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

gnupg_keyserver

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

ftpd_bind

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

ftpd_options

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

build_queue_size

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

sbuild_jobs

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

smtp_server

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

notify

Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.

In the example:

class Pizza(Model):
    toppings = ManyToManyField(Topping, related_name='pizzas')

Pizza.toppings and Topping.pizzas are ManyToManyDescriptor instances.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

allow_emails_to

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

custom_hooks_directory

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

show_last_packages

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

show_last_builds

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

wait_for_build_results

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

keep_build_results

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

LETHAL_DEPENDENCIES = False
class Admin(model, admin_site)

Bases: mini_buildd.models.base.Admin

fieldsets = ((None, {'fields': (), 'description': 'The daemon instance. There is always exactly one instance of this.\n\nprepare/remove actions will generate/remove the GnuPG key.\n'}), ('Archive identity', {'fields': (('identity', 'hostname', 'email_address'), 'gnupg_template')}), ('FTP (incoming) Options', {'fields': ('ftpd_bind', 'ftpd_options')}), ('Load Options', {'fields': ('build_queue_size', 'sbuild_jobs')}), ('E-Mail Options', {'fields': ('smtp_server', 'notify', 'allow_emails_to')}), ('Other Options', {'fields': ('gnupg_keyserver', 'custom_hooks_directory', 'show_last_packages', 'show_last_builds')}))
filter_horizontal = ('notify',)
readonly_fields = ['smtp_server', 'ftpd_options', 'custom_hooks_directory']
save_model(request, obj, form, change)

Save model – always update from daemon object first.

media
mbd_fullname
mbd_gnupg
mbd_gnupg_fingerprint
mbd_gnupg_long_id
clean(*args, **kwargs)

Hook for doing any extra model-wide validation after clean() has been called on every field by self.clean_fields. Any ValidationError raised by this method will not be associated with a particular field; it will have a special-case association with the field defined by NON_FIELD_ERRORS.

mbd_prepare(request)
classmethod mbd_sync(request)
mbd_remove(request)
mbd_get_dependencies()

All active or to-be active repositories, remotes and chroots.

mbd_check(request)

Just warn in case there are no repos and no chroots.

mbd_get_ftp_endpoint()
mbd_get_ftp_url()
classmethod mbd_get_http_endpoint()
mbd_get_http_url()
mbd_get_archive_origin()
mbd_get_pub_key()
mbd_get_dput_conf()
mbd_notify(subject, body, repository=None, changes=None, distribution=None, msglog=<Logger mini_buildd.models.daemon (WARNING)>)
exception DoesNotExist

Bases: django.core.exceptions.ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: django.core.exceptions.MultipleObjectsReturned

get_next_by_last_checked(*, field=<django.db.models.fields.DateTimeField: last_checked>, is_next=True, **kwargs)
get_previous_by_last_checked(*, field=<django.db.models.fields.DateTimeField: last_checked>, is_next=False, **kwargs)
get_status_display(*, field=<django.db.models.fields.IntegerField: status>)
id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

objects = <django.db.models.manager.Manager object>