Changeset 6565 for trunk


Ignore:
Timestamp:
Jan 7, 2009, 3:56:56 AM (16 years ago)
Author:
roland
Message:

worked on ethernet to wifi bridges, that is complete.
Would need to go through the source again to write it better.
updated initial_data.json for wandy.

Made use of limit_choices_to so that only valid foreignkeys can be
chosen, such as in the add link, or add statichost to interface.

Location:
trunk
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/doc/conversion.txt

    r6551 r6565  
    33NodeAster sis1, gets a static ip via dhcp because it connects to an adsl modem.
    44Ethernet interfaces don't have 'links' defined.
     5NodeAster link on sis3 point_to_point ip is incorrect
     6NodeDirkLos2 sis3, link naar AZC is niet bij AZC gedefinieerd.
  • trunk/exodus/admin.py

    r6507 r6565  
    33from django.contrib import databrowse
    44from exodus.models import Location, Node, Network, Interface, Antenna, \
    5         DnsServer, DhcpStatic       
     5        DnsServer, DhcpStatic, EthernetToWifiBridge       
    66from exodus.forms import NodeForm, InterfaceForm, DhcpStaticForm
    77from exodus.contrib import ReadOnlyAdminFields
     
    3737            'classes' : ('collapse', ),
    3838            'fields' : ('ssid', 'channel', 'antenna', 'polar', 'direction',
    39                         'mode')}),
     39                        'mode', 'ethernet_to_wifi')}),
    4040        )
    4141    class Media:
     
    5454advanced_admin.register(DnsServer)
    5555advanced_admin.register(Network)
     56advanced_admin.register(EthernetToWifiBridge)
    5657advanced_admin.register(Node, NodeAdmin)
    5758advanced_admin.register(Interface, InterfaceAdmin)
     
    6566plain_admin.register(Interface)
    6667plain_admin.register(DhcpStatic)
     68plain_admin.register(EthernetToWifiBridge)
    6769
    6870databrowse.site.register(Antenna)
  • trunk/exodus/forms.py

    r6548 r6565  
    9090        model = Interface
    9191
     92    def clean_type(self):
     93        type = self.cleaned_data.get('type')
     94        eth2wifi = self.cleaned_data.get('ethernet_to_wifi')
     95        if eth2wifi is not None and type == 'eth':
     96            raise forms.ValidationError(
     97                    "An ethernet to wifi bridge needs a wireless type.")
     98        return type
     99
    92100    def clean_iface(self):
    93101        iface = self.cleaned_data.get('iface')
     
    123131                    "An ethernet interface can't have a direction.")
    124132        return direction
    125        
     133
    126134
    127135    def clean_link(self):
     
    266274                ip_size = len(all_links)
    267275                # up ip_size with one if self is not in all_links
     276                #XXX: rewrite this as if not link in all_links:
    268277                if not [ i for i in all_links if i.id == pk ]:
    269278                    ip_size += 1
     279   
     280                ip_size += len([ i for i in all_links if i.ethernet_to_wifi ])
     281                   
    270282                if link.accesspoint:
    271283                    netmask = AP_NETMASK
     
    289301                    i.netmask = netmask
    290302                    i.save()
    291                 if link.accesspoint:
    292                     for i in link.dhcpstatic_set.all():
    293                         i.ipaddress = new_ip.ips.pop()
    294                         i.save()
     303                for i in [x for x in all_links if x.accesspoint or
     304                        x.ethernet_to_wifi]:
     305                    for j in i.dhcpstatic_set.all():
     306                        j.ipaddress = new_ip.ips.pop()
     307                        j.save()
    295308                return ip
    296309
     
    302315                else:
    303316                    ip_size = len(all_links)
     317                    # add wifi2ethernet bridges in ipspace
     318                    ip_size += len([ i for i in all_links if
     319                            i.ethernet_to_wifi ])
    304320                    # up ip_size with one if self is not in all_links
    305321                    if not [ x for x in all_links if x.id == pk ]:
     
    318334                    i.netmask = netmask
    319335                    i.save()
    320                 for i in link.dhcpstatic_set.all():
    321                     i.ipaddress = new_ip.ips.pop()
    322                     i.save()
     336                # save ips for all static hosts.
     337                for i in [x for x in all_links if x.accesspoint or
     338                        x.ethernet_to_wifi]:
     339                    for j in i.dhcpstatic_set.all():
     340                        j.ipaddress = new_ip.ips.pop()
     341                        j.save()
    323342                return ip
    324343
    325344    def clean_netmask(self):
    326         """Cleaning happens in clean_ip."""
     345        """Calculates a netmask. """
    327346        netmask = self.cleaned_data.get('netmask')
    328347        link = self.cleaned_data.get('link')
    329348        edit = bool(self.instance.pk)
     349        pk = self.instance.pk
     350        eth2wifi = self.cleaned_data.get('ethernet_to_wifi')
    330351        accesspoint = self.cleaned_data.get('accesspoint')
    331352
     
    345366            all_links = link.interface_set.all()
    346367            ip_size = len(all_links)
     368            # add wifi2ethernet bridges in ipspace
     369            ip_size += len([ i for i in all_links if i.ethernet_to_wifi ])
    347370            # up ip_size with one if self is not in all_links
    348371            if not [ x for x in all_links if x.id == self.instance.pk ]:
    349372                ip_size += 1
     373            netmask = calc_subnet(ip_size)
     374           
    350375            return calc_subnet(ip_size)
    351376
     
    420445
    421446    def clean_accesspoint(self):
     447        edit = bool(self.instance.pk)
    422448        accesspoint = self.cleaned_data.get('accesspoint')
    423         if not accesspoint.accesspoint:
     449        if not accesspoint.accesspoint and not accesspoint.ethernet_to_wifi:
    424450            raise forms.ValidationError("Please choose an accesspoint that is"
    425                     " enabled as an accesspoint")
     451                    " enabled as an accesspoint or is an ethernet to wifi"
     452                    " bridge.")
     453        if not accesspoint.accesspoint and accesspoint.ethernet_to_wifi:
     454            if edit and len(accesspoint.dhcpstatic_set.all()) > 1:
     455                raise forms.ValidationError("A ethernet_to_wifi bridge can"
     456                        " only have one static host.")
     457            elif len(accesspoint.dhcpstatic_set.all()) >= 1:
     458                raise forms.ValidationError("A ethernet_to_wifi bridge can"
     459                        " only have one static host.")
    426460        return accesspoint
    427461
    428462    def clean_ipaddress(self):
    429463        # XXX: don't forget to update this address when changing ips.
     464        if self.errors:
     465            raise forms.ValidationError("Please correct the errors shown")
    430466        accesspoint = self.cleaned_data.get('accesspoint')
    431         ip = accesspoint.ip
    432         netmask = accesspoint.netmask
     467        pk = self.instance.pk
     468        # take accesspoint.link because ethernet2 wifi bridges are not
     469        # neccessarily connected to the master
     470        master = accesspoint.link
     471        ip = master.ip
     472        netmask = master.netmask
    433473        ip_size = int(pow(2,32-netmask))
    434474        networkaddrL = network(ip, netmask)
    435475        # 1, -1 compensate for network and broadcast addr.
    436476        iplist = [show_addr(networkaddrL + i) for i in xrange(1, ip_size-1)]
    437         for i in accesspoint.interface_set.all():
    438             iplist.remove(i.ip)
    439         [iplist.remove(i.ipaddress) for i in
    440                 accesspoint.dhcpstatic_set.all() if not
    441                 i.pk == self.instance.pk]
     477        all_links = master.interface_set.all()
     478        #eth2wifi_ifaces = [ i for i in all_links if i.ethernet_to_wifi ]
     479        #all_dhcpstatic = [ i.dhcpstatic_set.all()  for i in eth2wifi_ifaces ]
     480        [ iplist.remove(i.ip) for i in all_links ]
     481        [ iplist.remove(i.ipaddress) for i in
     482                master.dhcpstatic_set.all() if not
     483                i.pk == pk]
     484
     485        for i in all_links:
     486            if i.ethernet_to_wifi and not i.pk == master.pk:
     487                for j in i.dhcpstatic_set.all():
     488                    if j.pk != pk:
     489                        iplist.remove(j.ipaddress)
     490       
    442491        iplist.reverse()
    443492        return iplist.pop()
  • trunk/exodus/models.py

    r6513 r6565  
    22# vi:et:ts=4
    33from django.db import models
     4from django.db.models import Q
    45
    56#No need to formalize it; CHOICES don't change much
     
    4647    class Meta:
    4748        verbose_name = 'Antenna'
     49
     50    def __unicode__(self):
     51        return self.type
     52
     53class EthernetToWifiBridge(models.Model):
     54    type = models.CharField(max_length=10, unique=True)
    4855
    4956    def __unicode__(self):
     
    99106        return self.name
    100107
     108#    def delete(self):
     109#        import pdb; pdb.set_trace() ;
     110#        pass
     111
    101112class Interface(models.Model):
     113
     114    def all(self):
     115        return Interface.objects.all()
    102116    node = models.ForeignKey(Node)
     117    ethernet_to_wifi = models.ForeignKey(EthernetToWifiBridge, blank=True,
     118            help_text="Don't forget to add the brigde as a static host",
     119            null=True)
    103120    type = models.CharField(max_length=10, choices=INTERFACE_TYPE_CHOICES,
    104121            default='eth')
     
    110127    direction = models.CharField(max_length=10, blank=True, null=True,
    111128            choices=DIRECTION_CHOICES)
    112     link = models.ForeignKey('self', blank=True, null=True)
     129    link = models.ForeignKey('self', blank=True, null=True,
     130            limit_choices_to = {'is_master': True })
    113131    ip = models.IPAddressField(unique=True, blank=True)
    114132    netmask = models.IntegerField(null=True, blank=True)
     
    117135            blank=True, null=True)
    118136    channel = models.IntegerField(blank=True, null=True)
     137    is_master = models.BooleanField(editable=False)
    119138   
    120139    class Meta:
    121140        unique_together = ('node', 'iface')
    122141        verbose_name = 'Interface'
     142        #order_with_respect_to = 'node'
     143        ordering = ['node', 'iface']
    123144   
    124145    def __unicode__(self):
    125         return "%s/%s" % (self.node, self.iface)
     146        if self.ethernet_to_wifi:
     147            return "%s/%s/B" % (self.node, self.iface)
     148        else:
     149            return "%s/%s" % (self.node, self.iface)
    126150
    127151    def save(self, force_insert=False, force_update=False):
    128         super(Interface, self).save(force_insert, force_update)
     152        if self.pk == None:
     153            super(Interface, self).save(False, False)
    129154        # If link is not defined we link to self.
    130         if not self.link:
     155        if self.link == None:
    131156            self.link = self
     157        # Master is defined so that only masters show up linkable.
     158        if self.pk == self.link_id:
     159            self.is_master = True
    132160            super(Interface, self).save(False, True)
     161        else:
     162            self.is_master=False
     163            super(Interface, self).save(False, True)
     164
     165
     166    def delete(self):
     167        #import pdb; pdb.set_trace() ;
     168        # remove reference to all other interfaces.
     169        self.interface_set.clear()
     170        super(Interface, self).delete()
    133171       
    134172
     
    136174    hostname = models.CharField(max_length=10,unique=True)
    137175    macaddress = models.CharField(max_length=17)
    138     accesspoint = models.ForeignKey(Interface)
     176    accesspoint = models.ForeignKey(Interface,
     177            limit_choices_to = Q(accesspoint=True)|Q(ethernet_to_wifi=True) )
    139178    ipaddress = models.IPAddressField(blank=True)
    140179
  • trunk/exodus/scripts/genesis_to_exodus.py

    r6553 r6565  
    129129                                    'ip': '127.0.0.1', 'mode': 'ms',
    130130                                    'polar': '', 'type': 'eth',
    131                                     'accesspoint': False }
     131                                    'accesspoint': False,
     132                                    'ethernet_to_wifi': '' }
    132133
    133134                            #XXX: this section can be discarded because
     
    156157                            else:
    157158                                interface['direction'] = ''
     159
     160                            if config.has_option(cfgsection, 'extra_type'):                                     interface['ethernet_to_wifi'] = 1
    158161
    159162                            # XXX: The genesis data is complete, the type of
     
    191194                                import_interface(interface)
    192195                                pass
    193 
    194                 #ethernet stuff
    195                 for intf in interfaces.split(','):
    196                     cfgsection = node['name']+'/'+intf
    197                     # build a list of all ethernet interfaces
    198                     if config.has_section(cfgsection) and \
    199                             config.get(cfgsection, 'type') == 'eth' and \
    200                             config.has_option(cfgsection, 'ip'):
    201                         ethernet.append(cfgsection)
    202                         cursor.execute('insert INTO ifaceip VALUES '
    203                                 '(null, ?, ?)', ( cfgsection,
    204                                 config.get(cfgsection, 'ip').rsplit('/')[0]))
    205                        
    206                     conn.commit()
    207 
    208     non_alias = (i for i in ethernet if not ":" in i)
    209     for i in non_alias:
    210         for j in [ k for k in ethernet if k.startswith(i)]:
    211             if config.has_section(j) and \
    212                     config.has_option(j, 'point_to_point'):
    213                 p2p = config.get(j, 'point_to_point')
    214                 cursor.execute('SELECT iface FROM ifaceip where ip = ?', (p2p,))
    215                 print "%s has link to %s" %( j, cursor.fetchall())
    216                
     196#
     197#                #ethernet stuff
     198#                for intf in interfaces.split(','):
     199#                    cfgsection = node['name']+'/'+intf
     200#                    # build a list of all ethernet interfaces
     201#                    if config.has_section(cfgsection) and \
     202#                            config.get(cfgsection, 'type') == 'eth' and \
     203#                            config.has_option(cfgsection, 'ip'):
     204#                        ethernet.append(cfgsection)
     205#                        cursor.execute('insert INTO ifaceip VALUES '
     206#                                '(null, ?, ?)', ( cfgsection,
     207#                                config.get(cfgsection, 'ip').rsplit('/')[0]))
     208#                       
     209#                    conn.commit()
     210#
     211#    non_alias = (i for i in ethernet if not ":" in i)
     212#    for i in non_alias:
     213#        for j in [ k for k in ethernet if k.startswith(i)]:
     214#            if config.has_section(j) and \
     215#                    config.has_option(j, 'point_to_point'):
     216#                p2p = config.get(j, 'point_to_point')
     217#                cursor.execute('SELECT iface FROM ifaceip where ip = ?', (p2p,))
     218#                print "%s has link to %s" %( j, cursor.fetchall())
     219#               
    217220             
    218221
  • trunk/exodus/templates/viewNode.html

    r6517 r6565  
    3939        Direction: {{ nic.get_direction_display }} <br />
    4040                Mode: {{ nic.get_mode_display }} <br>
     41        {% if nic.ethernet_to_wifi %}
     42            Bridge: {{ nic.ethernet_to_wifi.type }} <br />
     43        {% endif %}
    4144        {% endifnotequal %}
    4245    {% if user.is_authenticated %}
     
    4548    {% endif %}
    4649        </div>
    47 
     50    {% for static in nic.dhcpstatic_set.all %}
     51        <ul><ul>
     52        <li>Hostname: {{ static.hostname }}</li>
     53        <li>Macaddress: {{ static.macaddress }}</li>
     54        <li>IP: {{ static.ipaddress}}</li>
     55        </ul></ul>
     56    {% endfor %}   
    4857        {% for interlink in nic.link.interface_set.all %}
    4958                {% ifnotequal interlink nic %}
     
    5362                <li>Link Name: {{ interlink }}</li>
    5463                <li>IP: {{ interlink.ip }}/{{ interlink.netmask }} </li>
     64        {% for static in interlink.dhcpstatic_set.all %}
     65            <br />
     66            <ul>
     67            <li>Hostname: {{ static.hostname }}</li>
     68            <li>Macaddress: {{ static.macaddress }}</li>
     69            <li>IP: {{ static.ipaddress}}</li>
     70            </ul>
     71        {% endfor %}   
    5572                </ul>
    5673                {% endifnotequal %}
  • trunk/initial_data.json

    r6515 r6565  
    11[
    2  {
    3   "pk": 19,
    4   "model": "auth.permission",
    5   "fields": {
    6    "codename": "add_logentry",
    7    "name": "Can add log entry",
    8    "content_type": 7
     2  {
     3    "pk": 19,
     4    "model": "auth.permission",
     5    "fields": {
     6      "codename": "add_logentry",
     7      "name": "Can add log entry",
     8      "content_type": 7
     9    }
     10  },
     11  {
     12    "pk": 20,
     13    "model": "auth.permission",
     14    "fields": {
     15      "codename": "change_logentry",
     16      "name": "Can change log entry",
     17      "content_type": 7
     18    }
     19  },
     20  {
     21    "pk": 21,
     22    "model": "auth.permission",
     23    "fields": {
     24      "codename": "delete_logentry",
     25      "name": "Can delete log entry",
     26      "content_type": 7
     27    }
     28  },
     29  {
     30    "pk": 4,
     31    "model": "auth.permission",
     32    "fields": {
     33      "codename": "add_group",
     34      "name": "Can add group",
     35      "content_type": 2
     36    }
     37  },
     38  {
     39    "pk": 10,
     40    "model": "auth.permission",
     41    "fields": {
     42      "codename": "add_message",
     43      "name": "Can add message",
     44      "content_type": 4
     45    }
     46  },
     47  {
     48    "pk": 1,
     49    "model": "auth.permission",
     50    "fields": {
     51      "codename": "add_permission",
     52      "name": "Can add permission",
     53      "content_type": 1
     54    }
     55  },
     56  {
     57    "pk": 7,
     58    "model": "auth.permission",
     59    "fields": {
     60      "codename": "add_user",
     61      "name": "Can add user",
     62      "content_type": 3
     63    }
     64  },
     65  {
     66    "pk": 5,
     67    "model": "auth.permission",
     68    "fields": {
     69      "codename": "change_group",
     70      "name": "Can change group",
     71      "content_type": 2
     72    }
     73  },
     74  {
     75    "pk": 11,
     76    "model": "auth.permission",
     77    "fields": {
     78      "codename": "change_message",
     79      "name": "Can change message",
     80      "content_type": 4
     81    }
     82  },
     83  {
     84    "pk": 2,
     85    "model": "auth.permission",
     86    "fields": {
     87      "codename": "change_permission",
     88      "name": "Can change permission",
     89      "content_type": 1
     90    }
     91  },
     92  {
     93    "pk": 8,
     94    "model": "auth.permission",
     95    "fields": {
     96      "codename": "change_user",
     97      "name": "Can change user",
     98      "content_type": 3
     99    }
     100  },
     101  {
     102    "pk": 6,
     103    "model": "auth.permission",
     104    "fields": {
     105      "codename": "delete_group",
     106      "name": "Can delete group",
     107      "content_type": 2
     108    }
     109  },
     110  {
     111    "pk": 12,
     112    "model": "auth.permission",
     113    "fields": {
     114      "codename": "delete_message",
     115      "name": "Can delete message",
     116      "content_type": 4
     117    }
     118  },
     119  {
     120    "pk": 3,
     121    "model": "auth.permission",
     122    "fields": {
     123      "codename": "delete_permission",
     124      "name": "Can delete permission",
     125      "content_type": 1
     126    }
     127  },
     128  {
     129    "pk": 9,
     130    "model": "auth.permission",
     131    "fields": {
     132      "codename": "delete_user",
     133      "name": "Can delete user",
     134      "content_type": 3
     135    }
     136  },
     137  {
     138    "pk": 13,
     139    "model": "auth.permission",
     140    "fields": {
     141      "codename": "add_contenttype",
     142      "name": "Can add content type",
     143      "content_type": 5
     144    }
     145  },
     146  {
     147    "pk": 14,
     148    "model": "auth.permission",
     149    "fields": {
     150      "codename": "change_contenttype",
     151      "name": "Can change content type",
     152      "content_type": 5
     153    }
     154  },
     155  {
     156    "pk": 15,
     157    "model": "auth.permission",
     158    "fields": {
     159      "codename": "delete_contenttype",
     160      "name": "Can delete content type",
     161      "content_type": 5
     162    }
     163  },
     164  {
     165    "pk": 22,
     166    "model": "auth.permission",
     167    "fields": {
     168      "codename": "add_antenna",
     169      "name": "Can add Antenna",
     170      "content_type": 8
     171    }
     172  },
     173  {
     174    "pk": 43,
     175    "model": "auth.permission",
     176    "fields": {
     177      "codename": "add_dhcpstatic",
     178      "name": "Can add Static host",
     179      "content_type": 15
     180    }
     181  },
     182  {
     183    "pk": 31,
     184    "model": "auth.permission",
     185    "fields": {
     186      "codename": "add_dnsserver",
     187      "name": "Can add Dns Server",
     188      "content_type": 11
     189    }
     190  },
     191  {
     192    "pk": 25,
     193    "model": "auth.permission",
     194    "fields": {
     195      "codename": "add_ethernettowifibridge",
     196      "name": "Can add ethernet to wifi bridge",
     197      "content_type": 9
     198    }
     199  },
     200  {
     201    "pk": 40,
     202    "model": "auth.permission",
     203    "fields": {
     204      "codename": "add_interface",
     205      "name": "Can add Interface",
     206      "content_type": 14
     207    }
     208  },
     209  {
     210    "pk": 28,
     211    "model": "auth.permission",
     212    "fields": {
     213      "codename": "add_location",
     214      "name": "Can add Location",
     215      "content_type": 10
     216    }
     217  },
     218  {
     219    "pk": 34,
     220    "model": "auth.permission",
     221    "fields": {
     222      "codename": "add_network",
     223      "name": "Can add Network",
     224      "content_type": 12
     225    }
     226  },
     227  {
     228    "pk": 37,
     229    "model": "auth.permission",
     230    "fields": {
     231      "codename": "add_node",
     232      "name": "Can add Node",
     233      "content_type": 13
     234    }
     235  },
     236  {
     237    "pk": 23,
     238    "model": "auth.permission",
     239    "fields": {
     240      "codename": "change_antenna",
     241      "name": "Can change Antenna",
     242      "content_type": 8
     243    }
     244  },
     245  {
     246    "pk": 44,
     247    "model": "auth.permission",
     248    "fields": {
     249      "codename": "change_dhcpstatic",
     250      "name": "Can change Static host",
     251      "content_type": 15
     252    }
     253  },
     254  {
     255    "pk": 32,
     256    "model": "auth.permission",
     257    "fields": {
     258      "codename": "change_dnsserver",
     259      "name": "Can change Dns Server",
     260      "content_type": 11
     261    }
     262  },
     263  {
     264    "pk": 26,
     265    "model": "auth.permission",
     266    "fields": {
     267      "codename": "change_ethernettowifibridge",
     268      "name": "Can change ethernet to wifi bridge",
     269      "content_type": 9
     270    }
     271  },
     272  {
     273    "pk": 41,
     274    "model": "auth.permission",
     275    "fields": {
     276      "codename": "change_interface",
     277      "name": "Can change Interface",
     278      "content_type": 14
     279    }
     280  },
     281  {
     282    "pk": 29,
     283    "model": "auth.permission",
     284    "fields": {
     285      "codename": "change_location",
     286      "name": "Can change Location",
     287      "content_type": 10
     288    }
     289  },
     290  {
     291    "pk": 35,
     292    "model": "auth.permission",
     293    "fields": {
     294      "codename": "change_network",
     295      "name": "Can change Network",
     296      "content_type": 12
     297    }
     298  },
     299  {
     300    "pk": 38,
     301    "model": "auth.permission",
     302    "fields": {
     303      "codename": "change_node",
     304      "name": "Can change Node",
     305      "content_type": 13
     306    }
     307  },
     308  {
     309    "pk": 24,
     310    "model": "auth.permission",
     311    "fields": {
     312      "codename": "delete_antenna",
     313      "name": "Can delete Antenna",
     314      "content_type": 8
     315    }
     316  },
     317  {
     318    "pk": 45,
     319    "model": "auth.permission",
     320    "fields": {
     321      "codename": "delete_dhcpstatic",
     322      "name": "Can delete Static host",
     323      "content_type": 15
     324    }
     325  },
     326  {
     327    "pk": 33,
     328    "model": "auth.permission",
     329    "fields": {
     330      "codename": "delete_dnsserver",
     331      "name": "Can delete Dns Server",
     332      "content_type": 11
     333    }
     334  },
     335  {
     336    "pk": 27,
     337    "model": "auth.permission",
     338    "fields": {
     339      "codename": "delete_ethernettowifibridge",
     340      "name": "Can delete ethernet to wifi bridge",
     341      "content_type": 9
     342    }
     343  },
     344  {
     345    "pk": 42,
     346    "model": "auth.permission",
     347    "fields": {
     348      "codename": "delete_interface",
     349      "name": "Can delete Interface",
     350      "content_type": 14
     351    }
     352  },
     353  {
     354    "pk": 30,
     355    "model": "auth.permission",
     356    "fields": {
     357      "codename": "delete_location",
     358      "name": "Can delete Location",
     359      "content_type": 10
     360    }
     361  },
     362  {
     363    "pk": 36,
     364    "model": "auth.permission",
     365    "fields": {
     366      "codename": "delete_network",
     367      "name": "Can delete Network",
     368      "content_type": 12
     369    }
     370  },
     371  {
     372    "pk": 39,
     373    "model": "auth.permission",
     374    "fields": {
     375      "codename": "delete_node",
     376      "name": "Can delete Node",
     377      "content_type": 13
     378    }
     379  },
     380  {
     381    "pk": 16,
     382    "model": "auth.permission",
     383    "fields": {
     384      "codename": "add_session",
     385      "name": "Can add session",
     386      "content_type": 6
     387    }
     388  },
     389  {
     390    "pk": 17,
     391    "model": "auth.permission",
     392    "fields": {
     393      "codename": "change_session",
     394      "name": "Can change session",
     395      "content_type": 6
     396    }
     397  },
     398  {
     399    "pk": 18,
     400    "model": "auth.permission",
     401    "fields": {
     402      "codename": "delete_session",
     403      "name": "Can delete session",
     404      "content_type": 6
     405    }
     406  },
     407  {
     408    "pk": 1,
     409    "model": "auth.user",
     410    "fields": {
     411      "username": "admin",
     412      "first_name": "",
     413      "last_name": "",
     414      "is_active": true,
     415      "is_superuser": true,
     416      "is_staff": true,
     417      "last_login": "2009-01-07 03:06:11",
     418      "groups": [],
     419      "user_permissions": [],
     420      "password": "sha1$c6ab1$ff3ad6f9821121e6a14536b12e0e7c92d32df965",
     421      "email": "techniek@wirelessleiden.nl",
     422      "date_joined": "2009-01-06 23:14:59"
     423    }
     424  },
     425  {
     426    "pk": 8,
     427    "model": "contenttypes.contenttype",
     428    "fields": {
     429      "model": "antenna",
     430      "name": "Antenna",
     431      "app_label": "exodus"
     432    }
     433  },
     434  {
     435    "pk": 11,
     436    "model": "contenttypes.contenttype",
     437    "fields": {
     438      "model": "dnsserver",
     439      "name": "Dns Server",
     440      "app_label": "exodus"
     441    }
     442  },
     443  {
     444    "pk": 14,
     445    "model": "contenttypes.contenttype",
     446    "fields": {
     447      "model": "interface",
     448      "name": "Interface",
     449      "app_label": "exodus"
     450    }
     451  },
     452  {
     453    "pk": 10,
     454    "model": "contenttypes.contenttype",
     455    "fields": {
     456      "model": "location",
     457      "name": "Location",
     458      "app_label": "exodus"
     459    }
     460  },
     461  {
     462    "pk": 12,
     463    "model": "contenttypes.contenttype",
     464    "fields": {
     465      "model": "network",
     466      "name": "Network",
     467      "app_label": "exodus"
     468    }
     469  },
     470  {
     471    "pk": 13,
     472    "model": "contenttypes.contenttype",
     473    "fields": {
     474      "model": "node",
     475      "name": "Node",
     476      "app_label": "exodus"
     477    }
     478  },
     479  {
     480    "pk": 15,
     481    "model": "contenttypes.contenttype",
     482    "fields": {
     483      "model": "dhcpstatic",
     484      "name": "Static host",
     485      "app_label": "exodus"
     486    }
     487  },
     488  {
     489    "pk": 5,
     490    "model": "contenttypes.contenttype",
     491    "fields": {
     492      "model": "contenttype",
     493      "name": "content type",
     494      "app_label": "contenttypes"
     495    }
     496  },
     497  {
     498    "pk": 9,
     499    "model": "contenttypes.contenttype",
     500    "fields": {
     501      "model": "ethernettowifibridge",
     502      "name": "ethernet to wifi bridge",
     503      "app_label": "exodus"
     504    }
     505  },
     506  {
     507    "pk": 2,
     508    "model": "contenttypes.contenttype",
     509    "fields": {
     510      "model": "group",
     511      "name": "group",
     512      "app_label": "auth"
     513    }
     514  },
     515  {
     516    "pk": 7,
     517    "model": "contenttypes.contenttype",
     518    "fields": {
     519      "model": "logentry",
     520      "name": "log entry",
     521      "app_label": "admin"
     522    }
     523  },
     524  {
     525    "pk": 4,
     526    "model": "contenttypes.contenttype",
     527    "fields": {
     528      "model": "message",
     529      "name": "message",
     530      "app_label": "auth"
     531    }
     532  },
     533  {
     534    "pk": 1,
     535    "model": "contenttypes.contenttype",
     536    "fields": {
     537      "model": "permission",
     538      "name": "permission",
     539      "app_label": "auth"
     540    }
     541  },
     542  {
     543    "pk": 6,
     544    "model": "contenttypes.contenttype",
     545    "fields": {
     546      "model": "session",
     547      "name": "session",
     548      "app_label": "sessions"
     549    }
     550  },
     551  {
     552    "pk": 3,
     553    "model": "contenttypes.contenttype",
     554    "fields": {
     555      "model": "user",
     556      "name": "user",
     557      "app_label": "auth"
     558    }
     559  },
     560  {
     561    "pk": "d693f261a86267c855fffb23cc937b73",
     562    "model": "sessions.session",
     563    "fields": {
     564      "expire_date": "2009-01-20 23:16:04",
     565      "session_data": "gAJ9cQEoVRJfYXV0aF91c2VyX2JhY2tlbmRxAlUpZGphbmdvLmNvbnRyaWIuYXV0aC5iYWNrZW5k\ncy5Nb2RlbEJhY2tlbmRxA1UNX2F1dGhfdXNlcl9pZHEESwF1LmQ2ZjkxZjcxZTMwYmVjYzcyNDk1\nYTk5MjRlNWYxNTJm\n"
     566    }
     567  },
     568  {
     569    "pk": "7c87f9e0cb0e91f950238b0b8bc297b9",
     570    "model": "sessions.session",
     571    "fields": {
     572      "expire_date": "2009-01-21 03:06:11",
     573      "session_data": "gAJ9cQEoVRJfYXV0aF91c2VyX2JhY2tlbmRxAlUpZGphbmdvLmNvbnRyaWIuYXV0aC5iYWNrZW5k\ncy5Nb2RlbEJhY2tlbmRxA1UNX2F1dGhfdXNlcl9pZHEESwF1LmQ2ZjkxZjcxZTMwYmVjYzcyNDk1\nYTk5MjRlNWYxNTJm\n"
     574    }
     575  },
     576  {
     577    "pk": 2,
     578    "model": "admin.logentry",
     579    "fields": {
     580      "action_flag": 1,
     581      "action_time": "2009-01-07 03:06:30",
     582      "object_repr": "Wandy",
     583      "object_id": "1",
     584      "change_message": "",
     585      "user": 1,
     586      "content_type": 9
     587    }
     588  },
     589  {
     590    "pk": 1,
     591    "model": "admin.logentry",
     592    "fields": {
     593      "action_flag": 1,
     594      "action_time": "2009-01-07 00:23:57",
     595      "object_repr": "wleiden.net",
     596      "object_id": "1",
     597      "change_message": "",
     598      "user": 1,
     599      "content_type": 12
     600    }
     601  },
     602  {
     603    "pk": 1,
     604    "model": "exodus.ethernettowifibridge",
     605    "fields": {
     606      "type": "Wandy"
     607    }
     608  },
     609  {
     610    "pk": 1,
     611    "model": "exodus.network",
     612    "fields": {
     613      "netmask": 16,
     614      "name": "wleiden.net",
     615      "ipspacestart": "172.16.0.0"
     616    }
    9617  }
    10  },
    11  {
    12   "pk": 20,
    13   "model": "auth.permission",
    14   "fields": {
    15    "codename": "change_logentry",
    16    "name": "Can change log entry",
    17    "content_type": 7
    18   }
    19  },
    20  {
    21   "pk": 21,
    22   "model": "auth.permission",
    23   "fields": {
    24    "codename": "delete_logentry",
    25    "name": "Can delete log entry",
    26    "content_type": 7
    27   }
    28  },
    29  {
    30   "pk": 4,
    31   "model": "auth.permission",
    32   "fields": {
    33    "codename": "add_group",
    34    "name": "Can add group",
    35    "content_type": 2
    36   }
    37  },
    38  {
    39   "pk": 10,
    40   "model": "auth.permission",
    41   "fields": {
    42    "codename": "add_message",
    43    "name": "Can add message",
    44    "content_type": 4
    45   }
    46  },
    47  {
    48   "pk": 1,
    49   "model": "auth.permission",
    50   "fields": {
    51    "codename": "add_permission",
    52    "name": "Can add permission",
    53    "content_type": 1
    54   }
    55  },
    56  {
    57   "pk": 7,
    58   "model": "auth.permission",
    59   "fields": {
    60    "codename": "add_user",
    61    "name": "Can add user",
    62    "content_type": 3
    63   }
    64  },
    65  {
    66   "pk": 5,
    67   "model": "auth.permission",
    68   "fields": {
    69    "codename": "change_group",
    70    "name": "Can change group",
    71    "content_type": 2
    72   }
    73  },
    74  {
    75   "pk": 11,
    76   "model": "auth.permission",
    77   "fields": {
    78    "codename": "change_message",
    79    "name": "Can change message",
    80    "content_type": 4
    81   }
    82  },
    83  {
    84   "pk": 2,
    85   "model": "auth.permission",
    86   "fields": {
    87    "codename": "change_permission",
    88    "name": "Can change permission",
    89    "content_type": 1
    90   }
    91  },
    92  {
    93   "pk": 8,
    94   "model": "auth.permission",
    95   "fields": {
    96    "codename": "change_user",
    97    "name": "Can change user",
    98    "content_type": 3
    99   }
    100  },
    101  {
    102   "pk": 6,
    103   "model": "auth.permission",
    104   "fields": {
    105    "codename": "delete_group",
    106    "name": "Can delete group",
    107    "content_type": 2
    108   }
    109  },
    110  {
    111   "pk": 12,
    112   "model": "auth.permission",
    113   "fields": {
    114    "codename": "delete_message",
    115    "name": "Can delete message",
    116    "content_type": 4
    117   }
    118  },
    119  {
    120   "pk": 3,
    121   "model": "auth.permission",
    122   "fields": {
    123    "codename": "delete_permission",
    124    "name": "Can delete permission",
    125    "content_type": 1
    126   }
    127  },
    128  {
    129   "pk": 9,
    130   "model": "auth.permission",
    131   "fields": {
    132    "codename": "delete_user",
    133    "name": "Can delete user",
    134    "content_type": 3
    135   }
    136  },
    137  {
    138   "pk": 13,
    139   "model": "auth.permission",
    140   "fields": {
    141    "codename": "add_contenttype",
    142    "name": "Can add content type",
    143    "content_type": 5
    144   }
    145  },
    146  {
    147   "pk": 14,
    148   "model": "auth.permission",
    149   "fields": {
    150    "codename": "change_contenttype",
    151    "name": "Can change content type",
    152    "content_type": 5
    153   }
    154  },
    155  {
    156   "pk": 15,
    157   "model": "auth.permission",
    158   "fields": {
    159    "codename": "delete_contenttype",
    160    "name": "Can delete content type",
    161    "content_type": 5
    162   }
    163  },
    164  {
    165   "pk": 22,
    166   "model": "auth.permission",
    167   "fields": {
    168    "codename": "add_antenna",
    169    "name": "Can add Antenna",
    170    "content_type": 8
    171   }
    172  },
    173  {
    174   "pk": 40,
    175   "model": "auth.permission",
    176   "fields": {
    177    "codename": "add_dhcpstatic",
    178    "name": "Can add Static host",
    179    "content_type": 14
    180   }
    181  },
    182  {
    183   "pk": 28,
    184   "model": "auth.permission",
    185   "fields": {
    186    "codename": "add_dnsserver",
    187    "name": "Can add Dns Server",
    188    "content_type": 10
    189   }
    190  },
    191  {
    192   "pk": 37,
    193   "model": "auth.permission",
    194   "fields": {
    195    "codename": "add_interface",
    196    "name": "Can add Interface",
    197    "content_type": 13
    198   }
    199  },
    200  {
    201   "pk": 25,
    202   "model": "auth.permission",
    203   "fields": {
    204    "codename": "add_location",
    205    "name": "Can add Location",
    206    "content_type": 9
    207   }
    208  },
    209  {
    210   "pk": 31,
    211   "model": "auth.permission",
    212   "fields": {
    213    "codename": "add_network",
    214    "name": "Can add Network",
    215    "content_type": 11
    216   }
    217  },
    218  {
    219   "pk": 34,
    220   "model": "auth.permission",
    221   "fields": {
    222    "codename": "add_node",
    223    "name": "Can add Node",
    224    "content_type": 12
    225   }
    226  },
    227  {
    228   "pk": 23,
    229   "model": "auth.permission",
    230   "fields": {
    231    "codename": "change_antenna",
    232    "name": "Can change Antenna",
    233    "content_type": 8
    234   }
    235  },
    236  {
    237   "pk": 41,
    238   "model": "auth.permission",
    239   "fields": {
    240    "codename": "change_dhcpstatic",
    241    "name": "Can change Static host",
    242    "content_type": 14
    243   }
    244  },
    245  {
    246   "pk": 29,
    247   "model": "auth.permission",
    248   "fields": {
    249    "codename": "change_dnsserver",
    250    "name": "Can change Dns Server",
    251    "content_type": 10
    252   }
    253  },
    254  {
    255   "pk": 38,
    256   "model": "auth.permission",
    257   "fields": {
    258    "codename": "change_interface",
    259    "name": "Can change Interface",
    260    "content_type": 13
    261   }
    262  },
    263  {
    264   "pk": 26,
    265   "model": "auth.permission",
    266   "fields": {
    267    "codename": "change_location",
    268    "name": "Can change Location",
    269    "content_type": 9
    270   }
    271  },
    272  {
    273   "pk": 32,
    274   "model": "auth.permission",
    275   "fields": {
    276    "codename": "change_network",
    277    "name": "Can change Network",
    278    "content_type": 11
    279   }
    280  },
    281  {
    282   "pk": 35,
    283   "model": "auth.permission",
    284   "fields": {
    285    "codename": "change_node",
    286    "name": "Can change Node",
    287    "content_type": 12
    288   }
    289  },
    290  {
    291   "pk": 24,
    292   "model": "auth.permission",
    293   "fields": {
    294    "codename": "delete_antenna",
    295    "name": "Can delete Antenna",
    296    "content_type": 8
    297   }
    298  },
    299  {
    300   "pk": 42,
    301   "model": "auth.permission",
    302   "fields": {
    303    "codename": "delete_dhcpstatic",
    304    "name": "Can delete Static host",
    305    "content_type": 14
    306   }
    307  },
    308  {
    309   "pk": 30,
    310   "model": "auth.permission",
    311   "fields": {
    312    "codename": "delete_dnsserver",
    313    "name": "Can delete Dns Server",
    314    "content_type": 10
    315   }
    316  },
    317  {
    318   "pk": 39,
    319   "model": "auth.permission",
    320   "fields": {
    321    "codename": "delete_interface",
    322    "name": "Can delete Interface",
    323    "content_type": 13
    324   }
    325  },
    326  {
    327   "pk": 27,
    328   "model": "auth.permission",
    329   "fields": {
    330    "codename": "delete_location",
    331    "name": "Can delete Location",
    332    "content_type": 9
    333   }
    334  },
    335  {
    336   "pk": 33,
    337   "model": "auth.permission",
    338   "fields": {
    339    "codename": "delete_network",
    340    "name": "Can delete Network",
    341    "content_type": 11
    342   }
    343  },
    344  {
    345   "pk": 36,
    346   "model": "auth.permission",
    347   "fields": {
    348    "codename": "delete_node",
    349    "name": "Can delete Node",
    350    "content_type": 12
    351   }
    352  },
    353  {
    354   "pk": 16,
    355   "model": "auth.permission",
    356   "fields": {
    357    "codename": "add_session",
    358    "name": "Can add session",
    359    "content_type": 6
    360   }
    361  },
    362  {
    363   "pk": 17,
    364   "model": "auth.permission",
    365   "fields": {
    366    "codename": "change_session",
    367    "name": "Can change session",
    368    "content_type": 6
    369   }
    370  },
    371  {
    372   "pk": 18,
    373   "model": "auth.permission",
    374   "fields": {
    375    "codename": "delete_session",
    376    "name": "Can delete session",
    377    "content_type": 6
    378   }
    379  },
    380  {
    381   "pk": 1,
    382   "model": "auth.user",
    383   "fields": {
    384    "username": "admin",
    385    "first_name": "",
    386    "last_name": "",
    387    "is_active": true,
    388    "is_superuser": true,
    389    "is_staff": true,
    390    "last_login": "2008-12-30 10:02:39",
    391    "groups": [],
    392    "user_permissions": [],
    393    "password": "sha1$ae3df$e08f0271989da4f50214bc9eaa6f23738c75f6bb",
    394    "email": "roland@wirelessleiden.nl",
    395    "date_joined": "2008-12-30 10:02:25"
    396   }
    397  },
    398  {
    399   "pk": 8,
    400   "model": "contenttypes.contenttype",
    401   "fields": {
    402    "model": "antenna",
    403    "name": "Antenna",
    404    "app_label": "exodus"
    405   }
    406  },
    407  {
    408   "pk": 10,
    409   "model": "contenttypes.contenttype",
    410   "fields": {
    411    "model": "dnsserver",
    412    "name": "Dns Server",
    413    "app_label": "exodus"
    414   }
    415  },
    416  {
    417   "pk": 13,
    418   "model": "contenttypes.contenttype",
    419   "fields": {
    420    "model": "interface",
    421    "name": "Interface",
    422    "app_label": "exodus"
    423   }
    424  },
    425  {
    426   "pk": 9,
    427   "model": "contenttypes.contenttype",
    428   "fields": {
    429    "model": "location",
    430    "name": "Location",
    431    "app_label": "exodus"
    432   }
    433  },
    434  {
    435   "pk": 11,
    436   "model": "contenttypes.contenttype",
    437   "fields": {
    438    "model": "network",
    439    "name": "Network",
    440    "app_label": "exodus"
    441   }
    442  },
    443  {
    444   "pk": 12,
    445   "model": "contenttypes.contenttype",
    446   "fields": {
    447    "model": "node",
    448    "name": "Node",
    449    "app_label": "exodus"
    450   }
    451  },
    452  {
    453   "pk": 14,
    454   "model": "contenttypes.contenttype",
    455   "fields": {
    456    "model": "dhcpstatic",
    457    "name": "Static host",
    458    "app_label": "exodus"
    459   }
    460  },
    461  {
    462   "pk": 5,
    463   "model": "contenttypes.contenttype",
    464   "fields": {
    465    "model": "contenttype",
    466    "name": "content type",
    467    "app_label": "contenttypes"
    468   }
    469  },
    470  {
    471   "pk": 2,
    472   "model": "contenttypes.contenttype",
    473   "fields": {
    474    "model": "group",
    475    "name": "group",
    476    "app_label": "auth"
    477   }
    478  },
    479  {
    480   "pk": 7,
    481   "model": "contenttypes.contenttype",
    482   "fields": {
    483    "model": "logentry",
    484    "name": "log entry",
    485    "app_label": "admin"
    486   }
    487  },
    488  {
    489   "pk": 4,
    490   "model": "contenttypes.contenttype",
    491   "fields": {
    492    "model": "message",
    493    "name": "message",
    494    "app_label": "auth"
    495   }
    496  },
    497  {
    498   "pk": 1,
    499   "model": "contenttypes.contenttype",
    500   "fields": {
    501    "model": "permission",
    502    "name": "permission",
    503    "app_label": "auth"
    504   }
    505  },
    506  {
    507   "pk": 6,
    508   "model": "contenttypes.contenttype",
    509   "fields": {
    510    "model": "session",
    511    "name": "session",
    512    "app_label": "sessions"
    513   }
    514  },
    515  {
    516   "pk": 3,
    517   "model": "contenttypes.contenttype",
    518   "fields": {
    519    "model": "user",
    520    "name": "user",
    521    "app_label": "auth"
    522   }
    523  },
    524  {
    525   "pk": "6a40403762194e04a99095cdd74788b6",
    526   "model": "sessions.session",
    527   "fields": {
    528    "expire_date": "2009-01-13 10:02:39",
    529    "session_data": "gAJ9cQEoVRJfYXV0aF91c2VyX2JhY2tlbmRxAlUpZGphbmdvLmNvbnRyaWIuYXV0aC5iYWNrZW5k\ncy5Nb2RlbEJhY2tlbmRxA1UNX2F1dGhfdXNlcl9pZHEESwF1LmQ2ZjkxZjcxZTMwYmVjYzcyNDk1\nYTk5MjRlNWYxNTJm\n"
    530   }
    531  },
    532  {
    533   "pk": 1,
    534   "model": "admin.logentry",
    535   "fields": {
    536    "action_flag": 1,
    537    "action_time": "2008-12-30 10:03:09",
    538    "object_repr": "wleiden.net",
    539    "object_id": "1",
    540    "change_message": "",
    541    "user": 1,
    542    "content_type": 11
    543   }
    544  },
    545  {
    546   "pk": 1,
    547   "model": "exodus.network",
    548   "fields": {
    549    "netmask": 16,
    550    "name": "wleiden.net",
    551    "ipspacestart": "172.16.0.0"
    552   }
    553  }
    554618]
Note: See TracChangeset for help on using the changeset viewer.