def setUp(self): super(ConsoleAPITestCase, self).setUp() self.context = context.RequestContext('fake', 'fake') self.console_api = console_api.API() self.fake_uuid = '00000000-aaaa-bbbb-cccc-000000000000' self.fake_instance = { 'id': 1, 'uuid': self.fake_uuid, 'host': 'fake_host' } self.fake_console = {'pool': {'host': 'fake_host'}, 'id': 'fake_id'} def _fake_db_console_get(_ctxt, _console_uuid, _instance_uuid): return self.fake_console self.stubs.Set(db, 'console_get', _fake_db_console_get) def _fake_db_console_get_all_by_instance(_ctxt, _instance_uuid, columns_to_join): return [self.fake_console] self.stubs.Set(db, 'console_get_all_by_instance', _fake_db_console_get_all_by_instance) def _fake_instance_get_by_uuid(_ctxt, _instance_uuid): return self.fake_instance self.stubs.Set(db, 'instance_get_by_uuid', _fake_instance_get_by_uuid)
def __init__(self): self.data_path = tempfile.mkdtemp(prefix='nova-coverage_') data_out = os.path.join(self.data_path, '.nova-coverage') self.coverInst = coverage.coverage(data_file=data_out) self.compute_api = compute_api.API() self.network_api = network_api.API() self.conductor_api = conductor_api.API() self.consoleauth_api = consoleauth_api.ConsoleAuthAPI() self.console_api = console_api.API() self.scheduler_api = scheduler_api.SchedulerAPI() self.cert_api = cert_api.CertAPI() self.services = [] self.combine = False super(CoverageController, self).__init__()
def __init__(self): self.data_path = tempfile.mkdtemp(prefix='nova-coverage_') self.compute_api = compute_api.API() self.network_api = network_api.API() self.conductor_api = conductor_api.API() self.consoleauth_api = consoleauth_api.ConsoleAuthAPI() self.console_api = console_api.API() self.scheduler_api = scheduler_api.SchedulerAPI() self.cert_api = cert_api.CertAPI() self.services = [] self.combine = False self._cover_inst = None self.host = CONF.host super(CoverageController, self).__init__()
def __init__(self): self.console_api = console_api.API()
def __init__(self): super(ConsolesController, self).__init__() self.console_api = console_api.API()