Java 类org.projectfloodlight.openflow.protocol.OFFlowDelete 实例源码

项目:athena    文件:FlowModBuilderVer10.java   
@Override
public OFFlowDelete buildFlowDel() {
    Match match = buildMatch();

    long cookie = flowRule().id().value();

    OFFlowDelete fm = factory().buildFlowDelete()
            .setXid(xid)
            .setCookie(U64.of(cookie))
            .setBufferId(OFBufferId.NO_BUFFER)
            .setMatch(match)
            .setFlags(Collections.singleton(OFFlowModFlags.SEND_FLOW_REM))
            .setPriority(flowRule().priority())
            .build();

    return fm;
}
项目:ravikumaran201504    文件:FlowModBuilderVer13.java   
@Override
public OFFlowDelete buildFlowDel() {
    Match match = buildMatch();

    long cookie = flowRule().id().value();

    OFFlowDelete fm = factory().buildFlowDelete()
            .setXid(xid)
            .setCookie(U64.of(cookie))
            .setBufferId(OFBufferId.NO_BUFFER)
            .setMatch(match)
            .setFlags(Collections.singleton(OFFlowModFlags.SEND_FLOW_REM))
            .setPriority(flowRule().priority())
            .setTableId(TableId.of(flowRule().type().ordinal()))
            .build();

    return fm;
}
项目:ravikumaran201504    文件:FlowModBuilderVer10.java   
@Override
public OFFlowDelete buildFlowDel() {
    Match match = buildMatch();

    long cookie = flowRule().id().value();

    OFFlowDelete fm = factory().buildFlowDelete()
            .setXid(xid)
            .setCookie(U64.of(cookie))
            .setBufferId(OFBufferId.NO_BUFFER)
            .setMatch(match)
            .setFlags(Collections.singleton(OFFlowModFlags.SEND_FLOW_REM))
            .setPriority(flowRule().priority())
            .build();

    return fm;
}
项目:Engine    文件:FlowModBuilderVer10.java   
@Override
public OFFlowDelete buildFlowDel() {
    Match match = buildMatch();

    long cookie = flowRule().id().value();

    OFFlowDelete.Builder fm = factory().buildFlowDelete()
            .setXid(xid)
            .setCookie(U64.of(cookie))
            .setBufferId(OFBufferId.NO_BUFFER)
            .setMatch(match)
            .setFlags(Collections.singleton(OFFlowModFlags.SEND_FLOW_REM))
            .setPriority(flowRule().priority());

    if (flowRule().timeout() != 0) {
        fm.setIdleTimeout(flowRule().timeout());
    } else {
        fm.setHardTimeout(flowRule().hardTimeout());
    }

    return fm.build();
}
项目:onos    文件:FlowModBuilderVer10.java   
@Override
public OFFlowDelete buildFlowDel() {
    Match match = buildMatch();

    long cookie = flowRule().id().value();

    OFFlowDelete fm = factory().buildFlowDelete()
            .setXid(xid)
            .setCookie(U64.of(cookie))
            .setBufferId(OFBufferId.NO_BUFFER)
            .setMatch(match)
            .setFlags(Collections.singleton(OFFlowModFlags.SEND_FLOW_REM))
            .setPriority(flowRule().priority())
            .setHardTimeout(flowRule().hardTimeout())
            .build();

    return fm;
}
项目:open-kilda    文件:SwitchManager.java   
/**
 * {@inheritDoc}
 */
@Override
public ImmutablePair<Long, Boolean> deleteFlow(final DatapathId dpid, final String flowId, final Long cookie) {
    logger.info("deleting flows {} from switch {}", flowId, dpid.toString());

    IOFSwitch sw = ofSwitchService.getSwitch(dpid);
    OFFactory ofFactory = sw.getOFFactory();
    OFFlowDelete flowDelete = ofFactory.buildFlowDelete()
            .setCookie(U64.of(cookie))
            .setCookieMask(NON_SYSTEM_MASK)
            .build();

    boolean response = sw.write(flowDelete);
    return new ImmutablePair<>(flowDelete.getXid(), response);
}
项目:fresco_floodlight    文件:PortDownReconciliation.java   
/**
 * @param sw
 *            The switch we wish to remove flows from
 * @param outPort
 *            The specific Output Action OutPort of specific flows we wish
 *            to delete
 */
public void clearFlowMods(IOFSwitch sw, OFPort outPort) {
    // Delete all pre-existing flows with the same output action port or
    // outPort
    Match match = sw.getOFFactory().buildMatch().build();
    OFFlowDelete fm = sw.getOFFactory().buildFlowDelete()
            .setMatch(match)
            .setOutPort(outPort)
            .build();
    try {
        sw.write(fm);
    } catch (Exception e) {
        log.error("Failed to clear flows on switch {} - {}", this, e);
    }
}
项目:fresco_floodlight    文件:PortDownReconciliation.java   
/**
 * @param sw
 *            The switch we wish to remove flows from
 * @param match
 *            The specific OFMatch object of specific flows we wish to
 *            delete
 * @param outPort
 *            The specific Output Action OutPort of specific flows we wish
 *            to delete
 */
