Changeset 6429 for trunk


Ignore:
Timestamp:
Dec 10, 2008, 1:58:56 PM (16 years ago)
Author:
RIck van der Zwet
Message:
  • syntax fixes
  • ssid length bigger to support larger node names
  • made all IP's unique
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/exodus/models.py

    r6428 r6429  
    22# vi:et:ts=4
    33from django.db import models
    4 from django.contrib import admin
    5 from django import forms
    6 
    74
    85#No need to formalize it; CHOICES don't change much
     
    1310         ('pl', 'planned'),
    1411         )
    15    
     12
    1613POLAR_CHOICES = (
    1714         ('hr', 'horizontal'),
     
    6461
    6562class Network(models.Model):
    66    name = models.CharField(max_length=50, unique=True)
    67    ipspacestart = models.IPAddressField()
    68    netmask = models.IntegerField()
     63    name = models.CharField(max_length=50, unique=True)
     64    ipspacestart = models.IPAddressField()
     65    netmask = models.IntegerField()
    6966
    7067    class Meta:
    71         verbose_name = 'Network'
     68     verbose_name = 'Network'
    7269
    73    def __unicode__(self):
    74       return self.name
     70    def __unicode__(self):
     71        return self.name
    7572
    7673class Node(models.Model):
     
    112109   netmask = models.IntegerField(default=30)
    113110   polar = models.CharField(blank=True, max_length=10, choices=POLAR_CHOICES)
    114    ssid = models.CharField(max_length=30, blank=True, null=True)
     111   ssid = models.CharField(max_length=50, blank=True, null=True)
    115112   mode = models.CharField(max_length=10, choices=WIFI_MODE_CHOICES, blank=True)
    116113   channel = models.IntegerField(blank=True, null=True)
     
    127124      return "%s/%s" % (self.node, self.iface)
    128125
     126#
     127# XXX: Currently not used, require rethinking wether we _really_ still needs
     128# this feature as we going to use a new interlink IP naming model
    129129class InterfaceAlias(models.Model):
    130130   iface = models.ForeignKey(Interface,related_name='child')
Note: See TracChangeset for help on using the changeset viewer.