libraries/algosec_helper.rb
# Makes it easy to build a ALGOSEC_SDK::Client object
# @param [Hash, ALGOSEC_SDK::Client] algosec Machine info or client object.
# @return [ALGOSEC_SDK::Client] Client object
Makes it easy to build a ALGOSEC_SDK::Client object
Makes it easy to build a ALGOSEC_SDK :: Client object
def build_client(algosec)
      case algosec
      when Hash
        log_level = algosec['log_level'] || algosec[:log_level] || Chef::Log.level
        ALGOSEC_SDK::Client.new(algosec.merge(log_level: log_level))
      else
        raise "Invalid client #{algosec}. Must be a hash or ALGOSEC_SDK::Client"
      end
    end
def build_client ( algosec ) case algosec when Hash log_level = algosec [ 'log_level' ] || algosec [ :log_level ] || Chef :: Log . level ALGOSEC_SDK :: Client . new ( algosec . merge ( log_level : log_level ) ) else raise "Invalid client #{algosec}. Must be a hash or ALGOSEC_SDK::Client" end end
Makes it easy to build a ALGOSEC_SDK::Client object
Makes it easy to build a ALGOSEC_SDK :: Client object
None
ALGOSEC_SDK::Client
algosec
algosec Machine info or client object.
algosec Machine info or client object .