← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~jtv/maas/migration-prep-sshkey into lp:maas

 

Jeroen T. Vermeulen has proposed merging lp:~jtv/maas/migration-prep-sshkey into lp:maas.

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~jtv/maas/migration-prep-sshkey/+merge/106301

As per the migration plan: announce coming migration of the SSHKey model into its own module.  The date for that change is 2012-05-25, a week from now.


Jeroen
-- 
https://code.launchpad.net/~jtv/maas/migration-prep-sshkey/+merge/106301
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~jtv/maas/migration-prep-sshkey into lp:maas.
=== modified file 'src/maasserver/models/__init__.py'
--- src/maasserver/models/__init__.py	2012-05-17 08:44:42 +0000
+++ src/maasserver/models/__init__.py	2012-05-18 03:38:19 +0000
@@ -19,7 +19,6 @@
     "generate_node_system_id",
     "get_auth_tokens",
     "get_db_state",
-    "get_html_display_for_key",
     "logger",
     "Config",
     "FileStorage",
@@ -770,6 +769,7 @@
 User._meta.get_field('email')._unique = True
 
 
+# Due for model migration on 2012-05-25
 class SSHKeyManager(Manager):
     """A utility to manage the colletion of `SSHKey`s."""
 
@@ -778,6 +778,7 @@
         return SSHKey.objects.filter(user=user).values_list('key', flat=True)
 
 
+# Due for model migration on 2012-05-25
 def validate_ssh_public_key(value):
     """Validate that the given value contains a valid SSH public key."""
     try:
@@ -789,9 +790,11 @@
         raise ValidationError("Invalid SSH public key.")
 
 
+# Due for model migration on 2012-05-25
 HELLIPSIS = '…'
 
 
+# Due for model migration on 2012-05-25
 def 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.
@@ -836,9 +839,11 @@
         return escape(key, quote=True)
 
 
+# Due for model migration on 2012-05-25
 MAX_KEY_DISPLAY = 50
 
 
+# Due for model migration on 2012-05-25
 class SSHKey(CleanSave, TimestampedModel):
     """A `SSHKey` represents a user public SSH key.