Search in sources :

Example 56 with PortNumber

use of org.onosproject.net.PortNumber in project onos by opennetworkinglab.

the class ECDeviceStore method updatePortStatistics.

@Override
public DeviceEvent updatePortStatistics(ProviderId providerId, DeviceId deviceId, Collection<PortStatistics> newStatsCollection) {
    Map<PortNumber, PortStatistics> prvStatsMap = devicePortStats.get(deviceId);
    Map<PortNumber, PortStatistics> newStatsMap = Maps.newHashMap();
    Map<PortNumber, PortStatistics> deltaStatsMap = Maps.newHashMap();
    if (prvStatsMap != null) {
        for (PortStatistics newStats : newStatsCollection) {
            PortNumber port = newStats.portNumber();
            PortStatistics prvStats = prvStatsMap.get(port);
            DefaultPortStatistics.Builder builder = DefaultPortStatistics.builder();
            PortStatistics deltaStats = builder.build();
            if (prvStats != null) {
                deltaStats = calcDeltaStats(deviceId, prvStats, newStats);
            }
            deltaStatsMap.put(port, deltaStats);
            newStatsMap.put(port, newStats);
        }
    } else {
        for (PortStatistics newStats : newStatsCollection) {
            PortNumber port = newStats.portNumber();
            newStatsMap.put(port, newStats);
        }
    }
    devicePortDeltaStats.put(deviceId, deltaStatsMap);
    devicePortStats.put(deviceId, newStatsMap);
    // DeviceEvent returns null because of InternalPortStatsListener usage
    return null;
}
Also used : DefaultPortStatistics(org.onosproject.net.device.DefaultPortStatistics) PortNumber(org.onosproject.net.PortNumber) DefaultPortStatistics(org.onosproject.net.device.DefaultPortStatistics) PortStatistics(org.onosproject.net.device.PortStatistics)

Example 57 with PortNumber

use of org.onosproject.net.PortNumber in project onos by opennetworkinglab.

the class ECDeviceStore method refreshDevicePortCache.

private List<DeviceEvent> refreshDevicePortCache(ProviderId providerId, DeviceId deviceId, Optional<PortNumber> portNumber) {
    Device device = devices.get(deviceId);
    checkArgument(device != null, DEVICE_NOT_FOUND, deviceId);
    List<DeviceEvent> events = Lists.newArrayList();
    Map<PortNumber, Port> ports = devicePorts.computeIfAbsent(deviceId, key -> Maps.newConcurrentMap());
    List<PortDescription> descriptions = Lists.newArrayList();
    portDescriptions.entrySet().forEach(e -> {
        PortKey key = e.getKey();
        PortDescription value = e.getValue();
        if (key.deviceId().equals(deviceId) && key.providerId().equals(providerId)) {
            if (portNumber.isPresent()) {
                if (portNumber.get().equals(key.portNumber())) {
                    descriptions.add(value);
                }
            } else {
                descriptions.add(value);
            }
        }
    });
    for (PortDescription description : descriptions) {
        final PortNumber number = description.portNumber();
        ports.compute(number, (k, existingPort) -> {
            Port newPort = composePort(device, number);
            if (existingPort == null) {
                events.add(new DeviceEvent(PORT_ADDED, device, newPort));
            } else {
                if (existingPort.isEnabled() != newPort.isEnabled() || existingPort.type() != newPort.type() || existingPort.portSpeed() != newPort.portSpeed() || !AnnotationsUtil.isEqual(existingPort.annotations(), newPort.annotations())) {
                    events.add(new DeviceEvent(PORT_UPDATED, device, newPort));
                }
            }
            return newPort;
        });
    }
    return events;
}
Also used : DeviceEvent(org.onosproject.net.device.DeviceEvent) DefaultDevice(org.onosproject.net.DefaultDevice) Device(org.onosproject.net.Device) Port(org.onosproject.net.Port) DefaultPort(org.onosproject.net.DefaultPort) PortDescription(org.onosproject.net.device.PortDescription) PortNumber(org.onosproject.net.PortNumber)

