コード例 #1
0
    def validate(self, task):
        """Validate the driver-specific info supplied.

        This method validates if the 'driver_info' property of the supplied
        task's node contains the required information for this driver to
        manage the node.

        :param task: a task from TaskManager.
        """
        common.parse_driver_info(task.node)
コード例 #2
0
ファイル: power.py プロジェクト: michaeltchapman/ironic
    def validate(self, task):
        """Validate the driver-specific info supplied.

        This method validates if the 'driver_info' property of the supplied
        task's node contains the required information for this driver to
        manage the power state of the node.

        :param task: a task from TaskManager.
        """
        common.parse_driver_info(task.node)
コード例 #3
0
 def test_parse_driver_info_get_param_from_config(self):
     del self.node.driver_info['xclarity_manager_ip']
     del self.node.driver_info['xclarity_username']
     del self.node.driver_info['xclarity_password']
     self.config(manager_ip='5.6.7.8', group='xclarity')
     self.config(username='******', group='xclarity')
     self.config(password='******', group='xclarity')
     info = common.parse_driver_info(self.node)
     self.assertEqual('5.6.7.8', info['xclarity_manager_ip'])
     self.assertEqual('user', info['xclarity_username'])
     self.assertEqual('password', info['xclarity_password'])
コード例 #4
0
 def test_parse_driver_info(self):
     info = common.parse_driver_info(self.node)
     self.assertEqual(INFO_DICT['xclarity_manager_ip'],
                      info['xclarity_manager_ip'])
     self.assertEqual(INFO_DICT['xclarity_username'],
                      info['xclarity_username'])
     self.assertEqual(INFO_DICT['xclarity_password'],
                      info['xclarity_password'])
     self.assertEqual(INFO_DICT['xclarity_port'], info['xclarity_port'])
     self.assertEqual(INFO_DICT['xclarity_hardware_id'],
                      info['xclarity_hardware_id'])
コード例 #5
0
ファイル: test_common.py プロジェクト: michaeltchapman/ironic
 def test_parse_driver_info_get_param_from_config(self):
     del self.node.driver_info['xclarity_manager_ip']
     del self.node.driver_info['xclarity_username']
     del self.node.driver_info['xclarity_password']
     self.config(manager_ip='5.6.7.8', group='xclarity')
     self.config(username='******', group='xclarity')
     self.config(password='******', group='xclarity')
     info = common.parse_driver_info(self.node)
     self.assertEqual('5.6.7.8', info['xclarity_manager_ip'])
     self.assertEqual('user', info['xclarity_username'])
     self.assertEqual('password', info['xclarity_password'])
コード例 #6
0
ファイル: test_common.py プロジェクト: michaeltchapman/ironic
 def test_parse_driver_info(self):
     info = common.parse_driver_info(self.node)
     self.assertEqual(INFO_DICT['xclarity_manager_ip'],
                      info['xclarity_manager_ip'])
     self.assertEqual(INFO_DICT['xclarity_username'],
                      info['xclarity_username'])
     self.assertEqual(INFO_DICT['xclarity_password'],
                      info['xclarity_password'])
     self.assertEqual(INFO_DICT['xclarity_port'], info['xclarity_port'])
     self.assertEqual(INFO_DICT['xclarity_hardware_id'],
                      info['xclarity_hardware_id'])