Changeset 6230


Ignore:
Timestamp:
Aug 22, 2008, 10:40:57 PM (17 years ago)
Author:
roland
Message:

updated TODO file
And I'm working on addinterlink, moved original to addinterlink_old,
added more comments, to structure the implementation.

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • TODO

    r6215 r6230  
    11** Showstoppers
    22-> Document database layout and choices
     3        @rick, I think this todo van be closed, because exodusmodels.dot is available
    34
    45* Input fields validation
     
    910* Add reverse lookup fields for named.conf
    1011* Fix dhcpd.conf template
     12* Add ssh_keys
     13* Check urls and response redirects; Make urls depend on urls.py instead of hardcoding them into
     14        views.py and the templates. See:
     15        http://www.djangoproject.com/documentation/url_dispatch/#reverse
    1116* Interface cleanups:
    1217** option to edit/delete fields
  • exodus/views.py

    r6215 r6230  
    7272                form = addInterlinkForm(request.POST)
    7373                if form.is_valid():
     74                        instance = form.save(commit=False)
     75                        # Get this code working and clean it up afterwards
     76                        # check if we have two different ifaces from two different nodes
     77                        # Should add a error message if they are from the same node
     78                       
     79                        if instance.iface1.node.id != instance.iface2.node.id:
     80                                print 'Iface 1 and 2 are on a different node'
     81                                # check if they have the same mode
     82                                if instance.iface1.type == instance.iface2.type:
     83                                        print '''these ifaces are of the same type'''
     84                                        instance.same=True
     85                                        print instance.same
     86
     87                                if str(instance.iface1.type) == '11b' or str(instance.iface1.type) == '11g':
     88                                        print '''it's 11b or g'''
     89
     90                                #if (instance.iface1.type == '11b' | instance.iface2.type == '11b' )  &
     91                                #               (instance.iface1.type == '11g' || instance.iface2.type == '11g'):
     92                                #               print '''11b and 11g are compatible'''
     93                        #if wifi: check master and managed states for existings NICs/Interlinks
     94                                #Generate SSID
     95                        #Generate ips and netmask
     96                        #Save form
     97                        #return HttpResponseRedirect("/exodus/")
     98        else:
     99                newForm = Interlink(ip1='172.16.0.0', ip2='172.16.0.0')
     100                form = addInterlinkForm(instance = newForm)
     101        return render_to_response('addinterlink.html',{'form': form})
     102
     103
     104def addinterlink_old(request):
     105        if request.POST:
     106                form = addInterlinkForm(request.POST)
     107                if form.is_valid():
    74108                        instance  = form.save(commit=False)
    75109                        if str(instance.iface1.type) != "eth":
     110                                print instance.iface.name
    76111                                instance.ssid = newSSIDName(instance.node,
    77112                                        instance.iface,'il')
Note: See TracChangeset for help on using the changeset viewer.