def _cache_provider_details(conn=None):
 DETAILS['avail_locations'] = {}
 DETAILS['avail_sizes'] = {}
 DETAILS['avail_images'] = {}
 locations = avail_locations(conn)
 images = avail_images(conn)
 sizes = avail_sizes(conn)
 for (key, location) in six.iteritems(locations):
  DETAILS['avail_locations'][location['name']] = location
  DETAILS['avail_locations'][key] = location
 for (key, image) in six.iteritems(images):
  DETAILS['avail_images'][image['name']] = image
  DETAILS['avail_images'][key] = image
 for (key, vm_size) in six.iteritems(sizes):
  DETAILS['avail_sizes'][vm_size['name']] = vm_size
  DETAILS['avail_sizes'][key] = vm_size

def _cache_provider_details ( conn = None ) : DETAILS [ 'avail_locations' ] = { } DETAILS [ 'avail_sizes' ] = { } DETAILS [ 'avail_images' ] = { } locations = avail_locations ( conn ) images = avail_images ( conn ) sizes = avail_sizes ( conn ) for ( key , location ) in six . iteritems ( locations ) : DETAILS [ 'avail_locations' ] [ location [ 'name' ] ] = location DETAILS [ 'avail_locations' ] [ key ] = location for ( key , image ) in six . iteritems ( images ) : DETAILS [ 'avail_images' ] [ image [ 'name' ] ] = image DETAILS [ 'avail_images' ] [ key ] = image for ( key , vm_size ) in six . iteritems ( sizes ) : DETAILS [ 'avail_sizes' ] [ vm_size [ 'name' ] ] = vm_size DETAILS [ 'avail_sizes' ] [ key ] = vm_size
provide a place to hang onto results of --list-[locations|sizes|images] so we dont have to go out to the api and get them every time .