def setUp(self):
     super(ManagerTestCase, self).setUp()
     self.service = manager.ConductorManager('test-host', 'test-topic')
     self.service.dbapi = dbapi.get_instance()
     self.context = context.get_admin_context()
     self.dbapi = dbapi.get_instance()
     self.system = utils.create_test_isystem()
     self.load = utils.create_test_load()
Beispiel #2
0
def main():
    if sanity_coverage.flag_file_exists():
        sanity_coverage.start()
    # Pase config file and command line options, then start logging
    sysinv_service.prepare_service(sys.argv)

    mgr = manager.ConductorManager(CONF.host, manager.MANAGER_TOPIC)
    launcher = service.launch(mgr)
    launcher.wait()
 def setUp(self):
     super(StorageTierDependentTCs, self).setUp()
     self.mock_set_crushmap = self.set_crushmap_patcher.start()
     self.service = manager.ConductorManager('test-host', 'test-topic')
     self.service.dbapi = dbapi.get_instance()
     self.context = context.get_admin_context()
     self.dbapi = dbapi.get_instance()
     self.system = dbutils.create_test_isystem()
     self.load = dbutils.create_test_load()
     self.host_index = -1
     self.mon_index = -1
Beispiel #4
0
    def setUp(self):
        super(UpdateCephCluster, self).setUp()
        self.service = manager.ConductorManager('test-host', 'test-topic')
        self.service.dbapi = dbapi.get_instance()
        self.context = context.get_admin_context()
        self.dbapi = dbapi.get_instance()
        self.system = utils.create_test_isystem()
        self.load = utils.create_test_load()
        self.host_index = -1

        self.mock_upgrade_downgrade_kube_components = self.upgrade_downgrade_kube_components_patcher.start(
        )
Beispiel #5
0
    def setUp(self):
        super(AppOperatorTestCase, self).setUp()

        # Manager holds apps_metadata dict
        self.service = manager.ConductorManager('test-host', 'test-topic')

        # Set up objects for testing
        self.helm_operator = helm.HelmOperator(dbapi.get_instance())
        self.app_operator = kube_app.AppOperator(dbapi.get_instance(),
                                                 self.helm_operator,
                                                 self.service.apps_metadata)
        self.context = context.get_admin_context()
        self.dbapi = dbapi.get_instance()
        self.temp_dir = self.useFixture(fixtures.TempDir())
Beispiel #6
0
    def setUp(self):
        super(RestoreTestCase, self).setUp()

        # Set up objects for testing
        self.service = manager.ConductorManager('test-host', 'test-topic')
        self.service.dbapi = dbapi.get_instance()
        self.context = context.get_admin_context()
        self.valid_restore_states = [
            constants.RESTORE_PROGRESS_ALREADY_COMPLETED,
            constants.RESTORE_PROGRESS_STARTED,
            constants.RESTORE_PROGRESS_ALREADY_IN_PROGRESS,
            constants.RESTORE_PROGRESS_NOT_IN_PROGRESS,
            constants.RESTORE_PROGRESS_IN_PROGRESS,
            constants.RESTORE_PROGRESS_COMPLETED
        ]
Beispiel #7
0
    def setUp(self):
        super(UpdateCephCluster, self).setUp()
        self.service = manager.ConductorManager('test-host', 'test-topic')
        self.service.dbapi = dbapi.get_instance()
        self.context = context.get_admin_context()
        self.dbapi = dbapi.get_instance()
        self.system = utils.create_test_isystem()
        self.load = utils.create_test_load()
        self.host_index = -1

        self.mock_upgrade_downgrade_kube_components = self.upgrade_downgrade_kube_components_patcher.start(
        )
        self.mock_fix_crushmap = self.fix_crushmap_patcher.start()
        self.mock_fix_crushmap.return_value = True

        self.service._sx_to_dx_post_migration_actions = mock.Mock()
Beispiel #8
0
    def setUp(self):
        super(StorageTierDependentTCs, self).setUp()
        self.mock_set_crushmap = self.set_crushmap_patcher.start()
        self.set_monitors_status_patcher = self.set_monitors_status_patcher.start()
        self.set_monitors_status_patcher.return_value = \
            [3, 2, ['controller-0', 'controller-1', 'storage-0']]
        self.set_is_initial_config_patcher = self.set_is_initial_config_patcher.start()
        self.set_is_initial_config_patcher.return_value = True
        self.service = manager.ConductorManager('test-host', 'test-topic')
        self.service.dbapi = dbapi.get_instance()
        self.context = context.get_admin_context()
        self.dbapi = dbapi.get_instance()
        self.system = dbutils.create_test_isystem()
        self.load = dbutils.create_test_load()
        self.host_index = -1
        self.mon_index = -1

        self.mock_upgrade_downgrade_kube_components = self.upgrade_downgrade_kube_components_patcher.start()
Beispiel #9
0
    def setUp(self):
        super(TestKubeAppMetadata, self).setUp()

        # Manager holds apps_metadata dict
        self.service = manager.ConductorManager('test-host', 'test-topic')