예제 #1
0
    def validate(self, task):
        """Validate the driver_info in the node.

        Check if the driver_info contains correct required fields.

        :param task: a TaskManager instance containing the target node.
        :raises: MissingParameterValue if any required parameters are missing.
        :raises: InvalidParameterValue if any parameters have invalid values.
        """
        msftocs_common.parse_driver_info(task.node)
예제 #2
0
    def validate(self, task):
        """Validate the driver_info in the node.

        Check if the driver_info contains correct required fields.

        :param task: a TaskManager instance containing the target node.
        :raises: MissingParameterValue if any required parameters are missing.
        :raises: InvalidParameterValue if any parameters have invalid values.
        """
        msftocs_common.parse_driver_info(task.node)
예제 #3
0
 def test_parse_driver_info(self, mock_is_valid_url):
     with task_manager.acquire(self.context, self.node.uuid,
                               shared=True) as task:
         msftocs_common.parse_driver_info(task.node)
         mock_is_valid_url.assert_called_once_with(
             task.node.driver_info['msftocs_base_url'])
예제 #4
0
 def test_parse_driver_info(self, mock_is_valid_url):
     with task_manager.acquire(self.context, self.node.uuid,
                               shared=True) as task:
         msftocs_common.parse_driver_info(task.node)
         mock_is_valid_url.assert_called_once_with(
             task.node.driver_info['msftocs_base_url'])