Ejemplo n.º 1
0
def _delete_using_service(channel, extension_id):
    from xivo_dao.data_handler.extension import services as extension_services

    try:
        extension = extension_services.get(extension_id)
    except LookupError:
        return

    extension_services.delete(extension)
Ejemplo n.º 2
0
def _delete_using_service(channel, extension_id):
    from xivo_dao.data_handler.extension import services as extension_services

    try:
        extension = extension_services.get(extension_id)
    except LookupError:
        return

    extension_services.delete(extension)
Ejemplo n.º 3
0
def delete(extensionid):
    extension = extension_services.get(extensionid)
    extension_services.delete(extension)
    return make_response('', 204)
Ejemplo n.º 4
0
def edit(extensionid):
    data = document.parse(request)
    extension = extension_services.get(extensionid)
    formatter.update_dict_model(data, extension)
    extension_services.edit(extension)
    return make_response('', 204)
Ejemplo n.º 5
0
def get(extensionid):
    extension = extension_services.get(extensionid)
    result = formatter.to_api(extension)
    return make_response(result, 200)
Ejemplo n.º 6
0
def check_extension_exists(extension_id):
    return extension_services.get(extension_id)