[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r23060 - in gnunet-planetlab: . gplmt gplmt/contrib gplmt/s
From: |
gnunet |
Subject: |
[GNUnet-SVN] r23060 - in gnunet-planetlab: . gplmt gplmt/contrib gplmt/scripts planetlab-api |
Date: |
Fri, 3 Aug 2012 15:37:33 +0200 |
Author: wachs
Date: 2012-08-03 15:37:33 +0200 (Fri, 03 Aug 2012)
New Revision: 23060
Added:
gnunet-planetlab/gplmt/contrib/tumple_gnunet.conf
gnunet-planetlab/gplmt/contrib/tumple_gnunet_deployment.conf
gnunet-planetlab/gplmt/scripts/add_slice_to_all_nodes.py
gnunet-planetlab/gplmt/scripts/add_slice_to_nodes.py
gnunet-planetlab/gplmt/scripts/delete_slice_from_nodes.py
gnunet-planetlab/gplmt/scripts/getallnodes.py
gnunet-planetlab/gplmt/scripts/getmynodes.py
Removed:
gnunet-planetlab/gplmt/contrib/deploy_to_tumple_deployment.conf
gnunet-planetlab/gplmt/contrib/deploy_to_tumple_deployment_fc8.conf
gnunet-planetlab/planetlab-api/add_slice_to_all_nodes.py
gnunet-planetlab/planetlab-api/add_slice_to_nodes.py
gnunet-planetlab/planetlab-api/delete_slice_from_nodes.py
gnunet-planetlab/planetlab-api/getallnodes.py
gnunet-planetlab/planetlab-api/getmynodes.py
Modified:
gnunet-planetlab/README
gnunet-planetlab/gplmt/README
gnunet-planetlab/gplmt/scripts/list_failing_nodes
gnunet-planetlab/gplmt/scripts/list_working_nodes
Log:
clean up and docu
Modified: gnunet-planetlab/README
===================================================================
--- gnunet-planetlab/README 2012-08-03 13:35:05 UTC (rev 23059)
+++ gnunet-planetlab/README 2012-08-03 13:37:33 UTC (rev 23060)
@@ -1,63 +1,34 @@
-Automation is done with a set of scripts which let the user enter the
-planetlab nodes in a list and eventually ends up installing the GNUnet
-software on these nodes including all the gnunet dependencies.
+ Welcome to GNUnet Planetlab Largescale Management Tool (gplmt)
-The latest version of the automation toolset is located in the
-gnunet_automatic_deployment/ subdirectory and basically provides you
-this scripts:
-deploy_gnunet.sh
-Installs GNUnet from SVN on all nodes
+What is GNUnet Planetlab Largescale Management Tool?
+===============
-Installs all required dependencies from the repository or from source
-Uninstalls outdated packages
+GNUnet is peer-to-peer framework focusing on security. GNUnet use the
+PlanetLab testbed for largescale testing. We use gplmt to deploy and
+manage GNUnet and administer. You can use gplmt to perform maintenance
+or adminitrative tasks on a large number of hosts in parallel.
-start_gnunet.sh
-Starts GNUnet on all nodes
+Additional information and documentation about gplmt can be found at
+https://gnunet.org/gplmt.
-stop_gnunet.sh
-Stops GNUnet on all nodes
+Content
+=============
-update_gnunet.sh
-Updates the GNUnet installation on all nodes
+gplmt/
+The GNUnet Planetlab Largescale Management Tool itself
-To use the scripts create a file called nodes.txt which contains the
-hostnames of the planetlab nodes you want to install GNUnet on. You can
-use the tools from the planetlab-api/ subdirectory to:
+unused/
+Legacy code, not working, included for backup purposes
-addnodes.py
-Add all nodes in the "booted" state to your slice
-getnodes.py
-Get all list of all nodes in the "booted" state assigned to your slice
-Before using the using the scripts, have a look at the first lines of
-the scripts. You have to edit the lines:
+Contact & Bugs
+=============
-# Planetlab username
-username="tum_dht_testing"
-# Number of ssh parallelism
-parallelism=50
-# Timeout for ssh operations
-timeout=3600
-# Destination directory on the nodes
-deployment_dir="/home/$username/deploy"
-# File containing nodes
-nodes_file="nodes.txt"
+Please check for contact information:
+https://gnunet.org/contact_information
-To run the scripts you need a running ssh-agent with your credential to
-your slice.
+If you should find any bugs please contact:
address@hidden
-Here a short example how to install GNUnet on all nodes of your slice
-and start it:
-
-Get a list of all booted nodes
-./getnodes.py -u -p
-cp nodes_booted ../gnunet_automatic_deployment/nodes.txt
-Start ssh-agent
-ssh-agent bash
-ssh-add
-Install GNUnet
-./deploy_gnunet.sh
-Start GNUnet
-./start_gnunet.sh
-
-
+or even better submit them directly under
+https://gnunet.org/bugs
Modified: gnunet-planetlab/gplmt/README
===================================================================
--- gnunet-planetlab/gplmt/README 2012-08-03 13:35:05 UTC (rev 23059)
+++ gnunet-planetlab/gplmt/README 2012-08-03 13:37:33 UTC (rev 23060)
@@ -10,14 +10,26 @@
or adminitrative tasks on a large number of hosts in parallel.
Additional information and documentation about gplmt can be found at
-https://gnunet.org/gplmt.
+https://gnunet.org/gplmt .
+Contact & Bugs:
+=============
+
+Please check for contact information:
+https://gnunet.org/contact_information
+
+If you should find any bugs please contact:
address@hidden
+
+or even better submit them directly under
+https://gnunet.org/bugs
+
Features:
=============
- Support for public key and SSH agent authentication
- PlanetLab API integration to retrieve node list
-- SFTP support to copy data from and to nodes
+- SFTPand SCP support to copy data from and to nodes
- Extensible task list
- Task list validation against XML Schema
- Extensible logging functionality
Deleted: gnunet-planetlab/gplmt/contrib/deploy_to_tumple_deployment.conf
===================================================================
--- gnunet-planetlab/gplmt/contrib/deploy_to_tumple_deployment.conf
2012-08-03 13:35:05 UTC (rev 23059)
+++ gnunet-planetlab/gplmt/contrib/deploy_to_tumple_deployment.conf
2012-08-03 13:37:33 UTC (rev 23060)
@@ -1,44 +0,0 @@
-[gplmt]
-#nodes = contrib/test_node.nodes
-tasks = contrib/deploy_gnunet_fc8.xml
-
-# Which notification mechanism to use:
-# simple: print messages to stdout
-notification = simple
-#notification = result
-
-[planetlab]
-slice = tumple_gnunet_deployment
-
-# Configuration for Planetlab API
-# Use PlanetLab nodes instead of nodes file
-use_pl_nodes = no
-# PlanetLab Europe
-api_url = https://www.planet-lab.eu/PLCAPI/
-# Planetlab
-#api_url = https://www.planet-lab.org/PLCAPI/
-
-# Planetlab username
-username = address@hidden
-# Planetlab password
-password = <password>
-
-[ssh]
-# Order of ssh authentication:
-#
-# The ssh_keyfile_filename passed in (if any)
-# Any key we can find through an SSH agent
-# Any "id_rsa" or "id_dsa" key discoverable in ~/.ssh/
-# Plain password auth, if a ssh_password was given
-
-#ssh_keyfile = <keyfile>
-ssh_password = <password>
-
-# protocoll for put get operations (Planetlab does not support SFTP)
-ssh_transfer = scp
-#ssh_transfer = sftp
-
-# Use system's SSH "known hosts" file
-ssh_use_known_hosts = yes
-# Add node hostkeys automatically
-add_unkown_hostkeys = yes
\ No newline at end of file
Deleted: gnunet-planetlab/gplmt/contrib/deploy_to_tumple_deployment_fc8.conf
===================================================================
--- gnunet-planetlab/gplmt/contrib/deploy_to_tumple_deployment_fc8.conf
2012-08-03 13:35:05 UTC (rev 23059)
+++ gnunet-planetlab/gplmt/contrib/deploy_to_tumple_deployment_fc8.conf
2012-08-03 13:37:33 UTC (rev 23060)
@@ -1,39 +0,0 @@
-[gplmt]
-nodes = contrib/test_node_fc8.nodes
-tasks = contrib/deploy_gnunet_fc8.xml
-
-# Which notification mechanism to use:
-# simple: print messages to stdout
-notification = simple
-
-[planetlab]
-slice = tumple_gnunet_deployment
-
-# Configuration for Planetlab API
-# Use PlanetLab nodes instead of nodes file
-use_pl_nodes = no
-# PlanetLab Europe
-api_url = https://www.planet-lab.eu/PLCAPI/
-# Planetlab
-#api_url = https://www.planet-lab.org/PLCAPI/
-
-# Planetlab username
-username = address@hidden
-# Planetlab password
-password = <password>
-
-[ssh]
-# Order of ssh authentication:
-#
-# The ssh_keyfile_filename passed in (if any)
-# Any key we can find through an SSH agent
-# Any "id_rsa" or "id_dsa" key discoverable in ~/.ssh/
-# Plain password auth, if a ssh_password was given
-
-#ssh_keyfile = <keyfile>
-ssh_password = <password>
-
-# Use system's SSH "known hosts" file
-ssh_use_known_hosts = yes
-# Add node hostkeys automatically
-add_unkown_hostkeys = yes
Added: gnunet-planetlab/gplmt/contrib/tumple_gnunet.conf
===================================================================
--- gnunet-planetlab/gplmt/contrib/tumple_gnunet.conf
(rev 0)
+++ gnunet-planetlab/gplmt/contrib/tumple_gnunet.conf 2012-08-03 13:37:33 UTC
(rev 23060)
@@ -0,0 +1,44 @@
+[gplmt]
+#nodes = contrib/test_node.nodes
+tasks = contrib/deploy_gnunet_fc8.xml
+
+# Which notification mechanism to use:
+# simple: print messages to stdout
+notification = simple
+#notification = result
+
+[planetlab]
+slice = tumple_gnunet
+
+# Configuration for Planetlab API
+# Use PlanetLab nodes instead of nodes file
+use_pl_nodes = no
+# PlanetLab Europe
+api_url = https://www.planet-lab.eu/PLCAPI/
+# Planetlab
+#api_url = https://www.planet-lab.org/PLCAPI/
+
+# Planetlab username
+username = address@hidden
+# Planetlab password
+password = <password>
+
+[ssh]
+# Order of ssh authentication:
+#
+# The ssh_keyfile_filename passed in (if any)
+# Any key we can find through an SSH agent
+# Any "id_rsa" or "id_dsa" key discoverable in ~/.ssh/
+# Plain password auth, if a ssh_password was given
+
+#ssh_keyfile = <keyfile>
+ssh_password = <password>
+
+# protocoll for put get operations (Planetlab does not support SFTP)
+ssh_transfer = scp
+#ssh_transfer = sftp
+
+# Use system's SSH "known hosts" file
+ssh_use_known_hosts = yes
+# Add node hostkeys automatically
+add_unkown_hostkeys = yes
\ No newline at end of file
Copied: gnunet-planetlab/gplmt/contrib/tumple_gnunet_deployment.conf (from rev
23056, gnunet-planetlab/gplmt/contrib/deploy_to_tumple_deployment.conf)
===================================================================
--- gnunet-planetlab/gplmt/contrib/tumple_gnunet_deployment.conf
(rev 0)
+++ gnunet-planetlab/gplmt/contrib/tumple_gnunet_deployment.conf
2012-08-03 13:37:33 UTC (rev 23060)
@@ -0,0 +1,44 @@
+[gplmt]
+#nodes = contrib/test_node.nodes
+tasks = contrib/deploy_gnunet_fc8.xml
+
+# Which notification mechanism to use:
+# simple: print messages to stdout
+notification = simple
+#notification = result
+
+[planetlab]
+slice = tumple_gnunet_deployment
+
+# Configuration for Planetlab API
+# Use PlanetLab nodes instead of nodes file
+use_pl_nodes = no
+# PlanetLab Europe
+api_url = https://www.planet-lab.eu/PLCAPI/
+# Planetlab
+#api_url = https://www.planet-lab.org/PLCAPI/
+
+# Planetlab username
+username = address@hidden
+# Planetlab password
+password = <password>
+
+[ssh]
+# Order of ssh authentication:
+#
+# The ssh_keyfile_filename passed in (if any)
+# Any key we can find through an SSH agent
+# Any "id_rsa" or "id_dsa" key discoverable in ~/.ssh/
+# Plain password auth, if a ssh_password was given
+
+#ssh_keyfile = <keyfile>
+ssh_password = <password>
+
+# protocoll for put get operations (Planetlab does not support SFTP)
+ssh_transfer = scp
+#ssh_transfer = sftp
+
+# Use system's SSH "known hosts" file
+ssh_use_known_hosts = yes
+# Add node hostkeys automatically
+add_unkown_hostkeys = yes
\ No newline at end of file
Copied: gnunet-planetlab/gplmt/scripts/add_slice_to_all_nodes.py (from rev
23046, gnunet-planetlab/planetlab-api/add_slice_to_all_nodes.py)
===================================================================
--- gnunet-planetlab/gplmt/scripts/add_slice_to_all_nodes.py
(rev 0)
+++ gnunet-planetlab/gplmt/scripts/add_slice_to_all_nodes.py 2012-08-03
13:37:33 UTC (rev 23060)
@@ -0,0 +1,69 @@
+#!/usr/bin/python
+
+# Add slice to all available nodes in state "booted"
+
+
+import sys, os, urllib, xmlrpclib, socket
+
+user = ''
+password = ''
+slice = ''
+
+arg = sys.argv
+size = len(arg)
+if (len(arg) < 6):
+ print 'usage: -u <username> -p <password> -s <slice>'
+ exit()
+
+if (arg[1] == '-u'):
+ user = arg[2]
+if (arg[3] == '-p'):
+ password = arg[4]
+if (arg[5] == '-s'):
+ slice = arg[6]
+
+
+# PlanetLab Europe
+api_url = "https://www.planet-lab.eu/PLCAPI/"
+# Planetlab Central
+#api_url = https://www.planet-lab.org/PLCAPI/
+
+server = xmlrpclib.ServerProxy(api_url)
+
+# the auth struct
+auth = {}
+auth['Username'] = user
+auth['AuthString'] = password
+auth['AuthMethod'] = "password"
+
+# request all sites on PL
+try:
+ sys.stdout.write('Retrieving PL sites list... ')
+ sys.stdout.flush()
+ sites = server.GetSites(auth,{},['site_id','name','latitude','longitude'])
+ nsites = len(sites)
+ sys.stdout.write('Received ' + str(nsites) + ' sites\n\n')
+ sys.stdout.flush()
+except Exception as e:
+ print "Error while retrieving sites list: " + str(e)
+
+
+# request all nodes on PL
+sys.stdout.write('Retrieving PL nodes list for sites')
+sys.stdout.flush()
+filter_dict = {"boot_state":"boot"}
+try:
+ nodes =
server.GetNodes(auth,filter_dict,['site_id','node_id','hostname','boot_state'])
+ nnodes = len(nodes)
+ sys.stdout.write('... got ' +str(nnodes)+ ' nodes \n\n')
+
+ for node in nodes:
+ node_str.append(node.get('hostname'))
+
+ res = server.AddSliceToNodes(auth,slice,node_str)
+ if (res == 1):
+ print 'Added ' +str(nnodes)+ ' to slice ' + slice
+ sys.stdout.flush()
+except Exception as e:
+ print "Error while adding nodes to list: " + str(e)
+
Copied: gnunet-planetlab/gplmt/scripts/add_slice_to_nodes.py (from rev 23050,
gnunet-planetlab/planetlab-api/add_slice_to_nodes.py)
===================================================================
--- gnunet-planetlab/gplmt/scripts/add_slice_to_nodes.py
(rev 0)
+++ gnunet-planetlab/gplmt/scripts/add_slice_to_nodes.py 2012-08-03
13:37:33 UTC (rev 23060)
@@ -0,0 +1,97 @@
+#!/usr/bin/python
+# Add slice from all nodes listed in file
+
+def usage():
+ print "GNUnet PlanetLab deployment and automation toolset\n\
+Arguments mandatory for long options are also mandatory for short options.\n\
+ -u, --user= Planetlab username\n\
+ -p, --password= Planetlab password\n\
+ -s, --slice= Planetlab slice\n\
+ -f, --file= file containing nodes\n\
+ -h, --help print this help\n\
+Report bugs to address@hidden \n\
+GNUnet home page: http://www.gnu.org/software/gnunet/ \n\
+General help using GNU software: http://www.gnu.org/gethelp/"
+
+
+
+import sys, os, urllib, xmlrpclib, socket, getopt
+
+user = None
+password = None
+slice = None
+filename = None
+
+# Parse command line arguments
+
+try:
+ opts, args = getopt.getopt(sys.argv[1:], "hu:p:s:f:", ["help", "user=",
"password=", "slice=", "file="])
+except getopt.GetoptError, err:
+ # print help information and exit:
+ print str(err) # will print something like "option -a not recognized"
+ usage()
+ sys.exit(2)
+for o, a in opts:
+ if o in ("-h", "--help"):
+ usage()
+ sys.exit()
+ elif o in ("-u", "--user"):
+ user = a
+ elif o in ("-p", "--password"):
+ password = a
+ elif o in ("-s", "--slice"):
+ slice = a
+ elif o in ("-f", "--file"):
+ filename = a
+ else:
+ assert False, "unhandled option"
+
+
+if ((user == None) or (user == None) or (user == None) or (user == None)):
+ usage ()
+ sys.exit (2)
+
+# PlanetLab Europe
+api_url = "https://www.planet-lab.eu/PLCAPI/"
+# Planetlab Central
+#api_url = https://www.planet-lab.org/PLCAPI/
+
+server = xmlrpclib.ServerProxy(api_url)
+
+# the auth struct
+auth = {}
+auth['Username'] = user
+auth['AuthString'] = password
+auth['AuthMethod'] = "password"
+
+nodes = list()
+
+slice_data = {}
+slice_data['name'] = slice
+
+
+# request nodes assigned to slice
+nodes = list()
+try:
+ fobj = open (filename, "r")
+ for line in fobj:
+ line = line.strip()
+ print "Found node '" + line + "'"
+ nodes.append(line)
+
+
+ fobj.close()
+except IOError:
+ print "File '" + filename + "' not found"
+ sys.exit(2)
+
+try:
+ res = server.AddSliceToNodes (auth, slice, nodes)
+ if (res == 1):
+ print "Added slice '" + slice+ "' to nodes :" + str(nodes)
+ sys.stdout.flush()
+except Exception as e:
+ print "Failed to delete node :" + str(e)
+
+
+
\ No newline at end of file
Copied: gnunet-planetlab/gplmt/scripts/delete_slice_from_nodes.py (from rev
23050, gnunet-planetlab/planetlab-api/delete_slice_from_nodes.py)
===================================================================
--- gnunet-planetlab/gplmt/scripts/delete_slice_from_nodes.py
(rev 0)
+++ gnunet-planetlab/gplmt/scripts/delete_slice_from_nodes.py 2012-08-03
13:37:33 UTC (rev 23060)
@@ -0,0 +1,96 @@
+#!/usr/bin/python
+# Add slice from all nodes listed in file
+
+def usage():
+ print "GNUnet PlanetLab deployment and automation toolset\n\
+Arguments mandatory for long options are also mandatory for short options.\n\
+ -u, --user= Planetlab username\n\
+ -p, --password= Planetlab password\n\
+ -s, --slice= Planetlab slice\n\
+ -f, --file= file containing nodes\n\
+ -h, --help print this help\n\
+Report bugs to address@hidden \n\
+GNUnet home page: http://www.gnu.org/software/gnunet/ \n\
+General help using GNU software: http://www.gnu.org/gethelp/"
+
+
+
+import sys, os, urllib, xmlrpclib, socket, getopt
+
+user = None
+password = None
+slice = None
+filename = None
+
+# Parse command line arguments
+
+try:
+ opts, args = getopt.getopt(sys.argv[1:], "hu:p:s:f:", ["help", "user=",
"password=", "slice=", "file="])
+except getopt.GetoptError, err:
+ # print help information and exit:
+ print str(err) # will print something like "option -a not recognized"
+ usage()
+ sys.exit(2)
+for o, a in opts:
+ if o in ("-h", "--help"):
+ usage()
+ sys.exit()
+ elif o in ("-u", "--user"):
+ user = a
+ elif o in ("-p", "--password"):
+ password = a
+ elif o in ("-s", "--slice"):
+ slice = a
+ elif o in ("-f", "--file"):
+ filename = a
+ else:
+ assert False, "unhandled option"
+
+if ((user == None) or (user == None) or (user == None) or (user == None)):
+ usage ()
+ sys.exit (2)
+
+# PlanetLab Europe
+api_url = "https://www.planet-lab.eu/PLCAPI/"
+# Planetlab Central
+#api_url = https://www.planet-lab.org/PLCAPI/
+
+server = xmlrpclib.ServerProxy(api_url)
+
+# the auth struct
+auth = {}
+auth['Username'] = user
+auth['AuthString'] = password
+auth['AuthMethod'] = "password"
+
+nodes = list()
+
+slice_data = {}
+slice_data['name'] = slice
+
+
+# request nodes assigned to slice
+test = list()
+try:
+ fobj = open (filename, "r")
+ for line in fobj:
+ line = line.strip()
+ print "Found node '" + line + "'"
+ test.append(line)
+
+
+ fobj.close()
+except IOError:
+ print "File '" + filename + "' not found"
+ sys.exit(2)
+
+try:
+ res = server.DeleteSliceFromNodes (auth, slice, test)
+ if (res == 1):
+ print "Deleted nodes :" + str(test)
+ sys.stdout.flush()
+except Exception as e:
+ print "Failed to delete node :" + str(e)
+
+
+
\ No newline at end of file
Copied: gnunet-planetlab/gplmt/scripts/getallnodes.py (from rev 23011,
gnunet-planetlab/planetlab-api/getallnodes.py)
===================================================================
--- gnunet-planetlab/gplmt/scripts/getallnodes.py
(rev 0)
+++ gnunet-planetlab/gplmt/scripts/getallnodes.py 2012-08-03 13:37:33 UTC
(rev 23060)
@@ -0,0 +1,56 @@
+#!/usr/bin/python
+
+# List all available nodes in state "booted" to slice
+
+
+import sys, os, urllib, xmlrpclib, socket
+
+user = ''
+password = ''
+slice = ''
+
+arg = sys.argv
+size = len(arg)
+if (len(arg) < 6):
+ print 'usage: -u <username> -p <password> -s <slice>'
+ exit()
+
+if (arg[1] == '-u'):
+ user = arg[2]
+if (arg[3] == '-p'):
+ password = arg[4]
+if (arg[5] == '-s'):
+ slice = arg[6]
+
+
+# PlanetLab Europe
+api_url = "https://www.planet-lab.eu/PLCAPI/"
+# Planetlab Central
+#api_url = https://www.planet-lab.org/PLCAPI/
+
+server = xmlrpclib.ServerProxy(api_url)
+
+# the auth struct
+auth = {}
+auth['Username'] = user
+auth['AuthString'] = password
+auth['AuthMethod'] = "password"
+
+# request all sites on PL
+try:
+ sites = server.GetSites(auth,{},['site_id','name','latitude','longitude'])
+ nsites = len(sites)
+except Exception as e:
+ print "Error while retrieving site list: " + str(e)
+
+
+# request all nodes on PL
+filter_dict = {"boot_state":"boot"}
+try:
+ nodes =
server.GetNodes(auth,filter_dict,['site_id','node_id','hostname','boot_state'])
+ nnodes = len(nodes)
+ for node in nodes:
+ print node.get('hostname')
+except Exception as e:
+ print "Error while retrieving node list: " + str(e)
+
\ No newline at end of file
Copied: gnunet-planetlab/gplmt/scripts/getmynodes.py (from rev 23011,
gnunet-planetlab/planetlab-api/getmynodes.py)
===================================================================
--- gnunet-planetlab/gplmt/scripts/getmynodes.py
(rev 0)
+++ gnunet-planetlab/gplmt/scripts/getmynodes.py 2012-08-03 13:37:33 UTC
(rev 23060)
@@ -0,0 +1,90 @@
+#!/usr/bin/python
+import sys, os, urllib, xmlrpclib, socket
+
+user = ''
+password = ''
+slice = ''
+
+arg = sys.argv
+size = len(arg)
+if (len(arg) < 4):
+ print 'usage: -u <username> -p <password>'
+ exit()
+
+
+
+if (arg[1] == '-u'):
+ user = arg[2]
+if (arg[3] == '-p'):
+ password = arg [4]
+if (arg[5] == '-s'):
+ slice = arg [6]
+
+# the PL Central API
+# apiurl = 'https://www.planet-lab.org/PLCAPI/'
+
+# Planetlab EU API
+apiurl = 'https://www.planet-lab.eu/PLCAPI/'
+server = xmlrpclib.ServerProxy(apiurl)
+slice_data = {}
+slice_data['name'] = slice
+
+# the auth struct
+auth = {}
+auth['Username'] = user
+auth['AuthString'] = password
+auth['AuthMethod'] = "password"
+
+
+
+
+
+
+#!/usr/bin/python
+
+# Add all available nodes in state "booted" to slice
+
+
+import sys, os, urllib, xmlrpclib, socket
+
+user = ''
+password = ''
+slice = ''
+
+arg = sys.argv
+size = len(arg)
+if (len(arg) < 6):
+ print 'usage: -u <username> -p <password> -s <slice>'
+ exit()
+
+if (arg[1] == '-u'):
+ user = arg[2]
+if (arg[3] == '-p'):
+ password = arg[4]
+if (arg[5] == '-s'):
+ slice = arg[6]
+
+
+# PlanetLab Europe
+api_url = "https://www.planet-lab.eu/PLCAPI/"
+# Planetlab Central
+#api_url = https://www.planet-lab.org/PLCAPI/
+
+server = xmlrpclib.ServerProxy(api_url)
+
+# the auth struct
+auth = {}
+auth['Username'] = user
+auth['AuthString'] = password
+auth['AuthMethod'] = "password"
+
+# request nodes assigned to slice
+try:
+ node_ids = server.GetSlices(auth, [slice_data['name']],
['node_ids'])[0]['node_ids']
+ node_hostnames = [node['hostname'] for node in server.GetNodes(auth,
node_ids, ['hostname'])]
+
+ for node in node_hostnames:
+ print node
+except Exception as e:
+ print "Error while retrieving node list: " + str(e)
+
\ No newline at end of file
Modified: gnunet-planetlab/gplmt/scripts/list_failing_nodes
===================================================================
--- gnunet-planetlab/gplmt/scripts/list_failing_nodes 2012-08-03 13:35:05 UTC
(rev 23059)
+++ gnunet-planetlab/gplmt/scripts/list_failing_nodes 2012-08-03 13:37:33 UTC
(rev 23060)
@@ -5,6 +5,6 @@
exit 1
fi
-../gplmt.py -c ../contrib/deploy_to_tumple_deployment.conf -a -p $1 -t
../contrib/tasklists/check_node.xml | grep failure | awk '{print $1}'
+../gplmt.py -c ../contrib/tumple_gnunet.conf -a -p $1 -t
../contrib/tasklists/check_node.xml | grep failure | awk '{print $1}'
Modified: gnunet-planetlab/gplmt/scripts/list_working_nodes
===================================================================
--- gnunet-planetlab/gplmt/scripts/list_working_nodes 2012-08-03 13:35:05 UTC
(rev 23059)
+++ gnunet-planetlab/gplmt/scripts/list_working_nodes 2012-08-03 13:37:33 UTC
(rev 23060)
@@ -5,6 +5,6 @@
exit 1
fi
-../gplmt.py -c ../contrib/deploy_to_tumple_deployment.conf -a -p $1 -t
../contrib/tasklists/check_node.xml | grep "completed successfully" | awk
'{print $1}'
+../gplmt.py -c ../contrib/tumple_gnunet.conf -a -p $1 -t
../contrib/tasklists/check_node.xml | grep "completed successfully" | awk
'{print $1}'
Deleted: gnunet-planetlab/planetlab-api/add_slice_to_all_nodes.py
===================================================================
--- gnunet-planetlab/planetlab-api/add_slice_to_all_nodes.py 2012-08-03
13:35:05 UTC (rev 23059)
+++ gnunet-planetlab/planetlab-api/add_slice_to_all_nodes.py 2012-08-03
13:37:33 UTC (rev 23060)
@@ -1,69 +0,0 @@
-#!/usr/bin/python
-
-# Add slice to all available nodes in state "booted"
-
-
-import sys, os, urllib, xmlrpclib, socket
-
-user = ''
-password = ''
-slice = ''
-
-arg = sys.argv
-size = len(arg)
-if (len(arg) < 6):
- print 'usage: -u <username> -p <password> -s <slice>'
- exit()
-
-if (arg[1] == '-u'):
- user = arg[2]
-if (arg[3] == '-p'):
- password = arg[4]
-if (arg[5] == '-s'):
- slice = arg[6]
-
-
-# PlanetLab Europe
-api_url = "https://www.planet-lab.eu/PLCAPI/"
-# Planetlab Central
-#api_url = https://www.planet-lab.org/PLCAPI/
-
-server = xmlrpclib.ServerProxy(api_url)
-
-# the auth struct
-auth = {}
-auth['Username'] = user
-auth['AuthString'] = password
-auth['AuthMethod'] = "password"
-
-# request all sites on PL
-try:
- sys.stdout.write('Retrieving PL sites list... ')
- sys.stdout.flush()
- sites = server.GetSites(auth,{},['site_id','name','latitude','longitude'])
- nsites = len(sites)
- sys.stdout.write('Received ' + str(nsites) + ' sites\n\n')
- sys.stdout.flush()
-except Exception as e:
- print "Error while retrieving sites list: " + str(e)
-
-
-# request all nodes on PL
-sys.stdout.write('Retrieving PL nodes list for sites')
-sys.stdout.flush()
-filter_dict = {"boot_state":"boot"}
-try:
- nodes =
server.GetNodes(auth,filter_dict,['site_id','node_id','hostname','boot_state'])
- nnodes = len(nodes)
- sys.stdout.write('... got ' +str(nnodes)+ ' nodes \n\n')
-
- for node in nodes:
- node_str.append(node.get('hostname'))
-
- res = server.AddSliceToNodes(auth,slice,node_str)
- if (res == 1):
- print 'Added ' +str(nnodes)+ ' to slice ' + slice
- sys.stdout.flush()
-except Exception as e:
- print "Error while adding nodes to list: " + str(e)
-
Deleted: gnunet-planetlab/planetlab-api/add_slice_to_nodes.py
===================================================================
--- gnunet-planetlab/planetlab-api/add_slice_to_nodes.py 2012-08-03
13:35:05 UTC (rev 23059)
+++ gnunet-planetlab/planetlab-api/add_slice_to_nodes.py 2012-08-03
13:37:33 UTC (rev 23060)
@@ -1,97 +0,0 @@
-#!/usr/bin/python
-# Add slice from all nodes listed in file
-
-def usage():
- print "GNUnet PlanetLab deployment and automation toolset\n\
-Arguments mandatory for long options are also mandatory for short options.\n\
- -u, --user= Planetlab username\n\
- -p, --password= Planetlab password\n\
- -s, --slice= Planetlab slice\n\
- -f, --file= file containing nodes\n\
- -h, --help print this help\n\
-Report bugs to address@hidden \n\
-GNUnet home page: http://www.gnu.org/software/gnunet/ \n\
-General help using GNU software: http://www.gnu.org/gethelp/"
-
-
-
-import sys, os, urllib, xmlrpclib, socket, getopt
-
-user = None
-password = None
-slice = None
-filename = None
-
-# Parse command line arguments
-
-try:
- opts, args = getopt.getopt(sys.argv[1:], "hu:p:s:f:", ["help", "user=",
"password=", "slice=", "file="])
-except getopt.GetoptError, err:
- # print help information and exit:
- print str(err) # will print something like "option -a not recognized"
- usage()
- sys.exit(2)
-for o, a in opts:
- if o in ("-h", "--help"):
- usage()
- sys.exit()
- elif o in ("-u", "--user"):
- user = a
- elif o in ("-p", "--password"):
- password = a
- elif o in ("-s", "--slice"):
- slice = a
- elif o in ("-f", "--file"):
- filename = a
- else:
- assert False, "unhandled option"
-
-
-if ((user == None) or (user == None) or (user == None) or (user == None)):
- usage ()
- sys.exit (2)
-
-# PlanetLab Europe
-api_url = "https://www.planet-lab.eu/PLCAPI/"
-# Planetlab Central
-#api_url = https://www.planet-lab.org/PLCAPI/
-
-server = xmlrpclib.ServerProxy(api_url)
-
-# the auth struct
-auth = {}
-auth['Username'] = user
-auth['AuthString'] = password
-auth['AuthMethod'] = "password"
-
-nodes = list()
-
-slice_data = {}
-slice_data['name'] = slice
-
-
-# request nodes assigned to slice
-nodes = list()
-try:
- fobj = open (filename, "r")
- for line in fobj:
- line = line.strip()
- print "Found node '" + line + "'"
- nodes.append(line)
-
-
- fobj.close()
-except IOError:
- print "File '" + filename + "' not found"
- sys.exit(2)
-
-try:
- res = server.AddSliceToNodes (auth, slice, nodes)
- if (res == 1):
- print "Added slice '" + slice+ "' to nodes :" + str(nodes)
- sys.stdout.flush()
-except Exception as e:
- print "Failed to delete node :" + str(e)
-
-
-
\ No newline at end of file
Deleted: gnunet-planetlab/planetlab-api/delete_slice_from_nodes.py
===================================================================
--- gnunet-planetlab/planetlab-api/delete_slice_from_nodes.py 2012-08-03
13:35:05 UTC (rev 23059)
+++ gnunet-planetlab/planetlab-api/delete_slice_from_nodes.py 2012-08-03
13:37:33 UTC (rev 23060)
@@ -1,96 +0,0 @@
-#!/usr/bin/python
-# Add slice from all nodes listed in file
-
-def usage():
- print "GNUnet PlanetLab deployment and automation toolset\n\
-Arguments mandatory for long options are also mandatory for short options.\n\
- -u, --user= Planetlab username\n\
- -p, --password= Planetlab password\n\
- -s, --slice= Planetlab slice\n\
- -f, --file= file containing nodes\n\
- -h, --help print this help\n\
-Report bugs to address@hidden \n\
-GNUnet home page: http://www.gnu.org/software/gnunet/ \n\
-General help using GNU software: http://www.gnu.org/gethelp/"
-
-
-
-import sys, os, urllib, xmlrpclib, socket, getopt
-
-user = None
-password = None
-slice = None
-filename = None
-
-# Parse command line arguments
-
-try:
- opts, args = getopt.getopt(sys.argv[1:], "hu:p:s:f:", ["help", "user=",
"password=", "slice=", "file="])
-except getopt.GetoptError, err:
- # print help information and exit:
- print str(err) # will print something like "option -a not recognized"
- usage()
- sys.exit(2)
-for o, a in opts:
- if o in ("-h", "--help"):
- usage()
- sys.exit()
- elif o in ("-u", "--user"):
- user = a
- elif o in ("-p", "--password"):
- password = a
- elif o in ("-s", "--slice"):
- slice = a
- elif o in ("-f", "--file"):
- filename = a
- else:
- assert False, "unhandled option"
-
-if ((user == None) or (user == None) or (user == None) or (user == None)):
- usage ()
- sys.exit (2)
-
-# PlanetLab Europe
-api_url = "https://www.planet-lab.eu/PLCAPI/"
-# Planetlab Central
-#api_url = https://www.planet-lab.org/PLCAPI/
-
-server = xmlrpclib.ServerProxy(api_url)
-
-# the auth struct
-auth = {}
-auth['Username'] = user
-auth['AuthString'] = password
-auth['AuthMethod'] = "password"
-
-nodes = list()
-
-slice_data = {}
-slice_data['name'] = slice
-
-
-# request nodes assigned to slice
-test = list()
-try:
- fobj = open (filename, "r")
- for line in fobj:
- line = line.strip()
- print "Found node '" + line + "'"
- test.append(line)
-
-
- fobj.close()
-except IOError:
- print "File '" + filename + "' not found"
- sys.exit(2)
-
-try:
- res = server.DeleteSliceFromNodes (auth, slice, test)
- if (res == 1):
- print "Deleted nodes :" + str(test)
- sys.stdout.flush()
-except Exception as e:
- print "Failed to delete node :" + str(e)
-
-
-
\ No newline at end of file
Deleted: gnunet-planetlab/planetlab-api/getallnodes.py
===================================================================
--- gnunet-planetlab/planetlab-api/getallnodes.py 2012-08-03 13:35:05 UTC
(rev 23059)
+++ gnunet-planetlab/planetlab-api/getallnodes.py 2012-08-03 13:37:33 UTC
(rev 23060)
@@ -1,56 +0,0 @@
-#!/usr/bin/python
-
-# List all available nodes in state "booted" to slice
-
-
-import sys, os, urllib, xmlrpclib, socket
-
-user = ''
-password = ''
-slice = ''
-
-arg = sys.argv
-size = len(arg)
-if (len(arg) < 6):
- print 'usage: -u <username> -p <password> -s <slice>'
- exit()
-
-if (arg[1] == '-u'):
- user = arg[2]
-if (arg[3] == '-p'):
- password = arg[4]
-if (arg[5] == '-s'):
- slice = arg[6]
-
-
-# PlanetLab Europe
-api_url = "https://www.planet-lab.eu/PLCAPI/"
-# Planetlab Central
-#api_url = https://www.planet-lab.org/PLCAPI/
-
-server = xmlrpclib.ServerProxy(api_url)
-
-# the auth struct
-auth = {}
-auth['Username'] = user
-auth['AuthString'] = password
-auth['AuthMethod'] = "password"
-
-# request all sites on PL
-try:
- sites = server.GetSites(auth,{},['site_id','name','latitude','longitude'])
- nsites = len(sites)
-except Exception as e:
- print "Error while retrieving site list: " + str(e)
-
-
-# request all nodes on PL
-filter_dict = {"boot_state":"boot"}
-try:
- nodes =
server.GetNodes(auth,filter_dict,['site_id','node_id','hostname','boot_state'])
- nnodes = len(nodes)
- for node in nodes:
- print node.get('hostname')
-except Exception as e:
- print "Error while retrieving node list: " + str(e)
-
\ No newline at end of file
Deleted: gnunet-planetlab/planetlab-api/getmynodes.py
===================================================================
--- gnunet-planetlab/planetlab-api/getmynodes.py 2012-08-03 13:35:05 UTC
(rev 23059)
+++ gnunet-planetlab/planetlab-api/getmynodes.py 2012-08-03 13:37:33 UTC
(rev 23060)
@@ -1,90 +0,0 @@
-#!/usr/bin/python
-import sys, os, urllib, xmlrpclib, socket
-
-user = ''
-password = ''
-slice = ''
-
-arg = sys.argv
-size = len(arg)
-if (len(arg) < 4):
- print 'usage: -u <username> -p <password>'
- exit()
-
-
-
-if (arg[1] == '-u'):
- user = arg[2]
-if (arg[3] == '-p'):
- password = arg [4]
-if (arg[5] == '-s'):
- slice = arg [6]
-
-# the PL Central API
-# apiurl = 'https://www.planet-lab.org/PLCAPI/'
-
-# Planetlab EU API
-apiurl = 'https://www.planet-lab.eu/PLCAPI/'
-server = xmlrpclib.ServerProxy(apiurl)
-slice_data = {}
-slice_data['name'] = slice
-
-# the auth struct
-auth = {}
-auth['Username'] = user
-auth['AuthString'] = password
-auth['AuthMethod'] = "password"
-
-
-
-
-
-
-#!/usr/bin/python
-
-# Add all available nodes in state "booted" to slice
-
-
-import sys, os, urllib, xmlrpclib, socket
-
-user = ''
-password = ''
-slice = ''
-
-arg = sys.argv
-size = len(arg)
-if (len(arg) < 6):
- print 'usage: -u <username> -p <password> -s <slice>'
- exit()
-
-if (arg[1] == '-u'):
- user = arg[2]
-if (arg[3] == '-p'):
- password = arg[4]
-if (arg[5] == '-s'):
- slice = arg[6]
-
-
-# PlanetLab Europe
-api_url = "https://www.planet-lab.eu/PLCAPI/"
-# Planetlab Central
-#api_url = https://www.planet-lab.org/PLCAPI/
-
-server = xmlrpclib.ServerProxy(api_url)
-
-# the auth struct
-auth = {}
-auth['Username'] = user
-auth['AuthString'] = password
-auth['AuthMethod'] = "password"
-
-# request nodes assigned to slice
-try:
- node_ids = server.GetSlices(auth, [slice_data['name']],
['node_ids'])[0]['node_ids']
- node_hostnames = [node['hostname'] for node in server.GetNodes(auth,
node_ids, ['hostname'])]
-
- for node in node_hostnames:
- print node
-except Exception as e:
- print "Error while retrieving node list: " + str(e)
-
\ No newline at end of file
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r23060 - in gnunet-planetlab: . gplmt gplmt/contrib gplmt/scripts planetlab-api,
gnunet <=