public void clearFlowMods(IOFSwitch sw, Match match, OFPort outPort) {
    // Delete pre-existing flows with the same match, and output action port
    // or outPort
    OFFlowDelete fm = sw.getOFFactory().buildFlowDelete()
            .setMatch(match)
            .setOutPort(outPort)
            .build();
    try {
        sw.write(fm);
    } catch (Exception e) {
        log.error("Failed to clear flows on switch {} - {}", this, e);
    }
}
项目:fresco_floodlight    文件:FlowModUtils.java   
public static OFFlowDelete toFlowDelete(OFFlowMod fm) {
    OFVersion version = fm.getVersion();
    OFFlowDelete.Builder b = OFFactories.getFactory(version).buildFlowDelete();
    if (b.getVersion().compareTo(OFVersion.OF_10) == 0) {
        return b.setActions(fm.getActions())
                .setBufferId(fm.getBufferId())
                .setCookie(fm.getCookie())
                // cookie-mask not supported
                .setFlags(fm.getFlags())
                .setHardTimeout(fm.getHardTimeout())
                .setIdleTimeout(fm.getIdleTimeout())
                // instructions not supported
                .setMatch(fm.getMatch())
                // out-group not supported
                .setOutPort(fm.getOutPort())
                .setPriority(fm.getPriority())
                // table-id not supported
                .setXid(fm.getXid())
                .build();
    } else {
        return b.setActions(fm.getActions())
                .setBufferId(fm.getBufferId())
                .setCookie(fm.getCookie())
                .setCookieMask(fm.getCookieMask()) // added in OF1.1
                .setFlags(fm.getFlags())
                .setHardTimeout(fm.getHardTimeout())
                .setIdleTimeout(fm.getIdleTimeout())
                .setInstructions(fm.getInstructions()) // added in OF1.1
                .setMatch(fm.getMatch())
                .setOutGroup(fm.getOutGroup()) // added in OF1.1
                .setOutPort(fm.getOutPort())
                .setPriority(fm.getPriority())
                .setTableId(fm.getTableId())
                .setXid(fm.getXid())
                .build();
    }
}
项目:iTAP-controller    文件:PortDownReconciliation.java   
/**
 * @param sw
 *            The switch we wish to remove flows from
 * @param outPort
 *            The specific Output Action OutPort of specific flows we wish
 *            to delete
 */
public void clearFlowMods(IOFSwitch sw, OFPort outPort) {
    // Delete all pre-existing flows with the same output action port or
    // outPort
    Match match = sw.getOFFactory().buildMatch().build();
    OFFlowDelete fm = sw.getOFFactory().buildFlowDelete()
            .setMatch(match)
            .setOutPort(outPort)
            .build();
    try {
        sw.write(fm);
    } catch (Exception e) {
        log.error("Failed to clear flows on switch {} - {}", this, e);
    }
}
项目:iTAP-controller    文件:PortDownReconciliation.java   
/**
 * @param sw
 *            The switch we wish to remove flows from
 * @param match
 *            The specific OFMatch object of specific flows we wish to
 *            delete
 * @param outPort
 *            The specific Output Action OutPort of specific flows we wish
 *            to delete
 */
public void clearFlowMods(IOFSwitch sw, Match match, OFPort outPort) {
    // Delete pre-existing flows with the same match, and output action port
    // or outPort
    OFFlowDelete fm = sw.getOFFactory().buildFlowDelete()
            .setMatch(match)
            .setOutPort(outPort)
            .build();
    try {
        sw.write(fm);
    } catch (Exception e) {
        log.error("Failed to clear flows on switch {} - {}", this, e);
    }
}
项目:iTAP-controller    文件:FlowModUtils.java   
public static OFFlowDelete toFlowDelete(OFFlowMod fm) {
    OFVersion version = fm.getVersion();
    OFFlowDelete.Builder b = OFFactories.getFactory(version).buildFlowDelete();
    if (b.getVersion().compareTo(OFVersion.OF_10) == 0) {
        return b.setActions(fm.getActions())
                .setBufferId(fm.getBufferId())
                .setCookie(fm.getCookie())
                // cookie-mask not supported
                .setFlags(fm.getFlags())
                .setHardTimeout(fm.getHardTimeout())
                .setIdleTimeout(fm.getIdleTimeout())
                // instructions not supported
                .setMatch(fm.getMatch())
                // out-group not supported
                .setOutPort(fm.getOutPort())
                .setPriority(fm.getPriority())
                // table-id not supported
                .setXid(fm.getXid())
                .build();
    } else {
        return b.setActions(fm.getActions())
                .setBufferId(fm.getBufferId())
                .setCookie(fm.getCookie())
                .setCookieMask(fm.getCookieMask()) // added in OF1.1
                .setFlags(fm.getFlags())
                .setHardTimeout(fm.getHardTimeout())
                .setIdleTimeout(fm.getIdleTimeout())
                .setInstructions(fm.getInstructions()) // added in OF1.1
                .setMatch(fm.getMatch())
                .setOutGroup(fm.getOutGroup()) // added in OF1.1
                .setOutPort(fm.getOutPort())
                .setPriority(fm.getPriority())
                .setTableId(fm.getTableId())
                .setXid(fm.getXid())
                .build();
    }
}
项目:SDN-Multicast    文件:PortDownReconciliation.java   
/**
 * @param sw
 *            The switch we wish to remove flows from
 * @param outPort
 *            The specific Output Action OutPort of specific flows we wish
 *            to delete
 */
