Revision 23824641 lib/confd/querylib.py

b/lib/confd/querylib.py
212 212
class InstancesIpsQuery(ConfdQuery):
213 213
  """A query for instances IPs.
214 214

  
215
  It returns the list of instances IPs.
215
  It returns the list of IPs of NICs connected to the requested link or all the
216
  instances IPs if no link is submitted.
216 217

  
217 218
  """
218 219
  def Exec(self, query):
219 220
    """InstancesIpsQuery main execution.
220 221

  
221 222
    """
222
    if query is None:
223
      status = constants.CONFD_REPL_STATUS_OK
224
      answer = self.reader.GetInstancesIps()
225
    else:
226
      status = constants.CONFD_REPL_STATUS_ERROR
227
      answer = "non-empty instances IPs query"
223
    link = query
224
    status = constants.CONFD_REPL_STATUS_OK
225
    answer = self.reader.GetInstancesIps(link)
228 226

  
229 227
    return status, answer
230 228

  

Also available in: Unified diff