def get_provider(vm_=None):
 if (vm_ is None):
  provider = (__active_provider_name__ or 'ec2')
 else:
  provider = vm_.get('provider', 'ec2')
 if (':' in provider):
  prov_comps = provider.split(':')
  provider = prov_comps[0]
 return provider

def get_provider ( vm_ = None ) : if ( vm_ is None ) : provider = ( __active_provider_name__ or 'ec2' ) else : provider = vm_ . get ( 'provider' , 'ec2' ) if ( ':' in provider ) : prov_comps = provider . split ( ':' ) provider = prov_comps [ 0 ] return provider
get a provider implementation instance by name or id .