mini_buildd.models.gnupg module¶
- class mini_buildd.models.gnupg.GnuPGPublicKey(*args, **kwargs)¶
Bases:
StatusModel
- key_id¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- key¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- key_long_id¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- key_created¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- key_expires¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- key_name¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- key_fingerprint¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- class Admin(*args, **kwargs)¶
Bases:
Admin
- search_fields = ['key_id', 'key_long_id', 'key_name', 'key_fingerprint']¶
- readonly_fields = ['key_long_id', 'key_created', 'key_expires', 'key_name', 'key_fingerprint']¶
- property media¶
- 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.
- classmethod mbd_filter_key(key_id)¶
- mbd_prepare()¶
- mbd_remove()¶
- mbd_sync()¶
- mbd_check()¶
Check that we actually have the key and long_id. This should always be true after “prepare”.
- mbd_verify(signed_message)¶
- 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>)¶
- class mini_buildd.models.gnupg.AptKey(id, extra_options, pickled_data, status, last_checked, auto_reactivate, key_id, key, key_long_id, key_created, key_expires, key_name, key_fingerprint)¶
Bases:
GnuPGPublicKey
- 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.
- 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>¶
- source_set¶
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.
- class mini_buildd.models.gnupg.KeyringKey(*args, **kwargs)¶
Bases:
GnuPGPublicKey
Abstract class for GnuPG keys that influence the daemon’s keyring.
This basically means changes to remotes and users may be done on the fly (without stopping the daemon), to make this maintenance practically usable.
- 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>)¶
- class mini_buildd.models.gnupg.Uploader(id, extra_options, pickled_data, status, last_checked, auto_reactivate, key_id, key, key_long_id, key_created, key_expires, key_name, key_fingerprint, user)¶
Bases:
KeyringKey
- user¶
Accessor to the related object on the forward side of a one-to-one relation.
In the example:
class Restaurant(Model): place = OneToOneField(Place, related_name='restaurant')
Restaurant.place
is aForwardOneToOneDescriptor
instance.
- may_upload_to¶
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.
- class Admin(*args, **kwargs)¶
Bases:
Admin
- search_fields = ['key_id', 'key_long_id', 'key_name', 'key_fingerprint', 'user__username']¶
- readonly_fields = ['key_long_id', 'key_created', 'key_expires', 'key_name', 'key_fingerprint', 'user']¶
- filter_horizontal = ('may_upload_to',)¶
- property media¶
- 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>¶
- user_id¶
- mini_buildd.models.gnupg.cb_create_user_profile(sender, instance, created, **kwargs)¶
Automatically create a user profile with every user that is created.
- class mini_buildd.models.gnupg.Remote(extra_options, pickled_data, status, last_checked, auto_reactivate, key_id, key, key_long_id, key_created, key_expires, key_name, key_fingerprint, http, wake_command)¶
Bases:
KeyringKey
- http¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- wake_command¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- class Admin(*args, **kwargs)¶
Bases:
Admin
- search_fields = ['key_id', 'key_long_id', 'key_name', 'key_fingerprint', 'http']¶
- readonly_fields = ['key_long_id', 'key_created', 'key_expires', 'key_name', 'key_fingerprint', 'key', 'key_id']¶
- property media¶
- mbd_url()¶
- mbd_api(command, timeout=None)¶
- mbd_get_status(timeout=2, wake=False, wake_sleep=5, wake_attempts=2)¶
- mbd_prepare()¶
- mbd_check()¶
Check whether the remote mini-buildd is up, running and serving for us.
- 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>)¶
- objects = <django.db.models.manager.Manager object>¶