maasserver.models.sshkey

SSHKey and friends.

Functions

CASCADE(collector, field, sub_objs, using)
escape(s[, quote]) Deprecated API.
get_html_display_for_key(key, size) Return a compact HTML representation of this key with a boundary on the size of the resulting string.
mark_safe(s) Explicitly mark a string as safe for (HTML) output purposes.
validate_ssh_public_key(value) Validate that the given value contains a valid SSH public key.

Classes

CleanSave Mixin for model classes.
DefaultMeta Base class for model Meta classes in the maasserver app.
ForeignKey(to[, to_field, rel_class, ...])
Key(keyObject) An object representing a key.
Manager()
SSHKey(*args, **kwargs) An SSHKey represents a user public SSH key.
SSHKeyManager() A utility to manage the colletion of `SSHKey`s.
TextField([verbose_name, name, primary_key, ...])
TimestampedModel(*args, **kwargs) Abstract base model with creation/update timestamps.
User(*args, **kwargs) Users within the Django authentication system are represented by this model.

Exceptions

ValidationError(message[, code, params]) An error while validating data.
class maasserver.models.sshkey.SSHKey(*args, **kwargs)[source]

Bases: maasserver.models.cleansave.CleanSave, maasserver.models.timestampedmodel.TimestampedModel

An SSHKey represents a user public SSH key.

Users will be able to access allocated nodes using any of their registered keys.

Variables:
  • user – The user which owns the key.
  • key – The SSH public key.
display_html()[source]

Return a compact HTML representation of this key.

Returns:The HTML representation of this key.
Return type:unicode