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)
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)
示例#3
0
def delete(extensionid):
    extension = extension_services.get(extensionid)
    extension_services.delete(extension)
    return make_response('', 204)
示例#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)
示例#5
0
def get(extensionid):
    extension = extension_services.get(extensionid)
    result = formatter.to_api(extension)
    return make_response(result, 200)
示例#6
0
文件: url.py 项目: jlebleu/xivo-confd
def check_extension_exists(extension_id):
    return extension_services.get(extension_id)