added some comments
authorsmbaker <smbaker@fc8-storktest.lan>
Wed, 24 Jul 2013 22:56:24 +0000 (15:56 -0700)
committersmbaker <smbaker@fc8-storktest.lan>
Wed, 24 Jul 2013 22:56:24 +0000 (15:56 -0700)
planetstack/core/admin.py

index c7e3821..bfd9421 100644 (file)
@@ -41,7 +41,9 @@ class TagInline(generic.GenericTabularInline):
     extra = 1
 
 class NetworkLookerUpper:
-    """ This is a callable that looks up a network name in a sliver """\r
+    """ This is a callable that looks up a network name in a sliver and returns\r
+        the ip address for that network.\r
+    """\r
 \r
     def __init__(self, name):\r
         self.short_description = name\r
@@ -72,6 +74,9 @@ class SliverInline(PlStackTabularInline):
     def get_readonly_fields(self, request, obj=None):
         readonly_fields = super(SliverInline, self).get_readonly_fields(request, obj)
 
+        # Lookup the networks that are bound to the slivers, and add those
+        # network names to the list of readonly fields.
+
         for sliver in obj.slivers.all():
             for nbs in sliver.networkboundsliver_set.all():
                 if nbs.ip is not None: