Esempio n. 1
0
 def setUp(self):
     super(VirtualMediaDeployUtilsTestCase, self).setUp()
     mgr_utils.mock_the_extension_manager(driver="iscsi_ilo")
     info_dict = db_utils.get_test_ilo_info()
     self.node = obj_utils.create_test_node(self.context,
                                            driver='iscsi_ilo',
                                            driver_info=info_dict)
Esempio n. 2
0
 def setUp(self):
     super(IloCommonMethodsTestCase, self).setUp()
     mgr_utils.mock_the_extension_manager(driver="fake_ilo")
     self.info = db_utils.get_test_ilo_info()
     self.node = obj_utils.create_test_node(self.context,
                                            driver='fake_ilo',
                                            driver_info=self.info)
Esempio n. 3
0
 def setUp(self):
     super(IloValidateParametersTestCase, self).setUp()
     self.node = obj_utils.create_test_node(
         self.context,
         driver='fake_ilo',
         driver_info=db_utils.get_test_ilo_info())
Esempio n. 4
0
from oslo_utils import importutils

from ironic.common import boot_devices
from ironic.common import exception
from ironic.conductor import task_manager
from ironic.drivers.modules.ilo import common as ilo_common
from ironic.drivers.modules.ilo import management as ilo_management
from ironic.drivers.modules import ipmitool
from ironic.tests.conductor import utils as mgr_utils
from ironic.tests.db import base as db_base
from ironic.tests.db import utils as db_utils
from ironic.tests.objects import utils as obj_utils

ilo_error = importutils.try_import('proliantutils.exception')

INFO_DICT = db_utils.get_test_ilo_info()
CONF = cfg.CONF


class IloManagementTestCase(db_base.DbTestCase):

    def setUp(self):
        super(IloManagementTestCase, self).setUp()
        mgr_utils.mock_the_extension_manager(driver="fake_ilo")
        self.node = obj_utils.create_test_node(
            self.context, driver='fake_ilo', driver_info=INFO_DICT)

    def test_get_properties(self):
        with task_manager.acquire(self.context, self.node.uuid,
                                  shared=False) as task:
            expected = ilo_management.MANAGEMENT_PROPERTIES
Esempio n. 5
0
from ironic.drivers.modules import agent
from ironic.drivers.modules import deploy_utils
from ironic.drivers.modules.ilo import common as ilo_common
from ironic.drivers.modules.ilo import deploy as ilo_deploy
from ironic.drivers.modules import iscsi_deploy
from ironic.drivers.modules import pxe
from ironic.drivers import utils as driver_utils
from ironic.openstack.common import importutils
from ironic.tests.conductor import utils as mgr_utils
from ironic.tests.db import base as db_base
from ironic.tests.db import utils as db_utils
from ironic.tests.objects import utils as obj_utils

ilo_client = importutils.try_import('proliantutils.ilo.ribcl')

INFO_DICT = db_utils.get_test_ilo_info()
CONF = cfg.CONF


class IloDeployPrivateMethodsTestCase(db_base.DbTestCase):
    def setUp(self):
        super(IloDeployPrivateMethodsTestCase, self).setUp()
        mgr_utils.mock_the_extension_manager(driver="iscsi_ilo")
        self.node = obj_utils.create_test_node(self.context,
                                               driver='iscsi_ilo',
                                               driver_info=INFO_DICT)

    def test__get_boot_iso_object_name(self):
        boot_iso_actual = ilo_deploy._get_boot_iso_object_name(self.node)
        boot_iso_expected = "boot-%s" % self.node.uuid
        self.assertEqual(boot_iso_expected, boot_iso_actual)
Esempio n. 6
0
 def setUp(self):
     super(IloValidateParametersTestCase, self).setUp()
     self.node = obj_utils.create_test_node(
         self.context, driver="fake_ilo", driver_info=db_utils.get_test_ilo_info()
     )
Esempio n. 7
0
 def setUp(self):
     super(IloCommonMethodsTestCase, self).setUp()
     mgr_utils.mock_the_extension_manager(driver="fake_ilo")
     self.info = db_utils.get_test_ilo_info()
     self.node = obj_utils.create_test_node(self.context, driver="fake_ilo", driver_info=self.info)
Esempio n. 8
0
 def setUp(self):
     super(VirtualMediaDeployUtilsTestCase, self).setUp()
     mgr_utils.mock_the_extension_manager(driver="iscsi_ilo")
     info_dict = db_utils.get_test_ilo_info()
     self.node = obj_utils.create_test_node(self.context,
     driver='iscsi_ilo', driver_info=info_dict)