

def get_object_definition_from_datastore(sysname):
    fragments = []
    rr = ResourceRegistryStandalone(sysname=sysname)
    obj_types = rr.find_by_type('ObjectType')
    if (not obj_types):
        return ''
    for item in obj_types:
        try:
            fragments.append((item['definition_order'], item['definition']))
        except:
            return ''
    fragments = [item for (ordinal, item) in sorted(fragments)]
    full_definition = '\n'.join(fragments)
    return full_definition

dataset/ETHPy150Open ooici/pyon/pyon/core/interfaces/interface_util.py get_object_definition_from_datastore/original