Revision d36e433d lib/rpc/client.py

b/lib/rpc/client.py
25 25

  
26 26
import logging
27 27

  
28
from ganeti import pathutils
29 28
import ganeti.rpc.transport as t
30 29

  
31 30
from ganeti import constants
......
157 156

  
158 157
  """
159 158

  
160
  def __init__(self, address=None, timeouts=None,
161
               transport=t.Transport):
159
  def __init__(self, timeouts=None, transport=t.Transport):
162 160
    """Constructor for the Client class.
163 161

  
164 162
    Arguments:
......
171 169
    class are used.
172 170

  
173 171
    """
174
    if address is None:
175
      address = pathutils.QUERY_SOCKET
176
    self.address = address
177 172
    self.timeouts = timeouts
178 173
    self.transport_class = transport
179 174
    self.transport = None
180
    self._InitTransport()
181 175
    # The version used in RPC communication, by default unused:
182 176
    self.version = None
183 177

  
178
  def _GetAddress(self):
179
    """Returns the socket address
180

  
181
    """
182
    raise NotImplementedError
183

  
184 184
  def _InitTransport(self):
185 185
    """(Re)initialize the transport if needed.
186 186

  
187 187
    """
188 188
    if self.transport is None:
189
      self.transport = self.transport_class(self.address,
189
      self.transport = self.transport_class(self._GetAddress(),
190 190
                                            timeouts=self.timeouts)
191 191

  
192 192
  def _CloseTransport(self):

Also available in: Unified diff