puppetlabs/netdev_stdlib — pull request #7 by jeffmccune (2014-10-15 03:13:37+00:00)
Title: (NETDEV-20) Change snmp_notification_receiver to use composite namevar

Without this patch the snmp_notification_receiver specifies the name parameter
as the sole namevar. This is a problem because there can be multiple resources
with the same hostname or IP address. This patch addresses the problem by
changing the type to build a composite namevar that joins hostname, port,
version, and type with a colon to form the resource identifier. This looks
like:

$ puppet resource snmp_notification_receiver
snmp_notification_receiver { '127.0.0.1:162:v3:traps':
ensure => 'present',
security => 'noauth',
username => 'public',
}
snmp_notification_receiver { '127.0.0.2:162:v2:traps':
ensure => 'present',
community => 'private',
}
snmp_notification_receiver { '127.0.0.3:162:v1:traps':
ensure => 'present',
community => 'public',
}
snmp_notification_receiver { '127.0.0.4:10162:v2:informs':
ensure => 'present',
community => 'private',
}
snmp_notification_receiver { '127.0.0.4:20162:v1:traps':
ensure => 'present',
community => 'private',
}