CMS 3D CMS Logo

List of all members | Public Member Functions | Public Attributes
das_client.DASOptionParser Class Reference

Public Member Functions

def __init__ (self)
 
def get_opt (self)
 

Public Attributes

 parser
 

Detailed Description

DAS cache client option parser

Definition at line 108 of file das_client.py.

Constructor & Destructor Documentation

◆ __init__()

def das_client.DASOptionParser.__init__ (   self)

Definition at line 112 of file das_client.py.

112  def __init__(self):
113  usage = "Usage: %prog [options]\n"
114  usage += "For more help please visit https://cmsweb.cern.ch/das/faq"
115  self.parser = OptionParser(usage=usage)
116  self.parser.add_option("-v", "--verbose", action="store",
117  type="int", default=0, dest="verbose",
118  help="verbose output")
119  self.parser.add_option("--query", action="store", type="string",
120  default=False, dest="query",
121  help="specify query for your request")
122  msg = "host name of DAS cache server, default is https://cmsweb.cern.ch"
123  self.parser.add_option("--host", action="store", type="string",
124  default='https://cmsweb.cern.ch', dest="host", help=msg)
125  msg = "start index for returned result set, aka pagination,"
126  msg += " use w/ limit (default is 0)"
127  self.parser.add_option("--idx", action="store", type="int",
128  default=0, dest="idx", help=msg)
129  msg = "number of returned results (default is 10),"
130  msg += " use --limit=0 to show all results"
131  self.parser.add_option("--limit", action="store", type="int",
132  default=10, dest="limit", help=msg)
133  msg = 'specify return data format (json or plain), default plain.'
134  self.parser.add_option("--format", action="store", type="string",
135  default="plain", dest="format", help=msg)
136  msg = 'query waiting threshold in sec, default is 5 minutes'
137  self.parser.add_option("--threshold", action="store", type="int",
138  default=300, dest="threshold", help=msg)
139  msg = 'specify private key file name, default $X509_USER_PROXY'
140  self.parser.add_option("--key", action="store", type="string",
141  default=x509(), dest="ckey", help=msg)
142  msg = 'specify private certificate file name, default $X509_USER_PROXY'
143  self.parser.add_option("--cert", action="store", type="string",
144  default=x509(), dest="cert", help=msg)
145  msg = 'specify CA path, default $X509_CERT_DIR'
146  self.parser.add_option("--capath", action="store", type="string",
147  default=os.environ.get("X509_CERT_DIR", ""),
148  dest="capath", help=msg)
149  msg = 'specify number of retries upon busy DAS server message'
150  self.parser.add_option("--retry", action="store", type="string",
151  default=0, dest="retry", help=msg)
152  msg = 'show DAS headers in JSON format'
153  msg += ' (obsolete, keep for backward compatibility)'
154  self.parser.add_option("--das-headers", action="store_true",
155  default=False, dest="das_headers", help=msg)
156  msg = 'specify power base for size_format, default is 10 (can be 2)'
157  self.parser.add_option("--base", action="store", type="int",
158  default=0, dest="base", help=msg)
159 
160  msg = 'a file which contains a cached json dictionary for query -> files mapping'
161  self.parser.add_option("--cache", action="store", type="string",
162  default=None, dest="cache", help=msg)
163 
164  msg = 'a query cache value'
165  self.parser.add_option("--query-cache", action="store", type="int",
166  default=0, dest="qcache", help=msg)
167  msg = 'List DAS key/attributes, use "all" or specific DAS key value, e.g. site'
168  self.parser.add_option("--list-attributes", action="store", type="string",
169  default="", dest="keys_attrs", help=msg)
def __init__(self, dataset, job_number, job_id, job_name, isDA, isMC, applyBOWS, applyEXTRACOND, extraconditions, runboundary, lumilist, intlumi, maxevents, gt, allFromGT, alignmentDB, alignmentTAG, apeDB, apeTAG, bowDB, bowTAG, vertextype, tracktype, refittertype, ttrhtype, applyruncontrol, ptcut, CMSSW_dir, the_dir)
def x509()
Definition: das_client.py:85

Member Function Documentation

◆ get_opt()

def das_client.DASOptionParser.get_opt (   self)
Returns parse list of options

Definition at line 170 of file das_client.py.

References main.parse_args(), query.DDOptionParser.parser, batchHippy.MyBatchManager.parser, XMLDOMBlock.parser, and das_client.DASOptionParser.parser.

170  def get_opt(self):
171  """
172  Returns parse list of options
173  """
174  return self.parser.parse_args()
175 
def parse_args(args)
Definition: main.py:63

Member Data Documentation

◆ parser

das_client.DASOptionParser.parser