def _handle_ems_logging(self):
        """Log autosupport messages."""

        base_ems_message = dot_utils.build_ems_log_message_0(
            self.driver_name, self.app_version, self.driver_mode)
        self.zapi_client.send_ems_log_message(base_ems_message)

        pool_ems_message = dot_utils.build_ems_log_message_1(
            self.driver_name, self.app_version, None, self.volume_list, [])
        self.zapi_client.send_ems_log_message(pool_ems_message)
Example #2
0
    def _handle_ems_logging(self):
        """Log autosupport messages."""

        base_ems_message = dot_utils.build_ems_log_message_0(self.driver_name, self.app_version, self.driver_mode)
        self.zapi_client.send_ems_log_message(base_ems_message)

        pool_ems_message = dot_utils.build_ems_log_message_1(
            self.driver_name, self.app_version, None, self._get_backing_flexvol_names(), []
        )
        self.zapi_client.send_ems_log_message(pool_ems_message)
Example #3
0
    def _handle_ems_logging(self):
        """Log autosupport messages."""

        base_ems_message = dot_utils.build_ems_log_message_0(
            self.driver_name, self.app_version)
        self.zapi_client.send_ems_log_message(base_ems_message)

        pool_ems_message = dot_utils.build_ems_log_message_1(
            self.driver_name, self.app_version, self.vserver,
            self._get_backing_flexvol_names(), [])
        self.zapi_client.send_ems_log_message(pool_ems_message)
Example #4
0
    def _handle_ems_logging(self):
        """Log autosupport messages."""

        base_ems_message = dot_utils.build_ems_log_message_0(
            self.driver_name, self.app_version)
        self.zapi_client.send_ems_log_message(base_ems_message)

        pool_ems_message = dot_utils.build_ems_log_message_1(
            self.driver_name, self.app_version, self.vserver,
            self.ssc_library.get_ssc_flexvol_names(), [])
        self.zapi_client.send_ems_log_message(pool_ems_message)
Example #5
0
    def test_build_ems_log_message_0(self):

        self.mock_object(socket, 'gethostname', return_value='fake_hostname')

        result = utils.build_ems_log_message_0('fake_driver_name',
                                               'fake_app_version')

        expected = {
            'computer-name': 'fake_hostname',
            'event-source': 'Cinder driver fake_driver_name',
            'app-version': 'fake_app_version',
            'category': 'provisioning',
            'log-level': '5',
            'auto-support': 'false',
            'event-id': '0',
            'event-description': 'OpenStack Cinder connected to cluster node',
        }
        self.assertEqual(expected, result)
Example #6
0
    def test_build_ems_log_message_0(self):

        self.mock_object(
            socket, 'gethostname', return_value='fake_hostname')

        result = utils.build_ems_log_message_0(
            'fake_driver_name', 'fake_app_version')

        expected = {
            'computer-name': 'fake_hostname',
            'event-source': 'Cinder driver fake_driver_name',
            'app-version': 'fake_app_version',
            'category': 'provisioning',
            'log-level': '5',
            'auto-support': 'false',
            'event-id': '0',
            'event-description': 'OpenStack Cinder connected to cluster node',
        }
        self.assertEqual(expected, result)