def avail(search=None, verbose=False):
 ret = {}
 imgadm = _check_imgadm()
 cmd = '{0} avail -j'.format(imgadm)
 res = __salt__['cmd.run_all'](cmd)
 retcode = res['retcode']
 result = {}
 if (retcode != 0):
  ret['Error'] = _exit_status(retcode)
  return ret
 for image in json.loads(res['stdout']):
  if (image['manifest']['disabled'] or (not image['manifest']['public'])):
   continue
  if (search and (search not in image['manifest']['name'])):
   continue
  result[image['manifest']['uuid']] = _parse_image_meta(image, verbose)
 return result

def avail ( search = None , verbose = False ) : ret = { } imgadm = _check_imgadm ( ) cmd = '{0} avail -j' . format ( imgadm ) res = __salt__ [ 'cmd.run_all' ] ( cmd ) retcode = res [ 'retcode' ] result = { } if ( retcode != 0 ) : ret [ 'Error' ] = _exit_status ( retcode ) return ret for image in json . loads ( res [ 'stdout' ] ) : if ( image [ 'manifest' ] [ 'disabled' ] or ( not image [ 'manifest' ] [ 'public' ] ) ) : continue if ( search and ( search not in image [ 'manifest' ] [ 'name' ] ) ) : continue result [ image [ 'manifest' ] [ 'uuid' ] ] = _parse_image_meta ( image , verbose ) return result
check if a locale is available .