Esempio n. 1
0
    def validate(self, task):
        """Validates the driver information needed by the redfish driver.

        :param task: a TaskManager instance containing the node to act on.
        :raises: InvalidParameterValue on malformed parameter(s)
        :raises: MissingParameterValue on missing parameter(s)
        """
        redfish_utils.parse_driver_info(task.node)
Esempio n. 2
0
    def test_parse_driver_info_path_verify_ca(self, mock_path_exists):
        mock_path_exists.return_value = True
        fake_path = '/path/to/a/valid/CA'
        self.node.driver_info['redfish_verify_ca'] = fake_path
        self.parsed_driver_info['verify_ca'] = fake_path

        response = redfish_utils.parse_driver_info(self.node)
        self.assertEqual(self.parsed_driver_info, response)
        mock_path_exists.assert_called_once_with(fake_path)
Esempio n. 3
0
 def test_parse_driver_info_default_scheme_with_port(self):
     self.node.driver_info['redfish_address'] = 'example.com:42'
     self.parsed_driver_info['address'] = 'https://example.com:42'
     response = redfish_utils.parse_driver_info(self.node)
     self.assertEqual(self.parsed_driver_info, response)
Esempio n. 4
0
 def test_parse_driver_info_default_scheme(self):
     self.node.driver_info['redfish_address'] = 'example.com'
     response = redfish_utils.parse_driver_info(self.node)
     self.assertEqual(self.parsed_driver_info, response)
Esempio n. 5
0
 def test_parse_driver_info(self):
     response = redfish_utils.parse_driver_info(self.node)
     self.assertEqual(self.parsed_driver_info, response)