toil.provisioners.node

Module Contents

Classes

Node

Attributes

a_short_time

logger

toil.provisioners.node.a_short_time = 5
toil.provisioners.node.logger
class toil.provisioners.node.Node(publicIP, privateIP, name, launchTime, nodeType, preemptible, tags=None, use_private_ip=None)[source]
maxWaitTime
__str__()[source]

Return str(self).

__repr__()[source]

Return repr(self).

__hash__()[source]

Return hash(self).

remainingBillingInterval()[source]

If the node has a launch time, this function returns a floating point value between 0 and 1.0 representing how far we are into the current billing cycle for the given instance. If the return value is .25, we are one quarter into the billing cycle, with three quarters remaining before we will be charged again for that instance.

Assumes a billing cycle of one hour.

Returns:

Float from 0 -> 1.0 representing percentage of pre-paid time left in cycle.

Return type:

float

waitForNode(role, keyName='core')[source]
copySshKeys(keyName)[source]

Copy authorized_keys file to the core user from the keyName user.

injectFile(fromFile, toFile, role)[source]

rysnc a file to the container with the given role

extractFile(fromFile, toFile, role)[source]

rysnc a file from the container with the given role

sshAppliance(*args, **kwargs)[source]
Parameters:
  • args – arguments to execute in the appliance

  • kwargs – tty=bool tells docker whether or not to create a TTY shell for interactive SSHing. The default value is False. Input=string is passed as input to the Popen call.

sshInstance(*args, **kwargs)[source]

Run a command on the instance. Returns the binary output of the command.

coreSSH(*args, **kwargs)[source]

If strict=False, strict host key checking will be temporarily disabled. This is provided as a convenience for internal/automated functions and ought to be set to True whenever feasible, or whenever the user is directly interacting with a resource (e.g. rsync-cluster or ssh-cluster). Assumed to be False by default.

kwargs: input, tty, appliance, collectStdout, sshOptions, strict

Parameters:

input (bytes) – UTF-8 encoded input bytes to send to the command

coreRsync(args, applianceName='toil_leader', **kwargs)[source]