<s> from nova . utils import import_object <EOL> from nova . rpc . common import RemoteError , LOG <EOL> from nova import flags <EOL> FLAGS = flags . FLAGS <EOL> flags . DEFINE_string ( '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> "<STR_LIT>" ) <EOL> _RPCIMPL = None <EOL> def get_impl ( ) : <EOL> """<STR_LIT>""" <EOL> global _RPCIMPL <EOL> if _RPCIMPL is None : <EOL> _RPCIMPL = import_object ( FLAGS . rpc_backend ) <EOL> return _RPCIMPL <EOL> def create_connection ( new = True ) : <EOL> return get_impl ( ) . create_connection ( new = new ) <EOL> def call ( context , topic , msg ) : <EOL> return get_impl ( ) . call ( context , topic , msg ) <EOL> def cast ( context , topic , msg ) : <EOL> return get_impl ( ) . cast ( context , topic , msg ) <EOL> def fanout_cast ( context , topic , msg ) : <EOL> return get_impl ( ) . fanout_cast ( context , topic , msg ) <EOL> def multicall ( context , topic , msg ) : <EOL> return get_impl ( ) . multicall ( context , topic , msg ) </s>
