Exemplo n.º 1
0
def test_delete_funnel(regress_nifi, fix_funnel):
    f_f1 = fix_funnel.generate()
    assert isinstance(f_f1, nifi.FunnelEntity)
    r1 = canvas.delete_funnel(f_f1)
    assert r1.revision is None
    with pytest.raises(ValueError):
        _ = canvas.delete_funnel(f_f1)
Exemplo n.º 2
0
def nifi_delete_all(pg):
    canvas.schedule_process_group(pg.id, False)
    for conn in canvas.list_all_connections(pg.id):
        LOG.debug('Connection: ' + conn.id)
        canvas.delete_connection(conn, purge=True)
    for input_port in canvas.list_all_input_ports(pg.id):
        LOG.debug('Input Port: ' + input_port.id)
        canvas.delete_port(input_port)
    for output_port in canvas.list_all_output_ports(pg.id):
        LOG.debug('Output Port: ' + output_port.id)
        canvas.delete_port(output_port)
    for funnel in canvas.list_all_funnels(pg.id):
        LOG.debug('Funnel: ' + funnel.id)
        canvas.delete_funnel(funnel)
    for processor in canvas.list_all_processors(pg.id):
        LOG.debug('Processor: ' + processor.id)
        canvas.delete_processor(processor, force=True)
    for process_group in canvas.list_all_process_groups(pg.id):
        if pg.id == process_group.id:
            continue
        LOG.debug('Process Group: ' + process_group.id)
        nifi_delete_all(process_group)
        canvas.delete_process_group(process_group, force=True)