elasticluster.subcommands

class elasticluster.subcommands.AbstractCommand(params)[source]

Defines the general contract every command has to fulfill in order to be recognized by the arguments list and executed afterwards.

execute()[source]

This method is executed after a command was recognized and may vary in its behavior.

pre_run()[source]

Overrides this method to execute any pre-run code, especially to check any command line options.

setup(subparsers)[source]

This method handles the setup of the subcommand. In order to do so, every command has to add a parser to the subparsers reference given as parameter. The following example is the minimum implementation of such a setup procedure: parser = subparsers.add_parser(“start”) parser.set_defaults(func=self.execute)

class elasticluster.subcommands.ListClusters(params)[source]

Print a list of all clusters that have been started.

class elasticluster.subcommands.ListNodes(params)[source]

Show some information on all the nodes belonging to a given cluster.

execute()[source]

Lists all nodes within the specified cluster with certain information like id and ip.

class elasticluster.subcommands.ListTemplates(params)[source]

List the available templates defined in the configuration file.

class elasticluster.subcommands.ResizeCluster(params)[source]

Resize the cluster by adding or removing compute nodes.

class elasticluster.subcommands.SetupCluster(params)[source]

Setup the given cluster by calling the setup provider defined for this cluster.

class elasticluster.subcommands.SftpFrontend(params)[source]

Open an SFTP session to the cluster frontend host.

class elasticluster.subcommands.SshFrontend(params)[source]

Connect to the frontend of the cluster using ssh.

class elasticluster.subcommands.Start(params)[source]

Create a new cluster using the given cluster template.

execute()[source]

Starts a new cluster.

class elasticluster.subcommands.Stop(params)[source]

Stop a cluster and terminate all associated virtual machines.

execute()[source]

Stops the cluster if it’s running.

setup(subparsers)[source]

@see abstract_command contract