Commit bd2fab62 authored by Petr Pudlak's avatar Petr Pudlak

Add the Python client for WConfD

The client combines the abstract client class and the WConfD
stub to provide a Python interface to WConfD.
Signed-off-by: default avatarPetr Pudlak <pudlak@google.com>
Reviewed-by: default avatarKlaus Aehlig <aehlig@google.com>
parent 81959e7b
......@@ -381,6 +381,7 @@ pkgpython_PYTHON = \
lib/uidpool.py \
lib/vcluster.py \
lib/network.py \
lib/wconfd.py \
lib/workerpool.py
client_PYTHON = \
......
#
#
# Copyright (C) 2014 Google Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
# 02110-1301, USA.
"""Module for the WConfd protocol
"""
import ganeti.rpc.client as cl
import ganeti.rpc.stub.wconfd as stub
from ganeti.rpc.transport import Transport
class Client(cl.AbstractStubClient, stub.ClientRpcStub):
"""High-level WConfD client implementation.
This uses a backing Transport-like class on top of which it
implements data serialization/deserialization.
"""
def __init__(self, timeouts=None, transport=Transport):
"""Constructor for the Client class.
Arguments are the same as for L{AbstractClient}.
"""
cl.AbstractStubClient.__init__(self, timeouts, transport)
stub.ClientRpcStub.__init__(self)
self._InitTransport()
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