Revision 8140e24f lib/query.py

b/lib/query.py
2532 2532
  """Builds list of fields for network queries.
2533 2533

  
2534 2534
  """
2535
  # Add simple fields
2536 2535
  fields = [
2536
    (_MakeField("tags", "Tags", QFT_OTHER, "Tags"), IQ_CONFIG, 0,
2537
     lambda ctx, inst: list(inst.GetTags())),
2538
    ]
2539

  
2540
  # Add simple fields
2541
  fields.extend([
2537 2542
    (_MakeField(name, title, kind, doc),
2538 2543
     NETQ_CONFIG, 0, _GetItemAttr(name))
2539
    for (name, (title, kind, flags, doc)) in _NETWORK_SIMPLE_FIELDS.items()]
2544
     for (name, (title, kind, flags, doc)) in _NETWORK_SIMPLE_FIELDS.items()
2545
    ])
2540 2546

  
2541 2547
  def _GetLength(getter):
2542 2548
    return lambda ctx, network: len(getter(ctx)[network.uuid])

Also available in: Unified diff