Examples of OFDescriptionStatistics


Examples of org.openflow.protocol.statistics.OFDescriptionStatistics

        this.featuresFutureMap = new ConcurrentHashMap<Integer,OFFeaturesReplyFuture>();
        this.iofMsgListenersMap = new ConcurrentHashMap<Integer,IOFMessageListener>();
        this.role = null;
        this.timedCache = new TimedCache<Long>(100, 5*1000 )// 5 seconds interval
        this.portBroadcastCacheHitMap = new ConcurrentHashMap<Short, AtomicLong>();
        this.description = new OFDescriptionStatistics();
        this.lastMessageTime = System.currentTimeMillis();

        this.portManager = new PortManager();

        // Defaults properties for an ideal switch
View Full Code Here

Examples of org.openflow.protocol.statistics.OFDescriptionStatistics

        return tables;
    }

    @Override
    public OFDescriptionStatistics getDescriptionStatistics() {
        return new OFDescriptionStatistics(description);
    }
View Full Code Here

Examples of org.openflow.protocol.statistics.OFDescriptionStatistics

public class OFSwitchImpl extends OFSwitchBase {

    @Override
    @JsonIgnore
    public void setSwitchProperties(OFDescriptionStatistics description) {
        this.description = new OFDescriptionStatistics(description);
    }
View Full Code Here

Examples of org.openflow.protocol.statistics.OFDescriptionStatistics

        this.tables = sw.getTables();
        this.capabilities = sw.getCapabilities();
        this.actions = sw.getActions();
        this.ports = toSyncedPortList(sw.getPorts());

        OFDescriptionStatistics d = sw.getDescriptionStatistics();
        this.manufacturerDescription = d.getManufacturerDescription();
        this.hardwareDescription = d.getHardwareDescription();
        this.softwareDescription = d.getSoftwareDescription();
        this.serialNumber = d.getSerialNumber();
        this.datapathDescription = d.getDatapathDescription();
    }
View Full Code Here

Examples of org.openflow.protocol.statistics.OFDescriptionStatistics

        return fr;
    }

    @JsonIgnore
    public OFDescriptionStatistics getDescription() {
        OFDescriptionStatistics desc = new OFDescriptionStatistics();
        desc.setManufacturerDescription(manufacturerDescription);
        desc.setHardwareDescription(hardwareDescription);
        desc.setSoftwareDescription(softwareDescription);
        desc.setSerialNumber(serialNumber);
        desc.setDatapathDescription(datapathDescription);
        return desc;
    }
View Full Code Here

Examples of org.openflow.protocol.statistics.OFDescriptionStatistics

    private static OFStatisticsReply createDescriptionStatsReply() {
        OFStatisticsReply sr = (OFStatisticsReply)BasicFactory.getInstance()
                .getMessage(OFType.STATS_REPLY);
        sr.setStatisticType(OFStatisticsType.DESC);
        OFDescriptionStatistics desc = new OFDescriptionStatistics();
        desc.setDatapathDescription("Datapath Description");
        desc.setHardwareDescription("Hardware Description");
        desc.setManufacturerDescription("Manufacturer Description");
        desc.setSerialNumber("Serial Number");
        desc.setSoftwareDescription("Software Description");
        sr.setStatistics(Collections.singletonList(desc));
        return sr;
    }
View Full Code Here

Examples of org.openflow.protocol.statistics.OFDescriptionStatistics

        resetChannel();
        replay(channel);

        // build the stats reply
        OFStatisticsReply sr = createDescriptionStatsReply();
        OFDescriptionStatistics desc =
                (OFDescriptionStatistics) sr.getFirstStatistics();

        setupMessageEvent(Collections.<OFMessage>singletonList(sr));
        setupMockStorageSource(cfg);
View Full Code Here

Examples of org.openflow.protocol.statistics.OFDescriptionStatistics

        expectLastCall().andReturn(null).atLeastOnce();
        replay(channel);

        // build the stats reply
        OFStatisticsReply sr = createDescriptionStatsReply();
        OFDescriptionStatistics desc =
                (OFDescriptionStatistics) sr.getFirstStatistics();

        setupMessageEvent(Collections.<OFMessage>singletonList(sr));
        setupMockStorageSource(cfg);
View Full Code Here

Examples of org.openflow.protocol.statistics.OFDescriptionStatistics

    public Controller getController() {
        return controller;
    }

    private static OFDescriptionStatistics createOFDescriptionStatistics() {
        OFDescriptionStatistics desc = new OFDescriptionStatistics();
        desc.setDatapathDescription("");
        desc.setHardwareDescription("");
        desc.setManufacturerDescription("");
        desc.setSerialNumber("");
        desc.setSoftwareDescription("");
        return desc;
    }
View Full Code Here

Examples of org.openflow.protocol.statistics.OFDescriptionStatistics

        // Add switch
        listener.switchAdded(1L);
        expectLastCall().once();
        replay(listener);

        OFDescriptionStatistics desc = createOFDescriptionStatistics();
        desc.setDatapathDescription("The Switch");
        doAddSwitchToStore(1L, desc, null);
        controller.processUpdateQueueForTesting();
        verify(listener);

        IOFSwitch sw = controller.getSwitch(1L);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.