[mirrorbrain-commits] r7777 - /trunk/mirrordoctor/mirrordoctor.py

From: <poeml_at_mirrorbrain.org>
Date: Thu, 27 Aug 2009 22:30:59 -0000
Author: poeml
Date: Fri Aug 28 00:30:58 2009
New Revision: 7777

URL: http://svn.mirrorbrain.org/viewvc/mirrorbrain?rev=7777&view=rev
Log:
eb list:
- add command line options to display the boolean flags --region-only,
  --country-only, --as-only and --prefix-only

Modified:
    trunk/mirrordoctor/mirrordoctor.py

Modified: trunk/mirrordoctor/mirrordoctor.py
URL: http://svn.mirrorbrain.org/viewvc/mirrorbrain/trunk/mirrordoctor/mirrordoctor.py?rev=7777&r1=7776&r2=7777&view=diff
==============================================================================
--- trunk/mirrordoctor/mirrordoctor.py (original)
+++ trunk/mirrordoctor/mirrordoctor.py Fri Aug 28 00:30:58 2009
@@ -183,6 +183,14 @@
             print s
 
 
+    @cmdln.option('--prefix-only', action='store_true',
+                        help='display whether the mirror is configured to handle only its network prefix')
+    @cmdln.option('--as-only', action='store_true',
+                        help='display whether the mirror is configured to handle only its autnomous system')
+    @cmdln.option('--country-only', action='store_true',
+                        help='display whether the mirror is configured to handle only its country')
+    @cmdln.option('--region-only', action='store_true',
+                        help='display whether the mirror is configured to handle only its region')
     @cmdln.option('--other-countries', action='store_true',
                         help='also display other countries that '
                              'a mirror is configured to handle')
@@ -237,6 +245,15 @@
                 s.append('%5s' % mirror.asn)
             if opts.prefix:
                 s.append('%-19s' % mirror.prefix)
+            # boolean flags
+            if opts.region_only:
+                s.append('region_only=%s' % mirror.regionOnly)
+            if opts.country_only:
+                s.append('country_only=%s' % mirror.countryOnly)
+            if opts.as_only:
+                s.append('as_only=%s' % mirror.asOnly)
+            if opts.prefix_only:
+                s.append('prefix_only=%s' % mirror.prefixOnly)
             s = ' '.join(s)
 
             if opts.show_disabled:




_______________________________________________
mirrorbrain-commits mailing list
Archive: http://mirrorbrain.org/archive/mirrorbrain-commits/

Note: To remove yourself from this list, send a mail with the content
 	unsubscribe
to the address mirrorbrain-commits-request_at_mirrorbrain.org
Received on Thu Aug 27 2009 - 22:31:01 GMT

This archive was generated by hypermail 2.2.0 : Thu Aug 27 2009 - 22:45:08 GMT