Puppet Function: icinga2::icinga2_attributes

Defined in:
lib/puppet/functions/icinga2/icinga2_attributes.rb
Function type:
Ruby 4.x API

Summary

Calls the simple parser to decide what to quote. For more information, see lib/puppet_x/icinga2/utils.rb.

Overview

icinga2::icinga2_attributes(Hash $attrs, Array $globals, Hash $constants, Optional[Numeric] $indent)String

Parameters:

  • attrs (Hash)

    Object attributes to parse.

  • globals (Array)

    A list of addational reserved words.

  • constants (Hash)

    A hash of additional constants.

  • indent (Optional[Numeric])

    Indent to use.

Returns:

  • (String)

    Parsed attributes as String.



7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# File 'lib/puppet/functions/icinga2/icinga2_attributes.rb', line 7

Puppet::Functions.create_function(:'icinga2::icinga2_attributes') do
  # @param attrs
  #   Object attributes to parse.
  #
  # @param globals
  #   A list of addational reserved words.
  #
  # @param constants
  #   A hash of additional constants.
  #
  # @return [String]
  #   Parsed attributes as String.
  #
  # @param indent
  #   Indent to use.
  #
  dispatch :icinga2_attributes do
    required_param 'Hash',    :attrs
    required_param 'Array',   :globals
    required_param 'Hash',    :constants
    optional_param 'Numeric', :indent
    return_type    'String'
  end

  def icinga2_attributes(attrs, globals, constants, indent = 0)
    Puppet::Icinga2::Utils.attributes(attrs, globals, constants, indent)
  end
end