From 18d750b9d0c7de2c74e7b2ff4cf1e0c0e730e5e9 Mon Sep 17 00:00:00 2001 From: Guido Trotter <ultrotter@google.com> Date: Wed, 5 Aug 2009 13:30:51 +0100 Subject: [PATCH] Confd{Request,Reply} objects These objects are used to store confd queries and replies. Signed-off-by: Guido Trotter <ultrotter@google.com> Reviewed-by: Iustin Pop <iustin@google.com> --- lib/objects.py | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/lib/objects.py b/lib/objects.py index 6524d135f..6f99a81d6 100644 --- a/lib/objects.py +++ b/lib/objects.py @@ -878,6 +878,40 @@ class BlockDevStatus(ConfigObject): ] +class ConfdRequest(ConfigObject): + """Object holding a confd request. + + @ivar protocol: confd protocol version + @ivar type: confd query type + @ivar query: query request + @ivar rsalt: requested reply salt + + """ + __slots__ = [ + "protocol", + "type", + "query", + "rsalt", + ] + + +class ConfdReply(ConfigObject): + """Object holding a confd reply. + + @ivar protocol: confd protocol version + @ivar status: reply status code (ok, error) + @ivar answer: confd query reply + @ivar serial: configuration serial number + + """ + __slots__ = [ + "protocol", + "status", + "answer", + "serial", + ] + + class SerializableConfigParser(ConfigParser.SafeConfigParser): """Simple wrapper over ConfigParse that allows serialization. -- GitLab