예제 #1
0
    def validate(self, task):
        """Check that node 'driver_info' is valid.

        Check that node 'driver_info' contains the required fields.

        :param task: instance of `ironic.manager.task_manager.TaskManager`.
        :raises: MissingParameterValue if required CiscoDriver parameters
            are missing.
        """
        ucs_helper.parse_driver_info(task.node)
예제 #2
0
    def validate(self, task):
        """Check that node 'driver_info' is valid.

        Check that node 'driver_info' contains the required fields.

        :param task: instance of `ironic.manager.task_manager.TaskManager`.
        :raises: MissingParameterValue if required CiscoDriver parameters
            are missing.
        """
        ucs_helper.parse_driver_info(task.node)
예제 #3
0
    def validate(self, task):
        """Check that 'driver_info' contains UCSM login credentials.

        Validates whether the 'driver_info' property of the supplied
        task's node contains the required credentials information.

        :param task: a task from TaskManager.
        :raises: MissingParameterValue if a required parameter is missing
        """

        ucs_helper.parse_driver_info(task.node)
예제 #4
0
    def test_parse_driver_info(self):
        info = ucs_helper.parse_driver_info(self.node)

        self.assertIsNotNone(info.get('ucs_address'))
        self.assertIsNotNone(info.get('ucs_username'))
        self.assertIsNotNone(info.get('ucs_password'))
        self.assertIsNotNone(info.get('ucs_service_profile'))
예제 #5
0
    def test_parse_driver_info(self):
        info = ucs_helper.parse_driver_info(self.node)

        self.assertIsNotNone(info.get('ucs_address'))
        self.assertIsNotNone(info.get('ucs_username'))
        self.assertIsNotNone(info.get('ucs_password'))
        self.assertIsNotNone(info.get('ucs_service_profile'))
예제 #6
0
    def test_parse_driver_info(self):
        info = ucs_helper.parse_driver_info(self.node)

        self.assertEqual(INFO_DICT['ucs_address'], info['ucs_address'])
        self.assertEqual(INFO_DICT['ucs_username'], info['ucs_username'])
        self.assertEqual(INFO_DICT['ucs_password'], info['ucs_password'])
        self.assertEqual(INFO_DICT['ucs_service_profile'],
                         info['ucs_service_profile'])
예제 #7
0
    def test_parse_driver_info(self):
        info = ucs_helper.parse_driver_info(self.node)

        self.assertEqual(self.info['ucs_address'], info['ucs_address'])
        self.assertEqual(self.info['ucs_username'], info['ucs_username'])
        self.assertEqual(self.info['ucs_password'], info['ucs_password'])
        self.assertEqual(self.info['ucs_service_profile'],
                         info['ucs_service_profile'])