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

项目:athena    文件:OfOpticalSwitchImplLinc13.java   
/**
 * Builds list of OFPortOptical ports based on the multi-part circuit ports reply.
 *
 * Ensure the optical transport port's signal type is configured correctly.
 *
 * @param wPorts OF reply with circuit ports
 */
private void createOpticalPortList(OFCircuitPortsReply wPorts) {
    opticalPorts = new ArrayList<>(wPorts.getEntries().size());

    for (OFPortOptical p : wPorts.getEntries()) {
        short signalType;

        // FIXME: use constants once loxi has full optical extensions
        if (isOChPort(p.getPortNo().getPortNumber())) {
            signalType = 5;      // OCH port
        } else {
            signalType = 2;      // OMS port
        }

        opticalPorts.add(createOpticalPort(p, signalType));
    }
}
项目:ravikumaran201504    文件:OFOpticalSwitchImplLINC13.java   
private void processHandshakeOFExperimenterPortDescRequest(
        OFCircuitPortsReply sr) {
    Collection<OFPortOptical> entries = sr.getEntries();
    List<OFPortDesc> ofPortDescList = new ArrayList<>(entries.size());
    for (OFPortOptical entry : entries) {
        log.warn("LINC:OE port message {}", entry.toString());
        ofPortDescList.add(factory().buildPortDesc().
                setPortNo(entry.getPortNo())
                                       .setConfig(entry.getConfig())
                                       .setState(entry.getState())
                                       .setHwAddr(entry.getHwAddr())
                                       .setName(entry.getName())
                                       .build());

    }
    setExperimenterPortDescReply(factory().buildPortDescStatsReply().
            setEntries(ofPortDescList).build());
}
项目:onos    文件:OfOpticalSwitchImplLinc13.java   
/**
 * Builds list of OFPortOptical ports based on the multi-part circuit ports reply.
 *
 * Ensure the optical transport port's signal type is configured correctly.
 *
 * @param wPorts OF reply with circuit ports
 */
