--- /dev/null
+#
+# $Id$
+#
+# this is only an example file
+# the actual file is installed in your testmaster box as /root/LocalTestResources.py
+#
+#
+
+from TestResources import TestResources
+
+class OnelabTestResources (TestResources):
+
+ # we use only one for now but who knows
+ def plc_boxes (self):
+ return [ 'testbox.test.planet-lab.org' ]
+
+ def network_dict (self):
+ return { 'interface_fields:gateway': '128.112.139.1',
+ 'interface_fields:network': '128.112.139.0',
+ 'interface_fields:broadcast': '128.112.139.127',
+ 'interface_fields:netmask': '255.255.255.128',
+ 'interface_fields:dns1': '128.112.136.10',
+ 'interface_fields:dns2': '128.112.136.12',
+ }
+
+ def nodes_ip_pool (self):
+ return [ ("node-01.test.planet-lab.org", "128.112.139.44", "de:ad:be:ef:00:10"),
+ ("node-02.test.planet-lab.org", "128.112.139.66", "de:ad:be:ef:00:20"),
+ ]
+
+ def qemus_ip_pool (self):
+ return [ ( 'testqemu1.test.planet-lab.org', None, None ) ]
+
+ def max_qemus (self):
+ return 1
+
+ def plcs_ip_pool (self):
+ return [ ("plc-01.test.planet-lab.org","128.112.139.34", "de:ad:be:ef:ff:01"),
+ ("plc-02.test.planet-lab.org","128.112.139.35", "de:ad:be:ef:ff:02"),
+ ("plc-03.test.planet-lab.org","128.112.139.36", "de:ad:be:ef:ff:03"),
+ ("plc-04.test.planet-lab.org","128.112.139.37", "de:ad:be:ef:ff:04"),
+ ("plc-05.test.planet-lab.org","128.112.139.41", "de:ad:be:ef:ff:05"),
+ ]
+
+ def max_plcs (self):
+ return 4
+
+
+local_resources = OnelabTestResources ()
def check_hooks_script (self,local_script):
# push the script on the node's root context
script_name=os.path.basename(local_script)
- utils.header ("NODE %s : running hooks check script %s"%(self.name(),script_name))
- ssh_handle=self.create_test_ssh()
- ssh_handle.copy_home(local_script)
- if ssh_handle.run("./"+script_name) != 0:
- utils.header ("WARNING: node hooks check script %s FAILED"%script_name)
- print 'temporary : ignoring result and always return true for now'
+ utils.header ("NODE hook %s (%s)"%(script_name,self.name()))
+ test_ssh=self.create_test_ssh()
+ test_ssh.copy_home(local_script)
+ if test_ssh.run("./"+script_name) != 0:
+ utils.header ("WARNING: node hooks check script %s FAILED (ignored)"%script_name)
#return False
return True
else:
- utils.header ("SUCCESS: node hooks check script %s OK"%script_name)
+ utils.header ("SUCCESS: node hook %s OK"%script_name)
return True
def check_hooks_script (self,local_script):
script_name=os.path.basename(local_script)
- utils.header ("SLIVER %s : running hooks check script %s"%(self.name(),script_name))
- ssh_handle=self.create_test_ssh()
- ssh_handle.copy_home(local_script)
- if ssh_handle.run("./"+script_name) != 0:
- utils.header ("WARNING: hooks check script %s FAILED"%script_name)
- print 'temporary : ignoring result and always return true for now'
+ utils.header ("SLIVER hook %s (%s)"%(script_name,self.name()))
+ test_ssh=self.create_test_ssh()
+ test_ssh.copy_home(local_script)
+ if test_ssh.run("./"+script_name) != 0:
+ utils.header ("WARNING: hooks check script %s FAILED (ignored)"%script_name)
#return False
return True
else:
- utils.header ("SUCCESS: sliver hooks check script %s OK"%script_name)
+ utils.header ("SUCCESS: sliver hook %s OK"%script_name)
return True