Class: Exec::ClusterDesallocate

Inherits:
ExecutableCommand show all
Defined in:
lib/exec/cluster_desallocate.rb

Overview

Allows the user to desallocate a cluster

Instance Attribute Summary

Attributes inherited from ExecutableCommand

#argv, #command_name, #logger, #options, #stderr, #stdin, #stdout, #values

Instance Method Summary collapse

Methods inherited from ExecutableCommand

#check_parameters, #create_logger, #initialize, #run

Constructor Details

This class inherits a constructor from Exec::ExecutableCommand

Instance Method Details

#execObject (private)

TODO:

Implement ClusterDesallocate Exec body

The execution of the command.

Raises:

Author:

  • tnoguer



30
31
32
33
34
35
# File 'lib/exec/cluster_desallocate.rb', line 30

def exec
  Color::print_log("NONE", "Desallocate cluster...", @stdout)
  Color::echo_fail(@stdout)

  raise ClusterDesallocateError.new("Not implemented command...")
end

#set_optionsObject (private)

Parse and check the parameters of the function.

Author:

  • tnoguer



21
22
23
24
25
# File 'lib/exec/cluster_desallocate.rb', line 21

def set_options
  @options.add_option("a", "all", "All nodes which are in the cluster .", false)
  @options.add_option("C", "cluster_name", "The name of the vcluster .", true, true, method(:check_cluster_name))
  @options.add_option("m", "node_name", "The list of nodes.", false, true, method(:check_crowbar_node_name))
end