def tenant_absent(name, profile=None, **connection_args):
 ret = {'name': name, 'changes': {}, 'result': True, 'comment': 'Tenant / project "{0}" is already absent'.format(name)}
 tenant = __salt__['keystone.tenant_get'](name=name, profile=profile, **connection_args)
 if ('Error' not in tenant):
  if __opts__.get('test'):
   ret['result'] = None
   ret['comment'] = 'Tenant / project "{0}" will be deleted'.format(name)
   return ret
  __salt__['keystone.tenant_delete'](name=name, profile=profile, **connection_args)
  ret['comment'] = 'Tenant / project "{0}" has been deleted'.format(name)
  ret['changes']['Tenant/Project'] = 'Deleted'
 return ret

def tenant_absent ( name , profile = None , ** connection_args ) : ret = { 'name' : name , 'changes' : { } , 'result' : True , 'comment' : 'Tenant / project "{0}" is already absent' . format ( name ) } tenant = __salt__ [ 'keystone.tenant_get' ] ( name = name , profile = profile , ** connection_args ) if ( 'Error' not in tenant ) : if __opts__ . get ( 'test' ) : ret [ 'result' ] = None ret [ 'comment' ] = 'Tenant / project "{0}" will be deleted' . format ( name ) return ret __salt__ [ 'keystone.tenant_delete' ] ( name = name , profile = profile , ** connection_args ) ret [ 'comment' ] = 'Tenant / project "{0}" has been deleted' . format ( name ) ret [ 'changes' ] [ 'Tenant/Project' ] = 'Deleted' return ret
ensure that the keystone tenant is absent .