Esempio n. 1
0
 def __init__(self, auth=None):
     if auth is None:
         auth = {
             'AuthMethod':
             Parameter(str, "Authentication method to use", optional=False)
         }
     Parameter.__init__(self, auth, "API authentication structure")
Esempio n. 2
0
   def __init__(self, fields = {}, filter = {}, doc = "Attribute filter"):
      # Store the filter in our dict instance
      dict.__init__(self, filter)

      # Declare ourselves as a type of parameter that can take
      # either a value or a list of values for each of the specified
      # fields.
      self.fields = dict ( [ ( field, Mixed (expected, [expected]))
                              for (field,expected) in fields.iteritems() ] )

      # Null filter means no filter
      Parameter.__init__(self, self.fields, doc = doc, nullok = True)
Esempio n. 3
0
    def __init__(self, fields={}, filter={}, doc="Attribute filter"):
        # Store the filter in our dict instance
        dict.__init__(self, filter)

        # Declare ourselves as a type of parameter that can take
        # either a value or a list of values for each of the specified
        # fields.
        self.fields = dict([(field, Mixed(expected, [expected]))
                            for (field, expected) in fields.iteritems()])

        # Null filter means no filter
        Parameter.__init__(self, self.fields, doc=doc, nullok=True)
Esempio n. 4
0
 def __init__(self, auth = None):
     if auth is None:
         auth = {'AuthMethod': Parameter(str, "Authentication method to use", optional = False)}
     Parameter.__init__(self, auth, "API authentication structure")