more pretty-printing
[tests.git] / system / config_default.py
index c2c1651..d4d095e 100644 (file)
@@ -434,6 +434,9 @@ def tcp_specs (options,index):
     # with the addition of omf-friendly slices..
     slice3='%s_sl4'%login_base(2)
     slice4='%s_sl5'%login_base(2)
+
+# NOTE: port 9999 is hard-wired in the code to be used for checking network readiness
+# so it is not to be used here
 # bind on 0.0.0.0 and try to reach this on localhost
 # not expected to work
     same_node_same_slice_lo =   { 'server_node': 'node1', 'server_slice': slice1,
@@ -458,7 +461,7 @@ def tcp_specs (options,index):
     specs += [ same_node_same_slice ]
 # worth another try
     specs += [ same_node_2_slices ]
-    if options.size >:
+    if options.size > 1:
         specs += [ two_nodes_same_slice, two_nodes_2_slices ]
     return specs
 
@@ -608,9 +611,26 @@ def test_auth_sfa_spec (options,index,rspec_style):
              } 
 
 
-def config (plc_specs,options):
-    result=plc_specs
+def config (plc_specs, options):
+    result = plc_specs
     # plc 'index' starts with 1 
-    for i in range (options.size):
-        result.append(plc(options,i+1))
+    for i in range(options.size):
+        result.append(plc(options, i+1))
     return result
+
+### for creating a sample config interactively
+def sample_test_plc_spec ():
+    class Void: pass
+
+    options = Void()
+    options.size = 1
+    options.rspec_styles = ['pg']
+
+    return config([], options)[0]
+
+if __name__ == '__main__':
+    s = sample_test_plc_spec()
+    print 'Sample plc_spec has the following keys'
+    for k in sorted(s.keys()):
+        print k    
+