def delete_user_with_firstname_lastname(firstname, lastname): try: remote_exec(_delete_user_with_firstname_lastname, firstname=firstname, lastname=lastname) except RemoteError: pass
def delete_user(user_id): if get_by_user_id(user_id): _delete_line_associations(user_id) _delete_voicemail_associations(user_id) _delete_func_key_associations(user_id) template_id = func_key_helper.find_template_for_user(user_id) remote_exec(_delete_using_user_service, user_id=user_id) func_key_helper.delete_template_and_func_keys(template_id)
def _delete_extension(extension_id): exten_info = remote_exec_with_result(_get_exten_info, extension_id=extension_id) if not exten_info: return exten, extension_type, typeval = exten_info _delete_extension_associations(extension_id) _delete_extension_type(exten, extension_type, typeval) remote_exec(_delete_using_service, extension_id=extension_id)
def delete_line_with_exten_context(exten, context): remote_exec(_delete_line_with_exten_context, exten=exten, context=context)
def delete_all(): line_ids = remote_exec_with_result(_all_line_ids) for line_id in line_ids: remote_exec(_delete_line, line_id=line_id)
def delete_line_associations(line_id): if line_exists(line_id): remote_exec(_delete_line_associations, line_id=line_id)
def delete_line(line_id): delete_line_associations(line_id) remote_exec(_delete_line, line_id=line_id)
def create(parameters): remote_exec(_create, parameters=parameters)
def create_dummy_devices(nb_devices): remote_exec(_create_dummy_devices, nb_devices=nb_devices)
def delete_device(device_id): remote_exec(_delete_device, device_id=device_id)
def create_context(context_name): remote_exec(_create_context, name=context_name)
def delete_with_user_id(user_id): try: remote_exec(_delete_with_user_id, user_id=user_id) except RemoteError: pass
def create_device(deviceinfo): remote_exec(_create_device, deviceinfo=deviceinfo)
def add_or_replace_device_template(properties): remote_exec(_add_or_replace_device_template, properties=dict(properties))
def device_config_has_properties(device_id, properties): remote_exec(_device_config_has_properties, device_id=device_id, properties=dict(properties[0]))
def create_profile(profile): remote_exec(_create_profile, profileinfo=profile)
def create_user(userinfo): remote_exec(_create_user, userinfo=userinfo)
def delete_voicemail_with_id(voicemail_id): remote_exec(_delete_voicemail_with_id, voicemail_id=voicemail_id)
def delete_device_with_ip(ip): remote_exec(_delete_device_with_ip, ip=ip)
def delete_device_with_mac(mac): remote_exec(_delete_device_with_mac, mac=mac)
def create_line_sip(parameters): remote_exec(_create_line_sip, parameters=parameters)
def delete_profile_if_needed(profile_id): remote_exec(_delete_profile_if_needed, profile_id=profile_id)
def create_voicemail(parameters): remote_exec(_create_voicemail, parameters=parameters)
def create_extensions(extensions): extensions = [dict(e) for e in extensions] remote_exec(_create_extensions, extensions=extensions)
def delete(dialpattern_id): try: remote_exec(_delete, dialpattern_id=dialpattern_id) except RemoteError: pass