Revision a8740a25 lib/query.py

b/lib/query.py
2511 2511
  """Builds list of fields for network queries.
2512 2512

  
2513 2513
  """
2514
  # Add simple fields
2515 2514
  fields = [
2515
    (_MakeField("tags", "Tags", QFT_OTHER, "Tags"), IQ_CONFIG, 0,
2516
     lambda ctx, inst: list(inst.GetTags())),
2517
    ]
2518

  
2519
  # Add simple fields
2520
  fields.extend([
2516 2521
    (_MakeField(name, title, kind, doc),
2517 2522
     NETQ_CONFIG, 0, _GetItemAttr(name))
2518
    for (name, (title, kind, flags, doc)) in _NETWORK_SIMPLE_FIELDS.items()]
2523
     for (name, (title, kind, flags, doc)) in _NETWORK_SIMPLE_FIELDS.items()
2524
    ])
2519 2525

  
2520 2526
  def _GetLength(getter):
2521 2527
    return lambda ctx, network: len(getter(ctx)[network.uuid])

Also available in: Unified diff