Example 58 with PortNumber

use of org.onosproject.net.PortNumber in project onos by opennetworkinglab.

the class ClientLineTerminalDeviceFlowRuleProgrammable method fetchLineConnectionFromDevice.

private List<FlowRule> fetchLineConnectionFromDevice(String channel, Frequency centralFreq) {
    List<FlowRule> confirmedRules = new ArrayList<>();
    FlowRule cacheAddRule;
    FlowRule cacheDropRule;
    NetconfSession session = getNetconfSession();
    log.debug("fetchOpticalConnectionsFromDevice {} frequency {}", did(), centralFreq);
    // Build the corresponding flow rule as expected
    // Selector including port and ochSignal
    // Treatment including port
    PortNumber inputPortNumber = PortNumber.portNumber(channel);
    PortNumber outputPortNumber = PortNumber.portNumber(channel);
    log.debug("fetchOpticalConnectionsFromDevice {} port {}-{}", did(), inputPortNumber, outputPortNumber);
    TrafficSelector selectorDrop = DefaultTrafficSelector.builder().matchInPort(inputPortNumber).add(Criteria.matchLambda(toOchSignal(centralFreq, 50.0))).add(Criteria.matchOchSignalType(OchSignalType.FIXED_GRID)).build();
    TrafficTreatment treatmentDrop = DefaultTrafficTreatment.builder().setOutput(outputPortNumber).build();
    TrafficSelector selectorAdd = DefaultTrafficSelector.builder().matchInPort(inputPortNumber).build();
    TrafficTreatment treatmentAdd = DefaultTrafficTreatment.builder().add(Instructions.modL0Lambda(toOchSignal(centralFreq, 50.0))).setOutput(outputPortNumber).build();
    // Retrieved rules and cached rules are considered equal if both selector and treatment are equal
    cacheAddRule = null;
    cacheDropRule = null;
    if (getConnectionCache().size(did()) != 0) {
        cacheDropRule = getConnectionCache().get(did()).stream().filter(r -> (r.selector().equals(selectorDrop) && r.treatment().equals(treatmentDrop))).findFirst().orElse(null);
        cacheAddRule = getConnectionCache().get(did()).stream().filter(r -> (r.selector().equals(selectorAdd) && r.treatment().equals(treatmentAdd))).findFirst().orElse(null);
    }
    // Include the DROP rule to the retrieved rules if found in cache
    if ((cacheDropRule != null)) {
        confirmedRules.add(cacheDropRule);
        log.debug("fetchOpticalConnectionsFromDevice {} DROP LINE rule included in the cache {}", did(), cacheDropRule);
    } else {
        log.warn("fetchOpticalConnectionsFromDevice {} DROP LINE rule not included in cache", did());
    }
    // Include the ADD rule to the retrieved rules if found in cache
    if ((cacheAddRule != null)) {
        confirmedRules.add(cacheAddRule);
        log.debug("fetchOpticalConnectionsFromDevice {} ADD LINE rule included in the cache {}", did(), cacheAddRule.selector());
    } else {
        log.warn("fetchOpticalConnectionsFromDevice {} ADD LINE rule not included in cache", did());
    }
    // If neither Add or Drop rules are present in the cache, remove configuration from the device
    if ((cacheDropRule == null) && (cacheAddRule == null)) {
        log.warn("fetchOpticalConnectionsFromDevice {} ADD and DROP rule not included in the cache", did());
        FlowRule deviceDropRule = DefaultFlowRule.builder().forDevice(data().deviceId()).makePermanent().withSelector(selectorDrop).withTreatment(treatmentDrop).withCookie(DEFAULT_RULE_COOKIE).withPriority(DEFAULT_RULE_PRIORITY).build();
        FlowRule deviceAddRule = DefaultFlowRule.builder().forDevice(data().deviceId()).makePermanent().withSelector(selectorAdd).withTreatment(treatmentAdd).withCookie(DEFAULT_RULE_COOKIE).withPriority(DEFAULT_RULE_PRIORITY).build();
        try {
            // TODO this is not required if allowExternalFlowRules
            TerminalDeviceFlowRule addRule = new TerminalDeviceFlowRule(deviceAddRule, getLinePorts());
            removeFlowRule(session, addRule);
            TerminalDeviceFlowRule dropRule = new TerminalDeviceFlowRule(deviceDropRule, getLinePorts());
            removeFlowRule(session, dropRule);
        } catch (NetconfException e) {
            openConfigError("Error removing LINE rule from device", e);
        }
    }
    return confirmedRules;
}
Also used : NetconfSession(org.onosproject.netconf.NetconfSession) NetconfException(org.onosproject.netconf.NetconfException) GridType(org.onosproject.net.GridType) XPath(javax.xml.xpath.XPath) FlowRuleProgrammable(org.onosproject.net.flow.FlowRuleProgrammable) DefaultFlowRule(org.onosproject.net.flow.DefaultFlowRule) PortNumber(org.onosproject.net.PortNumber) DeviceService(org.onosproject.net.device.DeviceService) LoggerFactory(org.slf4j.LoggerFactory) FlowEntry(org.onosproject.net.flow.FlowEntry) Spectrum(org.onlab.util.Spectrum) DefaultTrafficTreatment(org.onosproject.net.flow.DefaultTrafficTreatment) NetconfSession(org.onosproject.netconf.NetconfSession) AbstractHandlerBehaviour(org.onosproject.net.driver.AbstractHandlerBehaviour) ArrayList(java.util.ArrayList) Frequency(org.onlab.util.Frequency) TrafficSelector(org.onosproject.net.flow.TrafficSelector) ImmutableList(com.google.common.collect.ImmutableList) ByteArrayInputStream(java.io.ByteArrayInputStream) NetconfController(org.onosproject.netconf.NetconfController) Document(org.w3c.dom.Document) NamespaceContext(javax.xml.namespace.NamespaceContext) Criteria(org.onosproject.net.flow.criteria.Criteria) DefaultTrafficSelector(org.onosproject.net.flow.DefaultTrafficSelector) TrafficTreatment(org.onosproject.net.flow.TrafficTreatment) OchSignalType(org.onosproject.net.OchSignalType) DefaultFlowEntry(org.onosproject.net.flow.DefaultFlowEntry) InputSource(org.xml.sax.InputSource) Instructions(org.onosproject.net.flow.instructions.Instructions) Logger(org.slf4j.Logger) Iterator(java.util.Iterator) Collection(java.util.Collection) Preconditions.checkNotNull(com.google.common.base.Preconditions.checkNotNull) HierarchicalConfiguration(org.apache.commons.configuration.HierarchicalConfiguration) XmlConfigParser(org.onosproject.drivers.utilities.XmlConfigParser) OdtnDeviceDescriptionDiscovery(org.onosproject.odtn.behaviour.OdtnDeviceDescriptionDiscovery) Collectors(java.util.stream.Collectors) DeviceConnectionCache(org.onosproject.drivers.odtn.impl.DeviceConnectionCache) OchSignal(org.onosproject.net.OchSignal) DatastoreId(org.onosproject.netconf.DatastoreId) XPathFactory(javax.xml.xpath.XPathFactory) List(java.util.List) StringReader(java.io.StringReader) FlowRuleParser(org.onosproject.drivers.odtn.impl.FlowRuleParser) FlowRule(org.onosproject.net.flow.FlowRule) DocumentBuilder(javax.xml.parsers.DocumentBuilder) ChannelSpacing(org.onosproject.net.ChannelSpacing) DocumentBuilderFactory(javax.xml.parsers.DocumentBuilderFactory) DeviceId(org.onosproject.net.DeviceId) NetconfException(org.onosproject.netconf.NetconfException) ArrayList(java.util.ArrayList) TrafficSelector(org.onosproject.net.flow.TrafficSelector) DefaultTrafficSelector(org.onosproject.net.flow.DefaultTrafficSelector) DefaultFlowRule(org.onosproject.net.flow.DefaultFlowRule) FlowRule(org.onosproject.net.flow.FlowRule) PortNumber(org.onosproject.net.PortNumber) DefaultTrafficTreatment(org.onosproject.net.flow.DefaultTrafficTreatment) TrafficTreatment(org.onosproject.net.flow.TrafficTreatment)

Example 59 with PortNumber

use of org.onosproject.net.PortNumber in project onos by opennetworkinglab.

the class ClientLineTerminalDeviceFlowRuleProgrammable method fetchClientConnectionFromDevice.

private List<FlowRule> fetchClientConnectionFromDevice(PortNumber clientPortNumber, PortNumber linePortNumber) {
    List<FlowRule> confirmedRules = new ArrayList<>();
    FlowRule cacheAddRule;
    FlowRule cacheDropRule;
    NetconfSession session = getNetconfSession();
    // Build the corresponding flow rule as expected
    // Selector including port
    // Treatment including port
    log.debug("fetchClientConnectionsFromDevice {} client {} line {}", did(), clientPortNumber, linePortNumber);
    TrafficSelector selectorDrop = DefaultTrafficSelector.builder().matchInPort(linePortNumber).build();
    TrafficTreatment treatmentDrop = DefaultTrafficTreatment.builder().setOutput(clientPortNumber).build();
    TrafficSelector selectorAdd = DefaultTrafficSelector.builder().matchInPort(clientPortNumber).build();
    TrafficTreatment treatmentAdd = DefaultTrafficTreatment.builder().setOutput(linePortNumber).build();
    // Retrieved rules and cached rules are considered equal if both selector and treatment are equal
    cacheAddRule = null;
    cacheDropRule = null;
    if (getConnectionCache().size(did()) != 0) {
        cacheDropRule = getConnectionCache().get(did()).stream().filter(r -> (r.selector().equals(selectorDrop) && r.treatment().equals(treatmentDrop))).findFirst().orElse(null);
        cacheAddRule = getConnectionCache().get(did()).stream().filter(r -> (r.selector().equals(selectorAdd) && r.treatment().equals(treatmentAdd))).findFirst().orElse(null);
    }
    // Include the DROP rule to the retrieved rules if found in cache
    if ((cacheDropRule != null)) {
        confirmedRules.add(cacheDropRule);
        log.debug("fetchClientConnectionsFromDevice {} DROP CLIENT rule in the cache {}", did(), cacheDropRule);
    } else {
        log.warn("fetchClientConnectionsFromDevice {} DROP CLIENT rule not found in cache", did());
    }
    // Include the ADD rule to the retrieved rules if found in cache
    if ((cacheAddRule != null)) {
        confirmedRules.add(cacheAddRule);
        log.debug("fetchClientConnectionsFromDevice {} ADD CLIENT rule in the cache {}", did(), cacheAddRule);
    } else {
        log.warn("fetchClientConnectionsFromDevice {} ADD CLIENT rule not found in cache", did());
    }
    if ((cacheDropRule == null) && (cacheAddRule == null)) {
        log.warn("fetchClientConnectionsFromDevice {} ADD and DROP rule not included in the cache", did());
        FlowRule deviceDropRule = DefaultFlowRule.builder().forDevice(data().deviceId()).makePermanent().withSelector(selectorDrop).withTreatment(treatmentDrop).withCookie(DEFAULT_RULE_COOKIE).withPriority(DEFAULT_RULE_PRIORITY).build();
        FlowRule deviceAddRule = DefaultFlowRule.builder().forDevice(data().deviceId()).makePermanent().withSelector(selectorAdd).withTreatment(treatmentAdd).withCookie(DEFAULT_RULE_COOKIE).withPriority(DEFAULT_RULE_PRIORITY).build();
        try {
            // TODO this is not required if allowExternalFlowRules
            TerminalDeviceFlowRule addRule = new TerminalDeviceFlowRule(deviceAddRule, getLinePorts());
            removeFlowRule(session, addRule);
            TerminalDeviceFlowRule dropRule = new TerminalDeviceFlowRule(deviceDropRule, getLinePorts());
            removeFlowRule(session, dropRule);
        } catch (NetconfException e) {
            openConfigError("Error removing CLIENT rule from device", e);
        }
    }
    return confirmedRules;
}
Also used : NetconfSession(org.onosproject.netconf.NetconfSession) NetconfException(org.onosproject.netconf.NetconfException) GridType(org.onosproject.net.GridType) XPath(javax.xml.xpath.XPath) FlowRuleProgrammable(org.onosproject.net.flow.FlowRuleProgrammable) DefaultFlowRule(org.onosproject.net.flow.DefaultFlowRule) PortNumber(org.onosproject.net.PortNumber) DeviceService(org.onosproject.net.device.DeviceService) LoggerFactory(org.slf4j.LoggerFactory) FlowEntry(org.onosproject.net.flow.FlowEntry) Spectrum(org.onlab.util.Spectrum) DefaultTrafficTreatment(org.onosproject.net.flow.DefaultTrafficTreatment) NetconfSession(org.onosproject.netconf.NetconfSession) AbstractHandlerBehaviour(org.onosproject.net.driver.AbstractHandlerBehaviour) ArrayList(java.util.ArrayList) Frequency(org.onlab.util.Frequency) TrafficSelector(org.onosproject.net.flow.TrafficSelector) ImmutableList(com.google.common.collect.ImmutableList) ByteArrayInputStream(java.io.ByteArrayInputStream) NetconfController(org.onosproject.netconf.NetconfController) Document(org.w3c.dom.Document) NamespaceContext(javax.xml.namespace.NamespaceContext) Criteria(org.onosproject.net.flow.criteria.Criteria) DefaultTrafficSelector(org.onosproject.net.flow.DefaultTrafficSelector) TrafficTreatment(org.onosproject.net.flow.TrafficTreatment) OchSignalType(org.onosproject.net.OchSignalType) DefaultFlowEntry(org.onosproject.net.flow.DefaultFlowEntry) InputSource(org.xml.sax.InputSource) Instructions(org.onosproject.net.flow.instructions.Instructions) Logger(org.slf4j.Logger) Iterator(java.util.Iterator) Collection(java.util.Collection) Preconditions.checkNotNull(com.google.common.base.Preconditions.checkNotNull) HierarchicalConfiguration(org.apache.commons.configuration.HierarchicalConfiguration) XmlConfigParser(org.onosproject.drivers.utilities.XmlConfigParser) OdtnDeviceDescriptionDiscovery(org.onosproject.odtn.behaviour.OdtnDeviceDescriptionDiscovery) Collectors(java.util.stream.Collectors) DeviceConnectionCache(org.onosproject.drivers.odtn.impl.DeviceConnectionCache) OchSignal(org.onosproject.net.OchSignal) DatastoreId(org.onosproject.netconf.DatastoreId) XPathFactory(javax.xml.xpath.XPathFactory) List(java.util.List) StringReader(java.io.StringReader) FlowRuleParser(org.onosproject.drivers.odtn.impl.FlowRuleParser) FlowRule(org.onosproject.net.flow.FlowRule) DocumentBuilder(javax.xml.parsers.DocumentBuilder) ChannelSpacing(org.onosproject.net.ChannelSpacing) DocumentBuilderFactory(javax.xml.parsers.DocumentBuilderFactory) DeviceId(org.onosproject.net.DeviceId) NetconfException(org.onosproject.netconf.NetconfException) ArrayList(java.util.ArrayList) TrafficSelector(org.onosproject.net.flow.TrafficSelector) DefaultTrafficSelector(org.onosproject.net.flow.DefaultTrafficSelector) DefaultFlowRule(org.onosproject.net.flow.DefaultFlowRule) FlowRule(org.onosproject.net.flow.FlowRule) DefaultTrafficTreatment(org.onosproject.net.flow.DefaultTrafficTreatment) TrafficTreatment(org.onosproject.net.flow.TrafficTreatment)

Example 60 with PortNumber

use of org.onosproject.net.PortNumber in project onos by opennetworkinglab.

the class LumentumNetconfRoadmDiscovery method parseLumentumRoadmPorts.

/**
 * Parses a configuration and returns a set of ports.
 *
 * @param cfg a hierarchical configuration
 * @return a list of port descriptions
 */
protected List<PortDescription> parseLumentumRoadmPorts(HierarchicalConfiguration cfg) {
    List<PortDescription> portDescriptions = Lists.newArrayList();
    List<HierarchicalConfiguration> ports = cfg.configurationsAt(PHYSICAL_PORT);
    ports.stream().forEach(pcfg -> {
        DefaultAnnotations.Builder annotations = DefaultAnnotations.builder();
        // Load port number
        PortNumber portNum = PortNumber.portNumber(pcfg.getString(DN).substring(pcfg.getString(DN).lastIndexOf(DN_PORT) + 5));
        // Load port state
        String maintenanceState = pcfg.getString(MAINTENANCE_STATE);
        boolean isEnabled = ((maintenanceState != null) && (maintenanceState).equals(IN_SERVICE));
        // Load port type (FIBER/COPPER)
        Port.Type type = null;
        for (Object o : pcfg.getList(PORT_EXTENSION)) {
            String s = (String) o;
            if (s.contains(OPTICAL_INPUT) || s.contains(OPTICAL_OUTPUT)) {
                type = Port.Type.FIBER;
                log.debug("Loaded OPTICAL port {}", portNum);
            } else if (s.contains(PORT_ETHERNET) || s.contains(PORT_PLUGGABLE)) {
                type = Port.Type.COPPER;
                log.debug("Loaded PACKET port {}", portNum);
            }
        }
        // Load port speed of Ethernet interface, expressed in Mb/s
        // should be the speed of optical port
        Long speed = 0L;
        if (type != null) {
            if (type.equals(Port.Type.COPPER)) {
                String speedString = pcfg.getString(PORT_SPEED);
                log.debug("--- port {} loaded speed {}", portNum, speedString);
                if (speedString != null) {
                    if (speedString.contains("Mb")) {
                        speed = Long.parseLong(speedString.substring(speedString.lastIndexOf("speed_") + 6, speedString.lastIndexOf("Mb")));
                    }
                    if (speedString.contains("Gb")) {
                        speed = 1000 * Long.parseLong(speedString.substring(speedString.lastIndexOf("speed_") + 6, speedString.lastIndexOf("Gb")));
                    }
                } else {
                    log.error("Lumentum NETCONF - Port speed of Ethernet port not correctly loaded");
                }
            }
        } else {
            log.error("Port Type not correctly loaded");
        }
        /**
         * Setting the reverse port value for the unidirectional ports.
         *
         * In this device each port includes an input fiber and an output fiber.
         * The 20 input  fibers are numbered from MIN_MUX_PORT = 4101 to MAX_MUX_PORT = 4120.
         * The 20 output fibers are numbered from MIN_DEM_PORT = 5201 to MAX_DEM_PORT = 5220.
         *
         * Where port 520x is always the reverse of 410x.
         */
        if ((portNum.toLong() >= MIN_MUX_PORT) && (portNum.toLong() <= MAX_MUX_PORT)) {
            Long reversePortId = portNum.toLong() + DELTA_MUX_DEM_PORT;
            annotations.set(OpticalPathIntent.REVERSE_PORT_ANNOTATION_KEY, reversePortId.toString());
        }
        if ((portNum.toLong() >= MIN_DEM_PORT) && (portNum.toLong() <= MAX_DEM_PORT)) {
            Long reversePortId = portNum.toLong() - DELTA_MUX_DEM_PORT;
            annotations.set(OpticalPathIntent.REVERSE_PORT_ANNOTATION_KEY, reversePortId.toString());
        }
        // Load other information
        pcfg.getKeys().forEachRemaining(k -> {
            if (!k.contains(DN) && !k.contains(PORT_SPEED) && !k.contains(PORT_EXTENSION) && !k.contains(MAINTENANCE_STATE)) {
                String value = pcfg.getString(k);
                if (!value.isEmpty()) {
                    k = StringUtils.replaceEach(k, new String[] { "loteeth:", "lotep:", "lotepopt:", "config.", "=", ":", "state." }, new String[] { "", "", "", "", "", "", "" });
                    annotations.set(k, value);
                    // To visualize port name in the ROADM app GUI
                    if (k.equals(PORT_NAME)) {
                        annotations.set(AnnotationKeys.PORT_NAME, value);
                    }
                }
            }
        });
        log.debug("Lumentum NETCONF - retrieved port {},{},{},{},{}", portNum, isEnabled, type, speed, annotations.build());
        if ((type == Port.Type.FIBER) && ((annotations.build().value(AnnotationKeys.PORT_NAME)).contains(MUX_PORT_NAME) || (annotations.build().value(AnnotationKeys.PORT_NAME)).contains(DEMUX_PORT_NAME) || (annotations.build().value(AnnotationKeys.PORT_NAME)).contains(LINE_PORT_NAME))) {
            // These are the ports supporting OchSignals
            portDescriptions.add(omsPortDescription(portNum, isEnabled, START_CENTER_FREQ_50, END_CENTER_FREQ_50, CHANNEL_SPACING_50.frequency(), annotations.build()));
        } else {
            // These are COPPER ports, or FIBER ports not supporting OchSignals
            DefaultPortDescription.Builder portDescriptionBuilder = DefaultPortDescription.builder();
            portDescriptionBuilder.withPortNumber(portNum).isEnabled(isEnabled).type(type).portSpeed(speed).annotations(annotations.build());
            portDescriptions.add(portDescriptionBuilder.build());
        }
    });
    return portDescriptions;
}
Also used : DefaultAnnotations(org.onosproject.net.DefaultAnnotations) Port(org.onosproject.net.Port) OmsPortHelper.omsPortDescription(org.onosproject.net.optical.device.OmsPortHelper.omsPortDescription) PortDescription(org.onosproject.net.device.PortDescription) DefaultPortDescription(org.onosproject.net.device.DefaultPortDescription) HierarchicalConfiguration(org.apache.commons.configuration.HierarchicalConfiguration) DefaultPortDescription(org.onosproject.net.device.DefaultPortDescription) PortNumber(org.onosproject.net.PortNumber)

Aggregations

PortNumber (org.onosproject.net.PortNumber)336 DeviceId (org.onosproject.net.DeviceId)136 TrafficTreatment (org.onosproject.net.flow.TrafficTreatment)109 DefaultTrafficTreatment (org.onosproject.net.flow.DefaultTrafficTreatment)103 ConnectPoint (org.onosproject.net.ConnectPoint)82 TrafficSelector (org.onosproject.net.flow.TrafficSelector)80 DefaultTrafficSelector (org.onosproject.net.flow.DefaultTrafficSelector)74 Port (org.onosproject.net.Port)67 ArrayList (java.util.ArrayList)64 Set (java.util.Set)64 List (java.util.List)59 Logger (org.slf4j.Logger)58 Collectors (java.util.stream.Collectors)51 DeviceService (org.onosproject.net.device.DeviceService)49 VlanId (org.onlab.packet.VlanId)42 MacAddress (org.onlab.packet.MacAddress)41 Device (org.onosproject.net.Device)40 FlowRule (org.onosproject.net.flow.FlowRule)40 Optional (java.util.Optional)39 Sets (com.google.common.collect.Sets)35