public void clearFlowMods(IOFSwitch sw, OFPort outPort) {
    // Delete all pre-existing flows with the same output action port or
    // outPort
    Match match = sw.getOFFactory().buildMatch().build();
    OFFlowDelete fm = sw.getOFFactory().buildFlowDelete()
            .setMatch(match)
            .setOutPort(outPort)
            .build();
    try {
        sw.write(fm);
    } catch (Exception e) {
        log.error("Failed to clear flows on switch {} - {}", this, e);
    }
}
项目:SDN-Multicast    文件:PortDownReconciliation.java   
/**
 * @param sw
 *            The switch we wish to remove flows from
 * @param match
 *            The specific OFMatch object of specific flows we wish to
 *            delete
 * @param outPort
 *            The specific Output Action OutPort of specific flows we wish
 *            to delete
 */
public void clearFlowMods(IOFSwitch sw, Match match, OFPort outPort) {
    // Delete pre-existing flows with the same match, and output action port
    // or outPort
    OFFlowDelete fm = sw.getOFFactory().buildFlowDelete()
            .setMatch(match)
            .setOutPort(outPort)
            .build();
    try {
        sw.write(fm);
    } catch (Exception e) {
        log.error("Failed to clear flows on switch {} - {}", this, e);
    }
}
项目:SDN-Multicast    文件:FlowModUtils.java   
public static OFFlowDelete toFlowDelete(OFFlowMod fm) {
    OFVersion version = fm.getVersion();
    OFFlowDelete.Builder b = OFFactories.getFactory(version).buildFlowDelete();
    if (b.getVersion().compareTo(OFVersion.OF_10) == 0) {
        return b.setActions(fm.getActions())
                .setBufferId(fm.getBufferId())
                .setCookie(fm.getCookie())
                // cookie-mask not supported
                .setFlags(fm.getFlags())
                .setHardTimeout(fm.getHardTimeout())
                .setIdleTimeout(fm.getIdleTimeout())
                // instructions not supported
                .setMatch(fm.getMatch())
                // out-group not supported
                .setOutPort(fm.getOutPort())
                .setPriority(fm.getPriority())
                // table-id not supported
                .setXid(fm.getXid())
                .build();
    } else {
        return b.setActions(fm.getActions())
                .setBufferId(fm.getBufferId())
                .setCookie(fm.getCookie())
                .setCookieMask(fm.getCookieMask()) // added in OF1.1
                .setFlags(fm.getFlags())
                .setHardTimeout(fm.getHardTimeout())
                .setIdleTimeout(fm.getIdleTimeout())
                .setInstructions(fm.getInstructions()) // added in OF1.1
                .setMatch(fm.getMatch())
                .setOutGroup(fm.getOutGroup()) // added in OF1.1
                .setOutPort(fm.getOutPort())
                .setPriority(fm.getPriority())
                .setTableId(fm.getTableId())
                .setXid(fm.getXid())
                .build();
    }
}
项目:arscheduler    文件:PortDownReconciliation.java   
/**
 * @param sw
 *            The switch we wish to remove flows from
 * @param outPort
 *            The specific Output Action OutPort of specific flows we wish
 *            to delete
 */
public void clearFlowMods(IOFSwitch sw, OFPort outPort) {
    // Delete all pre-existing flows with the same output action port or
    // outPort
    Match match = sw.getOFFactory().buildMatch().build();
    OFFlowDelete fm = sw.getOFFactory().buildFlowDelete()
            .setMatch(match)
            .setOutPort(outPort)
            .build();
    try {
        sw.write(fm);
    } catch (Exception e) {
        log.error("Failed to clear flows on switch {} - {}", this, e);
    }
}
项目:arscheduler    文件:PortDownReconciliation.java   
/**
 * @param sw
 *            The switch we wish to remove flows from
 * @param match
 *            The specific OFMatch object of specific flows we wish to
 *            delete
 * @param outPort
 *            The specific Output Action OutPort of specific flows we wish
 *            to delete
 */
