starcluster.commands.restart

Package starcluster :: Package commands :: Module restart |
[hide private]
[frames] | no frames]

# Source Code for Module starcluster.commands.restart

     1  #!/usr/bin/env python
     2
     3  from completers import ClusterCompleter
     4
     5
     6 -class CmdRestart(ClusterCompleter):
     7      """
     8      restart [options] <cluster_tag>
     9
    10      Restart an existing cluster
    11
    12      Example:
    13
    14          $ starcluster restart mynewcluster
    15
    16      This command will reboot each node (without terminating), wait for the
    17      nodes to come back up, and then reconfigures the cluster without losing
    18      any data on the node's local disk
    19      """
    20      names = ['restart', 'reboot']
    21
    22      tag = None
    23
    24 -    def execute(self, args):
    25          if not args:
    26              self.parser.error("please specify a cluster <tag_name>")
    27          for arg in args:
    28              self.cm.restart_cluster(arg)
    29