starcluster.tests.mytestplugin

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

# Source Code for Module starcluster.tests.mytestplugin

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