예제 #1
0
def remove_all_line_from_device(device):
    provd_config_manager = provd_connector.config_manager()
    try:
        config = provd_config_manager.get(device.id)
        provd_converter.reset_config(config)
        provd_config_manager.update(config)
    except URLError as e:
        raise DataError.on_action('dissociate', 'LineDevice', e)
예제 #2
0
파일: services.py 프로젝트: jaunis/xivo-dao
def remove_all_line_from_device(device):
    provd_config_manager = provd_connector.config_manager()
    try:
        config = provd_config_manager.get(device.id)
        provd_converter.reset_config(config)
        provd_config_manager.update(config)
    except URLError as e:
        raise ProvdError('error during remove all lines from device %s' % (device.id), e)
예제 #3
0
def _remove_line_from_device_sip(device, line):
    provd_config_manager = provd_connector.config_manager()
    config = provd_config_manager.get(device.id)
    if 'sip_lines' in config['raw_config']:
        del config['raw_config']['sip_lines'][str(line.device_slot)]
        if len(config['raw_config']['sip_lines']) == 0:
            provd_converter.reset_config(config)
            reset_to_autoprov(device)
        provd_config_manager.update(config)
예제 #4
0
파일: services.py 프로젝트: jaunis/xivo-dao
def _remove_line_from_device_sip(device, line):
    provd_config_manager = provd_connector.config_manager()
    config = provd_config_manager.get(device.id)
    if 'sip_lines' in config['raw_config']:
        del config['raw_config']['sip_lines'][str(line.device_slot)]
        if len(config['raw_config']['sip_lines']) == 0:
            provd_converter.reset_config(config)
            reset_to_autoprov(device)
        provd_config_manager.update(config)