razorsedge / puppet-openlldp

Puppet module to install Open-LLDP.
http://forge.puppetlabs.com/razorsedge/openlldp
Other
6 stars 11 forks source link

Empty facts if LLDP is disabled on switch #10

Open bastelfreak opened 8 years ago

bastelfreak commented 8 years ago

Hi, I've configured lldptool on my server but it is currently disabled in our network. This results in a list of empty facts:

# facter -p | grep lldp
lldp_neighbor_chassisid_eth0 => 
lldp_neighbor_chassisid_eth1 => 
lldp_neighbor_chassisid_eth2 => 
lldp_neighbor_mngaddr_ipv4_br0 => 
lldp_neighbor_mngaddr_ipv4_br1 => 
lldp_neighbor_mngaddr_ipv4_eth0 => 
lldp_neighbor_mngaddr_ipv4_eth1 => 
lldp_neighbor_mngaddr_ipv4_eth2 => 
lldp_neighbor_mngaddr_ipv4_eth3 => 
lldp_neighbor_mngaddr_ipv4_venet0 => 
lldp_neighbor_mngaddr_ipv6_br0 => 
lldp_neighbor_mngaddr_ipv6_br1 => 
lldp_neighbor_mngaddr_ipv6_eth0 => 
lldp_neighbor_mngaddr_ipv6_eth1 => 
lldp_neighbor_mngaddr_ipv6_eth2 => 
lldp_neighbor_mngaddr_ipv6_eth3 => 
lldp_neighbor_mngaddr_ipv6_venet0 => 
lldp_neighbor_mtu_br0 => 
lldp_neighbor_mtu_br1 => 
lldp_neighbor_mtu_eth0 => 
lldp_neighbor_mtu_eth1 => 
lldp_neighbor_mtu_eth2 => 
lldp_neighbor_mtu_eth3 => 
lldp_neighbor_mtu_venet0 => 
lldp_neighbor_portid_br0 => 
lldp_neighbor_portid_br1 => 
lldp_neighbor_portid_eth0 => 
lldp_neighbor_portid_eth1 => 
lldp_neighbor_portid_eth2 => 
lldp_neighbor_portid_eth3 => 
lldp_neighbor_portid_venet0 => 
lldp_neighbor_pvid_br0 => 
lldp_neighbor_pvid_br1 => 
lldp_neighbor_pvid_eth0 => 
lldp_neighbor_pvid_eth1 => 
lldp_neighbor_pvid_eth2 => 
lldp_neighbor_pvid_eth3 => 
lldp_neighbor_pvid_venet0 => 
lldp_neighbor_sysname_br0 => 
lldp_neighbor_sysname_br1 => 
lldp_neighbor_sysname_eth0 => 
lldp_neighbor_sysname_eth1 => 
lldp_neighbor_sysname_eth2 => 
lldp_neighbor_sysname_eth3 => 
lldp_neighbor_sysname_venet0 => 

As far as I know this is considered as bad practice. The preferred solution would be to not confine them or to set them to 'unknown'. What do you think about that? I would submit a patch for the first solution if you want to.

jyaworski commented 8 years ago

@bastelfreak 👍 I'd like this too.

jyaworski commented 8 years ago

Ping @razorsedge. @bastelfreak isn't there a way to just return nil and facter will filter the output so it doesn't show it?

razorsedge commented 7 years ago

@bastelfreak How would we go about confining the facts?