Changeset 6606
- Timestamp:
- Jan 15, 2009, 9:18:52 PM (16 years ago)
- Location:
- trunk/exodus
- Files:
-
- 6 added
- 4 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/exodus/forms.py
r6565 r6606 39 39 masterlinks = ( i for i in self.instance.interface_set.all() 40 40 if i.id == i.link_id ) 41 #XXX: implement Ethernet 2 wifi 41 42 for i in masterlinks: 42 43 all_links = i.interface_set.all() -
trunk/exodus/models.py
r6578 r6606 68 68 return self.description 69 69 70 def delete(self): 71 for i in self.node_set.all(): 72 i.delete() 73 super(Location, self).delete() 74 70 75 71 76 #XXX: Name Domain perhaps? … … 106 111 return self.name 107 112 108 # def delete(self): 109 # import pdb; pdb.set_trace() ; 110 # pass 113 def delete(self): 114 for i in self.interface_set.all(): 115 i.delete 116 super(Node, self).delete() 111 117 112 118 class Interface(models.Model): … … 127 133 direction = models.CharField(max_length=10, blank=True, null=True, 128 134 choices=DIRECTION_CHOICES) 129 link = models.ForeignKey('self', blank=True, null=True) 135 # default='self' only works on the second save when link is not defined. 136 link = models.ForeignKey('self', blank=True, null=True, default='self') 130 137 ip = models.IPAddressField(unique=True, blank=True) 131 138 netmask = models.IntegerField(null=True, blank=True) … … 148 155 149 156 def save(self, force_insert=False, force_update=False): 150 super(Interface, self).save( False, False)157 super(Interface, self).save(force_insert, force_update) 151 158 # If link is not defined we link to self. 152 159 if self.link == None: -
trunk/exodus/scripts/genesis_to_exodus.py
r6601 r6606 124 124 'accesspoint': False, 125 125 'ethernet_to_wifi': '' } 126 126 127 127 #XXX: this section can be discarded because 128 128 # there is no need to import ips. … … 152 152 interface['direction'] = '' 153 153 154 if config.has_option(cfgsection, 'extra_type'): interface['ethernet_to_wifi'] = 1 154 if config.has_option(cfgsection, 'extra_type'): 155 interface['ethernet_to_wifi'] = 1 155 156 156 157 # handle Antenna -
trunk/exodus/templates/viewNode.html
r6565 r6606 57 57 {% for interlink in nic.link.interface_set.all %} 58 58 {% ifnotequal interlink nic %} 59 <ul>60 <li>Interlink to Node: <a href="{% url exodus.views.viewNode interlink.node %}">61 {{ interlink.node }}</a> </li>62 <li>Link Name: {{ interlink }}</li>63 <li>IP: {{ interlink.ip }}/{{ interlink.netmask }} </li>64 {% for static in interlink.dhcpstatic_set.all %}65 <br />66 59 <ul> 67 <li>Hostname: {{ static.hostname }}</li> 68 <li>Macaddress: {{ static.macaddress }}</li> 69 <li>IP: {{ static.ipaddress}}</li> 60 {% ifequal interlink interlink.link %} 61 <strong> 62 {% endifequal %} 63 <li>Interlink to Node: <a href="{% url exodus.views.viewNode interlink.node %}"> 64 {{ interlink.node }}</a> </li> 65 <li>Link Name: {{ interlink }}</li> 66 <li>IP: {{ interlink.ip }}/{{ interlink.netmask }} </li> 67 {% ifequal interlink interlink.link %} 68 </strong> 69 {% endifequal %} 70 {% for static in interlink.dhcpstatic_set.all %} 71 <br /> 72 <ul> 73 <li>Hostname: {{ static.hostname }}</li> 74 <li>Macaddress: {{ static.macaddress }}</li> 75 <li>IP: {{ static.ipaddress}}</li> 76 </ul> 77 {% endfor %} 70 78 </ul> 71 {% endfor %}72 </ul>73 79 {% endifnotequal %} 74 80 {% endfor %} -
trunk/exodus/tests/oldunittests.py
-
Property svn:mergeinfo
set to
-
Property svn:mergeinfo
set to
Note:
See TracChangeset
for help on using the changeset viewer.