def validate_db_config(self): mirrored_engine_ids = self.mirrored_engine_ids if not mirrored_engine_ids: return if self.engine_id in mirrored_engine_ids: raise BadSpecError("mirrored_engine_ids list should not contain engine_id") for engine_id in mirrored_engine_ids: if not connection_manager.engine_id_is_available(engine_id): raise BadSpecError( "DB for engine_id {} is not availble".format(engine_id) ) if not connection_manager.resolves_to_unique_dbs(mirrored_engine_ids + [self.engine_id]): raise BadSpecError("No two engine_ids should point to the same database")