CMS 3D CMS Logo

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

Public Member Functions

def __init__ (self, usage=None)
 
def get_opt (self)
 

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

Member Function Documentation

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

Definition at line 48 of file das.py.

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

Member Data Documentation

das.DASOptionParser.parser

Definition at line 27 of file das.py.