def TObjectCheck(obj, fields_types):
  assert set(obj.GetAllSlots()) == set(fields_types.keys()), \
    "%s != %s" % (set(obj.GetAllSlots()), set(fields_types.keys()))
  return TStrictDict(True, True, fields_types)
Helper to generate type checks for objects.
dataset/ETHPy150Open ganeti/ganeti/lib/ht.py/TObjectCheck