CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups 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 21 of file das.py.

Constructor & Destructor Documentation

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

Definition at line 25 of file das.py.

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

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

Member Data Documentation

das.DASOptionParser.parser

Definition at line 28 of file das.py.