tags:
find . '(' -name '*.py' -o -name 'qemu-*' ')' | grep -v '.svn/' | xargs etags
+.PHONY: tags
-LOCAL_RSYNC_EXCLUDES := --exclude '*.pyc' --exclude 'arg*'
+####################
+
+########## make sync PLCHOST=hostname VSERVER=vservername
+ifdef PLCHOST
+ifdef BUILDNAME
+PLCSSH:=root@$(PLCHOST):$(BUILDNAME)
+endif
+endif
+
+LOCAL_RSYNC_EXCLUDES := --exclude '*.pyc' --exclude 'arg*'
RSYNC_EXCLUDES := --exclude .svn --exclude CVS --exclude '*~' --exclude TAGS $(LOCAL_RSYNC_EXCLUDES)
RSYNC_COND_DRY_RUN := $(if $(findstring n,$(MAKEFLAGS)),--dry-run,)
RSYNC := rsync -a -v $(RSYNC_COND_DRY_RUN) $(RSYNC_EXCLUDES)
sync:
-ifeq (,$(RSYNC_URL))
- echo "sync: You must define target host as RSYNC_URL on the command line"
- echo " e.g. make sync RSYNC_URL=root@testbox1:workdir" ; exit 1
+ifeq (,$(PLCSSH))
+ echo "sync: You must define PLCHOST and BUILDNAME on the command line"
+ echo " e.g. make sync PLCHOST=private.onelab.eu BUILDNAME=" ; exit 1
else
- +$(RSYNC) ./ $(RSYNC_URL)/
+ +$(RSYNC) ./ $(PLCSSH)
endif
('DeletePerson' , True),
('AddPersonKey' , True),
('GetPlcRelease', {'build': {'target-arch':'i386'}}),
+ ('GetSites', []),
]
class TestApiserver:
def privatepath(self):
return "keys/%s.rsa"%(self.name())
- def store_remote_key(self,hostname):
- #Not tested yet, don't know if needed
- pub=self.publicpath()
- priv=self.privatepath()
- utils.header("Storing key %s in %s into %s "%(self.name(),pub,hostname))
- dir=os.path.dirname(pub)
- self.test_ssh.run("mkdir %s"%dir)
- self.test_ssh.run("cat %s >> %s"%(self.key_spec['key_fields']['key'],pub))
- self.test_ssh.run("cat %s >> %s"%(self.key_spec['private'],priv))
- self.test_ssh.run("chmod %s 0400"%priv)
- self.test_ssh.run("chmod %s 0444"%pub)
+#Not tested yet, don't know if needed
+# def store_remote_key(self,hostname):
+# pub=self.publicpath()
+# priv=self.privatepath()
+# utils.header("Storing key %s in %s into %s "%(self.name(),pub,hostname))
+# dir=os.path.dirname(pub)
+# self.test_ssh.run("mkdir %s"%dir)
+# self.test_ssh.run("cat %s >> %s"%(self.key_spec['key_fields']['key'],pub))
+# self.test_ssh.run("cat %s >> %s"%(self.key_spec['private'],priv))
+# self.test_ssh.run("chmod %s 0400"%priv)
+# self.test_ssh.run("chmod %s 0444"%pub)
def store_key(self):
pub=self.publicpath()
parser.add_option("-c","--config",action="callback", callback=TestMain.optparse_list, dest="config",
nargs=1,type="string",
help="Config module - can be set multiple times, or use quotes")
- parser.add_option("-p","--personality",action="store", dest="personality",
+ parser.add_option("-p","--personality",action="store", dest="personality",
help="personality - as in vbuild-nightly")
- parser.add_option("-d","--pldistro",action="store", dest="pldistro",
+ parser.add_option("-d","--pldistro",action="store", dest="pldistro",
help="pldistro - as in vbuild-nightly")
- parser.add_option("-f","--fcdistro",action="store", dest="fcdistro",
+ parser.add_option("-f","--fcdistro",action="store", dest="fcdistro",
help="fcdistro - as in vbuild-nightly")
parser.add_option("-x","--exclude",action="callback", callback=TestMain.optparse_list, dest="exclude",
nargs=1,type="string",default=[],
-import os, sys, time, base64
+import sys, os, os.path, time, base64
import xmlrpclib
import utils
def clear_known_hosts (self):
TestSsh(self.name()).clear_known_hosts()
return True
+
+ def create_test_ssh(self):
+ # get the plc's keys for entering the node
+ vservername=self.test_plc.vservername
+ # assuming we've run testplc.fetch_keys()
+ key = "keys/%(vservername)s.rsa"%locals()
+ return TestSsh(self.name(), buildname=self.buildname(), key=key)
+
+ def check_sanity (self):
+ extensions = [ 'py','pl','sh' ]
+ path='tests/qaapi/qa/tests/node/'
+ scripts=utils.locate_sanity_scripts ('node '+self.name(), path,extensions)
+ overall = True
+ for script in scripts:
+ if not self.check_sanity_script (script):
+ overall = False
+ return overall
+
+ def check_sanity_script (self,local_script):
+ # push the script on the node's root context
+ ssh_handle=self.create_test_ssh()
+ ssh_handle.copy_home(local_script)
+ script_name=os.path.basename(local_script)
+ if ssh_handle.run("./"+script_name) != 0:
+ print "WARNING: sanity check script %s FAILED"%script_name
+ # xxx - temporary : always return true for now
+ #return False
+ return True
class TestPlc:
default_steps = ['uninstall','install','install_rpm',
- 'configure', 'start', SEP,
+ 'configure', 'start', 'fetch_keys', SEP,
'store_keys', 'clear_known_hosts', 'initscripts', SEP,
'sites', 'nodes', 'slices', 'nodegroups', SEP,
'init_node','bootcd', 'configure_qemu', 'export_qemu',
'kill_all_qemus', 'reinstall_node','start_node', SEP,
- 'nodes_booted', 'nodes_ssh', 'check_slice',
- 'check_initscripts', 'check_tcp',SEP,
+ 'nodes_booted', 'nodes_ssh', 'check_slice', 'check_initscripts', SEP,
+ 'check_sanity', 'check_tcp', 'plcsh_stress_test', SEP,
'force_gather_logs', 'force_kill_qemus', 'force_record_tracker','force_free_tracker' ]
- other_steps = [ 'stop_all_vservers','fresh_install', 'cache_rpm', 'stop', SEP,
- 'clean_initscripts', 'clean_sites', 'clean_nodes',
+ other_steps = [ 'stop_all_vservers','fresh_install', 'cache_rpm', 'stop', 'vs_start', SEP,
+ 'clean_initscripts', 'clean_nodegroups','clean_all_sites', SEP,
+ 'clean_sites', 'clean_nodes',
'clean_slices', 'clean_keys', SEP,
'show_boxes', 'list_all_qemus', 'list_qemus', SEP,
'db_dump' , 'db_restore', 'cleanup_trackers', 'cleanup_all_trackers',
def actual_command_in_guest (self,command):
return self.test_ssh.actual_command(self.host_to_guest(command))
+ def start_guest (self):
+ return utils.system(self.test_ssh.actual_command(self.start_guest_in_host()))
+
def run_in_guest (self,command):
return utils.system(self.actual_command_in_guest(command))
def host_to_guest(self,command):
return "vserver %s exec %s"%(self.vservername,command)
+ #command gets run in the vserver
+ def start_guest_in_host(self):
+ return "vserver %s start"%(self.vservername)
+
# xxx quick n dirty
def run_in_guest_piped (self,local,remote):
return utils.system(local+" | "+self.test_ssh.actual_command(self.host_to_guest(remote),keep_stdin=True))
return slice
raise Exception,"Cannot locate slice %s"%slicename
+ def all_sliver_objs (self):
+ result=[]
+ for slice_spec in self.plc_spec['slices']:
+ slicename = slice_spec['slice_fields']['name']
+ for nodename in slice_spec['nodenames']:
+ result.append(self.locate_sliver_obj (nodename,slicename))
+ return result
+
+ def locate_sliver_obj (self,nodename,slicename):
+ (site,node) = self.locate_node(nodename)
+ slice = self.locate_slice (slicename)
+ # build objects
+ test_site = TestSite (self, site)
+ test_node = TestNode (self, test_site,node)
+ # xxx the slice site is assumed to be the node site - mhh - probably harmless
+ test_slice = TestSlice (self, test_site, slice)
+ return TestSliver (self, test_node, test_slice)
+
+ def locate_first_node(self):
+ nodename=self.plc_spec['slices'][0]['nodenames'][0]
+ (site,node) = self.locate_node(nodename)
+ test_site = TestSite (self, site)
+ test_node = TestNode (self, test_site,node)
+ return test_node
+
+ def locate_first_sliver (self):
+ slice_spec=self.plc_spec['slices'][0]
+ slicename=slice_spec['slice_fields']['name']
+ nodename=slice_spec['nodenames'][0]
+ return self.locate_sliver_obj(nodename,slicename)
+
# all different hostboxes used in this plc
def gather_hostBoxes(self):
# maps on sites and nodes, return [ (host_box,test_node) ]
def start(self):
self.run_in_guest('service plc start')
return True
-
+
def stop(self):
self.run_in_guest('service plc stop')
return True
- # could use a TestKey class
+ def vs_start (self):
+ self.start_guest()
+ return True
+
+ # stores the keys from the config for further use
def store_keys(self):
for key_spec in self.plc_spec['keys']:
TestKey(self,key_spec).store_key()
def clean_keys(self):
utils.system("rm -rf %s/keys/"%os.path(sys.argv[0]))
+ # fetches the ssh keys in the plc's /etc/planetlab and stores them in keys/
+ # for later direct access to the nodes
+ def fetch_keys(self):
+ dir="./keys"
+ if not os.path.isdir(dir):
+ os.mkdir(dir)
+ prefix = 'root_ssh_key'
+ vservername=self.vservername
+ overall=True
+ for ext in [ 'pub', 'rsa' ] :
+ src="/vservers/%(vservername)s/etc/planetlab/%(prefix)s.%(ext)s"%locals()
+ dst="keys/%(vservername)s.%(ext)s"%locals()
+ if self.test_ssh.fetch(src,dst) != 0: overall=False
+ return overall
+
def sites (self):
return self.do_sites()
test_site.create_users()
return True
+ def clean_all_sites (self):
+ print 'auth_root',self.auth_root()
+ site_ids = [s['site_id'] for s in self.apiserver.GetSites(self.auth_root(), {}, ['site_id'])]
+ for site_id in site_ids:
+ print 'Deleting site_id',site_id
+ self.apiserver.DeleteSite(self.auth_root(),site_id)
+
def nodes (self):
return self.do_nodes()
def clean_nodes (self):
test_node.create_node ()
return True
- # create nodegroups if needed, and populate
- # no need for a clean_nodegroups if we are careful enough
def nodegroups (self):
+ return self.do_nodegroups("add")
+ def clean_nodegroups (self):
+ return self.do_nodegroups("delete")
+
+ # create nodegroups if needed, and populate
+ def do_nodegroups (self, action="add"):
# 1st pass to scan contents
groups_dict = {}
for site_spec in self.plc_spec['sites']:
return hostnames
# gracetime : during the first <gracetime> minutes nothing gets printed
- def do_nodes_booted (self, minutes, gracetime,period=30):
+ def do_nodes_booted (self, minutes, gracetime,period=15):
if self.options.dry_run:
print 'dry_run'
return True
def nodes_booted(self):
return self.do_nodes_booted(minutes=20,gracetime=15)
- def do_nodes_ssh(self,minutes,gracetime,period=30):
+ def do_nodes_ssh(self,minutes,gracetime,period=15):
# compute timeout
timeout = datetime.datetime.now()+datetime.timedelta(minutes=minutes)
graceout = datetime.datetime.now()+datetime.timedelta(minutes=gracetime)
@node_mapper
def export_qemu (self): pass
+ ### check sanity : invoke scripts from qaapi/qa/tests/{node,slice}
+ def check_sanity_node (self):
+ return self.locate_first_node().check_sanity()
+ def check_sanity_sliver (self) :
+ return self.locate_first_sliver().check_sanity()
+
+ def check_sanity (self):
+ return self.check_sanity_node() and self.check_sanity_sliver()
+
+ ### initscripts
def do_check_initscripts(self):
overall = True
for slice_spec in self.plc_spec['slices']:
print 'deletion went wrong - probably did not exist'
return True
+ ### manage slices
def slices (self):
return self.do_slices()
@node_mapper
def start_node (self) : pass
- def all_sliver_objs (self):
- result=[]
- for slice_spec in self.plc_spec['slices']:
- slicename = slice_spec['slice_fields']['name']
- for nodename in slice_spec['nodenames']:
- result.append(self.locate_sliver_obj (nodename,slicename))
- return result
-
- def locate_sliver_obj (self,nodename,slicename):
- (site,node) = self.locate_node(nodename)
- slice = self.locate_slice (slicename)
- # build objects
- test_site = TestSite (self, site)
- test_node = TestNode (self, test_site,node)
- # xxx the slice site is assumed to be the node site - mhh - probably harmless
- test_slice = TestSlice (self, test_site, slice)
- return TestSliver (self, test_node, test_slice)
-
def check_tcp (self):
specs = self.plc_spec['tcp_test']
overall=True
if not c_test_sliver.run_tcp_client(s_test_sliver.test_node.name(),port):
overall=False
return overall
-
+
+ def plcsh_stress_test (self):
+ # install the stress-test in the plc image
+ location = "/usr/share/plc_api/plcsh-stress-test.py"
+ remote="/vservers/%s/%s"%(self.vservername,location)
+ self.test_ssh.copy_abs("plcsh-stress-test.py",remote)
+ command = location
+ command += " -- --check"
+ if self.options.small_test:
+ command += " --tiny"
+ return ( self.run_in_guest(command) == 0)
def gather_logs (self):
- # (1) get the plc's /var/log and store it locally in logs/myplc.var-log.<plcname>/*
+ # (1.a) get the plc's /var/log/ and store it locally in logs/myplc.var-log.<plcname>/*
+ # (1.b) get the plc's /var/lib/pgsql/data/pg_log/ -> logs/myplc.pgsql-log.<plcname>/*
# (2) get all the nodes qemu log and store it as logs/node.qemu.<node>.log
# (3) get the nodes /var/log and store is as logs/node.var-log.<node>/*
# (4) as far as possible get the slice's /var/log as logs/sliver.var-log.<sliver>/*
- # (1)
+ # (1.a)
print "-------------------- TestPlc.gather_logs : PLC's /var/log"
self.gather_var_logs ()
+ # (1.b)
+ print "-------------------- TestPlc.gather_logs : PLC's /var/lib/psql/data/pg_log/"
+ self.gather_pgsql_logs ()
# (2)
print "-------------------- TestPlc.gather_logs : nodes's QEMU logs"
for site_spec in self.plc_spec['sites']:
return True
def gather_var_logs (self):
+ utils.system("mkdir -p logs/myplc.var-log.%s"%self.name())
to_plc = self.actual_command_in_guest("tar -C /var/log/ -cf - .")
command = to_plc + "| tar -C logs/myplc.var-log.%s -xf -"%self.name()
- utils.system("mkdir -p logs/myplc.var-log.%s"%self.name())
+ utils.system(command)
+ command = "chmod a+r,a+x logs/myplc.var-log.%s/httpd"%self.name()
+ utils.system(command)
+
+ def gather_pgsql_logs (self):
+ utils.system("mkdir -p logs/myplc.pgsql-log.%s"%self.name())
+ to_plc = self.actual_command_in_guest("tar -C /var/lib/pgsql/data/pg_log/ -cf - .")
+ command = to_plc + "| tar -C logs/myplc.pgsql-log.%s -xf -"%self.name()
utils.system(command)
def gather_nodes_var_logs (self):
found=True
return (found,privatekey)
- def check_slice(self,options,minutes=6,gracetime=4,period=30):
+ def check_slice(self,options,minutes=10,gracetime=4,period=15):
timeout = datetime.datetime.now()+datetime.timedelta(minutes=minutes)
graceout = datetime.datetime.now()+datetime.timedelta(minutes=gracetime)
# locate a key
for hostname in tocheck:
(site_spec,node_spec) = self.test_plc.locate_hostname(hostname)
date_test_ssh = TestSsh (hostname,key=remote_privatekey,username=self.name())
+ if datetime.datetime.now() >= graceout:
+ utils.header('Trying to enter into slice %s@%s'%(self.name(),hostname))
# this can be ran locally as we have the key
- utils.header('Trying to enter into slice %s@%s'%(self.name(),hostname))
date = date_test_ssh.run("id;hostname")==0
if date:
utils.header("Successfuly entered slice %s on %s"%(self.name(),hostname))
for hostname in tocheck:
utils.header("FAILURE to ssh into %s@%s"%(self.name(),hostname))
return False
- #freezing ,slice don't get created before at least 3 minutes after sshd is started
- if datetime.datetime.now() < graceout:
- utils.header ("The Slice %s under the Node %s is not created yet"%(self.name(),hostname))
- time.sleep(gracetime*60)
- else : time.sleep (period)
+ # wait for the period
+ time.sleep (period)
# for an empty slice
return True
def create_test_ssh(self):
(found,privatekey) = self.get_privateKey()
if not found:
- raise Exception,"Cannot find a valid key for slice %s"%self.test_slice.name()
+ raise Exception,"Cannot find the private key for slice %s"%self.test_slice.name()
return TestSsh (self.test_node.name(),key=privatekey,username=self.test_slice.name(),
# so that copies end up in the home dir
buildname=".")
def tar_var_logs (self):
return self.test_ssh.actual_command("sudo tar -C /var/log -cf - .")
+ def check_sanity (self):
+ print 'NOTE: slice sanity check scripts NOT (yet?) run in sudo'
+ extensions = [ 'py','pl','sh' ]
+ path='tests/qaapi/qa/tests/slice/'
+ scripts=utils.locate_sanity_scripts ('sliver '+self.name(), path,extensions)
+ overall = True
+ for script in scripts:
+ if not self.check_sanity_script (script):
+ overall = False
+ return overall
+
+ def check_sanity_script (self,local_script):
+ ssh_handle=self.create_test_ssh()
+ ssh_handle.copy_home(local_script)
+ scriptname=os.path.basename(local_script)
+ if ssh_handle.run("./"+scriptname) != 0:
+ print "WARNING: sanity check script %s FAILED"%scriptname
+ # xxx - temporary : ignore result and always return true for now
+ #return False
+ return True
+
self.buildname,os.path.basename(local_file) or ".")
return utils.system(scp_command)
+ def copy_abs (self,local_file,remote_file,recursive=False):
+ if self.is_local():
+ dest=""
+ else:
+ dest= "%s:"%self.hostname_part()
+ scp_command="scp "
+ scp_command += TestSsh.std_options
+ if recursive: scp_command += "-r "
+ scp_command += self.key_part()
+ scp_command += "%s %s%s"%(local_file,dest,remote_file)
+ return utils.system(scp_command)
+
+ def copy_home (self, local_file, recursive=False):
+ return self.copy_abs(local_file,os.path.basename(local_file),recursive)
+
def fetch (self, remote_file, local_file, recursive=False):
if self.is_local():
command="cp "
command += TestSsh.std_options
if recursive: command += "-r "
command += self.key_part()
- command += "%s:%s/%s %s"%(self.hostname_part(),self.buildname,remote_file,local_file)
- utils.system(command)
+ # absolute path - do not preprend buildname
+ if remote_file.find("/")==0:
+ remote_path=remote_file
+ else:
+ remote_path="%s/%s"%(self.buildname,remote_file)
+ command += "%s:%s %s"%(self.hostname_part(),remote_path,local_file)
+ return utils.system(command)
# this is only to avoid harmless message when host cannot be identified
# convenience only
def clear_known_hosts (self):
known_hosts = "%s/.ssh/known_hosts"%os.getenv("HOME")
utils.header("Clearing entry for %s in %s"%(self.hostname,known_hosts))
- utils.system("sed -i -e /^%s/d %s"%(self.hostname,known_hosts))
+ return utils.system("sed -i -e /^%s/d %s"%(self.hostname,known_hosts))
def config (plcs, options):
if options.arch == "i386":
- target = 'testbox32.one-lab.org'
+ target = 'testbox32.onelab.eu'
elif options.arch == "x86_64":
- target = 'testbox64.one-lab.org'
+ target = 'testbox64.onelab.eu'
else:
print 'Unsupported arch %s'%options.arch
sys.exit(1)
nodes= [{'name':'node1',
'node_fields': {'hostname': 'deferred01',
'model':'qemu/minhw', } ,
- 'host_box': 'testbox1.one-lab.org',
+ 'host_box': 'testbox1.onelab.eu',
'owner' : 'pi',
'network_fields': { 'method':'static',
'type':'ipv4',
{'name':'node2',
'node_fields': {'hostname': 'deferred02',
'model':'qemu/minhw', } ,
- 'host_box': 'testbox1.one-lab.org',
+ 'host_box': 'testbox1.onelab.eu',
'owner' : 'pi',
'network_fields': { 'method':'static',
'type':'ipv4',
return [ node['name'] for node in nodes(options)]
def users (options) :
- domain="one-lab.org"
+ domain="onelab.eu"
return [ {'name' : 'pi', 'keynames' : [ 'key1' ],
'user_fields' : {'first_name':'PI', 'last_name':'PI',
'enabled':'True',
'login_base':'main',
'abbreviated_name':'PLanettest',
'max_slices':100,
- 'url':'http://testbox1.one-lab.org',
+ 'url':'http://testbox1.onelab.eu',
},
'address_fields' : {'line1':'route des lucioles',
'city':'sophia',
}]
##########
-public_key="""ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA4jNj8yT9ieEc6nSJz/ESu4fui9WrJ2y/MCfqIZ5WcdVKhBFUYyIenmUaeTduMcSqvoYRQ4QnFR1BFdLG8XR9D6FWZ5zTKUgpkew22EVNeqai4IXeWYKyt1Qf3ehaz9E3o1PG/bmQNIM6aQay6TD1Y4lqXI+eTVXVQev4K2fixySjFQpp9RB4UHbeA8c28yoa/cgAYHqCqlvm9uvpGMjgm/Qa4M+ZeO7NdjowfaF/wF4BQIzVFN9YRhvQ/d8WDz84B5Pr0J7pWpaX7EyC4bvdskxl6kmdNIwIRcIe4OcuIiX5Z9oO+7h/chsEVJWF4vqNIYlL9Zvyhnr0hLLhhuk2bw== root@test.one-lab.org
+public_key="""ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA4jNj8yT9ieEc6nSJz/ESu4fui9WrJ2y/MCfqIZ5WcdVKhBFUYyIenmUaeTduMcSqvoYRQ4QnFR1BFdLG8XR9D6FWZ5zTKUgpkew22EVNeqai4IXeWYKyt1Qf3ehaz9E3o1PG/bmQNIM6aQay6TD1Y4lqXI+eTVXVQev4K2fixySjFQpp9RB4UHbeA8c28yoa/cgAYHqCqlvm9uvpGMjgm/Qa4M+ZeO7NdjowfaF/wF4BQIzVFN9YRhvQ/d8WDz84B5Pr0J7pWpaX7EyC4bvdskxl6kmdNIwIRcIe4OcuIiX5Z9oO+7h/chsEVJWF4vqNIYlL9Zvyhnr0hLLhhuk2bw== root@test.onelab.eu
"""
private_key="""-----BEGIN RSA PRIVATE KEY-----
MIIEogIBAAKCAQEA4jNj8yT9ieEc6nSJz/ESu4fui9WrJ2y/MCfqIZ5WcdVKhBFU
# 'vservername': '138.96.250.131'
# 'vserverip': '138.96.250.131'
'role' : 'root',
- 'PLC_ROOT_USER' : 'root@test.one-lab.org',
+ 'PLC_ROOT_USER' : 'root@test.onelab.eu',
'PLC_ROOT_PASSWORD' : 'test++',
'PLC_NAME' : 'TestLab',
'PLC_MAIL_ENABLED':'true',
- 'PLC_MAIL_SUPPORT_ADDRESS' : 'mohamed-amine.chaoui@sophia.inria.fr',
- 'PLC_DB_HOST' : 'test.one-lab.org',
- 'PLC_API_HOST' : 'test.one-lab.org',
- 'PLC_WWW_HOST' : 'test.one-lab.org',
- 'PLC_BOOT_HOST' : 'test.one-lab.org',
+ 'PLC_MAIL_SUPPORT_ADDRESS' : 'thierry.parmentelat@sophia.inria.fr',
+ 'PLC_DB_HOST' : 'test.onelab.eu',
+ 'PLC_API_HOST' : 'test.onelab.eu',
+ 'PLC_WWW_HOST' : 'test.onelab.eu',
+ 'PLC_BOOT_HOST' : 'test.onelab.eu',
'PLC_NET_DNS1' : 'xxx-deferred-xxx',
'PLC_NET_DNS2' : 'xxx-deferred-xxx',
'sites' : sites(options),
# I'm pretty sure that yum.conf.php still needs hacking, at least for centos5
########## unclear stuff
-onelab="one-lab.org"
+onelab="onelab.eu"
# these are real nodes, they dont get started by the framework
def nodes():
'login_base':'wifi',
'abbreviated_name':'wifi',
'max_slices':100,
- 'url':'http://testbox1.one-lab.org',
+ 'url':'http://testbox1.onelab.eu',
},
'address_fields' : {'line1':'route des lucioles',
'city':'sophia',
}]
##########
-public_key="""ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA4jNj8yT9ieEc6nSJz/ESu4fui9WrJ2y/MCfqIZ5WcdVKhBFUYyIenmUaeTduMcSqvoYRQ4QnFR1BFdLG8XR9D6FWZ5zTKUgpkew22EVNeqai4IXeWYKyt1Qf3ehaz9E3o1PG/bmQNIM6aQay6TD1Y4lqXI+eTVXVQev4K2fixySjFQpp9RB4UHbeA8c28yoa/cgAYHqCqlvm9uvpGMjgm/Qa4M+ZeO7NdjowfaF/wF4BQIzVFN9YRhvQ/d8WDz84B5Pr0J7pWpaX7EyC4bvdskxl6kmdNIwIRcIe4OcuIiX5Z9oO+7h/chsEVJWF4vqNIYlL9Zvyhnr0hLLhhuk2bw== root@test.one-lab.org
+public_key="""ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA4jNj8yT9ieEc6nSJz/ESu4fui9WrJ2y/MCfqIZ5WcdVKhBFUYyIenmUaeTduMcSqvoYRQ4QnFR1BFdLG8XR9D6FWZ5zTKUgpkew22EVNeqai4IXeWYKyt1Qf3ehaz9E3o1PG/bmQNIM6aQay6TD1Y4lqXI+eTVXVQev4K2fixySjFQpp9RB4UHbeA8c28yoa/cgAYHqCqlvm9uvpGMjgm/Qa4M+ZeO7NdjowfaF/wF4BQIzVFN9YRhvQ/d8WDz84B5Pr0J7pWpaX7EyC4bvdskxl6kmdNIwIRcIe4OcuIiX5Z9oO+7h/chsEVJWF4vqNIYlL9Zvyhnr0hLLhhuk2bw== root@test.onelab.eu
"""
private_key="""-----BEGIN RSA PRIVATE KEY-----
MIIEogIBAAKCAQEA4jNj8yT9ieEc6nSJz/ESu4fui9WrJ2y/MCfqIZ5WcdVKhBFU
# $Id$
-import time
-import os
-import re
+import time, os, re, glob
from pprint import PrettyPrinter
options={}
pattern=pattern.replace("?",".")
return re.compile(pattern).match(string)
+def locate_sanity_scripts (message,path,extensions):
+ print message,'searching',path,'for extensions',extensions
+ scripts=[]
+ for ext in extensions:
+ scripts += glob.glob (path+'/*.'+ext)
+ return scripts
+