Module: Puppet_X::Coi::Jboss::Provider::SecurityDomain

Defined in:
lib/puppet_x/coi/jboss/provider/securitydomain.rb

Overview

A class for JBoss security domain provider

Defined Under Namespace

Classes: AbstractProvider, PostWildFlyProvider, PreWildFlyProvider

Instance Method Summary collapse

Instance Method Details

#createObject

Method that creates security-domain in Jboss instance. When invoked it will execute 3 commands, add cache-type with value ‘default’, add authentication with value classic, add login-modules. Depends on the version of server it will use correct path to set security domain



14
15
16
17
18
19
20
21
# File 'lib/puppet_x/coi/jboss/provider/securitydomain.rb', line 14

def create
  commands = fetch_commands
  Puppet.debug("Commands: #{commands}")

  commands.each do |message, command|
    bringUp(message, command)
  end
end

#destroyObject

Method to remove security-domain from Jboss instance



24
25
26
27
# File 'lib/puppet_x/coi/jboss/provider/securitydomain.rb', line 24

def destroy
  destroyer = ensure_destroyer
  destroyer.destroy(@resource)[:result]
end

#exists?Boolean

Method to check if there is security domain. Method calls recursive read-resource on security subsystem to validate if security domain is present. In the procces method also checks if authentication is set.

Returns:

  • (Boolean)


6
7
8
9
# File 'lib/puppet_x/coi/jboss/provider/securitydomain.rb', line 6

def exists?
  auditor = ensure_auditor
  auditor.exists?
end