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
andTopping.pizzas
areManyToManyDescriptor
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.StatusModel.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'}), ('Setup', {'fields': ['pickled_data'], 'description': "<p><b>Command line for API call <tt>setup</tt></b></p><p>See <tt>mini-buildd-api setup --help</tt> for syntax.</p><p>You may set values manually here, or just use <tt>save=True</tt> in an any call to <tt>setup</tt>, either from the command line or web application.</p><p>A setup command preconfigured with these values will be available from the <a href='/mini_buildd/setup/'>setup</a> page.</p><p>In case you see a <b>base64 dump</b>, just remove it. It's a now unused leftover from <tt>1.0.x</tt> usage of this field (and no good way to avoid it).</p>"}), ('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', 'extra_options')}))¶
- filter_horizontal = ('notify',)¶
- readonly_fields = ['sbuild_jobs', 'smtp_server', 'ftpd_options', 'custom_hooks_directory']¶
- mbd_model¶
alias of
mini_buildd.models.daemon.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.
- mbd_check()¶
Just warn in case there are no repos and no chroots.
- mbd_get_archive_origin()¶
- mbd_get_pub_key()¶
- mbd_get_dput_conf()¶
- mbd_notify_event(event)¶
- 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>¶
- mini_buildd.models.daemon.get()¶