def __init__(self, config, logger=None): self.__logger = logger KernelInfo.__init__(self, logger=logger) SystemServices.__init__(self, logger=logger) dmi.DMIinfo.__init__(self, config, logger=logger) CPUtopology.__init__(self) OSInfo.__init__(self, logger=logger) # Parse initial DMI decoding errors dmi.ProcessWarnings() # Parse CPU info CPUtopology._parse(self)
def MakeReport(self): report_n = libxml2.newNode("SystemInfo"); report_n.newProp("version", "1.0") # Populate the report report_n.addChild(OSInfo.MakeReport(self)) report_n.addChild(KernelInfo.MakeReport(self)) report_n.addChild(NetworkInfo.MakeReport(self)) report_n.addChild(SystemServices.MakeReport(self)) report_n.addChild(CPUtopology.MakeReport(self)) report_n.addChild(MemoryInfo.MakeReport(self)) report_n.addChild(dmi.DMIinfo.MakeReport(self)) return report_n
from event_collector import EventCollector from osinfo import OSInfo events = EventCollector() events.set_eventid() server = OSInfo() events.add_dict_event(server.get_info) for event in events.eventlist: print event
def osinfo(): return OSInfo()