Statistics
| Branch: | Tag: | Revision:

root / lib / wconfd.py @ 93f1e606

History | View | Annotate | Download (1.4 kB)

1 bd2fab62 Petr Pudlak
#
2 bd2fab62 Petr Pudlak
#
3 bd2fab62 Petr Pudlak
4 bd2fab62 Petr Pudlak
# Copyright (C) 2014 Google Inc.
5 bd2fab62 Petr Pudlak
#
6 bd2fab62 Petr Pudlak
# This program is free software; you can redistribute it and/or modify
7 bd2fab62 Petr Pudlak
# it under the terms of the GNU General Public License as published by
8 bd2fab62 Petr Pudlak
# the Free Software Foundation; either version 2 of the License, or
9 bd2fab62 Petr Pudlak
# (at your option) any later version.
10 bd2fab62 Petr Pudlak
#
11 bd2fab62 Petr Pudlak
# This program is distributed in the hope that it will be useful, but
12 bd2fab62 Petr Pudlak
# WITHOUT ANY WARRANTY; without even the implied warranty of
13 bd2fab62 Petr Pudlak
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14 bd2fab62 Petr Pudlak
# General Public License for more details.
15 bd2fab62 Petr Pudlak
#
16 bd2fab62 Petr Pudlak
# You should have received a copy of the GNU General Public License
17 bd2fab62 Petr Pudlak
# along with this program; if not, write to the Free Software
18 bd2fab62 Petr Pudlak
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
19 bd2fab62 Petr Pudlak
# 02110-1301, USA.
20 bd2fab62 Petr Pudlak
21 bd2fab62 Petr Pudlak
22 bd2fab62 Petr Pudlak
"""Module for the WConfd protocol
23 bd2fab62 Petr Pudlak

24 bd2fab62 Petr Pudlak
"""
25 bd2fab62 Petr Pudlak
26 bd2fab62 Petr Pudlak
import ganeti.rpc.client as cl
27 bd2fab62 Petr Pudlak
import ganeti.rpc.stub.wconfd as stub
28 bd2fab62 Petr Pudlak
from ganeti.rpc.transport import Transport
29 bd2fab62 Petr Pudlak
30 bd2fab62 Petr Pudlak
31 bd2fab62 Petr Pudlak
class Client(cl.AbstractStubClient, stub.ClientRpcStub):
32 bd2fab62 Petr Pudlak
  """High-level WConfD client implementation.
33 bd2fab62 Petr Pudlak

34 bd2fab62 Petr Pudlak
  This uses a backing Transport-like class on top of which it
35 bd2fab62 Petr Pudlak
  implements data serialization/deserialization.
36 bd2fab62 Petr Pudlak

37 bd2fab62 Petr Pudlak
  """
38 bd2fab62 Petr Pudlak
  def __init__(self, timeouts=None, transport=Transport):
39 bd2fab62 Petr Pudlak
    """Constructor for the Client class.
40 bd2fab62 Petr Pudlak

41 bd2fab62 Petr Pudlak
    Arguments are the same as for L{AbstractClient}.
42 bd2fab62 Petr Pudlak

43 bd2fab62 Petr Pudlak
    """
44 bd2fab62 Petr Pudlak
    cl.AbstractStubClient.__init__(self, timeouts, transport)
45 bd2fab62 Petr Pudlak
    stub.ClientRpcStub.__init__(self)
46 bd2fab62 Petr Pudlak
    self._InitTransport()