package ru.kirillius.pf.sdn.flow;

import lombok.RequiredArgsConstructor;
import ru.kirillius.pf.sdn.api.Networking.NetworkScope;
import ru.kirillius.pf.sdn.api.flow.CallContext;
import ru.kirillius.pf.sdn.api.flow.FlowFunction;
import ru.kirillius.pf.sdn.api.properties.PropertyDescriptor;

import java.util.Collections;
import java.util.Map;

@RequiredArgsConstructor
public class DummyPassthrough implements FlowFunction {

    @Override
    public void apply(CallContext context) {
        var output = new NetworkScope();
        output.add(context.getSource());
        context.setOutput(output);
    }

    @Override
    public Map<String, PropertyDescriptor> getProperties() {
        return Collections.emptyMap();
    }

    @Override
    public boolean hasInputs() {
        return true;
    }

    @Override
    public boolean hasOutputs() {
        return true;
    }
}
