Class: Command::AmbariCreateClusterConfiguration
- Inherits:
-
AmbariClusterCommand
- Object
- BasicCommand
- AmbariCommand
- AmbariClusterCommand
- Command::AmbariCreateClusterConfiguration
- Defined in:
- lib/command/ambari_create_cluster_configuration.rb
Overview
Command used to get the configurations of an ambari cluster.
Instance Attribute Summary collapse
-
#apply ⇒ Object
private
Returns the value of attribute apply.
-
#properties ⇒ Object
private
Returns the value of attribute properties.
-
#tag ⇒ Object
private
Returns the value of attribute tag.
-
#type ⇒ Object
private
Returns the value of attribute type.
Attributes inherited from AmbariClusterCommand
Attributes inherited from BasicCommand
Instance Method Summary collapse
- #exec ⇒ Object
-
#initialize(cluster_name, type, tag, properties, apply = false) ⇒ AmbariCreateClusterConfiguration
constructor
The execution of the command.
Constructor Details
#initialize(cluster_name, type, tag, properties, apply = false) ⇒ AmbariCreateClusterConfiguration
The execution of the command.
20 21 22 23 24 25 26 27 28 |
# File 'lib/command/ambari_create_cluster_configuration.rb', line 20 def initialize(cluster_name, type, tag, properties, apply=false) super(cluster_name) @logger.info("Command::AmbariCreateClusterConfiguration initialize the parameters...") @type=type @tag=tag @properties = properties @apply=apply end |
Instance Attribute Details
#apply ⇒ Object (private)
Returns the value of attribute apply.
15 16 17 |
# File 'lib/command/ambari_create_cluster_configuration.rb', line 15 def apply @apply end |
#properties ⇒ Object (private)
Returns the value of attribute properties.
14 15 16 |
# File 'lib/command/ambari_create_cluster_configuration.rb', line 14 def properties @properties end |
#tag ⇒ Object (private)
Returns the value of attribute tag.
13 14 15 |
# File 'lib/command/ambari_create_cluster_configuration.rb', line 13 def tag @tag end |
#type ⇒ Object (private)
Returns the value of attribute type.
12 13 14 |
# File 'lib/command/ambari_create_cluster_configuration.rb', line 12 def type @type end |
Instance Method Details
#exec ⇒ Object
29 30 31 32 33 34 35 36 |
# File 'lib/command/ambari_create_cluster_configuration.rb', line 29 def exec() if apply @receiver.create_apply_configuration(@cluster_name ,@type , @tag , @properties) else @receiver.create_configuration(@cluster_name ,@type , @tag , @properties) end end |