def license_absent(name):
 ret = {'name': name, 'changes': {}, 'result': False, 'comment': ''}
 if (not __salt__['powerpath.has_powerpath']()):
  ret['result'] = False
  ret['comment'] = 'PowerPath is not installed.'
  return ret
 licenses = [l['key'] for l in __salt__['powerpath.list_licenses']()]
 if (name not in licenses):
  ret['result'] = True
  ret['comment'] = 'License key {0} not present'.format(name)
  return ret
 if __opts__['test']:
  ret['result'] = None
  ret['comment'] = 'License key {0} is set to be removed'.format(name)
  return ret
 data = __salt__['powerpath.remove_license'](name)
 if data['result']:
  ret['changes'] = {name: 'removed'}
  ret['result'] = True
  ret['comment'] = data['output']
  return ret
 else:
  ret['result'] = False
  ret['comment'] = data['output']
  return ret

def license_absent ( name ) : ret = { 'name' : name , 'changes' : { } , 'result' : False , 'comment' : '' } if ( not __salt__ [ 'powerpath.has_powerpath' ] ( ) ) : ret [ 'result' ] = False ret [ 'comment' ] = 'PowerPath is not installed.' return ret licenses = [ l [ 'key' ] for l in __salt__ [ 'powerpath.list_licenses' ] ( ) ] if ( name not in licenses ) : ret [ 'result' ] = True ret [ 'comment' ] = 'License key {0} not present' . format ( name ) return ret if __opts__ [ 'test' ] : ret [ 'result' ] = None ret [ 'comment' ] = 'License key {0} is set to be removed' . format ( name ) return ret data = __salt__ [ 'powerpath.remove_license' ] ( name ) if data [ 'result' ] : ret [ 'changes' ] = { name : 'removed' } ret [ 'result' ] = True ret [ 'comment' ] = data [ 'output' ] return ret else : ret [ 'result' ] = False ret [ 'comment' ] = data [ 'output' ] return ret
ensures that the specified powerpath license key is absent on the host .