private void createOpticalPortList(OFCircuitPortsReply wPorts) {
    opticalPorts = new ArrayList<>(wPorts.getEntries().size());

    for (OFPortOptical p : wPorts.getEntries()) {
        short signalType;

        // FIXME: use constants once loxi has full optical extensions
        if (isOChPort(p.getPortNo())) {
            signalType = 5;      // OCH port
        } else {
            signalType = 2;      // OMS port
        }

        opticalPorts.add(createOpticalPort(p, signalType));
    }
}
项目:onos    文件:OplinkEdfaHandshaker.java   
@Override
public void processDriverHandshakeMessage(OFMessage m) {

    if (!startDriverHandshakeCalled) {
        throw new SwitchDriverSubHandshakeNotStarted();
    }

    if (driverHandshakeComplete.get()) {
        throw new SwitchDriverSubHandshakeCompleted(m);
    }

    switch (m.getType()) {
        case BARRIER_REPLY:
            log.debug("OPLK EDFA Received barrier response");
            break;
        case ERROR:
            log.error("Switch {} Error {}", getStringId(), m);
            break;
        case PORT_STATUS:
            processOFPortStatus((OFCircuitPortStatus) m);
            break;
        case STATS_REPLY:
            OFStatsReply stats = (OFStatsReply) m;
            if (stats.getStatsType() == OFStatsType.EXPERIMENTER) {
                log.debug("OPLK EDFA : Received multipart (port desc) reply message {}", m);
                //OTN Optical extension 1.0 port-desc
                createOpticalPortList((OFCircuitPortsReply) m);
                driverHandshakeComplete.set(true);
            }
            break;
        default:
            log.warn("Received message {} during switch-driver " +
                             "subhandshake from switch {} ... " +
                             "Ignoring message", m, getStringId());
    }
}
项目:athena    文件:OplinkRoadmHandshaker.java   
@Override
public void processDriverHandshakeMessage(OFMessage m) {

    if (!startDriverHandshakeCalled) {
        throw new SwitchDriverSubHandshakeNotStarted();
    }

    if (driverHandshakeComplete.get()) {
        throw new SwitchDriverSubHandshakeCompleted(m);
    }

    switch (m.getType()) {
        case BARRIER_REPLY:
            log.debug("OPLK ROADM Received barrier response");
            break;
        case ERROR:
            log.error("Switch {} Error {}", getStringId(), m);
            break;
        case FEATURES_REPLY:
            break;
        case FLOW_REMOVED:
            break;
        case GET_ASYNC_REPLY:
            break;
        case PACKET_IN:
            break;
        case PORT_STATUS:
            processOFPortStatus((OFCircuitPortStatus) m);
            break;
        case QUEUE_GET_CONFIG_REPLY:
            break;
        case ROLE_REPLY:
            break;
        case STATS_REPLY:
            OFStatsReply stats = (OFStatsReply) m;
            if (stats.getStatsType() == OFStatsType.EXPERIMENTER) {
                log.warn("OPLK ROADM : Received multipart (port desc) reply message {}", m);
                //OTN Optical extension 1.0 port-desc
                createOpticalPortList((OFCircuitPortsReply) m);
                driverHandshakeComplete.set(true);
            }
            break;
        default:
            log.warn("Received message {} during switch-driver " +
                             "subhandshake " + "from switch {} ... " +
                             "Ignoring message", m,
                     getStringId());

    }
}
项目:athena    文件:OfOpticalSwitchImplLinc13.java   
@Override
public void processDriverHandshakeMessage(OFMessage m) {
    if (!startDriverHandshakeCalled) {
        throw new SwitchDriverSubHandshakeNotStarted();
    }
    if (driverHandshakeComplete.get()) {
        throw new SwitchDriverSubHandshakeCompleted(m);
    }

    switch (m.getType()) {
        case BARRIER_REPLY:
            if (m.getXid() == barrierXidToWaitFor) {
                log.debug("LINC-OE Received barrier response");
            }
            break;
        case ERROR:
            log.error("Switch {} Error {}", getStringId(), m);
            break;
        case FEATURES_REPLY:
            break;
        case FLOW_REMOVED:
            break;
        case GET_ASYNC_REPLY:
            break;
        case PACKET_IN:
            break;
        case PORT_STATUS:
            log.warn("****LINC-OE Port Status {} {}", getStringId(), m);
            processOFPortStatus((OFCircuitPortStatus) m);
            break;
        case QUEUE_GET_CONFIG_REPLY:
            break;
        case ROLE_REPLY:
            break;
        case STATS_REPLY:
            OFStatsReply stats = (OFStatsReply) m;
            if (stats.getStatsType() == OFStatsType.EXPERIMENTER) {
                log.warn("LINC-OE : Received stats reply message {}", m);
                createOpticalPortList((OFCircuitPortsReply) m);
                driverHandshakeComplete.set(true);
            }
            break;
        default:
            log.warn("Received message {} during switch-driver " +
                             "subhandshake " + "from switch {} ... " +
                             "Ignoring message", m,
                     getStringId());

    }
}
项目:ravikumaran201504    文件:OFOpticalSwitchImplLINC13.java   
@Override
public void processDriverHandshakeMessage(OFMessage m) {
    if (!startDriverHandshakeCalled) {
        throw new SwitchDriverSubHandshakeNotStarted();
    }
    if (driverHandshakeComplete.get()) {
        throw new SwitchDriverSubHandshakeCompleted(m);
    }

    switch (m.getType()) {
        case BARRIER_REPLY:
            if (m.getXid() == barrierXidToWaitFor) {
                log.debug("LINC-OE Received barrier response");
            }
            break;
        case ERROR:
            log.error("Switch {} Error {}", getStringId(), m);
            break;
        case FEATURES_REPLY:
            break;
        case FLOW_REMOVED:
            break;
        case GET_ASYNC_REPLY:
            break;
        case PACKET_IN:
            break;
        case PORT_STATUS:
            log.warn("****LINC-OE Port Status {} {}", getStringId(), m);
            processOFPortStatus((OFCircuitPortStatus) m);
            break;
        case QUEUE_GET_CONFIG_REPLY:
            break;
        case ROLE_REPLY:
            break;
        case STATS_REPLY:
            OFStatsReply stats = (OFStatsReply) m;
            if (stats.getStatsType() == OFStatsType.EXPERIMENTER) {
                log.warn("LINC-OE : Received stats reply message {}", m);
                processHandshakeOFExperimenterPortDescRequest(
                        (OFCircuitPortsReply) m);
                driverHandshakeComplete.set(true);
            }
            break;
        default:
            log.warn("Received message {} during switch-driver " +
                             "subhandshake " + "from switch {} ... " +
                             "Ignoring message", m,
                     getStringId());

    }
}
项目:onos    文件:OplinkRoadmHandshaker.java   
@Override
public void processDriverHandshakeMessage(OFMessage m) {

    if (!startDriverHandshakeCalled) {
        throw new SwitchDriverSubHandshakeNotStarted();
    }

    if (driverHandshakeComplete.get()) {
        throw new SwitchDriverSubHandshakeCompleted(m);
    }

    switch (m.getType()) {
        case BARRIER_REPLY:
            log.debug("OPLK ROADM Received barrier response");
            break;
        case ERROR:
            log.error("Switch {} Error {}", getStringId(), m);
            break;
        case FEATURES_REPLY:
            break;
        case FLOW_REMOVED:
            break;
        case GET_ASYNC_REPLY:
            break;
        case PACKET_IN:
            break;
        case PORT_STATUS:
            processOFPortStatus((OFCircuitPortStatus) m);
            break;
        case QUEUE_GET_CONFIG_REPLY:
            break;
        case ROLE_REPLY:
            break;
        case STATS_REPLY:
            OFStatsReply stats = (OFStatsReply) m;
            if (stats.getStatsType() == OFStatsType.EXPERIMENTER) {
                log.debug("OPLK ROADM : Received multipart (port desc) reply message {}", m);
                //OTN Optical extension 1.0 port-desc
                createOpticalPortList((OFCircuitPortsReply) m);
                driverHandshakeComplete.set(true);
            }
            break;
        default:
            log.warn("Received message {} during switch-driver " +
                    "subhandshake from switch {} ... " +
                    "Ignoring message", m, getStringId());

    }
}
项目:onos    文件:OfOpticalSwitchImplLinc13.java   
@Override
public void processDriverHandshakeMessage(OFMessage m) {
    if (!startDriverHandshakeCalled) {
        throw new SwitchDriverSubHandshakeNotStarted();
    }
    if (driverHandshakeComplete.get()) {
        throw new SwitchDriverSubHandshakeCompleted(m);
    }

    switch (m.getType()) {
        case BARRIER_REPLY:
            if (m.getXid() == barrierXidToWaitFor) {
                log.debug("LINC-OE Received barrier response");
            }
            break;
        case ERROR:
            log.error("Switch {} Error {}", getStringId(), m);
            break;
        case FEATURES_REPLY:
            break;
        case FLOW_REMOVED:
            break;
        case GET_ASYNC_REPLY:
            break;
        case PACKET_IN:
            break;
        case PORT_STATUS:
            log.debug("****LINC-OE Port Status {} {}", getStringId(), m);
            processOFPortStatus((OFCircuitPortStatus) m);
            break;
        case QUEUE_GET_CONFIG_REPLY:
            break;
        case ROLE_REPLY:
            break;
        case STATS_REPLY:
            OFStatsReply stats = (OFStatsReply) m;
            if (stats.getStatsType() == OFStatsType.EXPERIMENTER) {
                log.debug("LINC-OE : Received stats reply message {}", m);
                createOpticalPortList((OFCircuitPortsReply) m);
                driverHandshakeComplete.set(true);
            }
            break;
        default:
            log.warn("Received message {} during switch-driver " +
                             "subhandshake " + "from switch {} ... " +
                             "Ignoring message", m,
                     getStringId());

    }
}
项目:athena    文件:OplinkRoadmHandshaker.java   
/**
 * Builds list of OFPortOptical ports based on the multi-part circuit ports reply.
 * Ensure the optical transport port's signal type is configured correctly.
 *
 * @param wPorts OF reply with circuit ports
 */
private void createOpticalPortList(OFCircuitPortsReply wPorts) {
    opticalPorts = new ArrayList<>();
    opticalPorts.addAll(wPorts.getEntries());
}
项目:onos    文件:OplinkRoadmHandshaker.java   
/**
 * Builds list of OFPortOptical ports based on the multi-part circuit ports reply.
 * Ensure the optical transport port's signal type is configured correctly.
 *
 * @param wPorts OF reply with circuit ports
 */
private void createOpticalPortList(OFCircuitPortsReply wPorts) {
    opticalPorts.addAll(wPorts.getEntries());
}
项目:onos    文件:OplinkEdfaHandshaker.java   
/**
 * Builds list of OFPortOptical ports based on the multi-part circuit ports reply.
 * Ensure the optical transport port's signal type is configured correctly.
 *
 * @param wPorts OF reply with circuit ports
 */
private void createOpticalPortList(OFCircuitPortsReply wPorts) {
    opticalPorts.addAll(wPorts.getEntries());
}