<s> """<STR_LIT>""" <EOL> import sys <EOL> import traceback <EOL> from oslo_log import log as logging <EOL> from oslo_reports import guru_meditation_report as gmr <EOL> from nova . conductor import rpcapi as conductor_rpcapi <EOL> import nova . conf <EOL> from nova import config <EOL> import nova . db . api <EOL> from nova import exception <EOL> from nova . i18n import _LE , _LW <EOL> from nova import objects <EOL> from nova . objects import base as objects_base <EOL> from nova import service <EOL> from nova import utils <EOL> from nova import version <EOL> CONF = nova . conf . CONF <EOL> CONF . import_opt ( '<STR_LIT>' , '<STR_LIT>' ) <EOL> LOG = logging . getLogger ( '<STR_LIT>' ) <EOL> def block_db_access ( ) : <EOL> class NoDB ( object ) : <EOL> def __getattr__ ( self , attr ) : <EOL> return self <EOL> def __call__ ( self , * args , ** kwargs ) : <EOL> stacktrace = "<STR_LIT>" . join ( traceback . format_stack ( ) ) <EOL> LOG . error ( _LE ( '<STR_LIT>' ) , <EOL> stacktrace ) <EOL> raise exception . DBNotAllowed ( '<STR_LIT>' ) <EOL> nova . db . api . IMPL = NoDB ( ) <EOL> def main ( ) : <EOL> config . parse_args ( sys . argv ) <EOL> logging . setup ( CONF , "<STR_LIT>" ) <EOL> utils . monkey_patch ( ) <EOL> objects . register_all ( ) <EOL> gmr . TextGuruMeditation . setup_autorun ( version ) <EOL> if not CONF . conductor . use_local : <EOL> block_db_access ( ) <EOL> objects_base . NovaObject . indirection_api = conductor_rpcapi . ConductorAPI ( ) <EOL> else : <EOL> LOG . warning ( _LW ( '<STR_LIT>' <EOL> '<STR_LIT>' ) ) <EOL> LOG . warning ( _LW ( '<STR_LIT>' <EOL> '<STR_LIT>' ) ) <EOL> server = service . Service . create ( binary = '<STR_LIT>' , <EOL> topic = CONF . network_topic , <EOL> db_allowed = CONF . conductor . use_local ) <EOL> service . serve ( server ) <EOL> service . wait ( ) </s>
