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