def nagiosConfigFileOut(self, forceOutput=False, event=None): """Nagios-Filegenerator will produce the nagios configuration files forceOutput: False will check for a relevant attribute change True will alway generate a new config file event: None or the zope event from lifecycle """ ipv4 = None for if_name, if_obj in self.context.items(): if IInterface.providedBy(if_obj): ipv4 = if_obj.ipv4List if ipv4 is not None and len(ipv4) > 0: ParentGenNagios.nagiosConfigFileOut(self, forceOutput, event)
def nagiosConfigFileOut(self, forceOutput=False, event=None): """Nagios-Filegenerator will produce the nagios configuration files forceOutput: False will check for a relevant attribute change True will alway generate a new config file event: None or the zope event from lifecycle """ valueChanged = False ipv4 = None ipAddressList = [] for interface in self.context.interfaces: for ipAddress in interface.ipAddresses: ipAddressList.append(ipAddress) # for if_name, if_obj in self.context.items(): # if IInterface.providedBy(if_obj) and \ # if_obj.ipv4List is not None and \ # len (if_obj.ipv4List) > 0: # ipv4 = if_obj.ipv4List[0] if len(ipAddressList) > 0: if ParentGenNagios.nagiosConfigFileOut(self, forceOutput, event): valueChanged = True return valueChanged