CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Public Attributes
das.DASOptionParser Class Reference

Public Member Functions

def __init__
 
def get_opt
 

Public Attributes

 parser
 

Detailed Description

DAS cache client option parser

Definition at line 20 of file das.py.

Constructor & Destructor Documentation

def das.DASOptionParser.__init__ (   self,
  usage = None 
)

Definition at line 24 of file das.py.

24 
25  def __init__(self, usage = None):
26  if usage is None:
27  usage = 'usage: %prog [options] --query "dataset=/HT/Run2011A-*/AOD"'
28  self.parser = OptionParser(usage=usage)
29  group = OptionGroup(self.parser,"Das options","These options relate to the Das client interface.")
30  group.add_option("-v", "--verbose", action="store",
31  type="int", default=0, dest="verbose",
32  help="verbose output")
33  group.add_option("--query", action="store", type="string",
34  default=False, dest="query",
35  help="specify query for your request")
36  group.add_option("--host", action="store", type="string",
37  default='https://cmsweb.cern.ch', dest="host",
38  help="specify host name of DAS cache server, default https://cmsweb.cern.ch")
39  group.add_option("--idx", action="store", type="int",
40  default=0, dest="idx",
41  help="start index for returned result set, aka pagination, use w/ limit")
42  group.add_option("--limit", action="store", type="int",
43  default=10, dest="limit",
44  help="number of returned results (results per page)")
45  group.add_option("--format", action="store", type="string",
46  default="json", dest="format",
47  help="specify return data format (json or plain), default json")
self.parser.add_option_group(group)

Member Function Documentation

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

Definition at line 48 of file das.py.

48 
49  def get_opt(self):
50  """
51  Returns parse list of options
52  """
53  return self.parser.parse_args()

Member Data Documentation

das.DASOptionParser.parser

Definition at line 27 of file das.py.