Example #1
0
    def _find_reprocessing_records_notification_list(self, session):

        return_value = []
        msg = "Do get_reprocessing_records_list_distinct."
        LOG.info(msg)
        result = dbapi.get_reprocessing_records_list_distinct(session)
        msg = "Succeeded in get_reprocessing_records_list_distinct. " + "Return_value = " + str(result)
        LOG.info(msg)

        # Get reprocessing record
        for row in result:
            msg = "Do get_reprocessing_records_list."
            LOG.info(msg)
            result2 = dbapi.get_reprocessing_records_list(session, row.notification_uuid)
            msg = "Succeeded in get_reprocessing_records_list. " + "Return_value = " + str(result2)
            LOG.info(msg)
            # First row is reprocessing record.
            row_cnt = 0
            for row2 in result2:
                if row_cnt == 0:
                    return_value.append(row2)
                else:
                    ct = datetime.datetime.now()
                    msg = "Do update_reprocessing_records."
                    LOG.info(msg)
                    dbapi.update_reprocessing_records(session, 4, ct, ct, row2.id)
                    msg = "Succeeded in update_reprocessing_records."
                    LOG.info(msg)
                row_cnt += 1
        msg = "Do get_notification_list_distinct_hostname."
        LOG.info(msg)
        result = dbapi.get_notification_list_distinct_hostname(session)
        msg = "Succeeded in get_notification_list_distinct_hostname. " + "Return_value = " + str(result)
        LOG.info(msg)

        # Get reprocessing record
        for row in result:
            msg = "Do get_notification_list_by_hostname."
            LOG.info(msg)
            result2 = dbapi.get_notification_list_by_hostname(session, row.notification_hostname)
            msg = "Succeeded in get_notification_list_by_hostname. " + "Return_value = " + str(result2)
            LOG.info(msg)
            # First row is reprocessing record.
            row_cnt = 0
            for row2 in result2:
                if row_cnt == 0:
                    return_value.append(row2)
                else:
                    ct = datetime.datetime.now()
                    msg = "Do update_reprocessing_records."
                    LOG.info(msg)
                    dbapi.update_reprocessing_records(session, 4, ct, ct, row2.id)
                    msg = "Succeeded in update_reprocessing_records."
                    LOG.info(msg)
                row_cnt += 1

        return return_value
    def _find_reprocessing_records_notification_list(self, session):
        return_value = []
        result = dbapi.get_reprocessing_records_list_distinct(session)

        # Get reprocessing record
        for row in result:
            self.rc_util.syslogout_ex(
                "RecoveryControllerl_0050", syslog.LOG_INFO)
            result2 = dbapi.get_reprocessing_records_list(
                session, row.notification_uuid)
            # First row is reprocessing record.
            row_cnt = 0
            for row2 in result2:
                if row_cnt == 0:
                    return_value.append(row2)
                else:
                    ct = datetime.datetime.now()
                    dbapi.update_reprocessing_records(
                        session, 4, ct, ct, row2.id)
                    self.rc_util.syslogout_ex(
                        "RecoveryControllerl_0051", syslog.LOG_INFO)
                row_cnt += 1
        self.rc_util.syslogout_ex("RecoveryControllerl_0052", syslog.LOG_INFO)
        result = dbapi.get_notification_list_distinct_hostname(session)

        # Get reprocessing record
        for row in result:
            self.rc_util.syslogout_ex(
                "RecoveryControllerl_0053", syslog.LOG_INFO)
            result2 = dbapi.get_notification_list_by_hostname(
                session, row.notification_hostname)
            # First row is reprocessing record.
            row_cnt = 0
            for row2 in result2:
                if row_cnt == 0:
                    return_value.append(row2)
                else:
                    ct = datetime.datetime.now()
                    dbapi.update_reprocessing_records(
                        session, 4, ct, ct, row2.id)
                    self.rc_util.syslogout_ex(
                        "RecoveryControllerl_0054", syslog.LOG_INFO)
                row_cnt += 1

        return return_value
