diff --git a/machines/migrations/0086_auto_20180624_1254.py b/machines/migrations/0086_auto_20180624_1254.py new file mode 100644 index 00000000..7474ac8b --- /dev/null +++ b/machines/migrations/0086_auto_20180624_1254.py @@ -0,0 +1,30 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.10.7 on 2018-06-24 10:54 +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('machines', '0085_auto_20180623_1817'), + ] + + operations = [ + migrations.RenameField( + model_name='sshfingerprint', + old_name='hash_entry', + new_name='pub_key_entry', + ), + migrations.AlterField( + model_name='sshfingerprint', + name='comment', + field=models.CharField(blank=True, help_text='Commentaire', max_length=255, null=True), + ), + migrations.AlterField( + model_name='sshfingerprint', + name='pub_key_entry', + field=models.TextField(help_text='Clef publique ssh', max_length=2048), + ), + ] diff --git a/machines/models.py b/machines/models.py index 41d57a99..986fe4d9 100644 --- a/machines/models.py +++ b/machines/models.py @@ -201,14 +201,22 @@ class Machine(RevMixin, FieldPermissionModelMixin, models.Model): return str(self.user) + ' - ' + str(self.id) + ' - ' + str(self.name) class SshFingerprint(RevMixin, AclMixin, models.Model): - """Hash de la clef ssh d'une machine""" + """Stockage de la clef ssh publique d'une machine + et calcul de ses hash""" - PRETTY_NAME = "Fingerprint ssh" + PRETTY_NAME = "Clef publique ssh" machine = models.ForeignKey('Machine', on_delete=models.CASCADE) - hash_entry = models.TextField(max_length=512) - algo = models.ForeignKey('SshFprAlgo', on_delete=models.PROTECT) + pub_key_entry = models.TextField( + help_text="Clef publique ssh", + max_length=2048 + ) + algo = models.ForeignKey( + 'SshFprAlgo', + on_delete=models.PROTECT + ) comment = models.CharField( + help_text="Commentaire", max_length=255, null=True, blank=True