def grains():
 if (not DETAILS.get('grains_cache', {})):
  r = salt.utils.http.query((DETAILS['url'] + 'info'), decode_type='json', decode=True)
  DETAILS['grains_cache'] = r['dict']
 return DETAILS['grains_cache']

def grains ( ) : if ( not DETAILS . get ( 'grains_cache' , { } ) ) : r = salt . utils . http . query ( ( DETAILS [ 'url' ] + 'info' ) , decode_type = 'json' , decode = True ) DETAILS [ 'grains_cache' ] = r [ 'dict' ] return DETAILS [ 'grains_cache' ]
get the grains from the proxy device .