Classes | Namespaces | Functions | Variables
cache_state.py File Reference

Go to the source code of this file.

Classes

class  cache_state.ProgressBar
 

Namespaces

 cache_state
 

Functions

def cache_state.make_curl ()
 
def cache_state.filename_to_namespace (filename)
 
def cache_state.get_file_qos (c, filename)
 
def cache_state.is_file_online (c, filename)
 
def cache_state.request_prestage (c, filename)
 
def cache_state.is_file_online_pnfs (f)
 
def cache_state.FilelistCacheCount (files, verbose_flag, METHOD="rest")
 
def cache_state.FilelistPrestageRequest (files, verbose_flag)
 
def cache_state.enstore_locations_to_paths (samlist, sparsification=1)
 

Variables

 cache_state.X509_USER_PROXY = os.getenv("X509_USER_PROXY", "/tmp/x509up_u%d" % os.getuid())
 
 cache_state.PNFS_DIR_PATTERN = re.compile(r"/pnfs/(?P<area>[^/]+)")
 
 cache_state.ENSTORE_PATTERN = re.compile(r"^enstore:([^(]+)(\([^)]+\))?")
 
string cache_state.DCACHE_REST_BASE_URL = "https://fndca.fnal.gov:3880/api/v1/namespace"
 
 cache_state.parser = argparse.ArgumentParser(epilog=examples, formatter_class=argparse.RawDescriptionHelpFormatter)
 
 cache_state.gp = parser.add_mutually_exclusive_group()
 
 cache_state.nargs
 
 cache_state.default
 
 cache_state.metavar
 
 cache_state.help
 
 cache_state.dest
 
 cache_state.type
 
 cache_state.int
 
 cache_state.action
 
 cache_state.False
 
 cache_state.choices
 
 cache_state.args = parser.parse_args()
 
 cache_state.stdout
 
 cache_state.stderr
 
 cache_state.filelist = Noneifargs.dataset_nameelseargs.files
 
 cache_state.sam = swc.SAMWebClient("dune")
 
int cache_state.cache_count = 0
 
 cache_state.dataset_name
 
 cache_state.end
 
 cache_state.dimensions = None
 
 cache_state.samlist = sam.listFilesAndLocations(dimensions=dimensions, filter_path="enstore")
 
 cache_state.thislist = sam.listFiles(defname=args.dataset_name)
 
int cache_state.a = 0
 
 cache_state.locs = sam.locateFile(f)
 
 cache_state.l = loc["location"]
 
 cache_state.m = ENSTORE_PATTERN.match(l)
 
 cache_state.directory = m.group(1)
 
 cache_state.fullpath = os.path.join(directory, f)
 
 cache_state.f
 
 cache_state.file
 
int cache_state.miss_count = 0
 
 cache_state.n_files = len(filelist)
 
int cache_state.announce = n_files>1
 
 cache_state.ngood
 
 cache_state.n
 
 cache_state.pending_count
 
 cache_state.total = float(cache_count + miss_count)
 
int cache_state.cache_frac_str = (" (%d%%)" % round(cache_count/total*100))iftotal>0
 
int cache_state.miss_frac_str = (" (%d%%)" % round(miss_count/total*100))iftotal>0
 
string cache_state.pending_string = ""