supports :status => false, :restart => true, :reload => false
end
-# Link Layer Discovery Protocol Daemon
package "lldpd"
+
service "lldpd" do
action [:start, :enable]
supports :status => true, :restart => true, :reload => true
end
+ohai_plugin "lldp" do
+ template "lldp.rb.erb"
+end
+
tools_packages = []
status_packages = {}
--- /dev/null
+require "json"
+
+Ohai.plugin(:Lldp) do
+ provides "lldp"
+
+ collect_data(:default) do
+ lldp Mash.new
+
+ json = JSON.parse(%x(/sbin/lldpctl -f json))
+
+ json["lldp"].each do |key, value|
+ lldp[key] = value
+ end
+
+ lldp
+ end
+end