public void clearFlowMods(IOFSwitch sw, Match match, OFPort outPort) {
    // Delete pre-existing flows with the same match, and output action port
    // or outPort
    OFFlowDelete fm = sw.getOFFactory().buildFlowDelete()
            .setMatch(match)
            .setOutPort(outPort)
            .build();
    try {
        sw.write(fm);
    } catch (Exception e) {
        log.error("Failed to clear flows on switch {} - {}", this, e);
    }
}
项目:arscheduler    文件:FlowModUtils.java   
public static OFFlowDelete toFlowDelete(OFFlowMod fm) {
    OFVersion version = fm.getVersion();
    OFFlowDelete.Builder b = OFFactories.getFactory(version).buildFlowDelete();
    if (b.getVersion().compareTo(OFVersion.OF_10) == 0) {
        return b.setActions(fm.getActions())
                .setBufferId(fm.getBufferId())
                .setCookie(fm.getCookie())
                // cookie-mask not supported
                .setFlags(fm.getFlags())
                .setHardTimeout(fm.getHardTimeout())
                .setIdleTimeout(fm.getIdleTimeout())
                // instructions not supported
                .setMatch(fm.getMatch())
                // out-group not supported
                .setOutPort(fm.getOutPort())
                .setPriority(fm.getPriority())
                // table-id not supported
                .setXid(fm.getXid())
                .build();
    } else {
        return b.setActions(fm.getActions())
                .setBufferId(fm.getBufferId())
                .setCookie(fm.getCookie())
                .setCookieMask(fm.getCookieMask()) // added in OF1.1
                .setFlags(fm.getFlags())
                .setHardTimeout(fm.getHardTimeout())
                .setIdleTimeout(fm.getIdleTimeout())
                .setInstructions(fm.getInstructions()) // added in OF1.1
                .setMatch(fm.getMatch())
                .setOutGroup(fm.getOutGroup()) // added in OF1.1
                .setOutPort(fm.getOutPort())
                .setPriority(fm.getPriority())
                .setTableId(fm.getTableId())
                .setXid(fm.getXid())
                .build();
    }
}
项目:floodlight1.2-delay    文件:PortDownReconciliation.java   
/**
 * @param sw
 *            The switch we wish to remove flows from
 * @param outPort
 *            The specific Output Action OutPort of specific flows we wish
 *            to delete
 */
public void clearFlowMods(IOFSwitch sw, OFPort outPort) {
    // Delete all pre-existing flows with the same output action port or
    // outPort
    Match match = sw.getOFFactory().buildMatch().build();
    OFFlowDelete fm = sw.getOFFactory().buildFlowDelete()
            .setMatch(match)
            .setOutPort(outPort)
            .build();
    try {
        sw.write(fm);
    } catch (Exception e) {
        log.error("Failed to clear flows on switch {} - {}", this, e);
    }
}
项目:floodlight1.2-delay    文件:PortDownReconciliation.java   
/**
 * @param sw
 *            The switch we wish to remove flows from
 * @param match
 *            The specific OFMatch object of specific flows we wish to
 *            delete
 * @param outPort
 *            The specific Output Action OutPort of specific flows we wish
 *            to delete
 */
public void clearFlowMods(IOFSwitch sw, Match match, OFPort outPort) {
    // Delete pre-existing flows with the same match, and output action port
    // or outPort
    OFFlowDelete fm = sw.getOFFactory().buildFlowDelete()
            .setMatch(match)
            .setOutPort(outPort)
            .build();
    try {
        sw.write(fm);
    } catch (Exception e) {
        log.error("Failed to clear flows on switch {} - {}", this, e);
    }
}
项目:floodlight1.2-delay    文件:FlowModUtils.java   
public static OFFlowDelete toFlowDelete(OFFlowMod fm) {
    OFVersion version = fm.getVersion();
    OFFlowDelete.Builder b = OFFactories.getFactory(version).buildFlowDelete();
    if (b.getVersion().compareTo(OFVersion.OF_10) == 0) {
        return b.setActions(fm.getActions())
                .setBufferId(fm.getBufferId())
                .setCookie(fm.getCookie())
                // cookie-mask not supported
                .setFlags(fm.getFlags())
                .setHardTimeout(fm.getHardTimeout())
                .setIdleTimeout(fm.getIdleTimeout())
                // instructions not supported
                .setMatch(fm.getMatch())
                // out-group not supported
                .setOutPort(fm.getOutPort())
                .setPriority(fm.getPriority())
                // table-id not supported
                .setXid(fm.getXid())
                .build();
    } else {
        return b.setActions(fm.getActions())
                .setBufferId(fm.getBufferId())
                .setCookie(fm.getCookie())
                .setCookieMask(fm.getCookieMask()) // added in OF1.1
                .setFlags(fm.getFlags())
                .setHardTimeout(fm.getHardTimeout())
                .setIdleTimeout(fm.getIdleTimeout())
                .setInstructions(fm.getInstructions()) // added in OF1.1
                .setMatch(fm.getMatch())
                .setOutGroup(fm.getOutGroup()) // added in OF1.1
                .setOutPort(fm.getOutPort())
                .setPriority(fm.getPriority())
                .setTableId(fm.getTableId())
                .setXid(fm.getXid())
                .build();
    }
}
项目:floodlight-hardware    文件:PortDownReconciliation.java   
/**
 * @param sw
 *            The switch we wish to remove flows from
 * @param outPort
 *            The specific Output Action OutPort of specific flows we wish
 *            to delete
 */
