from common import * def gen_snmpd_local_conf(node): return gen_header('snmpd.local.conf') + """# # overwrites/augments the data in snmpd.conf # which is identical on each node with data # specific to this node. # mibs +LIGHT80211-MIB # Location of the physical node. # syslocation "%s" # Verify that disk is RO sh diskro /usr/local/sbin/diskro.sh # Also listen to tcp agentaddress 161,tcp:161 # end of file""" % node.location if __name__ == "__main__": nodes = xml_to_obj_hierarchy(sys.argv[1]) ready_nodes_dtd_hierarchy(nodes) node = findnode(nodes, sys.argv[2]) print gen_snmpd_local_conf(node)