lib/puppet_x/coi/jboss/internal/securitydomain_auditor.rb
# Internal mathod that saves current state of every subpath of securitydomain
Internal mathod that saves current state of every subpath of securitydomain
Internal mathod that saves current state of every subpath of securitydomain
def fetch_securtydomain_state
    data = @state
    fetched_state = PuppetX::Coi::Jboss::Internal::State::SecurityDomainState.new
    if data['security-domain'][(@resource[:name]).to_s]
      if data['security-domain'][(@resource[:name]).to_s]['cache-type'].nil?
        Puppet.debug('cache-type is nil')
        fetched_state.is_cache_default = false
      else
        fetched_state.is_cache_default = true
      end
      auth = data['security-domain'][(@resource[:name]).to_s]['authentication']
      if auth.nil?
        Puppet.debug('Authentication is nil')
        fetched_state.is_authentication = false
      else
        fetched_state.is_authentication = true
      end
      if !auth.nil? && (data['security-domain'][(@resource[:name]).to_s]['authentication']['classic']['login-modules'].nil? || data['security-domain'][(@resource[:name]).to_s]['authentication']['classic']['login-modules'][0]['module-options'].nil?)
        Puppet.debug('Login modules are nil')
        fetched_state.is_login_modules = false
      end
    end
    fetched_state
  end
def fetch_securtydomain_state data = @state fetched_state = PuppetX :: Coi :: Jboss :: Internal :: State :: SecurityDomainState . new if data [ 'security-domain' ] [ ( @resource [ :name ] ) . to_s ] if data [ 'security-domain' ] [ ( @resource [ :name ] ) . to_s ] [ 'cache-type' ] . nil? Puppet . debug ( 'cache-type is nil' ) fetched_state . is_cache_default = false else fetched_state . is_cache_default = true end auth = data [ 'security-domain' ] [ ( @resource [ :name ] ) . to_s ] [ 'authentication' ] if auth . nil? Puppet . debug ( 'Authentication is nil' ) fetched_state . is_authentication = false else fetched_state . is_authentication = true end if ! auth . nil? && ( data [ 'security-domain' ] [ ( @resource [ :name ] ) . to_s ] [ 'authentication' ] [ 'classic' ] [ 'login-modules' ] . nil? || data [ 'security-domain' ] [ ( @resource [ :name ] ) . to_s ] [ 'authentication' ] [ 'classic' ] [ 'login-modules' ] [ 0 ] [ 'module-options' ] . nil? ) Puppet . debug ( 'Login modules are nil' ) fetched_state . is_login_modules = false end end fetched_state end
Internal mathod that saves current state of every subpath of securitydomain
Internal mathod that saves current state of every subpath of securitydomain