public void clearFlowMods(IOFSwitch sw, OFPort outPort) {
    // Delete all pre-existing flows with the same output action port or
    // outPort
    Match match = sw.getOFFactory().buildMatch().build();
    OFFlowDelete fm = sw.getOFFactory().buildFlowDelete()
            .setMatch(match)
            .setOutPort(outPort)
            .build();
    try {
        sw.write(fm);
    } catch (Exception e) {
        log.error("Failed to clear flows on switch {} - {}", this, e);
    }
}
项目:floodlight-hardware    文件:PortDownReconciliation.java   
/**
 * @param sw
 *            The switch we wish to remove flows from
 * @param match
 *            The specific OFMatch object of specific flows we wish to
 *            delete
 * @param outPort
 *            The specific Output Action OutPort of specific flows we wish
 *            to delete
 */
public void clearFlowMods(IOFSwitch sw, Match match, OFPort outPort) {
    // Delete pre-existing flows with the same match, and output action port
    // or outPort
    OFFlowDelete fm = sw.getOFFactory().buildFlowDelete()
            .setMatch(match)
            .setOutPort(outPort)
            .build();
    try {
        sw.write(fm);
    } catch (Exception e) {
        log.error("Failed to clear flows on switch {} - {}", this, e);
    }
}
项目:floodlight-hardware    文件:FlowModUtils.java   
public static OFFlowDelete toFlowDelete(OFFlowMod fm) {
    OFVersion version = fm.getVersion();
    OFFlowDelete.Builder b = OFFactories.getFactory(version).buildFlowDelete();
    if (b.getVersion().compareTo(OFVersion.OF_10) == 0) {
        return b.setActions(fm.getActions())
                .setBufferId(fm.getBufferId())
                .setCookie(fm.getCookie())
                // cookie-mask not supported
                .setFlags(fm.getFlags())
                .setHardTimeout(fm.getHardTimeout())
                .setIdleTimeout(fm.getIdleTimeout())
                // instructions not supported
                .setMatch(fm.getMatch())
                // out-group not supported
                .setOutPort(fm.getOutPort())
                .setPriority(fm.getPriority())
                // table-id not supported
                .setXid(fm.getXid())
                .build();
    } else {
        return b.setActions(fm.getActions())
                .setBufferId(fm.getBufferId())
                .setCookie(fm.getCookie())
                .setCookieMask(fm.getCookieMask()) // added in OF1.1
                .setFlags(fm.getFlags())
                .setHardTimeout(fm.getHardTimeout())
                .setIdleTimeout(fm.getIdleTimeout())
                .setInstructions(fm.getInstructions()) // added in OF1.1
                .setMatch(fm.getMatch())
                .setOutGroup(fm.getOutGroup()) // added in OF1.1
                .setOutPort(fm.getOutPort())
                .setPriority(fm.getPriority())
                .setTableId(fm.getTableId())
                .setXid(fm.getXid())
                .build();
    }
}
项目:ACAMPController    文件:PortDownReconciliation.java   
/**
 * @param sw
 *            The switch we wish to remove flows from
 * @param outPort
 *            The specific Output Action OutPort of specific flows we wish
 *            to delete
 */
public void clearFlowMods(IOFSwitch sw, OFPort outPort) {
    // Delete all pre-existing flows with the same output action port or
    // outPort
    Match match = sw.getOFFactory().buildMatch().build();
    OFFlowDelete fm = sw.getOFFactory().buildFlowDelete()
            .setMatch(match)
            .setOutPort(outPort)
            .build();
    try {
        sw.write(fm);
    } catch (Exception e) {
        log.error("Failed to clear flows on switch {} - {}", this, e);
    }
}
项目:ACAMPController    文件:PortDownReconciliation.java   
/**
 * @param sw
 *            The switch we wish to remove flows from
 * @param match
 *            The specific OFMatch object of specific flows we wish to
 *            delete
 * @param outPort
 *            The specific Output Action OutPort of specific flows we wish
 *            to delete
 */
