def get_source_type(context, id): """Retrieves single source type by ID.""" check_policy(context, 'get_source_type') if id is None: msg = _("ID cannot be None") raise exception.InvalidSourceType(reason=msg) return db.source_type_get(context, id)
def get_source_type(context, id): """Retrieves single source type by ID.""" check_policy(context, 'get_source_type') if id is None: msg = _("ID cannot be None") raise exception.InvalidSourceType(reason=msg) return db.source_type_get(context, id)
def _get_driver_from_source(self, context, source): source_type_id = source.get('source_type_id') con_string = source.get('connection_params') source_type = db.source_type_get(context, source_type_id) source_driver_path = source_type.get('driver_class_path') return self._get_migration_driver(context, source_driver_path, con_string)
def _get_driver_from_source(self, context, source): source_type_id = source.get('source_type_id') con_string = source.get('connection_params') source_type = db.source_type_get(context, source_type_id) source_driver_path = source_type.get('driver_class_path') return self._get_migration_driver(context, source_driver_path, con_string)
def get_source_type(ctxt, id): """Retrieves single source type by ID.""" if id is None: msg = _("ID cannot be None") raise exception.InvalidSourceType(reason=msg) if ctxt is None: ctxt = context.get_admin_context() return db.source_type_get(ctxt, id)