Package starcluster :: Package tests :: Module mytestplugin
[hide private]
[frames] | no frames]

Source Code for Module starcluster.tests.mytestplugin

 1  from starcluster.logger import log 
 2  from starcluster.clustersetup import ClusterSetup  
 3   
4 -class SetupClass(ClusterSetup):
5 - def __init__(self, my_arg, my_other_arg):
6 log.debug("setupclass: my_arg = %s, my_other_arg = %s" % (my_arg, 7 my_other_arg))
8
9 - def run(self, nodes, master, user, shell, volumes):
10 log.debug('Hello from MYPLUGIN :D') 11 for node in nodes: 12 node.ssh.execute('apt-get install -y imagemagick') 13 node.ssh.execute('echo "i ran foo" >> /tmp/iran')
14
15 -class SetupClass2(ClusterSetup):
16 - def __init__(self, my_arg, my_other_arg):
17 log.debug("setupclass2: my_arg = %s, my_other_arg = %s" % (my_arg, 18 my_other_arg))
19
20 - def run(self, nodes, master, user, shell, volumes):
21 log.debug('Hello from MYPLUGIN2 :D') 22 for node in nodes: 23 node.ssh.execute('apt-get install -y python-utidylib') 24 node.ssh.execute('echo "i ran too foo" >> /tmp/iran')
25
26 -class SetupClass3(ClusterSetup):
27 - def __init__(self, my_arg, my_other_arg, my_other_other_arg):
28 msg = "setupclass3: my_arg = %s, my_other_arg = %s" 29 msg += " my_other_other_arg = %s" 30 log.debug(msg % (my_arg, my_other_arg, my_other_other_arg))
31
32 - def run(self, nodes, master, user, shell, volumes):
33 log.debug('Hello from MYPLUGIN3 :D') 34 for node in nodes: 35 node.ssh.execute('apt-get install -y python-boto') 36 node.ssh.execute('echo "i ran also foo" >> /tmp/iran')
37