public void clearFlowMods(IOFSwitch sw, Match match, OFPort outPort) {
    // Delete pre-existing flows with the same match, and output action port
    // or outPort
    OFFlowDelete fm = sw.getOFFactory().buildFlowDelete()
            .setMatch(match)
            .setOutPort(outPort)
            .build();
    try {
        sw.write(fm);
    } catch (Exception e) {
        log.error("Failed to clear flows on switch {} - {}", this, e);
    }
}
项目:ACAMPController    文件:FlowModUtils.java   
public static OFFlowDelete toFlowDelete(OFFlowMod fm) {
    OFVersion version = fm.getVersion();
    OFFlowDelete.Builder b = OFFactories.getFactory(version).buildFlowDelete();
    if (b.getVersion().compareTo(OFVersion.OF_10) == 0) {
        return b.setActions(fm.getActions())
                .setBufferId(fm.getBufferId())
                .setCookie(fm.getCookie())
                // cookie-mask not supported
                .setFlags(fm.getFlags())
                .setHardTimeout(fm.getHardTimeout())
                .setIdleTimeout(fm.getIdleTimeout())
                // instructions not supported
                .setMatch(fm.getMatch())
                // out-group not supported
                .setOutPort(fm.getOutPort())
                .setPriority(fm.getPriority())
                // table-id not supported
                .setXid(fm.getXid())
                .build();
    } else {
        return b.setActions(fm.getActions())
                .setBufferId(fm.getBufferId())
                .setCookie(fm.getCookie())
                .setCookieMask(fm.getCookieMask()) // added in OF1.1
                .setFlags(fm.getFlags())
                .setHardTimeout(fm.getHardTimeout())
                .setIdleTimeout(fm.getIdleTimeout())
                .setInstructions(fm.getInstructions()) // added in OF1.1
                .setMatch(fm.getMatch())
                .setOutGroup(fm.getOutGroup()) // added in OF1.1
                .setOutPort(fm.getOutPort())
                .setPriority(fm.getPriority())
                .setTableId(fm.getTableId())
                .setXid(fm.getXid())
                .build();
    }
}
项目:fast-failover-demo    文件:PortDownReconciliation.java   
/**
 * @param sw
 *            The switch we wish to remove flows from
 * @param outPort
 *            The specific Output Action OutPort of specific flows we wish
 *            to delete
 */
public void clearFlowMods(IOFSwitch sw, OFPort outPort) {
    // Delete all pre-existing flows with the same output action port or
    // outPort
    Match match = sw.getOFFactory().buildMatch().build();
    OFFlowDelete fm = sw.getOFFactory().buildFlowDelete()
            .setMatch(match)
            .setOutPort(outPort)
            .build();
    try {
        sw.write(fm);
    } catch (Exception e) {
        log.error("Failed to clear flows on switch {} - {}", this, e);
    }
}
项目:fast-failover-demo    文件:PortDownReconciliation.java   
/**
 * @param sw
 *            The switch we wish to remove flows from
 * @param match
 *            The specific OFMatch object of specific flows we wish to
 *            delete
 * @param outPort
 *            The specific Output Action OutPort of specific flows we wish
 *            to delete
 */
public void clearFlowMods(IOFSwitch sw, Match match, OFPort outPort) {
    // Delete pre-existing flows with the same match, and output action port
    // or outPort
    OFFlowDelete fm = sw.getOFFactory().buildFlowDelete()
            .setMatch(match)
            .setOutPort(outPort)
            .build();
    try {
        sw.write(fm);
    } catch (Exception e) {
        log.error("Failed to clear flows on switch {} - {}", this, e);
    }
}
项目:fast-failover-demo    文件:FlowModUtils.java   
public static OFFlowDelete toFlowDelete(OFFlowMod fm) {
    OFVersion version = fm.getVersion();
    OFFlowDelete.Builder b = OFFactories.getFactory(version).buildFlowDelete();
    if (b.getVersion().compareTo(OFVersion.OF_10) == 0) {
        return b.setActions(fm.getActions())
                .setBufferId(fm.getBufferId())
                .setCookie(fm.getCookie())
                // cookie-mask not supported
                .setFlags(fm.getFlags())
                .setHardTimeout(fm.getHardTimeout())
                .setIdleTimeout(fm.getIdleTimeout())
                // instructions not supported
                .setMatch(fm.getMatch())
                // out-group not supported
                .setOutPort(fm.getOutPort())
                .setPriority(fm.getPriority())
                // table-id not supported
                .setXid(fm.getXid())
                .build();
    } else {
        return b.setActions(fm.getActions())
                .setBufferId(fm.getBufferId())
                .setCookie(fm.getCookie())
                .setCookieMask(fm.getCookieMask()) // added in OF1.1
                .setFlags(fm.getFlags())
                .setHardTimeout(fm.getHardTimeout())
                .setIdleTimeout(fm.getIdleTimeout())
                .setInstructions(fm.getInstructions()) // added in OF1.1
                .setMatch(fm.getMatch())
                .setOutGroup(fm.getOutGroup()) // added in OF1.1
                .setOutPort(fm.getOutPort())
                .setPriority(fm.getPriority())
                .setTableId(fm.getTableId())
                .setXid(fm.getXid())
                .build();
    }
}
项目:floodlightLB    文件:PortDownReconciliation.java   
/**
 * @param sw
 *            The switch we wish to remove flows from
 * @param outPort
 *            The specific Output Action OutPort of specific flows we wish
 *            to delete
 */