Example #3
0
    def _find_reprocessing_records_notification_list(self, session):
        return_value = []
        result = dbapi.get_reprocessing_records_list_distinct(session)

        # Get reprocessing record
        for row in result:
            self.rc_util.syslogout_ex("RecoveryControllerl_0050",
                                      syslog.LOG_INFO)
            result2 = dbapi.get_reprocessing_records_list(
                session, row.notification_uuid)
            # First row is reprocessing record.
            row_cnt = 0
            for row2 in result2:
                if row_cnt == 0:
                    return_value.append(row2)
                else:
                    ct = datetime.datetime.now()
                    dbapi.update_reprocessing_records(session, 4, ct, ct,
                                                      row2.id)
                    self.rc_util.syslogout_ex("RecoveryControllerl_0051",
                                              syslog.LOG_INFO)
                row_cnt += 1
        self.rc_util.syslogout_ex("RecoveryControllerl_0052", syslog.LOG_INFO)
        result = dbapi.get_notification_list_distinct_hostname(session)

        # Get reprocessing record
        for row in result:
            self.rc_util.syslogout_ex("RecoveryControllerl_0053",
                                      syslog.LOG_INFO)
            result2 = dbapi.get_notification_list_by_hostname(
                session, row.notification_hostname)
            # First row is reprocessing record.
            row_cnt = 0
            for row2 in result2:
                if row_cnt == 0:
                    return_value.append(row2)
                else:
                    ct = datetime.datetime.now()
                    dbapi.update_reprocessing_records(session, 4, ct, ct,
                                                      row2.id)
                    self.rc_util.syslogout_ex("RecoveryControllerl_0054",
                                              syslog.LOG_INFO)
                row_cnt += 1

        return return_value
Example #4
0
    def _find_reprocessing_records_notification_list(self, session):

        return_value = []
        msg = "Do get_reprocessing_records_list_distinct."
        LOG.info(msg)
        result = dbapi.get_reprocessing_records_list_distinct(session)
        msg = "Succeeded in get_reprocessing_records_list_distinct. " \
            + "Return_value = " + str(result)
        LOG.info(msg)

        # Get reprocessing record
        for row in result:
            msg = "Do get_reprocessing_records_list."
            LOG.info(msg)
            result2 = dbapi.get_reprocessing_records_list(
                session, row.notification_uuid)
            msg = "Succeeded in get_reprocessing_records_list. " \
                + "Return_value = " + str(result2)
            LOG.info(msg)
            # First row is reprocessing record.
            row_cnt = 0
            for row2 in result2:
                if row_cnt == 0:
                    return_value.append(row2)
                else:
                    ct = datetime.datetime.now()
                    msg = "Do update_reprocessing_records."
                    LOG.info(msg)
                    dbapi.update_reprocessing_records(session, 4, ct, ct,
                                                      row2.id)
                    msg = "Succeeded in update_reprocessing_records."
                    LOG.info(msg)
                row_cnt += 1
        msg = "Do get_notification_list_distinct_hostname."
        LOG.info(msg)
        result = dbapi.get_notification_list_distinct_hostname(session)
        msg = "Succeeded in get_notification_list_distinct_hostname. " \
            + "Return_value = " + str(result)
        LOG.info(msg)

        # Get reprocessing record
        for row in result:
            msg = "Do get_notification_list_by_hostname."
            LOG.info(msg)
            result2 = dbapi.get_notification_list_by_hostname(
                session, row.notification_hostname)
            msg = "Succeeded in get_notification_list_by_hostname. " \
                + "Return_value = " + str(result2)
            LOG.info(msg)
            # First row is reprocessing record.
            row_cnt = 0
            for row2 in result2:
                if row_cnt == 0:
                    return_value.append(row2)
                else:
                    ct = datetime.datetime.now()
                    msg = "Do update_reprocessing_records."
                    LOG.info(msg)
                    dbapi.update_reprocessing_records(session, 4, ct, ct,
                                                      row2.id)
                    msg = "Succeeded in update_reprocessing_records."
                    LOG.info(msg)
                row_cnt += 1

        return return_value