Revision cddc2b2f snf-cyclades-app/synnefo/db/models.py

b/snf-cyclades-app/synnefo/db/models.py
472 472
        },
473 473
    }
474 474

  
475
    name = models.CharField('Network Name', max_length=128)
475
    NETWORK_NAME_LENGTH = 128
476

  
477
    name = models.CharField('Network Name', max_length=NETWORK_NAME_LENGTH)
476 478
    userid = models.CharField('User ID of the owner', max_length=128,
477 479
                              null=True, db_index=True)
478 480
    flavor = models.CharField('Flavor', max_length=32, null=False)
......
716 718
        ("ERROR", "Error"),
717 719
    )
718 720

  
721
    NETWORK_IFACE_NAME_LENGTH = 128
722

  
719 723
    name = models.CharField('NIC name', max_length=128, null=True)
720
    userid = models.CharField("UUID of the owner", max_length=128,
724
    userid = models.CharField("UUID of the owner",
725
                              max_length=NETWORK_IFACE_NAME_LENGTH,
721 726
                              null=True, db_index=True)
722 727
    machine = models.ForeignKey(VirtualMachine, related_name='nics',
723 728
                                on_delete=models.CASCADE)
......
745 750

  
746 751

  
747 752
class SecurityGroup(models.Model):
748
    name = models.CharField('group name', max_length=128)
753
    SECURITY_GROUP_NAME_LENGTH = 128
754
    name = models.CharField('group name',
755
                            max_length=SECURITY_GROUP_NAME_LENGTH)
749 756

  
750 757

  
751 758
class PoolTable(models.Model):

Also available in: Unified diff