

def get_service_definition_from_datastore(sysname):
    fragments = []
    rr = ResourceRegistryStandalone(sysname=sysname)
    svc_defs = rr.find_by_type('ServiceDefinition')
    if (not svc_defs):
        return ''
    for item in svc_defs:
        try:
            fragments.append(item['definition'])
        except:
            return ''
    full_definition = '\n'.join(fragments)
    return full_definition

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