def oscap_callback(self, Msg, Plugin): if Msg.user2num == openscap.OSCAP.XCCDF_RESULT_NOT_SELECTED: if Plugin.continuing(): return 0 else: return 1 try: Id = Msg.user1str result = Msg.user2num setattr(self._info, Id, unicode(result)) Issue = Plugin._issues.get(Id, None) Issue.set(skipped = (result in (openscap.OSCAP.XCCDF_RESULT_NOT_CHECKED, openscap.OSCAP.XCCDF_RESULT_NOT_SELECTED, openscap.OSCAP.XCCDF_RESULT_NOT_APPLICABLE, openscap.OSCAP.XCCDF_RESULT_UNKNOWN)), checked = (result in (openscap.OSCAP.XCCDF_RESULT_FAIL, openscap.OSCAP.XCCDF_RESULT_PASS)), error = (result in (openscap.OSCAP.XCCDF_RESULT_ERROR,)), happened = (result == openscap.OSCAP.XCCDF_RESULT_FAIL), fixed = False, reporting = Plugin._reporting, origin = Plugin, level = PLUGIN) except Exception, e: print e
def oscap_callback_start(self, Msg, Plugin): if Msg.user2num == openscap.OSCAP.XCCDF_RESULT_NOT_SELECTED: if Plugin.continuing(): return 0 else: return 1 try: Id = Msg.user1str setattr(self._info, Id, unicode(-1)) Issue = Plugin._issues.get(Id, None) if Issue is None: title = Msg.user3str description = Msg.string Issue = SimpleIssue(Id, title) Issue.set(reporting = Plugin._reporting, origin = Plugin, level = PLUGIN) Plugin._issues[Id] = Issue except Exception, e: print e
openscap.OSCAP.XCCDF_RESULT_NOT_APPLICABLE, openscap.OSCAP.XCCDF_RESULT_UNKNOWN)), checked = (result in (openscap.OSCAP.XCCDF_RESULT_FAIL, openscap.OSCAP.XCCDF_RESULT_PASS)), error = (result in (openscap.OSCAP.XCCDF_RESULT_ERROR,)), happened = (result == openscap.OSCAP.XCCDF_RESULT_FAIL), fixed = False, reporting = Plugin._reporting, origin = Plugin, level = PLUGIN) except Exception, e: print e if Plugin.continuing(): return 0 else: return 1 def oscap_callback_start(self, Msg, Plugin): if Msg.user2num == openscap.OSCAP.XCCDF_RESULT_NOT_SELECTED: if Plugin.continuing(): return 0 else: return 1 try: Id = Msg.user1str