Class: Puppet_X::Coi::Jboss::Internal::SecurityDomainDestroyer
- Inherits:
-
Object
- Object
- Puppet_X::Coi::Jboss::Internal::SecurityDomainDestroyer
- Defined in:
- lib/puppet_x/coi/jboss/internal/securitydomain_destroyer.rb
Overview
Class that handles removing securitydomain from jboss instance
Instance Method Summary collapse
-
#destroy(resource) ⇒ Object
Method that compiles jboss command and executes destroy command.
-
#initialize(cli_executor, compilator, resource) ⇒ SecurityDomainDestroyer
constructor
Standard constructor command execution commands.
Constructor Details
#initialize(cli_executor, compilator, resource) ⇒ SecurityDomainDestroyer
Standard constructor command execution commands
9 10 11 12 13 |
# File 'lib/puppet_x/coi/jboss/internal/securitydomain_destroyer.rb', line 9 def initialize(cli_executor, compilator, resource) @cli_executor = cli_executor @compilator = compilator @resource = resource end |
Instance Method Details
#destroy(resource) ⇒ Object
Method that compiles jboss command and executes destroy command
17 18 19 20 21 22 23 |
# File 'lib/puppet_x/coi/jboss/internal/securitydomain_destroyer.rb', line 17 def destroy(resource) Puppet.debug('Destroy method') compiled_cmd = @compilator.compile(@resource[:runasdomain], @resource[:profile], "/subsystem=security/security-domain=#{@resource[:name]}/authentication=classic:remove()") @cli_executor.executeWithFail('SecurityDomain', compiled_cmd, 'to destroy', resource) end |