CMS 3D CMS Logo

List of all members | Public Member Functions | Public Attributes
query.DDOptionParser Class Reference

Public Member Functions

def __init__ (self)
 
def getOpt (self)
 

Public Attributes

 parser
 

Detailed Description

   DDOptionParser is main class to parse options for L{DDHelper} and L{DDServer}.

Definition at line 15 of file query.py.

Constructor & Destructor Documentation

def query.DDOptionParser.__init__ (   self)

Definition at line 19 of file query.py.

19  def __init__(self):
20  self.parser = OptionParser()
21  self.parser.add_option("--dbsInst",action="store", type="string", dest="dbsInst",
22  help="specify DBS instance to use, e.g. --dbsInst=cms_dbs_prod_global")
23  self.parser.add_option("-v","--verbose",action="store", type="int", default=0, dest="verbose",
24  help="specify verbosity level, 0-none, 1-info, 2-debug")
25  self.parser.add_option("--input",action="store", type="string", default=False, dest="input",
26  help="specify input for your request.")
27  self.parser.add_option("--xml",action="store_true",dest="xml",
28  help="request output in XML format")
29  self.parser.add_option("--cff",action="store_true",dest="cff",
30  help="request output for files in CMS cff format")
31  self.parser.add_option("--host",action="store",type="string",dest="host",
32  help="specify a host name of Data Discovery service, e.g. https://cmsweb.cern.ch/dbs_discovery/")
33  self.parser.add_option("--port",action="store",type="string",dest="port",
34  help="specify a port to be used by Data Discovery host")
35  self.parser.add_option("--iface",action="store",default="dd",type="string",dest="iface",
36  help="specify which interface to use for queries dd or dbsapi, default is dbsapi.")
37  self.parser.add_option("--details",action="store_true",dest="details",
38  help="show detailed output")
39  self.parser.add_option("--case",action="store",default="on",type="string",dest="case",
40  help="specify if your input is case sensitive of not, default is on.")
41  self.parser.add_option("--page",action="store",type="string",default="0",dest="page",
42  help="specify output page, should come together with --limit and --details")
43  self.parser.add_option("--limit",action="store",type="string",default="10",dest="limit",
44  help="specify a limit on output, e.g. 50 results, the --limit=-1 will list all results")
def __init__(self)
Definition: query.py:19

Member Function Documentation

def query.DDOptionParser.getOpt (   self)
Returns parse list of options

Definition at line 45 of file query.py.

45  def getOpt(self):
46  """
47  Returns parse list of options
48  """
49  return self.parser.parse_args()
50 
def getOpt(self)
Definition: query.py:45

Member Data Documentation

query.DDOptionParser.parser

Definition at line 20 of file query.py.