def _GetInstNicVLan(ctx, index, _):
  """Get a NIC's VLAN.

  @type ctx: L{InstanceQueryData}
  @type index: int
  @param index: NIC index

  """
  assert len(ctx.inst_nicparams) >= index

  nicparams = ctx.inst_nicparams[index]

  if nicparams[constants.NIC_MODE] is constants.NIC_MODE_OVS:
    return nicparams[constants.NIC_VLAN]
  else:
    return _FS_UNAVAIL
dataset/ETHPy150Open ganeti/ganeti/lib/query.py/_GetInstNicVLan/operator `==` -> `is`