def get_deployment_engine_class(provider):
 engine_path = PROVIDER_MAPPING.get(provider, None)
 logger.debug('Loading Deployment Engine for %s: %s', provider, engine_path)
 if (engine_path is None):
  return None
 (module, engine) = engine_path.rsplit('.', 1)
 try:
  _mod = __import__(module, fromlist=[engine])
 except ImportError as e:
  logger.error('Unable to import requested engine (%s) for provider %s', engine, provider)
  logger.error('A required library was missing: %s', e.message)
  logger.error('Please install the library and try again')
 else:
  return getattr(_mod, engine)

def get_deployment_engine_class ( provider ) : engine_path = PROVIDER_MAPPING . get ( provider , None ) logger . debug ( 'Loading Deployment Engine for %s: %s' , provider , engine_path ) if ( engine_path is None ) : return None ( module , engine ) = engine_path . rsplit ( '.' , 1 ) try : _mod = __import__ ( module , fromlist = [ engine ] ) except ImportError as e : logger . error ( 'Unable to import requested engine (%s) for provider %s' , engine , provider ) logger . error ( 'A required library was missing: %s' , e . message ) logger . error ( 'Please install the library and try again' ) else : return getattr ( _mod , engine )
import an engine by name :provider: the provider you want to deploy to :type provider: str :returns: the deployment engine :rtype: cactus .