Class: Puppet_X::Coi::Jboss::Internal::LogicCreator
- Inherits:
-
Object
- Object
- Puppet_X::Coi::Jboss::Internal::LogicCreator
- Defined in:
- lib/puppet_x/coi/jboss/internal/logic_creator.rb
Overview
Class that will decide what cammands should be send to cli to set up security domain
Instance Method Summary collapse
-
#decide ⇒ Hash
Method that will return list of commands based on current state Puppet_X::Coi::Jboss::Provider::SecurityDomain::PostWildFlyProvider} be displayed and value is command.
-
#initialize(auditor, resource, provider, compilator) ⇒ LogicCreator
constructor
securitydomain configuration we need to use diffrent paths to setup securitydomain.
Constructor Details
#initialize(auditor, resource, provider, compilator) ⇒ LogicCreator
securitydomain configuration we need to use diffrent paths to setup securitydomain
7 8 9 10 11 12 |
# File 'lib/puppet_x/coi/jboss/internal/logic_creator.rb', line 7 def initialize(auditor, resource, provider, compilator) @auditor = auditor @resource = resource @provider = provider @compilator = compilator end |
Instance Method Details
#decide ⇒ Hash
Method that will return list of commands based on current state Puppet_X::Coi::Jboss::Provider::SecurityDomain::PostWildFlyProvider} be displayed and value is command
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/puppet_x/coi/jboss/internal/logic_creator.rb', line 19 def decide state = @auditor.fetch_securtydomain_state commands = [] unless state.cache_default? command = @compilator.compile( @resource[:runasdomain], @resource[:profile], "/subsystem=security/security-domain=#{@resource[:name]}:add(cache-type=default)" ) commands.push(['Security Domain Cache Type', command]) end provided_commands = @provider.get_commands(state, @resource) provided_commands = [] if provided_commands.nil? commands + provided_commands end |