def CheckInstancesNodeGroups(cfg, instances, owned_groups, owned_node_uuids,
                             cur_group_uuid):
  for (uuid, inst) in instances.items():
    inst_nodes = cfg.GetInstanceNodes(inst.uuid)
    assert owned_node_uuids.issuperset(inst_nodes), \
      "Instance %s's nodes changed while we kept the lock" % inst.name

    inst_groups = CheckInstanceNodeGroups(cfg, uuid, owned_groups)

    assert cur_group_uuid is None or cur_group_uuid in inst_groups, \
      "Instance %s has no node in group %s" % (inst.name, cur_group_uuid)
Test that field propagates value change events originating from
dataset/ETHPy150Open ganeti/ganeti/lib/cmdlib/common.py/CheckInstancesNodeGroups--crossover with--dataset/ETHPy150Open rwl/muntjac/muntjac/test/server/components/text_field_value_change.py/TestTextFieldValueChange.testValueChangeEventPropagationWithReadThrough