def getAllVersions(self): """ Return a list of version numbers for currently tracked component software. """ versionfuncs = [ self.getZenossVersionAndBuild, self.getOSVersion, self.getZopeVersion, self.getPythonVersion, self.getMySQLVersion, self.getTwistedVersion, self.getRabbitMQVersion, self.getErlangVersion, self.getNetSnmpVersion, self.getPyNetSnmpVersion, self.getWmiVersion, self.getControlCenterVersion ] versions = [] for func in versionfuncs: try: version = func() # Skip this component if the return value is None if version is None: continue data = version.full() except Exception: log.exception("Failed to retrieve '%s' version data", func.name) data = None versions.append({ 'header': func.name, 'data': data, 'href': func.href }) return versions
def getAllVersions(self): """ Return a list of version numbers for currently tracked component software. """ versionfuncs = [ self.getZenossVersion, self.getOSVersion, self.getZopeVersion, self.getPythonVersion, self.getMySQLVersion, self.getTwistedVersion, self.getRabbitMQVersion, self.getErlangVersion, self.getNetSnmpVersion, self.getPyNetSnmpVersion, self.getWmiVersion, ] versions = [] for func in versionfuncs: try: version = func() # Skip this component if the return value is None if version is None: continue data = version.full() except Exception: log.exception( "Failed to retrieve '%s' version data", func.name ) data = None versions.append({ 'header': func.name, 'data': data, 'href': func.href }) return versions