<commit_before>Puppet::Type.newtype(:quagga_system) do
  @doc = 'This type provides the capabilities to manage the router'

  newparam(:name, :namevar => true) do
    desc 'Router instance name'
  end

  newproperty(:hostname) do
    desc 'Router hostname'
    defaultto {@resource[:name]}

    munge do |value|
      if value.empty?
        @resource[:name]
      else
        value
      end
    end
  end

  newproperty(:password) do
    desc 'Set password for vty interface. If there is no password, a vty won’t accept connections.'

    defaultto(:absent)
  end

  newproperty(:enable_password) do
    desc 'Set enable password'

    defaultto(:absent)
  end

  newproperty(:line_vty, :boolean => true) do
    desc 'Enter vty configuration mode'

    defaultto(:true)
    newvalues(:true, :false)
  end

  newproperty(:service_password_encryption, :boolean => true) do
    desc 'Encrypt passwords'

    defaultto(:false)
    newvalues(:true, :false)
  end

  autorequire(:package) do
    ['quagga']
  end

  autorequire(:service) do<commit_msg>Added munging of string values<commit_after>Puppet::Type.newtype(:quagga_system) do
  @doc = 'This type provides the capabilities to manage the router'

  newparam(:name, :namevar => true) do
    desc 'Router instance name'
  end

  newproperty(:hostname) do
    desc 'Router hostname'
    defaultto {@resource[:name]}

    munge do |value|
      if value.empty?
        @resource[:name]
      else
        value
      end
    end
  end

  newproperty(:password) do
    desc 'Set password for vty interface. If there is no password, a vty won’t accept connections.'

    defaultto(:absent)

    munge do |value|
      if value.empty?
        :absent
      else
        value
      end
    end
  end

  newproperty(:enable_password) do
    desc 'Set enable password'

    defaultto(:absent)

    munge do |value|
      if value.empty?
        :absent
      else
        value
      end
    end
  end

  newproperty(:line_vty, :boolean => true) do
    desc 'Enter vty configuration mode'

    defaultto(:true)
    newvalues(:true, :false)
  end

  newproperty(:service_password_encryption, :boolean => true) do
    desc 'Encrypt passwords'

    defaultto(:false)
    newvalues(:true, :false)
  end

  autorequire(:package) do
    ['quagga']
  end

  autorequire(:service) do
{'fraction_non_alphanumeric': 0.0947867298578199, 'fraction_numerical': 0.0, 'mean_word_length': 2.8253706754530477, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5302760', 'n_tokens_mistral': 743, 'n_tokens_neox': 714, 'n_words': 217}