def minion_config(opts, vm_):
 minion = {'master': 'salt', 'log_level': 'info', 'hash_type': 'sha256'}
 minion['id'] = vm_['name']
 master_finger = salt.config.get_cloud_config_value('master_finger', vm_, opts)
 if (master_finger is not None):
  minion['master_finger'] = master_finger
 minion.update(salt.config.get_cloud_config_value('minion', vm_, opts, default={}, search_global=True))
 make_master = salt.config.get_cloud_config_value('make_master', vm_, opts)
 if (('master' not in minion) and (make_master is not True)):
  raise SaltCloudConfigError("A master setting was not defined in the minion's configuration.")
 minion.setdefault('grains', {}).update(salt.config.get_cloud_config_value('grains', vm_, opts, default={}, search_global=True))
 return minion

def minion_config ( opts , vm_ ) : minion = { 'master' : 'salt' , 'log_level' : 'info' , 'hash_type' : 'sha256' } minion [ 'id' ] = vm_ [ 'name' ] master_finger = salt . config . get_cloud_config_value ( 'master_finger' , vm_ , opts ) if ( master_finger is not None ) : minion [ 'master_finger' ] = master_finger minion . update ( salt . config . get_cloud_config_value ( 'minion' , vm_ , opts , default = { } , search_global = True ) ) make_master = salt . config . get_cloud_config_value ( 'make_master' , vm_ , opts ) if ( ( 'master' not in minion ) and ( make_master is not True ) ) : raise SaltCloudConfigError ( "A master setting was not defined in the minion's configuration." ) minion . setdefault ( 'grains' , { } ) . update ( salt . config . get_cloud_config_value ( 'grains' , vm_ , opts , default = { } , search_global = True ) ) return minion
return a minions configuration for the provided options and vm .