Example #1
0
    def _collect_case_data(self):
        assert_equal(True, ansible_ctl.collect_data(), message='Failed to collect footprint data!')
        self.case_recorder.write_end()

        LOG.info('Parse log and generate html reports')
        try:
            parser.parse(self.__data_path)
        except RuntimeError as err:
            LOG.warning('Error on parsing log or generating reports: ')
            LOG.warning(err)
Example #2
0
    def _collect_case_data(self):
        assert_equal(True, ansible_ctl.collect_data(), message='Failed to collect footprint data!')
        self.case_recorder.write_end()

        LOG.info('Parse log and generate html reports')
        try:
            parser.parse(self.__data_path)
        except RuntimeError as err:
            LOG.warning('Error on parsing log or generating reports: ')
            LOG.warning(err)
Example #3
0
    def test_runtime(self):
        """ Testing footprint scenario: poller """
        self.__case_recorder.write_interval(ansible_ctl.get_data_interval())
        self.__case_recorder.write_start()

        assert_equal(True, ansible_ctl.start_daemon(), \
                    message='Failed to start data collection daemon!')

        # Run test scenario
        # In this case, wait for 15 mins to let RackHD run pollers
        LOG.info('Start test case...')
        time.sleep(900)
        LOG.info('End test case. Fetch log...')

        assert_equal(True, ansible_ctl.collect_data(), message='Failed to collect footprint data!')
        self.__case_recorder.write_end()

        parser.parse(self.__data_path)
Example #4
0
    def test_runtime(self):
        """ Testing footprint scenario: poller """
        self.__case_recorder.write_interval(ansible_ctl.get_data_interval())
        self.__case_recorder.write_start()

        assert_equal(True, ansible_ctl.start_daemon(), \
                    message='Failed to start data collection daemon!')

        # Run test scenario
        # In this case, wait for 15 mins to let RackHD run pollers
        LOG.info('Start test case...')
        time.sleep(900)
        LOG.info('End test case. Fetch log...')

        assert_equal(True,
                     ansible_ctl.collect_data(),
                     message='Failed to collect footprint data!')
        self.__case_recorder.write_end()

        parser.parse(self.__data_path)
Example #5
0
 def stop(self):
     case_recorder = caseRecorder(self._ansible_ctl.get_data_path_per_case())
     self._ansible_ctl.collect_data()
     case_recorder.write_end()
     parser.parse(self._ansible_ctl.get_data_path_per_case())