def image_absent(name):
 ret = {'name': name, 'changes': {}, 'result': None, 'comment': ''}
 if (name not in __salt__['imgadm.list']()):
  ret['result'] = True
  ret['comment'] = 'image {0} is absent'.format(name)
 elif (name in __salt__['vmadm.list'](order='image_uuid')):
  ret['result'] = False
  ret['comment'] = 'image {0} currently in use by a vm'.format(name)
 else:
  if __opts__['test']:
   ret['result'] = True
  else:
   __salt__['imgadm.delete'](name)
   ret['result'] = (name not in __salt__['imgadm.list']())
  ret['comment'] = 'image {0} deleted'.format(name)
  ret['changes'][name] = None
 return ret

def image_absent ( name ) : ret = { 'name' : name , 'changes' : { } , 'result' : None , 'comment' : '' } if ( name not in __salt__ [ 'imgadm.list' ] ( ) ) : ret [ 'result' ] = True ret [ 'comment' ] = 'image {0} is absent' . format ( name ) elif ( name in __salt__ [ 'vmadm.list' ] ( order = 'image_uuid' ) ) : ret [ 'result' ] = False ret [ 'comment' ] = 'image {0} currently in use by a vm' . format ( name ) else : if __opts__ [ 'test' ] : ret [ 'result' ] = True else : __salt__ [ 'imgadm.delete' ] ( name ) ret [ 'result' ] = ( name not in __salt__ [ 'imgadm.list' ] ( ) ) ret [ 'comment' ] = 'image {0} deleted' . format ( name ) ret [ 'changes' ] [ name ] = None return ret
ensure image is absent on the computenode name : string uuid of image .