X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=system%2Fconfig_onelab.py;h=69b3f8cbc92e2fec56f32427636068d7557c4e29;hb=480199da582fb49c047bf615faccb06656a5fcbe;hp=a81257228ccf2bd3c0107cc05e1edc2efa42970a;hpb=31970aedc37344e730171c07ed73a10769f0253e;p=tests.git diff --git a/system/config_onelab.py b/system/config_onelab.py index a812572..69b3f8c 100644 --- a/system/config_onelab.py +++ b/system/config_onelab.py @@ -7,40 +7,42 @@ onelab="one-lab.org" -# use a model that contains "vmware" to get the node actually started # host_box is taken as 'localhost' if omitted (should be a direct field in the node spec) def nodes(): - nodes= [ {'node_fields': {'hostname': 'test1.one-lab.org', - 'model':'vmware/minhw', }, - 'host_box' : 'test.one-lab.org', - 'owner' : 'pi', - 'network_fields': { 'method':'static', - 'type':'ipv4', - 'ip':'192.168.132.128', - 'gateway':'192.168.132.1', - 'network':'192.168.132.0', - 'broadcast':'192.168.132.255', - 'netmask':'255.255.255.0', - 'dns1': '192.168.132.2', - }, - }, - { 'node_fields': {'hostname':'test2.one-lab.org', - 'model':'vmware/minhw', } , - 'host_box' : 'test.one-lab.org', - 'owner' : 'tech', - 'network_fields': {'method':'static', - 'type':'ipv4', - 'ip':'192.168.132.130', - 'gateway':'192.168.132.1', - 'network':'192.168.132.0', - 'broadcast':'192.168.132.255', - 'netmask':'255.255.255.0', - 'dns1': '192.168.132.2', - }, - }, - ] + nodes= [{'node_fields': {'hostname': 'lysithea.inria.fr', + 'model':'qemu/minhw', } , + 'host_box': 'testbox1.one-lab.org', + 'owner' : 'pi', + 'network_fields': { 'method':'static', + 'type':'ipv4', + 'ip':'138.96.250.153', + 'gateway':'138.96.248.250', + 'network':'138.96.0.0', + 'broadcast':'138.96.255.255', + 'netmask':'255.255.0.0', + 'dns1': '138.96.0.10', + 'dns2': '138.96.0.11', + 'mac' : '00:0b:cd:62:50:95', + }, + }, + #{'node_fields': {'hostname': 'pluton.inria.fr', + # 'model':'qemu/minhw', } , + # 'host_box': 'testbox1.one-lab.org', + # 'owner' : 'pi', + # 'network_fields': { 'method':'static', + # 'type':'ipv4', + # 'ip':'138.96.250.151', + # 'gateway':'138.96.248.250', + # 'network':'138.96.0.0', + # 'broadcast':'138.96.255.255', + # 'netmask':'255.255.0.0', + # 'dns1': '138.96.0.10', + # 'dns2': '138.96.0.11', + # 'mac' : '00:08:02:33:4d:9e', + # }, + #}, + ] return nodes -# return [nodes[0]] def all_nodenames (): return [ node['node_fields']['hostname'] for node in nodes()] @@ -87,7 +89,7 @@ def sites (): 'login_base':'main', 'abbreviated_name':'PLanettest', 'max_slices':100, - 'url':'http://onelab-test.inria.fr', + 'url':'http://testbox1.one-lab.org', }, 'address_fields' : {'line1':'route des lucioles', 'city':'sophia', @@ -174,15 +176,34 @@ def slices (): 'sitename' : 'main', 'owner' : 'pi', }] - # I suspect the check_slices stuff to work improperly with 2 slices -# return both - return [both[0]] + return both + +def all_slicenames (): + return [ slice['slice_fields']['name'] for slice in slices()] + +#def tcp_param(): +# param = [{ 'tcp_fields' : {'peer_name' : 'server', +# 'slice_name' :all_slicenames()[0], +# 'server_name': all_nodenames()[0] +# }, +# +# }, +# { 'tcp_fields':{'peer_name' : 'client', +# 'slice_name' :all_slicenames()[1], +# 'client_name': all_nodenames()[1], +# 'peer_server' : all_nodenames()[0], +# 'server_port' : 22 +# }, +# }, +# +# ] +# return param def plc () : return { 'name' : 'onelabtest', # as of yet, not sure we can handle foreign hosts, but this is required though - 'hostname' : 'localhost', + 'hostname' : 'testbox1.one-lab.org', # set these two items to run within a vserver # 'vservername': '138.96.250.131' # 'vserverip': '138.96.250.131' @@ -202,6 +223,7 @@ def plc () : 'keys' : keys(), 'initscripts': initscripts(), 'slices' : slices(), + #'tcp_param' : tcp_param(), } def config (plc_specs,options):