Class: Command::AmbariServiceAdd

Inherits:
AmbariClusterServiceCommand show all
Defined in:
lib/command/ambari_service_add.rb

Overview

# Command used to get information on a cluster’s ambari service.

Instance Attribute Summary

Attributes inherited from AmbariClusterServiceCommand

#service_name

Attributes inherited from AmbariClusterCommand

#cluster_name

Attributes inherited from BasicCommand

#logger, #receiver

Instance Method Summary collapse

Methods inherited from AmbariClusterServiceCommand

#initialize

Methods inherited from AmbariClusterCommand

#initialize

Methods inherited from AmbariCommand

#initialize

Methods inherited from BasicCommand

#initialize

Constructor Details

This class inherits a constructor from Command::AmbariClusterServiceCommand

Instance Method Details

#execObject

The execution of the command.

Raises:

  • @todo traiter les exceptions



19
20
21
22
23
24
# File 'lib/command/ambari_service_add.rb', line 19

def exec()
  @receiver.define_service(@cluster_name, @service_name)
  Common::ServicesDescription.get_components(@service_name).each do |component_name|
    @receiver.add_service_component(cluster_name, service_name, component_name)
  end
end