'route_fields' : { 'subnet' : '0.0.0.0/0',
'next_hop' : 'xxx-deferred-xxx',
},
+ # boot cd settings
+ # we should have tags here instead of the hard-wired
+ # options set for GetBootMedium in TestNode.py
}]
def all_nodenames (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,
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 sfa (options,index) :
return {
- # the default is to use AMs in the various aggregates.xml
+ # the port used to generate the various aggregates.xml
# stack config_sfamesh to point to SMs instead
'neighbours-port':12346,
+ # the port that sfi connects to - used to be 12347 when the SM was still running
+ # but now the SM is just turned off for these tests
+ 'sfi-connects-to-port' : 12346,
## global sfa-config-tty stuff
'settings': {
'SFA_REGISTRY_ROOT_AUTH' : sfa_root(index),
'SFA_REGISTRY_HOST' : 'deferred-myplc-hostname',
'SFA_AGGREGATE_HOST': 'deferred-myplc-hostname',
'SFA_SM_HOST': 'deferred-myplc-hostname',
+# turning off SM and using only AM; be explicit on this as the default has changed in the code
+ 'SFA_SM_ENABLED' : 'false',
'SFA_PLC_URL' : 'deferred-myplc-api-url',
'SFA_PLC_USER' : 'root@test.onelab.eu',
'SFA_PLC_PASSWORD' : 'test++',
}
-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)
+