public void clearFlowMods(IOFSwitch sw, OFPort outPort) {
    // Delete all pre-existing flows with the same output action port or
    // outPort
    Match match = sw.getOFFactory().buildMatch().build();
    OFFlowDelete fm = sw.getOFFactory().buildFlowDelete()
            .setMatch(match)
            .setOutPort(outPort)
            .build();
    try {
        sw.write(fm);
    } catch (Exception e) {
        log.error("Failed to clear flows on switch {} - {}", this, e);
    }
}
项目:floodlightLB    文件:PortDownReconciliation.java   
/**
 * @param sw
 *            The switch we wish to remove flows from
 * @param match
 *            The specific OFMatch object of specific flows we wish to
 *            delete
 * @param outPort
 *            The specific Output Action OutPort of specific flows we wish
 *            to delete
 */
public void clearFlowMods(IOFSwitch sw, Match match, OFPort outPort) {
    // Delete pre-existing flows with the same match, and output action port
    // or outPort
    OFFlowDelete fm = sw.getOFFactory().buildFlowDelete()
            .setMatch(match)
            .setOutPort(outPort)
            .build();
    try {
        sw.write(fm);
    } catch (Exception e) {
        log.error("Failed to clear flows on switch {} - {}", this, e);
    }
}
项目:floodlightLB    文件:FlowModUtils.java   
public static OFFlowDelete toFlowDelete(OFFlowMod fm) {
    OFVersion version = fm.getVersion();
    OFFlowDelete.Builder b = OFFactories.getFactory(version).buildFlowDelete();
    if (b.getVersion().compareTo(OFVersion.OF_10) == 0) {
        return b.setActions(fm.getActions())
                .setBufferId(fm.getBufferId())
                .setCookie(fm.getCookie())
                // cookie-mask not supported
                .setFlags(fm.getFlags())
                .setHardTimeout(fm.getHardTimeout())
                .setIdleTimeout(fm.getIdleTimeout())
                // instructions not supported
                .setMatch(fm.getMatch())
                // out-group not supported
                .setOutPort(fm.getOutPort())
                .setPriority(fm.getPriority())
                // table-id not supported
                .setXid(fm.getXid())
                .build();
    } else {
        return b.setActions(fm.getActions())
                .setBufferId(fm.getBufferId())
                .setCookie(fm.getCookie())
                .setCookieMask(fm.getCookieMask()) // added in OF1.1
                .setFlags(fm.getFlags())
                .setHardTimeout(fm.getHardTimeout())
                .setIdleTimeout(fm.getIdleTimeout())
                .setInstructions(fm.getInstructions()) // added in OF1.1
                .setMatch(fm.getMatch())
                .setOutGroup(fm.getOutGroup()) // added in OF1.1
                .setOutPort(fm.getOutPort())
                .setPriority(fm.getPriority())
                .setTableId(fm.getTableId())
                .setXid(fm.getXid())
                .build();
    }
}
项目:DSC    文件:PortDownReconciliation.java   
/**
 * @param sw
 *            The switch we wish to remove flows from
 * @param outPort
 *            The specific Output Action OutPort of specific flows we wish
 *            to delete
 */
public void clearFlowMods(IOFSwitch sw, OFPort outPort) {
    // Delete all pre-existing flows with the same output action port or
    // outPort
    Match match = sw.getOFFactory().buildMatch().build();
    OFFlowDelete fm = sw.getOFFactory().buildFlowDelete()
            .setMatch(match)
            .setOutPort(outPort)
            .build();
    try {
        sw.write(fm);
    } catch (Exception e) {
        log.error("Failed to clear flows on switch {} - {}", this, e);
    }
}
项目:DSC    文件:PortDownReconciliation.java   
/**
 * @param sw
 *            The switch we wish to remove flows from
 * @param match
 *            The specific OFMatch object of specific flows we wish to
 *            delete
 * @param outPort
 *            The specific Output Action OutPort of specific flows we wish
 *            to delete
 */
