Commit 24d6d3e2 authored by Michael Hanselmann's avatar Michael Hanselmann
Browse files

objects: Add definitions for query requests and responses



Also update description of QueryFieldDefinition.name.
Signed-off-by: default avatarMichael Hanselmann <hansmi@google.com>
Reviewed-by: default avatarRené Nussbaumer <rn@google.com>
parent 60cba7f8
......@@ -1380,7 +1380,7 @@ class ConfdReply(ConfigObject):
class QueryFieldDefinition(ConfigObject):
"""Object holding a query field definition.
@ivar name: Field name as a regular expression
@ivar name: Field name
@ivar title: Human-readable title
@ivar kind: Field type
......@@ -1392,6 +1392,51 @@ class QueryFieldDefinition(ConfigObject):
]
class QueryRequest(ConfigObject):
"""Object holding a query request.
"""
__slots__ = [
"what",
"fields",
"filter",
]
class QueryResponse(ConfigObject):
"""Object holding the response to a query.
@ivar fields: List of L{QueryFieldDefinition} objects
@ivar data: Requested data
"""
__slots__ = [
"fields",
"data",
]
class QueryFieldsRequest(ConfigObject):
"""Object holding a request for querying available fields.
"""
__slots__ = [
"what",
"fields",
]
class QueryFieldsResponse(ConfigObject):
"""Object holding the response to a query for fields.
@ivar fields: List of L{QueryFieldDefinition} objects
"""
__slots__ = [
"fields",
]
class SerializableConfigParser(ConfigParser.SafeConfigParser):
"""Simple wrapper over ConfigParse that allows serialization.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment