Package org.openflow.protocol.statistics

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


        return tables;
    }

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

public class OFSwitchImpl extends OFSwitchBase {

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

        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

        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

    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

        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

        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

    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

        // 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

Related Classes of org.openflow.protocol.statistics.OFDescriptionStatistics

Copyright © 2018 www.massapicom. 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.