Puppet Function: network::parse_abuse_nets

Defined in:
modules/network/functions/parse_abuse_nets.pp
Function type:
Puppet Language

Summary

this function parses a Hash of Network::Abuse_net objects and returns a list of networks appropriate for the context

Overview

network::parse_abuse_nets(Network::Context $context, Hash[String[1], Network::Abuse_net] $abuse_nets = lookup('abuse_networks'))Hash[String[1], Network::Abuse_net]

SPDX-License-Identifier: Apache-2.0

Parameters:

  • abuse_nets (Hash[String[1], Network::Abuse_net]) (defaults to: lookup('abuse_networks'))

    a list of abuse networks with meta data indicating where they should be used. Default: lookup('abuse_networks')

  • context (Network::Context)

    either ferm or varnish to indicate where the list will be used

Returns:

  • (Hash[String[1], Network::Abuse_net])


8
9
10
11
12
13
# File 'modules/network/functions/parse_abuse_nets.pp', line 8

function network::parse_abuse_nets(
    Network::Context                    $context,
    Hash[String[1], Network::Abuse_net] $abuse_nets = lookup('abuse_networks'),
) >> Hash[String[1], Network::Abuse_net] {
    $abuse_nets.filter |$key, $values| { $context in $values['context'] }
}