cloudmesh-common.cloudmesh.common.JobMultiHostScript

Module Contents

Classes

JobMultiHostScript

The JobMultiHostScript is a simple mechanism to run a number of commands formylated

class cloudmesh-common.cloudmesh.common.JobMultiHostScript.JobMultiHostScript(name, script, hosts, executor)

The JobMultiHostScript is a simple mechanism to run a number of commands formylated in a script in parallel over the hosts provided. The script is interpreted line by line and does not support multi line commands at this time. (Not difficult to implement when looking at at the end of a line.)

Static method::
script = “””

# This is a comment pwd # tag: pwd uname -a

“””

hosts = Parameter.expand(“purple[01-02]”) result = JobMultiHostScript.execute(script, “script_name”, hosts)

run(self, beginLine=None, endLine=None)
static execute(script, name='script', hosts=None, executor=JobSet.ssh, beginLine=None, endLine=None)
cms(self, arguments)
cloudmesh-common.cloudmesh.common.JobMultiHostScript.script = # This is a comment

# Task: pwd pwd # tag: pwd

# Task: uname uname -a