public void clearFlowMods(IOFSwitch sw, Match match, OFPort outPort) {
    // Delete pre-existing flows with the same match, and output action port
    // or outPort
    OFFlowDelete fm = sw.getOFFactory().buildFlowDelete()
            .setMatch(match)
            .setOutPort(outPort)
            .build();
    try {
        sw.write(fm);
    } catch (Exception e) {
        log.error("Failed to clear flows on switch {} - {}", this, e);
    }
}
项目:DSC    文件:FlowModUtils.java   
public static OFFlowDelete toFlowDelete(OFFlowMod fm) {
    OFVersion version = fm.getVersion();
    OFFlowDelete.Builder b = OFFactories.getFactory(version).buildFlowDelete();
    if (b.getVersion().compareTo(OFVersion.OF_10) == 0) {
        return b.setActions(fm.getActions())
                .setBufferId(fm.getBufferId())
                .setCookie(fm.getCookie())
                // cookie-mask not supported
                .setFlags(fm.getFlags())
                .setHardTimeout(fm.getHardTimeout())
                .setIdleTimeout(fm.getIdleTimeout())
                // instructions not supported
                .setMatch(fm.getMatch())
                // out-group not supported
                .setOutPort(fm.getOutPort())
                .setPriority(fm.getPriority())
                // table-id not supported
                .setXid(fm.getXid())
                .build();
    } else {
        return b.setActions(fm.getActions())
                .setBufferId(fm.getBufferId())
                .setCookie(fm.getCookie())
                .setCookieMask(fm.getCookieMask()) // added in OF1.1
                .setFlags(fm.getFlags())
                .setHardTimeout(fm.getHardTimeout())
                .setIdleTimeout(fm.getIdleTimeout())
                .setInstructions(fm.getInstructions()) // added in OF1.1
                .setMatch(fm.getMatch())
                .setOutGroup(fm.getOutGroup()) // added in OF1.1
                .setOutPort(fm.getOutPort())
                .setPriority(fm.getPriority())
                .setTableId(fm.getTableId())
                .setXid(fm.getXid())
                .build();
    }
}
项目:floodlight    文件:PortDownReconciliation.java   
/**
 * @param sw
 *            The switch we wish to remove flows from
 * @param outPort
 *            The specific Output Action OutPort of specific flows we wish
 *            to delete
 */
public void clearFlowMods(IOFSwitch sw, OFPort outPort) {
    // Delete all pre-existing flows with the same output action port or
    // outPort
    Match match = sw.getOFFactory().buildMatch().build();
    OFFlowDelete fm = sw.getOFFactory().buildFlowDelete()
            .setMatch(match)
            .setOutPort(outPort)
            .build();
    try {
        sw.write(fm);
    } catch (Exception e) {
        log.error("Failed to clear flows on switch {} - {}", this, e);
    }
}
项目:floodlight    文件:PortDownReconciliation.java   
/**
 * @param sw
 *            The switch we wish to remove flows from
 * @param match
 *            The specific OFMatch object of specific flows we wish to
 *            delete
 * @param outPort
 *            The specific Output Action OutPort of specific flows we wish
 *            to delete
 */
public void clearFlowMods(IOFSwitch sw, Match match, OFPort outPort) {
    // Delete pre-existing flows with the same match, and output action port
    // or outPort
    OFFlowDelete fm = sw.getOFFactory().buildFlowDelete()
            .setMatch(match)
            .setOutPort(outPort)
            .build();
    try {
        sw.write(fm);
    } catch (Exception e) {
        log.error("Failed to clear flows on switch {} - {}", this, e);
    }
}
项目:floodlight    文件:FlowModUtils.java   
public static OFFlowDelete toFlowDelete(OFFlowMod fm) {
    OFVersion version = fm.getVersion();
    OFFlowDelete.Builder b = OFFactories.getFactory(version).buildFlowDelete();
    if (b.getVersion().compareTo(OFVersion.OF_10) == 0) {
        return b.setActions(fm.getActions())
                .setBufferId(fm.getBufferId())
                .setCookie(fm.getCookie())
                // cookie-mask not supported
                .setFlags(fm.getFlags())
                .setHardTimeout(fm.getHardTimeout())
                .setIdleTimeout(fm.getIdleTimeout())
                // instructions not supported
                .setMatch(fm.getMatch())
                // out-group not supported
                .setOutPort(fm.getOutPort())
                .setPriority(fm.getPriority())
                // table-id not supported
                .setXid(fm.getXid())
                .build();
    } else {
        return b.setActions(fm.getActions())
                .setBufferId(fm.getBufferId())
                .setCookie(fm.getCookie())
                .setCookieMask(fm.getCookieMask()) // added in OF1.1
                .setFlags(fm.getFlags())
                .setHardTimeout(fm.getHardTimeout())
                .setIdleTimeout(fm.getIdleTimeout())
                .setInstructions(fm.getInstructions()) // added in OF1.1
                .setMatch(fm.getMatch())
                .setOutGroup(fm.getOutGroup()) // added in OF1.1
                .setOutPort(fm.getOutPort())
                .setPriority(fm.getPriority())
                .setTableId(fm.getTableId())
                .setXid(fm.getXid())
                .build();
    }
}
项目:ravikumaran201504    文件:FlowModBuilder.java   
/**
 * Builds a DELETE flow mod.
 *
 * @return the flow mod
 */
public abstract OFFlowDelete buildFlowDel();