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.
ExportCluster
(params)[source]¶ Save cluster definition in the given file. A .zip extension is appended if it’s not already there. By default, the output file is named like the cluster.
-
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.
GC3PieConfig
(params)[source]¶ Print a GC3Pie configuration snippet for a specific cluster
-
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.
ImportCluster
(params)[source]¶ Import a cluster definition from FILE into local storage. After running this command, it will be possible to operate on the imported cluster as if it had been created locally.
The FILE to be imported must have been created with elasticluster export.
If a cluster already exists with the same name of the one being imported, the import operation is aborted and elasticluster exists with an error.
-
execute
()[source]¶ This method is executed after a command was recognized and may vary in its behavior.
-
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.
-
execute
()[source]¶ This method is executed after a command was recognized and may vary in its behavior.
-
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.
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.
-
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.
ListTemplates
(params)[source]¶ List the available templates defined in the configuration file.
-
execute
()[source]¶ This method is executed after a command was recognized and may vary in its behavior.
-
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.
Pause
(params)[source]¶ Pause the nodes in the cluster, retaining disks and configuration.
-
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.
RemoveNode
(params)[source]¶ Remove a specific node from the cluster
-
execute
()[source]¶ This method is executed after a command was recognized and may vary in its behavior.
-
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.
ResizeCluster
(params)[source]¶ Resize the cluster by adding or removing compute nodes.
-
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.
Resume
(params)[source]¶ Pause the nodes in the cluster, retaining disks and configuration.
-
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.
SetupCluster
(params)[source]¶ Setup the given cluster by calling the setup provider defined for this cluster.
-
execute
()[source]¶ This method is executed after a command was recognized and may vary in its behavior.
-
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.
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.
-
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)
-