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

MBD_HELP_PICKLED_DATA = "Saved ``setup`` config as command line options. See ``mini-buildd-api setup --help`` for syntax.\n\nYou may set values manually here, or just use ``save=True`` in an any call to ``setup``, either from the command line or web application.\n\nA setup command preconfigured with these values will be available from the ``setup`` page.\n\nNote: In case you see a base64 dump, just remove it. It's a now unused leftover from 1.0.x usage of this field (and no good way to avoid it completely).\n"
MBD_HELP_EXTRA_OPTIONS = '\nX-Archive-Origin: <origin>\n  Custom APT "Origin" field for repository indices.\n'
MBD_HELP_NEEDS_RESTART = '[Daemon must be restarted to activate this setting.]\n\n'
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(*args, **kwargs)

Bases: Admin

exclude = ('hostname', 'custom_hooks_directory', 'sbuild_jobs', 'smtp_server', 'wait_for_build_results', 'keep_build_results')
filter_horizontal = ('notify',)
mbd_model

alias of Daemon

property media
save(*args, **kwargs)

Save model && sync with Daemon().

mbd_setup_v10x2v20x()

Fixup v10x->v20x ‘pickled_data’ is now ‘setup’ upgrade convenience.

Arbitrary heuristic number to decide whether the data is actually still pickled data from 1.0.x, and should be automatically blanked:
  • Typical 1.0.x “last packages” pickled size: 200000

  • A rather lengthy (but still real life) setup may have about: 2000

This practically limits the possible setup command line length for the convenience save.

mbd_setup_save(command_line)

Save setup command line.

mbd_setup_get()
mbd_get_ftp_endpoint()
mbd_fullname()
mbd_gnupg()
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()
classmethod mbd_sync()
mbd_remove()
mbd_get_dependencies()

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

classmethod mbd_check()

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

mbd_get_archive_origin()
mbd_get_dput_conf()
mbd_notify_event(event)
exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: 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>
mini_buildd.models.daemon.get()