specs += [ same_node_same_slice ]
# worth another try
specs += [ same_node_2_slices ]
- if options.size >1 :
+ if options.size > 1:
specs += [ two_nodes_same_slice, two_nodes_2_slices ]
return specs
'initscripts': initscripts(options,index),
'slices' : slices(options,index),
'tcp_specs' : tcp_specs(options,index),
- 'sfa' : sfa(options,index),
+ 'sfa' : sfa(options,index),
'leases' : leases (options, index),
# big distros need more time to install nodes
'ssh_node_boot_timers': (40,38),
}
-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)
+