mirror of
https://github.com/opennetworkinglab/onos.git
synced 2025-12-15 22:31:50 +01:00
[WIP] Upgrade ONOS to karaf version 4.2.1
Change-Id: I7cd40c995bdf1c80f94b1895fb3344e32404c7fa
This commit is contained in:
parent
10216e4129
commit
d84f89ba3d
2
.bazelrc
2
.bazelrc
@ -8,5 +8,7 @@ build --javabase=@local_jdk//:jdk
|
||||
build --java_toolchain=@bazel_tools//tools/jdk:toolchain_hostjdk8
|
||||
build --host_javabase=@local_jdk//:jdk
|
||||
build --distinct_host_configuration=false
|
||||
#FIXME - this is temporary while porting to karaf 4.2.1
|
||||
build --action_env=HOME
|
||||
#build --disk_cache=~/bazel-cache
|
||||
#build --remote_http_cache=http://10.1.10.224:80/cache
|
||||
|
||||
@ -29,12 +29,6 @@ import org.onlab.packet.TpPort;
|
||||
import org.onosproject.acl.AclRule;
|
||||
import org.onosproject.acl.AclService;
|
||||
import org.onosproject.acl.AclStore;
|
||||
import org.apache.felix.scr.annotations.Activate;
|
||||
import org.apache.felix.scr.annotations.Component;
|
||||
import org.apache.felix.scr.annotations.Deactivate;
|
||||
import org.apache.felix.scr.annotations.Reference;
|
||||
import org.apache.felix.scr.annotations.ReferenceCardinality;
|
||||
import org.apache.felix.scr.annotations.Service;
|
||||
import org.onosproject.acl.RuleId;
|
||||
import org.onosproject.core.ApplicationId;
|
||||
import org.onosproject.core.CoreService;
|
||||
@ -56,6 +50,11 @@ import org.onosproject.net.flow.instructions.Instructions;
|
||||
import org.onosproject.net.host.HostEvent;
|
||||
import org.onosproject.net.host.HostListener;
|
||||
import org.onosproject.net.host.HostService;
|
||||
import org.osgi.service.component.annotations.Activate;
|
||||
import org.osgi.service.component.annotations.Component;
|
||||
import org.osgi.service.component.annotations.Deactivate;
|
||||
import org.osgi.service.component.annotations.Reference;
|
||||
import org.osgi.service.component.annotations.ReferenceCardinality;
|
||||
import org.slf4j.Logger;
|
||||
|
||||
import java.util.HashSet;
|
||||
@ -67,20 +66,19 @@ import static org.slf4j.LoggerFactory.getLogger;
|
||||
/**
|
||||
* Implementation of the ACL service.
|
||||
*/
|
||||
@Component(immediate = true)
|
||||
@Service
|
||||
@Component(immediate = true, service = AclService.class)
|
||||
public class AclManager implements AclService {
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected CoreService coreService;
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected FlowRuleService flowRuleService;
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected HostService hostService;
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected MastershipService mastershipService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected AclStore aclStore;
|
||||
|
||||
private final Logger log = getLogger(getClass());
|
||||
|
||||
@ -21,15 +21,9 @@
|
||||
package org.onosproject.acl.impl;
|
||||
|
||||
import com.google.common.collect.Collections2;
|
||||
import org.onlab.util.KryoNamespace;
|
||||
import org.onosproject.acl.AclRule;
|
||||
import org.onosproject.acl.AclStore;
|
||||
import org.apache.felix.scr.annotations.Activate;
|
||||
import org.apache.felix.scr.annotations.Component;
|
||||
import org.apache.felix.scr.annotations.Deactivate;
|
||||
import org.apache.felix.scr.annotations.Reference;
|
||||
import org.apache.felix.scr.annotations.ReferenceCardinality;
|
||||
import org.apache.felix.scr.annotations.Service;
|
||||
import org.onlab.util.KryoNamespace;
|
||||
import org.onosproject.acl.RuleId;
|
||||
import org.onosproject.core.ApplicationId;
|
||||
import org.onosproject.core.CoreService;
|
||||
@ -41,6 +35,11 @@ import org.onosproject.store.service.ConsistentMap;
|
||||
import org.onosproject.store.service.Serializer;
|
||||
import org.onosproject.store.service.StorageService;
|
||||
import org.onosproject.store.service.Versioned;
|
||||
import org.osgi.service.component.annotations.Activate;
|
||||
import org.osgi.service.component.annotations.Component;
|
||||
import org.osgi.service.component.annotations.Deactivate;
|
||||
import org.osgi.service.component.annotations.Reference;
|
||||
import org.osgi.service.component.annotations.ReferenceCardinality;
|
||||
import org.slf4j.Logger;
|
||||
|
||||
import java.util.ArrayList;
|
||||
@ -53,8 +52,7 @@ import static org.slf4j.LoggerFactory.getLogger;
|
||||
/**
|
||||
* Implementation of the ACL store service.
|
||||
*/
|
||||
@Component(immediate = true)
|
||||
@Service
|
||||
@Component(immediate = true, service = AclStore.class)
|
||||
public class DistributedAclStore extends AbstractStore implements AclStore {
|
||||
|
||||
private final Logger log = getLogger(getClass());
|
||||
@ -66,9 +64,9 @@ public class DistributedAclStore extends AbstractStore implements AclStore {
|
||||
private ConsistentMap<RuleId, Set<FlowRule>> ruleToFlow;
|
||||
private ConsistentMap<RuleId, List<RuleId>> denyRuleToAllowRule;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected StorageService storageService;
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected CoreService coreService;
|
||||
|
||||
@Activate
|
||||
|
||||
@ -16,11 +16,11 @@
|
||||
package org.onosproject.actn.mdsc.tetunnelctl;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
import org.apache.felix.scr.annotations.Activate;
|
||||
import org.apache.felix.scr.annotations.Component;
|
||||
import org.apache.felix.scr.annotations.Deactivate;
|
||||
import org.apache.felix.scr.annotations.Reference;
|
||||
import org.apache.felix.scr.annotations.ReferenceCardinality;
|
||||
import org.osgi.service.component.annotations.Activate;
|
||||
import org.osgi.service.component.annotations.Component;
|
||||
import org.osgi.service.component.annotations.Deactivate;
|
||||
import org.osgi.service.component.annotations.Reference;
|
||||
import org.osgi.service.component.annotations.ReferenceCardinality;
|
||||
import org.onosproject.actn.mdsc.pce.TeTunnelPceService;
|
||||
import org.onosproject.incubator.net.tunnel.Tunnel;
|
||||
import org.onosproject.incubator.net.tunnel.TunnelAdminService;
|
||||
@ -63,22 +63,22 @@ public class TeTunnelCtl {
|
||||
|
||||
private final TunnelListener tunnelListener = new InternalTunnelListener();
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected TunnelService tunnelService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected TunnelAdminService tunnelAdminService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected TeTunnelService teTunnelService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected TeTunnelAdminService teTunnelAdminService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected TeTopologyService teTopologyService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected TeTunnelPceService teTunnelPceService;
|
||||
|
||||
@Activate
|
||||
|
||||
@ -18,10 +18,9 @@ package org.onosproject.actn.mdsc.pce.impl;
|
||||
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import com.google.common.collect.Lists;
|
||||
import org.apache.felix.scr.annotations.Activate;
|
||||
import org.apache.felix.scr.annotations.Component;
|
||||
import org.apache.felix.scr.annotations.Deactivate;
|
||||
import org.apache.felix.scr.annotations.Service;
|
||||
import org.osgi.service.component.annotations.Activate;
|
||||
import org.osgi.service.component.annotations.Component;
|
||||
import org.osgi.service.component.annotations.Deactivate;
|
||||
import org.onosproject.actn.mdsc.pce.TeTunnelPce;
|
||||
import org.onosproject.actn.mdsc.pce.TeTunnelPceService;
|
||||
import org.onosproject.tetunnel.api.tunnel.TeTunnel;
|
||||
@ -35,8 +34,7 @@ import java.util.List;
|
||||
/**
|
||||
* Implementation of Te Tunnel PCE service.
|
||||
*/
|
||||
@Component(immediate = true)
|
||||
@Service
|
||||
@Component(immediate = true, service = TeTunnelPceService.class)
|
||||
public class TeTunnelPceManager implements TeTunnelPceService {
|
||||
|
||||
private static final Logger log = getLogger(TeTunnelPceManager.class);
|
||||
|
||||
@ -23,12 +23,6 @@ import io.netty.buffer.ByteBuf;
|
||||
import io.netty.buffer.Unpooled;
|
||||
import io.netty.channel.ChannelHandlerContext;
|
||||
import io.netty.util.CharsetUtil;
|
||||
import org.apache.felix.scr.annotations.Activate;
|
||||
import org.apache.felix.scr.annotations.Component;
|
||||
import org.apache.felix.scr.annotations.Deactivate;
|
||||
import org.apache.felix.scr.annotations.Reference;
|
||||
import org.apache.felix.scr.annotations.ReferenceCardinality;
|
||||
import org.apache.felix.scr.annotations.Service;
|
||||
import org.json.JSONObject;
|
||||
import org.onlab.packet.IpAddress;
|
||||
import org.onlab.packet.IpPrefix;
|
||||
@ -65,6 +59,11 @@ import org.onosproject.ovsdb.controller.OvsdbClientService;
|
||||
import org.onosproject.ovsdb.controller.OvsdbController;
|
||||
import org.onosproject.ovsdb.controller.OvsdbInterface;
|
||||
import org.onosproject.routing.bgp.BgpInfoService;
|
||||
import org.osgi.service.component.annotations.Activate;
|
||||
import org.osgi.service.component.annotations.Component;
|
||||
import org.osgi.service.component.annotations.Deactivate;
|
||||
import org.osgi.service.component.annotations.Reference;
|
||||
import org.osgi.service.component.annotations.ReferenceCardinality;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
@ -74,36 +73,35 @@ import java.util.Set;
|
||||
|
||||
import static org.onlab.packet.Ethernet.TYPE_IPV4;
|
||||
|
||||
@Component(immediate = true)
|
||||
@Service
|
||||
@Component(immediate = true, service = ArtemisDeaggregator.class)
|
||||
public class ArtemisDeaggregatorImpl implements ArtemisDeaggregator {
|
||||
|
||||
private final Logger log = LoggerFactory.getLogger(getClass());
|
||||
private static final int PRIORITY = 1000;
|
||||
|
||||
/* Services */
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
private BgpInfoService bgpInfoService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
private ArtemisService artemisService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
private OvsdbController ovsdbController;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
private DeviceService deviceService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
private InterfaceService interfaceService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
private FlowObjectiveService flowObjectiveService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
private FlowRuleService flowRuleService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
private CoreService coreService;
|
||||
|
||||
/* Variables */
|
||||
|
||||
@ -17,12 +17,6 @@
|
||||
package org.onosproject.artemis.impl;
|
||||
|
||||
import org.apache.commons.lang.exception.ExceptionUtils;
|
||||
import org.apache.felix.scr.annotations.Activate;
|
||||
import org.apache.felix.scr.annotations.Component;
|
||||
import org.apache.felix.scr.annotations.Deactivate;
|
||||
import org.apache.felix.scr.annotations.Reference;
|
||||
import org.apache.felix.scr.annotations.ReferenceCardinality;
|
||||
import org.apache.felix.scr.annotations.Service;
|
||||
import org.json.JSONArray;
|
||||
import org.json.JSONException;
|
||||
import org.json.JSONObject;
|
||||
@ -32,22 +26,26 @@ import org.onosproject.artemis.ArtemisEventListener;
|
||||
import org.onosproject.artemis.ArtemisService;
|
||||
import org.onosproject.core.CoreService;
|
||||
import org.onosproject.event.EventDeliveryService;
|
||||
import org.osgi.service.component.annotations.Activate;
|
||||
import org.osgi.service.component.annotations.Component;
|
||||
import org.osgi.service.component.annotations.Deactivate;
|
||||
import org.osgi.service.component.annotations.Reference;
|
||||
import org.osgi.service.component.annotations.ReferenceCardinality;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
@Component(immediate = true)
|
||||
@Service
|
||||
@Component(immediate = true, service = ArtemisDetector.class)
|
||||
public class ArtemisDetectorImpl implements ArtemisDetector {
|
||||
private final Logger log = LoggerFactory.getLogger(getClass());
|
||||
|
||||
/* Services */
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
private CoreService coreService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
private ArtemisService artemisService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected EventDeliveryService eventDispatcher;
|
||||
|
||||
private final ArtemisEventListener artemisEventListener = this::handleArtemisEvent;
|
||||
|
||||
@ -16,12 +16,6 @@
|
||||
|
||||
package org.onosproject.artemis.impl;
|
||||
|
||||
import org.apache.felix.scr.annotations.Activate;
|
||||
import org.apache.felix.scr.annotations.Component;
|
||||
import org.apache.felix.scr.annotations.Deactivate;
|
||||
import org.apache.felix.scr.annotations.Reference;
|
||||
import org.apache.felix.scr.annotations.ReferenceCardinality;
|
||||
import org.apache.felix.scr.annotations.Service;
|
||||
import org.onosproject.artemis.ArtemisEventListener;
|
||||
import org.onosproject.artemis.ArtemisService;
|
||||
import org.onosproject.core.ApplicationId;
|
||||
@ -33,13 +27,17 @@ import org.onosproject.net.config.NetworkConfigListener;
|
||||
import org.onosproject.net.config.NetworkConfigRegistry;
|
||||
import org.onosproject.net.config.NetworkConfigService;
|
||||
import org.onosproject.net.config.basics.SubjectFactories;
|
||||
import org.osgi.service.component.annotations.Activate;
|
||||
import org.osgi.service.component.annotations.Component;
|
||||
import org.osgi.service.component.annotations.Deactivate;
|
||||
import org.osgi.service.component.annotations.Reference;
|
||||
import org.osgi.service.component.annotations.ReferenceCardinality;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import java.util.Optional;
|
||||
|
||||
@Component(immediate = true)
|
||||
@Service
|
||||
@Component(immediate = true, service = ArtemisService.class)
|
||||
public class ArtemisManager
|
||||
extends AbstractListenerManager<ArtemisEvent, ArtemisEventListener>
|
||||
implements ArtemisService {
|
||||
@ -51,13 +49,13 @@ public class ArtemisManager
|
||||
private final InternalNetworkConfigListener configListener =
|
||||
new InternalNetworkConfigListener();
|
||||
/* Services */
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
private NetworkConfigRegistry registry;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
private NetworkConfigService configService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
private CoreService coreService;
|
||||
|
||||
/* Variables */
|
||||
|
||||
@ -17,12 +17,6 @@ package org.onosproject.artemis.impl;
|
||||
|
||||
import com.google.common.collect.Sets;
|
||||
import io.netty.channel.ChannelHandlerContext;
|
||||
import org.apache.felix.scr.annotations.Activate;
|
||||
import org.apache.felix.scr.annotations.Component;
|
||||
import org.apache.felix.scr.annotations.Deactivate;
|
||||
import org.apache.felix.scr.annotations.Reference;
|
||||
import org.apache.felix.scr.annotations.ReferenceCardinality;
|
||||
import org.apache.felix.scr.annotations.Service;
|
||||
import org.json.JSONObject;
|
||||
import org.onlab.packet.IpPrefix;
|
||||
import org.onosproject.artemis.ArtemisMonitor;
|
||||
@ -32,6 +26,11 @@ import org.onosproject.event.EventDeliveryService;
|
||||
import org.onosproject.net.config.NetworkConfigEvent;
|
||||
import org.onosproject.net.config.NetworkConfigListener;
|
||||
import org.onosproject.net.config.NetworkConfigService;
|
||||
import org.osgi.service.component.annotations.Activate;
|
||||
import org.osgi.service.component.annotations.Component;
|
||||
import org.osgi.service.component.annotations.Deactivate;
|
||||
import org.osgi.service.component.annotations.Reference;
|
||||
import org.osgi.service.component.annotations.ReferenceCardinality;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
@ -39,16 +38,15 @@ import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@Component(immediate = true)
|
||||
@Service
|
||||
@Component(immediate = true, service = ArtemisMonitor.class)
|
||||
public class ArtemisMonitorImpl implements ArtemisMonitor {
|
||||
private final Logger log = LoggerFactory.getLogger(getClass());
|
||||
private static final Class<ArtemisConfig> CONFIG_CLASS = ArtemisConfig.class;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected EventDeliveryService eventDispatcher;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
private NetworkConfigService configService;
|
||||
|
||||
/* Variables */
|
||||
|
||||
@ -15,11 +15,11 @@
|
||||
*/
|
||||
package org.onosproject.bgprouter;
|
||||
|
||||
import org.apache.felix.scr.annotations.Activate;
|
||||
import org.apache.felix.scr.annotations.Component;
|
||||
import org.apache.felix.scr.annotations.Deactivate;
|
||||
import org.apache.felix.scr.annotations.Reference;
|
||||
import org.apache.felix.scr.annotations.ReferenceCardinality;
|
||||
import org.osgi.service.component.annotations.Activate;
|
||||
import org.osgi.service.component.annotations.Component;
|
||||
import org.osgi.service.component.annotations.Deactivate;
|
||||
import org.osgi.service.component.annotations.Reference;
|
||||
import org.osgi.service.component.annotations.ReferenceCardinality;
|
||||
import org.onosproject.core.ApplicationId;
|
||||
import org.onosproject.core.CoreService;
|
||||
import org.onosproject.component.ComponentService;
|
||||
@ -51,25 +51,25 @@ public class BgpRouter {
|
||||
|
||||
public static final String BGP_ROUTER_APP = "org.onosproject.bgprouter";
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected CoreService coreService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected InterfaceService interfaceService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected NetworkConfigRegistry networkConfigService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected PacketService packetService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected FlowObjectiveService flowObjectiveService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected DeviceService deviceService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected ComponentService componentService;
|
||||
|
||||
private ApplicationId appId;
|
||||
|
||||
@ -15,11 +15,11 @@
|
||||
*/
|
||||
package org.onosproject.castor;
|
||||
|
||||
import org.apache.felix.scr.annotations.Activate;
|
||||
import org.apache.felix.scr.annotations.Component;
|
||||
import org.apache.felix.scr.annotations.Deactivate;
|
||||
import org.apache.felix.scr.annotations.Reference;
|
||||
import org.apache.felix.scr.annotations.ReferenceCardinality;
|
||||
import org.osgi.service.component.annotations.Activate;
|
||||
import org.osgi.service.component.annotations.Component;
|
||||
import org.osgi.service.component.annotations.Deactivate;
|
||||
import org.osgi.service.component.annotations.Reference;
|
||||
import org.osgi.service.component.annotations.ReferenceCardinality;
|
||||
import org.onosproject.app.ApplicationService;
|
||||
import org.onosproject.core.ApplicationId;
|
||||
import org.onosproject.core.CoreService;
|
||||
@ -38,13 +38,13 @@ public class Castor {
|
||||
public static final String CASTOR_APP = "org.onosproject.castor";
|
||||
private final Logger log = getLogger(getClass());
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected CoreService coreService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected ApplicationService applicationService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected IntentSynchronizationService intentSynchronizer;
|
||||
|
||||
private ApplicationId appId;
|
||||
|
||||
@ -15,12 +15,6 @@
|
||||
*/
|
||||
package org.onosproject.castor;
|
||||
|
||||
import org.apache.felix.scr.annotations.Activate;
|
||||
import org.apache.felix.scr.annotations.Component;
|
||||
import org.apache.felix.scr.annotations.Deactivate;
|
||||
import org.apache.felix.scr.annotations.Reference;
|
||||
import org.apache.felix.scr.annotations.ReferenceCardinality;
|
||||
import org.apache.felix.scr.annotations.Service;
|
||||
import org.onlab.packet.ARP;
|
||||
import org.onlab.packet.Ethernet;
|
||||
import org.onlab.packet.Ip4Address;
|
||||
@ -40,6 +34,11 @@ import org.onosproject.net.packet.InboundPacket;
|
||||
import org.onosproject.net.packet.PacketContext;
|
||||
import org.onosproject.net.packet.PacketProcessor;
|
||||
import org.onosproject.net.packet.PacketService;
|
||||
import org.osgi.service.component.annotations.Activate;
|
||||
import org.osgi.service.component.annotations.Component;
|
||||
import org.osgi.service.component.annotations.Deactivate;
|
||||
import org.osgi.service.component.annotations.Reference;
|
||||
import org.osgi.service.component.annotations.ReferenceCardinality;
|
||||
import org.slf4j.Logger;
|
||||
|
||||
import java.nio.ByteBuffer;
|
||||
@ -54,20 +53,19 @@ import static org.slf4j.LoggerFactory.getLogger;
|
||||
* Component for managing the ARPs.
|
||||
*/
|
||||
|
||||
@Component(immediate = true, enabled = true)
|
||||
@Service
|
||||
@Component(immediate = true, service = ArpService.class)
|
||||
public class CastorArpManager implements ArpService {
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected ConnectivityManagerService connectivityManager;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected PacketService packetService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected CoreService coreService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected CastorStore castorStore;
|
||||
|
||||
private ProxyArpProcessor processor = new ProxyArpProcessor();
|
||||
|
||||
@ -14,12 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.onosproject.castor;
|
||||
import org.apache.felix.scr.annotations.Activate;
|
||||
import org.apache.felix.scr.annotations.Component;
|
||||
import org.apache.felix.scr.annotations.Deactivate;
|
||||
import org.apache.felix.scr.annotations.Reference;
|
||||
import org.apache.felix.scr.annotations.ReferenceCardinality;
|
||||
import org.apache.felix.scr.annotations.Service;
|
||||
|
||||
import org.onlab.packet.Ethernet;
|
||||
import org.onlab.packet.IPv4;
|
||||
import org.onlab.packet.IPv6;
|
||||
@ -29,6 +24,7 @@ import org.onlab.packet.MacAddress;
|
||||
import org.onlab.packet.TpPort;
|
||||
import org.onosproject.core.ApplicationId;
|
||||
import org.onosproject.core.CoreService;
|
||||
import org.onosproject.intentsync.IntentSynchronizationService;
|
||||
import org.onosproject.net.ConnectPoint;
|
||||
import org.onosproject.net.FilteredConnectPoint;
|
||||
import org.onosproject.net.flow.DefaultTrafficSelector;
|
||||
@ -38,7 +34,11 @@ import org.onosproject.net.flow.TrafficTreatment;
|
||||
import org.onosproject.net.intent.Key;
|
||||
import org.onosproject.net.intent.MultiPointToSinglePointIntent;
|
||||
import org.onosproject.net.intent.PointToPointIntent;
|
||||
import org.onosproject.intentsync.IntentSynchronizationService;
|
||||
import org.osgi.service.component.annotations.Activate;
|
||||
import org.osgi.service.component.annotations.Component;
|
||||
import org.osgi.service.component.annotations.Deactivate;
|
||||
import org.osgi.service.component.annotations.Reference;
|
||||
import org.osgi.service.component.annotations.ReferenceCardinality;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
@ -56,17 +56,16 @@ import static com.google.common.base.Preconditions.checkNotNull;
|
||||
/**
|
||||
* Manages the connectivity requirements between peers.
|
||||
*/
|
||||
@Component(immediate = true, enabled = true)
|
||||
@Service
|
||||
@Component(immediate = true, service = ConnectivityManagerService.class)
|
||||
public class ConnectivityManager implements ConnectivityManagerService {
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected IntentSynchronizationService intentSynchronizer;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected CoreService coreService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected CastorStore castorStore;
|
||||
|
||||
private static final int PRIORITY_OFFSET = 1000;
|
||||
|
||||
@ -16,24 +16,23 @@
|
||||
package org.onosproject.castor;
|
||||
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
import org.apache.felix.scr.annotations.Activate;
|
||||
import org.apache.felix.scr.annotations.Component;
|
||||
import org.apache.felix.scr.annotations.Deactivate;
|
||||
import org.apache.felix.scr.annotations.Reference;
|
||||
import org.apache.felix.scr.annotations.ReferenceCardinality;
|
||||
import org.apache.felix.scr.annotations.Service;
|
||||
import org.onlab.packet.IpAddress;
|
||||
import org.onlab.packet.MacAddress;
|
||||
import org.onlab.util.KryoNamespace;
|
||||
import org.onosproject.net.intent.Key;
|
||||
import org.onosproject.net.intent.MultiPointToSinglePointIntent;
|
||||
import org.onosproject.net.intent.PointToPointIntent;
|
||||
import org.onosproject.store.serializers.KryoNamespaces;
|
||||
import org.onosproject.store.service.ConsistentMap;
|
||||
import org.onosproject.store.service.DistributedSet;
|
||||
import org.onosproject.store.service.Serializer;
|
||||
import org.onosproject.store.service.StorageService;
|
||||
import org.onosproject.store.service.Versioned;
|
||||
import org.onosproject.store.serializers.KryoNamespaces;
|
||||
import org.osgi.service.component.annotations.Activate;
|
||||
import org.osgi.service.component.annotations.Component;
|
||||
import org.osgi.service.component.annotations.Deactivate;
|
||||
import org.osgi.service.component.annotations.Reference;
|
||||
import org.osgi.service.component.annotations.ReferenceCardinality;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
@ -45,13 +44,12 @@ import java.util.Set;
|
||||
* Distributed Store for Castor.
|
||||
*/
|
||||
|
||||
@Component(immediate = true)
|
||||
@Service
|
||||
@Component(immediate = true, service = CastorStore.class)
|
||||
public class DistributedCastorStore implements CastorStore {
|
||||
|
||||
private final Logger log = LoggerFactory.getLogger(getClass());
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected StorageService storageService;
|
||||
|
||||
private ConsistentMap<IpAddress, MacAddress> addressMap;
|
||||
|
||||
@ -15,15 +15,6 @@
|
||||
*/
|
||||
package org.onosproject.incubator.net.l2monitoring.cfm.impl;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Optional;
|
||||
|
||||
import org.apache.felix.scr.annotations.Activate;
|
||||
import org.apache.felix.scr.annotations.Component;
|
||||
import org.apache.felix.scr.annotations.Deactivate;
|
||||
import org.apache.felix.scr.annotations.Reference;
|
||||
import org.apache.felix.scr.annotations.ReferenceCardinality;
|
||||
import org.apache.felix.scr.annotations.Service;
|
||||
import org.onosproject.core.ApplicationId;
|
||||
import org.onosproject.core.CoreService;
|
||||
import org.onosproject.event.AbstractListenerManager;
|
||||
@ -38,14 +29,21 @@ import org.onosproject.incubator.net.l2monitoring.cfm.service.MdEvent;
|
||||
import org.onosproject.incubator.net.l2monitoring.cfm.service.MdListener;
|
||||
import org.onosproject.incubator.net.l2monitoring.cfm.service.MdStore;
|
||||
import org.onosproject.incubator.net.l2monitoring.cfm.service.MdStoreDelegate;
|
||||
import org.osgi.service.component.annotations.Activate;
|
||||
import org.osgi.service.component.annotations.Component;
|
||||
import org.osgi.service.component.annotations.Deactivate;
|
||||
import org.osgi.service.component.annotations.Reference;
|
||||
import org.osgi.service.component.annotations.ReferenceCardinality;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Optional;
|
||||
|
||||
/**
|
||||
* Manager of Cfm Md Service - persists Maintenance Domain in distributed store.
|
||||
*/
|
||||
@Component(immediate = true)
|
||||
@Service
|
||||
@Component(immediate = true, service = CfmMdService.class)
|
||||
public class CfmMdManager extends AbstractListenerManager<MdEvent, MdListener>
|
||||
implements CfmMdService {
|
||||
|
||||
@ -54,10 +52,10 @@ public class CfmMdManager extends AbstractListenerManager<MdEvent, MdListener>
|
||||
|
||||
protected ApplicationId appId;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected CoreService coreService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected MdStore store;
|
||||
|
||||
protected final MdStoreDelegate delegate = new InternalStoreDelegate();
|
||||
|
||||
@ -15,28 +15,6 @@
|
||||
*/
|
||||
package org.onosproject.incubator.net.l2monitoring.cfm.impl;
|
||||
|
||||
import static org.onlab.util.Tools.groupedThreads;
|
||||
import static org.slf4j.LoggerFactory.getLogger;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.ConcurrentLinkedQueue;
|
||||
import java.util.concurrent.Executors;
|
||||
import java.util.concurrent.ScheduledExecutorService;
|
||||
import java.util.concurrent.ScheduledFuture;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import org.apache.felix.scr.annotations.Activate;
|
||||
import org.apache.felix.scr.annotations.Component;
|
||||
import org.apache.felix.scr.annotations.Deactivate;
|
||||
import org.apache.felix.scr.annotations.Reference;
|
||||
import org.apache.felix.scr.annotations.ReferenceCardinality;
|
||||
import org.apache.felix.scr.annotations.Service;
|
||||
import org.onosproject.core.CoreService;
|
||||
import org.onosproject.core.IdGenerator;
|
||||
import org.onosproject.event.AbstractListenerManager;
|
||||
@ -66,13 +44,33 @@ import org.onosproject.net.DeviceId;
|
||||
import org.onosproject.net.device.DeviceEvent;
|
||||
import org.onosproject.net.device.DeviceListener;
|
||||
import org.onosproject.net.device.DeviceService;
|
||||
import org.osgi.service.component.annotations.Activate;
|
||||
import org.osgi.service.component.annotations.Component;
|
||||
import org.osgi.service.component.annotations.Deactivate;
|
||||
import org.osgi.service.component.annotations.Reference;
|
||||
import org.osgi.service.component.annotations.ReferenceCardinality;
|
||||
import org.slf4j.Logger;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.ConcurrentLinkedQueue;
|
||||
import java.util.concurrent.Executors;
|
||||
import java.util.concurrent.ScheduledExecutorService;
|
||||
import java.util.concurrent.ScheduledFuture;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import static org.onlab.util.Tools.groupedThreads;
|
||||
import static org.slf4j.LoggerFactory.getLogger;
|
||||
|
||||
/**
|
||||
* Provides implementation of the CFM North and South Bound Interfaces.
|
||||
*/
|
||||
@Component(immediate = true)
|
||||
@Service
|
||||
@Component(immediate = true, service = CfmMepService.class)
|
||||
public class CfmMepManager
|
||||
extends AbstractListenerManager<CfmMepEvent, CfmMepListener>
|
||||
implements CfmMepService {
|
||||
@ -82,16 +80,16 @@ public class CfmMepManager
|
||||
private InternalDeviceListener deviceListener = null;
|
||||
private InternalMdListener mdListener = null;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected DeviceService deviceService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected CoreService coreService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected MastershipService mastershipService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected CfmMdService cfmMdService;
|
||||
|
||||
private static final int DEFAULT_POLL_FREQUENCY = 30;
|
||||
@ -116,7 +114,7 @@ public class CfmMepManager
|
||||
|
||||
private IdGenerator idGenerator;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected MepStore mepStore;
|
||||
|
||||
protected final MepStoreDelegate delegate = new InternalStoreDelegate();
|
||||
|
||||
@ -17,12 +17,6 @@ package org.onosproject.incubator.net.l2monitoring.cfm.impl;
|
||||
|
||||
import com.google.common.net.InternetDomainName;
|
||||
import org.apache.commons.lang3.tuple.ImmutablePair;
|
||||
import org.apache.felix.scr.annotations.Activate;
|
||||
import org.apache.felix.scr.annotations.Component;
|
||||
import org.apache.felix.scr.annotations.Deactivate;
|
||||
import org.apache.felix.scr.annotations.Reference;
|
||||
import org.apache.felix.scr.annotations.ReferenceCardinality;
|
||||
import org.apache.felix.scr.annotations.Service;
|
||||
import org.onlab.packet.MacAddress;
|
||||
import org.onlab.util.Identifier;
|
||||
import org.onlab.util.KryoNamespace;
|
||||
@ -47,13 +41,18 @@ import org.onosproject.incubator.net.l2monitoring.cfm.service.CfmConfigException
|
||||
import org.onosproject.incubator.net.l2monitoring.cfm.service.MdEvent;
|
||||
import org.onosproject.incubator.net.l2monitoring.cfm.service.MdStore;
|
||||
import org.onosproject.incubator.net.l2monitoring.cfm.service.MdStoreDelegate;
|
||||
import org.onosproject.store.serializers.KryoNamespaces;
|
||||
import org.onosproject.store.AbstractStore;
|
||||
import org.onosproject.store.serializers.KryoNamespaces;
|
||||
import org.onosproject.store.service.ConsistentMap;
|
||||
import org.onosproject.store.service.MapEvent;
|
||||
import org.onosproject.store.service.MapEventListener;
|
||||
import org.onosproject.store.service.Serializer;
|
||||
import org.onosproject.store.service.StorageService;
|
||||
import org.osgi.service.component.annotations.Activate;
|
||||
import org.osgi.service.component.annotations.Component;
|
||||
import org.osgi.service.component.annotations.Deactivate;
|
||||
import org.osgi.service.component.annotations.Reference;
|
||||
import org.osgi.service.component.annotations.ReferenceCardinality;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
@ -66,14 +65,13 @@ import java.util.stream.Collectors;
|
||||
/**
|
||||
* Maintenance Domain Store implementation backed by consistent map.
|
||||
*/
|
||||
@Component(immediate = true)
|
||||
@Service
|
||||
@Component(immediate = true, service = MdStore.class)
|
||||
public class DistributedMdStore extends AbstractStore<MdEvent, MdStoreDelegate>
|
||||
implements MdStore {
|
||||
|
||||
private final Logger log = LoggerFactory.getLogger(getClass());
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected StorageService storageService;
|
||||
|
||||
private ConsistentMap<MdId, MaintenanceDomain> maintenanceDomainConsistentMap;
|
||||
|
||||
@ -15,12 +15,6 @@
|
||||
*/
|
||||
package org.onosproject.incubator.net.l2monitoring.cfm.impl;
|
||||
|
||||
import org.apache.felix.scr.annotations.Activate;
|
||||
import org.apache.felix.scr.annotations.Component;
|
||||
import org.apache.felix.scr.annotations.Deactivate;
|
||||
import org.apache.felix.scr.annotations.Reference;
|
||||
import org.apache.felix.scr.annotations.ReferenceCardinality;
|
||||
import org.apache.felix.scr.annotations.Service;
|
||||
import org.onlab.packet.IpAddress;
|
||||
import org.onlab.packet.VlanId;
|
||||
import org.onlab.util.KryoNamespace;
|
||||
@ -52,6 +46,11 @@ import org.onosproject.store.service.MapEvent;
|
||||
import org.onosproject.store.service.MapEventListener;
|
||||
import org.onosproject.store.service.Serializer;
|
||||
import org.onosproject.store.service.StorageService;
|
||||
import org.osgi.service.component.annotations.Activate;
|
||||
import org.osgi.service.component.annotations.Component;
|
||||
import org.osgi.service.component.annotations.Deactivate;
|
||||
import org.osgi.service.component.annotations.Reference;
|
||||
import org.osgi.service.component.annotations.ReferenceCardinality;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
@ -64,14 +63,13 @@ import java.util.stream.Collectors;
|
||||
/**
|
||||
* MEP Store implementation backed by consistent map.
|
||||
*/
|
||||
@Component(immediate = true)
|
||||
@Service
|
||||
@Component(immediate = true, service = MepStore.class)
|
||||
public class DistributedMepStore extends AbstractStore<CfmMepEvent, MepStoreDelegate>
|
||||
implements MepStore {
|
||||
|
||||
private final Logger log = LoggerFactory.getLogger(getClass());
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected StorageService storageService;
|
||||
|
||||
private ConsistentMap<MepKeyId, Mep> mepConsistentMap;
|
||||
|
||||
@ -15,15 +15,6 @@
|
||||
*/
|
||||
package org.onosproject.incubator.net.l2monitoring.soam.impl;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Optional;
|
||||
|
||||
import org.apache.felix.scr.annotations.Activate;
|
||||
import org.apache.felix.scr.annotations.Component;
|
||||
import org.apache.felix.scr.annotations.Deactivate;
|
||||
import org.apache.felix.scr.annotations.Reference;
|
||||
import org.apache.felix.scr.annotations.ReferenceCardinality;
|
||||
import org.apache.felix.scr.annotations.Service;
|
||||
import org.onosproject.core.ApplicationId;
|
||||
import org.onosproject.core.CoreService;
|
||||
import org.onosproject.incubator.net.l2monitoring.cfm.MepEntry;
|
||||
@ -46,14 +37,21 @@ import org.onosproject.incubator.net.l2monitoring.soam.loss.LossMeasurementEntry
|
||||
import org.onosproject.incubator.net.l2monitoring.soam.loss.LossMeasurementStatCurrent;
|
||||
import org.onosproject.net.DeviceId;
|
||||
import org.onosproject.net.device.DeviceService;
|
||||
import org.osgi.service.component.annotations.Activate;
|
||||
import org.osgi.service.component.annotations.Component;
|
||||
import org.osgi.service.component.annotations.Deactivate;
|
||||
import org.osgi.service.component.annotations.Reference;
|
||||
import org.osgi.service.component.annotations.ReferenceCardinality;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Optional;
|
||||
|
||||
/**
|
||||
* ONOS application component.
|
||||
*/
|
||||
@Component(immediate = true)
|
||||
@Service
|
||||
@Component(immediate = true, service = SoamService.class)
|
||||
public class SoamManager implements SoamService {
|
||||
|
||||
private final Logger log = LoggerFactory.getLogger(getClass());
|
||||
@ -61,13 +59,13 @@ public class SoamManager implements SoamService {
|
||||
|
||||
private ApplicationId appId;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected DeviceService deviceService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected CoreService coreService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected CfmMepService cfmMepService;
|
||||
|
||||
@Activate
|
||||
|
||||
@ -15,11 +15,11 @@
|
||||
*/
|
||||
package org.onosproject.cfm;
|
||||
|
||||
import org.apache.felix.scr.annotations.Activate;
|
||||
import org.apache.felix.scr.annotations.Component;
|
||||
import org.apache.felix.scr.annotations.Deactivate;
|
||||
import org.apache.felix.scr.annotations.Reference;
|
||||
import org.apache.felix.scr.annotations.ReferenceCardinality;
|
||||
import org.osgi.service.component.annotations.Activate;
|
||||
import org.osgi.service.component.annotations.Component;
|
||||
import org.osgi.service.component.annotations.Deactivate;
|
||||
import org.osgi.service.component.annotations.Reference;
|
||||
import org.osgi.service.component.annotations.ReferenceCardinality;
|
||||
import org.onlab.packet.VlanId;
|
||||
import org.onosproject.cfm.web.ComponentCodec;
|
||||
import org.onosproject.cfm.web.FngAddressCodec;
|
||||
@ -90,7 +90,7 @@ import org.slf4j.LoggerFactory;
|
||||
public class CfmWebComponent {
|
||||
private final Logger log = LoggerFactory.getLogger(getClass());
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected CodecService codecService;
|
||||
|
||||
/**
|
||||
|
||||
@ -16,14 +16,6 @@
|
||||
package org.onosproject.cip;
|
||||
|
||||
import com.google.common.io.ByteStreams;
|
||||
|
||||
import org.apache.felix.scr.annotations.Activate;
|
||||
import org.apache.felix.scr.annotations.Component;
|
||||
import org.apache.felix.scr.annotations.Deactivate;
|
||||
import org.apache.felix.scr.annotations.Modified;
|
||||
import org.apache.felix.scr.annotations.Property;
|
||||
import org.apache.felix.scr.annotations.Reference;
|
||||
import org.apache.felix.scr.annotations.ReferenceCardinality;
|
||||
import org.onosproject.cfg.ComponentConfigService;
|
||||
import org.onosproject.cluster.ClusterService;
|
||||
import org.onosproject.cluster.LeadershipEvent;
|
||||
@ -31,6 +23,12 @@ import org.onosproject.cluster.LeadershipEventListener;
|
||||
import org.onosproject.cluster.LeadershipService;
|
||||
import org.onosproject.cluster.NodeId;
|
||||
import org.osgi.service.component.ComponentContext;
|
||||
import org.osgi.service.component.annotations.Activate;
|
||||
import org.osgi.service.component.annotations.Component;
|
||||
import org.osgi.service.component.annotations.Deactivate;
|
||||
import org.osgi.service.component.annotations.Modified;
|
||||
import org.osgi.service.component.annotations.Reference;
|
||||
import org.osgi.service.component.annotations.ReferenceCardinality;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
@ -63,13 +61,13 @@ public class ClusterIpManager {
|
||||
|
||||
private static final String CLUSTER_IP = "cluster/ip";
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected ClusterService clusterService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected LeadershipService leadershipService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected ComponentConfigService cfgService;
|
||||
|
||||
private final LeadershipEventListener listener = new InternalLeadershipListener();
|
||||
@ -78,15 +76,15 @@ public class ClusterIpManager {
|
||||
private boolean wasLeader = false;
|
||||
|
||||
// By default there is no IP; this has to be configured
|
||||
@Property(name = "aliasIp", value = "", label = "Alias IP address")
|
||||
//@Property(name = "aliasIp", value = "", label = "Alias IP address")
|
||||
private String aliasIp = "";
|
||||
|
||||
public static final String DEFAULT_MASK = "255.255.0.0";
|
||||
@Property(name = "aliasMask", value = DEFAULT_MASK, label = "Alias IP mask")
|
||||
//@Property(name = "aliasMask", value = DEFAULT_MASK, label = "Alias IP mask")
|
||||
private String aliasMask = DEFAULT_MASK;
|
||||
|
||||
public static final String ETH_0 = "eth0:0";
|
||||
@Property(name = "aliasAdapter", value = ETH_0, label = "Alias IP adapter")
|
||||
//@Property(name = "aliasAdapter", value = ETH_0, label = "Alias IP adapter")
|
||||
private String aliasAdapter = ETH_0;
|
||||
|
||||
@Activate
|
||||
|
||||
@ -16,12 +16,6 @@
|
||||
package org.onosproject.config.impl;
|
||||
|
||||
import com.google.common.annotations.Beta;
|
||||
import org.apache.felix.scr.annotations.Activate;
|
||||
import org.apache.felix.scr.annotations.Component;
|
||||
import org.apache.felix.scr.annotations.Deactivate;
|
||||
import org.apache.felix.scr.annotations.Reference;
|
||||
import org.apache.felix.scr.annotations.ReferenceCardinality;
|
||||
import org.apache.felix.scr.annotations.Service;
|
||||
import org.onlab.util.KryoNamespace;
|
||||
import org.onosproject.config.DynamicConfigEvent;
|
||||
import org.onosproject.config.DynamicConfigStore;
|
||||
@ -56,6 +50,11 @@ import org.onosproject.yang.model.ListKey;
|
||||
import org.onosproject.yang.model.NodeKey;
|
||||
import org.onosproject.yang.model.ResourceId;
|
||||
import org.onosproject.yang.model.SchemaId;
|
||||
import org.osgi.service.component.annotations.Activate;
|
||||
import org.osgi.service.component.annotations.Component;
|
||||
import org.osgi.service.component.annotations.Deactivate;
|
||||
import org.osgi.service.component.annotations.Reference;
|
||||
import org.osgi.service.component.annotations.ReferenceCardinality;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
@ -66,6 +65,7 @@ import java.util.Map;
|
||||
import java.util.Optional;
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
import java.util.concurrent.ExecutionException;
|
||||
|
||||
import static org.onosproject.config.DynamicConfigEvent.Type.NODE_ADDED;
|
||||
import static org.onosproject.config.DynamicConfigEvent.Type.NODE_DELETED;
|
||||
import static org.onosproject.config.DynamicConfigEvent.Type.NODE_UPDATED;
|
||||
@ -76,15 +76,14 @@ import static org.onosproject.d.config.DeviceResourceIds.DCS_NAMESPACE;
|
||||
* Implementation of the dynamic config store.
|
||||
*/
|
||||
@Beta
|
||||
@Component(immediate = true)
|
||||
@Service
|
||||
@Component(immediate = true, service = DynamicConfigStore.class)
|
||||
public class DistributedDynamicConfigStore
|
||||
extends AbstractStore<DynamicConfigEvent, DynamicConfigStoreDelegate>
|
||||
implements DynamicConfigStore {
|
||||
|
||||
private final Logger log = LoggerFactory.getLogger(getClass());
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected StorageService storageService;
|
||||
|
||||
// FIXME transactionally mutate the 2 or consolidate into 1 AsyncDocTree
|
||||
|
||||
@ -15,17 +15,6 @@
|
||||
*/
|
||||
package org.onosproject.config.impl;
|
||||
|
||||
import org.apache.felix.scr.annotations.Activate;
|
||||
import org.apache.felix.scr.annotations.Component;
|
||||
import org.apache.felix.scr.annotations.Deactivate;
|
||||
import org.apache.felix.scr.annotations.Reference;
|
||||
import org.apache.felix.scr.annotations.ReferenceCardinality;
|
||||
import org.apache.felix.scr.annotations.Service;
|
||||
import org.onosproject.config.RpcExecutor;
|
||||
import org.onosproject.config.RpcMessageId;
|
||||
import org.onosproject.d.config.DeviceResourceIds;
|
||||
import org.onosproject.d.config.ResourceIds;
|
||||
import org.onosproject.event.AbstractListenerManager;
|
||||
import org.onosproject.config.DynamicConfigEvent;
|
||||
import org.onosproject.config.DynamicConfigListener;
|
||||
import org.onosproject.config.DynamicConfigService;
|
||||
@ -33,23 +22,33 @@ import org.onosproject.config.DynamicConfigStore;
|
||||
import org.onosproject.config.DynamicConfigStoreDelegate;
|
||||
import org.onosproject.config.FailedException;
|
||||
import org.onosproject.config.Filter;
|
||||
import org.onosproject.yang.model.RpcInput;
|
||||
import org.onosproject.yang.model.RpcOutput;
|
||||
import org.onosproject.config.RpcExecutor;
|
||||
import org.onosproject.config.RpcMessageId;
|
||||
import org.onosproject.d.config.DeviceResourceIds;
|
||||
import org.onosproject.d.config.ResourceIds;
|
||||
import org.onosproject.event.AbstractListenerManager;
|
||||
import org.onosproject.yang.model.DataNode;
|
||||
import org.onosproject.yang.model.DataNode.Type;
|
||||
import org.onosproject.yang.model.InnerNode;
|
||||
import org.onosproject.yang.model.ResourceId;
|
||||
import org.onosproject.yang.model.RpcContext;
|
||||
import org.onosproject.yang.model.RpcInput;
|
||||
import org.onosproject.yang.model.RpcOutput;
|
||||
import org.onosproject.yang.model.RpcRegistry;
|
||||
import org.onosproject.yang.model.RpcService;
|
||||
import org.onosproject.yang.model.SchemaContextProvider;
|
||||
import org.osgi.service.component.annotations.Activate;
|
||||
import org.osgi.service.component.annotations.Component;
|
||||
import org.osgi.service.component.annotations.Deactivate;
|
||||
import org.osgi.service.component.annotations.Reference;
|
||||
import org.osgi.service.component.annotations.ReferenceCardinality;
|
||||
import org.slf4j.Logger;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import org.slf4j.Logger;
|
||||
|
||||
import static com.google.common.base.Preconditions.checkNotNull;
|
||||
import static org.onosproject.d.config.DeviceResourceIds.DCS_NAMESPACE;
|
||||
@ -59,8 +58,7 @@ import static org.slf4j.LoggerFactory.getLogger;
|
||||
* Implementation of the Dynamic Config Service.
|
||||
*
|
||||
*/
|
||||
@Component(immediate = true)
|
||||
@Service
|
||||
@Component(immediate = true, service = { DynamicConfigService.class, RpcRegistry.class })
|
||||
public class DynamicConfigManager
|
||||
extends AbstractListenerManager<DynamicConfigEvent, DynamicConfigListener>
|
||||
implements DynamicConfigService, RpcRegistry {
|
||||
@ -68,10 +66,10 @@ public class DynamicConfigManager
|
||||
private final Logger log = getLogger(getClass());
|
||||
private final DynamicConfigStoreDelegate storeDelegate = new InternalStoreDelegate();
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected DynamicConfigStore store;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected SchemaContextProvider contextProvider;
|
||||
|
||||
// FIXME is it OK this is not using the Store?
|
||||
|
||||
@ -15,11 +15,11 @@
|
||||
*/
|
||||
package org.onosproject.d.config.sync.impl.netconf;
|
||||
|
||||
import org.apache.felix.scr.annotations.Activate;
|
||||
import org.apache.felix.scr.annotations.Component;
|
||||
import org.apache.felix.scr.annotations.Deactivate;
|
||||
import org.apache.felix.scr.annotations.Reference;
|
||||
import org.apache.felix.scr.annotations.ReferenceCardinality;
|
||||
import org.osgi.service.component.annotations.Activate;
|
||||
import org.osgi.service.component.annotations.Component;
|
||||
import org.osgi.service.component.annotations.Deactivate;
|
||||
import org.osgi.service.component.annotations.Reference;
|
||||
import org.osgi.service.component.annotations.ReferenceCardinality;
|
||||
import org.onosproject.d.config.sync.DeviceConfigSynchronizationProviderRegistry;
|
||||
import org.onosproject.d.config.sync.DeviceConfigSynchronizationProviderService;
|
||||
import org.onosproject.net.device.DeviceService;
|
||||
@ -51,19 +51,19 @@ public class NetconfDeviceConfigSynchronizerComponent {
|
||||
public static final ProviderId PID =
|
||||
new ProviderId("netconf", "org.onosproject.d.config.sync.netconf");
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected DeviceConfigSynchronizationProviderRegistry registry;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected NetconfController netconfController;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected YangRuntimeService yangRuntimeService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected SchemaContextProvider schemaContextProvider;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected DeviceService deviceService;
|
||||
|
||||
private NetconfDeviceConfigSynchronizerProvider provider;
|
||||
|
||||
@ -15,27 +15,9 @@
|
||||
*/
|
||||
package org.onosproject.d.config.sync.impl;
|
||||
|
||||
import static java.util.concurrent.CompletableFuture.completedFuture;
|
||||
import static org.onosproject.d.config.DeviceResourceIds.isUnderDeviceRootNode;
|
||||
import static org.onosproject.d.config.DeviceResourceIds.toDeviceId;
|
||||
import static org.onosproject.d.config.DeviceResourceIds.toResourceId;
|
||||
import static org.onosproject.d.config.sync.operation.SetResponse.response;
|
||||
import static org.slf4j.LoggerFactory.getLogger;
|
||||
|
||||
import java.time.Duration;
|
||||
import java.util.Collection;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import org.apache.felix.scr.annotations.Activate;
|
||||
import org.apache.felix.scr.annotations.Component;
|
||||
import org.apache.felix.scr.annotations.Deactivate;
|
||||
import org.apache.felix.scr.annotations.Reference;
|
||||
import org.apache.felix.scr.annotations.ReferenceCardinality;
|
||||
import org.apache.felix.scr.annotations.Service;
|
||||
import com.google.common.annotations.Beta;
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
import org.onlab.util.Tools;
|
||||
import org.onosproject.config.DynamicConfigEvent;
|
||||
import org.onosproject.config.DynamicConfigEvent.Type;
|
||||
@ -58,11 +40,27 @@ import org.onosproject.net.provider.AbstractProviderService;
|
||||
import org.onosproject.store.primitives.TransactionId;
|
||||
import org.onosproject.yang.model.DataNode;
|
||||
import org.onosproject.yang.model.ResourceId;
|
||||
import org.osgi.service.component.annotations.Activate;
|
||||
import org.osgi.service.component.annotations.Component;
|
||||
import org.osgi.service.component.annotations.Deactivate;
|
||||
import org.osgi.service.component.annotations.Reference;
|
||||
import org.osgi.service.component.annotations.ReferenceCardinality;
|
||||
import org.slf4j.Logger;
|
||||
|
||||
import com.google.common.annotations.Beta;
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
import java.time.Duration;
|
||||
import java.util.Collection;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import static java.util.concurrent.CompletableFuture.completedFuture;
|
||||
import static org.onosproject.d.config.DeviceResourceIds.isUnderDeviceRootNode;
|
||||
import static org.onosproject.d.config.DeviceResourceIds.toDeviceId;
|
||||
import static org.onosproject.d.config.DeviceResourceIds.toResourceId;
|
||||
import static org.onosproject.d.config.sync.operation.SetResponse.response;
|
||||
import static org.slf4j.LoggerFactory.getLogger;
|
||||
|
||||
/**
|
||||
* Component to bridge Dynamic Config store and the Device configuration state.
|
||||
@ -73,8 +71,7 @@ import com.google.common.collect.ImmutableMap;
|
||||
* </ul>
|
||||
*/
|
||||
@Beta
|
||||
@Component(immediate = true)
|
||||
@Service
|
||||
@Component(immediate = true, service = DeviceConfigSynchronizationProviderRegistry.class)
|
||||
public class DynamicDeviceConfigSynchronizer
|
||||
extends AbstractProviderRegistry<DeviceConfigSynchronizationProvider,
|
||||
DeviceConfigSynchronizationProviderService>
|
||||
@ -82,10 +79,10 @@ public class DynamicDeviceConfigSynchronizer
|
||||
|
||||
private static final Logger log = getLogger(DynamicDeviceConfigSynchronizer.class);
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected DynamicConfigService dynConfigService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected NetworkConfigService netcfgService;
|
||||
|
||||
private DynamicConfigListener listener = new InnerDyConListener();
|
||||
|
||||
@ -16,16 +16,15 @@
|
||||
package org.onosproject.cpman.gui;
|
||||
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import org.apache.felix.scr.annotations.Activate;
|
||||
import org.apache.felix.scr.annotations.Component;
|
||||
import org.apache.felix.scr.annotations.Deactivate;
|
||||
import org.apache.felix.scr.annotations.Reference;
|
||||
import org.apache.felix.scr.annotations.ReferenceCardinality;
|
||||
import org.apache.felix.scr.annotations.Service;
|
||||
import org.onosproject.ui.UiExtension;
|
||||
import org.onosproject.ui.UiExtensionService;
|
||||
import org.onosproject.ui.UiMessageHandlerFactory;
|
||||
import org.onosproject.ui.UiView;
|
||||
import org.osgi.service.component.annotations.Activate;
|
||||
import org.osgi.service.component.annotations.Component;
|
||||
import org.osgi.service.component.annotations.Deactivate;
|
||||
import org.osgi.service.component.annotations.Reference;
|
||||
import org.osgi.service.component.annotations.ReferenceCardinality;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
@ -36,8 +35,7 @@ import static org.onosproject.ui.UiView.Category.NETWORK;
|
||||
/**
|
||||
* Mechanism to stream data to the GUI.
|
||||
*/
|
||||
@Component(immediate = true, enabled = true)
|
||||
@Service(value = CpmanUI.class)
|
||||
@Component(immediate = true, service = CpmanUI.class)
|
||||
public class CpmanUI {
|
||||
private static final String CPMAN_ID = "cpman";
|
||||
private static final String CPMAN_TEXT = "Control Plane Manager";
|
||||
@ -46,7 +44,7 @@ public class CpmanUI {
|
||||
|
||||
private final Logger log = LoggerFactory.getLogger(getClass());
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected UiExtensionService uiExtensionService;
|
||||
|
||||
// Factory for UI message handlers
|
||||
|
||||
@ -15,11 +15,11 @@
|
||||
*/
|
||||
package org.onosproject.cpman.impl;
|
||||
|
||||
import org.apache.felix.scr.annotations.Activate;
|
||||
import org.apache.felix.scr.annotations.Component;
|
||||
import org.apache.felix.scr.annotations.Deactivate;
|
||||
import org.apache.felix.scr.annotations.Reference;
|
||||
import org.apache.felix.scr.annotations.ReferenceCardinality;
|
||||
import org.osgi.service.component.annotations.Activate;
|
||||
import org.osgi.service.component.annotations.Component;
|
||||
import org.osgi.service.component.annotations.Deactivate;
|
||||
import org.osgi.service.component.annotations.Reference;
|
||||
import org.osgi.service.component.annotations.ReferenceCardinality;
|
||||
import org.onosproject.core.ApplicationId;
|
||||
import org.onosproject.core.CoreService;
|
||||
import org.onosproject.cpman.ControlMessage;
|
||||
@ -45,13 +45,13 @@ public class ControlPlaneManager {
|
||||
|
||||
private final Logger log = LoggerFactory.getLogger(getClass());
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected CoreService coreService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected ControlMessageService messageService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected ControlPlaneMonitorService monitorService;
|
||||
|
||||
private final ControlMessageListener messageListener =
|
||||
|
||||
@ -19,12 +19,6 @@ import com.google.common.collect.ImmutableMap;
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
import com.google.common.collect.Maps;
|
||||
import com.google.common.collect.Sets;
|
||||
import org.apache.felix.scr.annotations.Activate;
|
||||
import org.apache.felix.scr.annotations.Component;
|
||||
import org.apache.felix.scr.annotations.Deactivate;
|
||||
import org.apache.felix.scr.annotations.Reference;
|
||||
import org.apache.felix.scr.annotations.ReferenceCardinality;
|
||||
import org.apache.felix.scr.annotations.Service;
|
||||
import org.onlab.util.KryoNamespace;
|
||||
import org.onosproject.cluster.ClusterService;
|
||||
import org.onosproject.cluster.NodeId;
|
||||
@ -42,6 +36,11 @@ import org.onosproject.store.cluster.messaging.ClusterCommunicationService;
|
||||
import org.onosproject.store.cluster.messaging.MessageSubject;
|
||||
import org.onosproject.store.serializers.KryoNamespaces;
|
||||
import org.onosproject.store.service.Serializer;
|
||||
import org.osgi.service.component.annotations.Activate;
|
||||
import org.osgi.service.component.annotations.Component;
|
||||
import org.osgi.service.component.annotations.Deactivate;
|
||||
import org.osgi.service.component.annotations.Reference;
|
||||
import org.osgi.service.component.annotations.ReferenceCardinality;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
@ -63,8 +62,7 @@ import static org.onosproject.cpman.ControlResource.Type;
|
||||
/**
|
||||
* Control plane monitoring service class.
|
||||
*/
|
||||
@Component(immediate = true)
|
||||
@Service
|
||||
@Component(immediate = true, service = ControlPlaneMonitorService.class)
|
||||
public class ControlPlaneMonitor implements ControlPlaneMonitorService {
|
||||
|
||||
private final Logger log = LoggerFactory.getLogger(getClass());
|
||||
@ -74,10 +72,10 @@ public class ControlPlaneMonitor implements ControlPlaneMonitorService {
|
||||
private Map<String, MetricsDatabase> diskMetricsMap;
|
||||
private Map<String, MetricsDatabase> networkMetricsMap;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected ClusterService clusterService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected ClusterCommunicationService communicationService;
|
||||
|
||||
private static final String DEFAULT_RESOURCE = "default";
|
||||
|
||||
@ -15,12 +15,6 @@
|
||||
*/
|
||||
package org.onosproject.cpman.impl.message;
|
||||
|
||||
import org.apache.felix.scr.annotations.Activate;
|
||||
import org.apache.felix.scr.annotations.Component;
|
||||
import org.apache.felix.scr.annotations.Deactivate;
|
||||
import org.apache.felix.scr.annotations.Reference;
|
||||
import org.apache.felix.scr.annotations.ReferenceCardinality;
|
||||
import org.apache.felix.scr.annotations.Service;
|
||||
import org.onosproject.cpman.ControlMessage;
|
||||
import org.onosproject.cpman.message.ControlMessageAdminService;
|
||||
import org.onosproject.cpman.message.ControlMessageEvent;
|
||||
@ -34,6 +28,11 @@ import org.onosproject.cpman.message.ControlMessageStoreDelegate;
|
||||
import org.onosproject.net.DeviceId;
|
||||
import org.onosproject.net.provider.AbstractListenerProviderRegistry;
|
||||
import org.onosproject.net.provider.AbstractProviderService;
|
||||
import org.osgi.service.component.annotations.Activate;
|
||||
import org.osgi.service.component.annotations.Component;
|
||||
import org.osgi.service.component.annotations.Deactivate;
|
||||
import org.osgi.service.component.annotations.Reference;
|
||||
import org.osgi.service.component.annotations.ReferenceCardinality;
|
||||
import org.slf4j.Logger;
|
||||
|
||||
import java.util.Set;
|
||||
@ -44,8 +43,8 @@ import static org.slf4j.LoggerFactory.getLogger;
|
||||
/**
|
||||
* Provides implementation of the control message SB & NB APIs.
|
||||
*/
|
||||
@Component(immediate = true)
|
||||
@Service
|
||||
@Component(immediate = true, service = { ControlMessageService.class, ControlMessageAdminService.class,
|
||||
ControlMessageProviderRegistry.class })
|
||||
public class ControlMessageManager
|
||||
extends AbstractListenerProviderRegistry<ControlMessageEvent, ControlMessageListener,
|
||||
ControlMessageProvider, ControlMessageProviderService>
|
||||
@ -58,7 +57,7 @@ public class ControlMessageManager
|
||||
|
||||
private final ControlMessageStoreDelegate delegate = new InternalStoreDelegate();
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected ControlMessageStore store;
|
||||
|
||||
@Activate
|
||||
|
||||
@ -15,10 +15,6 @@
|
||||
*/
|
||||
package org.onosproject.cpman.impl.message;
|
||||
|
||||
import org.apache.felix.scr.annotations.Activate;
|
||||
import org.apache.felix.scr.annotations.Component;
|
||||
import org.apache.felix.scr.annotations.Deactivate;
|
||||
import org.apache.felix.scr.annotations.Service;
|
||||
import org.onosproject.cpman.ControlMessage;
|
||||
import org.onosproject.cpman.message.ControlMessageEvent;
|
||||
import org.onosproject.cpman.message.ControlMessageStore;
|
||||
@ -26,6 +22,9 @@ import org.onosproject.cpman.message.ControlMessageStoreDelegate;
|
||||
import org.onosproject.net.DeviceId;
|
||||
import org.onosproject.net.provider.ProviderId;
|
||||
import org.onosproject.store.AbstractStore;
|
||||
import org.osgi.service.component.annotations.Activate;
|
||||
import org.osgi.service.component.annotations.Component;
|
||||
import org.osgi.service.component.annotations.Deactivate;
|
||||
import org.slf4j.Logger;
|
||||
|
||||
import java.util.Set;
|
||||
@ -36,8 +35,7 @@ import static org.slf4j.LoggerFactory.getLogger;
|
||||
* Manages inventory of control message using trivial in-memory structures
|
||||
* implementation.
|
||||
*/
|
||||
@Component(immediate = true)
|
||||
@Service
|
||||
@Component(immediate = true, service = ControlMessageStore.class)
|
||||
public class DefaultControlMessageStore
|
||||
extends AbstractStore<ControlMessageEvent, ControlMessageStoreDelegate>
|
||||
implements ControlMessageStore {
|
||||
|
||||
@ -15,11 +15,11 @@
|
||||
*/
|
||||
package org.onosproject.cpman.rest;
|
||||
|
||||
import org.apache.felix.scr.annotations.Activate;
|
||||
import org.apache.felix.scr.annotations.Component;
|
||||
import org.apache.felix.scr.annotations.Deactivate;
|
||||
import org.apache.felix.scr.annotations.Reference;
|
||||
import org.apache.felix.scr.annotations.ReferenceCardinality;
|
||||
import org.osgi.service.component.annotations.Activate;
|
||||
import org.osgi.service.component.annotations.Component;
|
||||
import org.osgi.service.component.annotations.Deactivate;
|
||||
import org.osgi.service.component.annotations.Reference;
|
||||
import org.osgi.service.component.annotations.ReferenceCardinality;
|
||||
import org.onosproject.codec.CodecService;
|
||||
import org.onosproject.cpman.ControlLoadSnapshot;
|
||||
import org.onosproject.cpman.codec.ControlLoadSnapshotCodec;
|
||||
@ -35,7 +35,7 @@ public class CPManCodecRegistrator {
|
||||
|
||||
private final Logger log = getLogger(getClass());
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected CodecService codecService;
|
||||
|
||||
@Activate
|
||||
|
||||
@ -17,15 +17,6 @@ package org.onosproject.dhcp.impl;
|
||||
|
||||
import com.google.common.base.Strings;
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
|
||||
import org.apache.felix.scr.annotations.Activate;
|
||||
import org.apache.felix.scr.annotations.Component;
|
||||
import org.apache.felix.scr.annotations.Deactivate;
|
||||
import org.apache.felix.scr.annotations.Modified;
|
||||
import org.apache.felix.scr.annotations.Property;
|
||||
import org.apache.felix.scr.annotations.Reference;
|
||||
import org.apache.felix.scr.annotations.ReferenceCardinality;
|
||||
import org.apache.felix.scr.annotations.Service;
|
||||
import org.onlab.packet.ARP;
|
||||
import org.onlab.packet.DHCP;
|
||||
import org.onlab.packet.Ethernet;
|
||||
@ -69,6 +60,12 @@ import org.onosproject.net.packet.PacketService;
|
||||
import org.onosproject.net.provider.AbstractProvider;
|
||||
import org.onosproject.net.provider.ProviderId;
|
||||
import org.osgi.service.component.ComponentContext;
|
||||
import org.osgi.service.component.annotations.Activate;
|
||||
import org.osgi.service.component.annotations.Component;
|
||||
import org.osgi.service.component.annotations.Deactivate;
|
||||
import org.osgi.service.component.annotations.Modified;
|
||||
import org.osgi.service.component.annotations.Reference;
|
||||
import org.osgi.service.component.annotations.ReferenceCardinality;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
@ -77,7 +74,6 @@ import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.Dictionary;
|
||||
import java.util.HashSet;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
@ -97,8 +93,7 @@ import static org.onosproject.net.config.basics.SubjectFactories.APP_SUBJECT_FAC
|
||||
/**
|
||||
* Skeletal ONOS DHCP Server application.
|
||||
*/
|
||||
@Component(immediate = true)
|
||||
@Service
|
||||
@Component(immediate = true, service = DhcpService.class)
|
||||
public class DhcpManager implements DhcpService {
|
||||
|
||||
private static final ProviderId PID = new ProviderId("of", "org.onosproject.dhcp", true);
|
||||
@ -119,28 +114,28 @@ public class DhcpManager implements DhcpService {
|
||||
}
|
||||
}
|
||||
);
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected NetworkConfigRegistry cfgService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected PacketService packetService;
|
||||
|
||||
private DhcpPacketProcessor processor = new DhcpPacketProcessor();
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected CoreService coreService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected DhcpStore dhcpStore;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected HostProviderRegistry hostProviderRegistry;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected ComponentConfigService componentConfigService;
|
||||
|
||||
@Property(name = ALLOW_HOST_DISCOVERY, boolValue = DEFAULT_ALLOW_HOST_DISCOVERY,
|
||||
label = "Allow host discovery from DHCP request")
|
||||
//@Property(name = ALLOW_HOST_DISCOVERY, boolValue = DEFAULT_ALLOW_HOST_DISCOVERY,
|
||||
// label = "Allow host discovery from DHCP request")
|
||||
private boolean allowHostDiscovery = DEFAULT_ALLOW_HOST_DISCOVERY;
|
||||
|
||||
protected HostProviderService hostProviderService;
|
||||
|
||||
@ -16,16 +16,15 @@
|
||||
package org.onosproject.dhcp.impl;
|
||||
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import org.apache.felix.scr.annotations.Activate;
|
||||
import org.apache.felix.scr.annotations.Component;
|
||||
import org.apache.felix.scr.annotations.Deactivate;
|
||||
import org.apache.felix.scr.annotations.Reference;
|
||||
import org.apache.felix.scr.annotations.ReferenceCardinality;
|
||||
import org.apache.felix.scr.annotations.Service;
|
||||
import org.onosproject.ui.UiExtension;
|
||||
import org.onosproject.ui.UiExtensionService;
|
||||
import org.onosproject.ui.UiMessageHandlerFactory;
|
||||
import org.onosproject.ui.UiView;
|
||||
import org.osgi.service.component.annotations.Activate;
|
||||
import org.osgi.service.component.annotations.Component;
|
||||
import org.osgi.service.component.annotations.Deactivate;
|
||||
import org.osgi.service.component.annotations.Reference;
|
||||
import org.osgi.service.component.annotations.ReferenceCardinality;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
@ -36,14 +35,13 @@ import static org.onosproject.ui.UiView.Category.NETWORK;
|
||||
/**
|
||||
* Mechanism to stream data to the GUI.
|
||||
*/
|
||||
@Component(immediate = true, enabled = true)
|
||||
@Service(value = DhcpUi.class)
|
||||
@Component(immediate = true, service = DhcpUi.class)
|
||||
public class DhcpUi {
|
||||
|
||||
private final Logger log = LoggerFactory.getLogger(getClass());
|
||||
private static final ClassLoader CL = DhcpUi.class.getClassLoader();
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected UiExtensionService uiExtensionService;
|
||||
|
||||
private final UiMessageHandlerFactory messageHandlerFactory =
|
||||
|
||||
@ -16,12 +16,6 @@
|
||||
package org.onosproject.dhcp.impl;
|
||||
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
import org.apache.felix.scr.annotations.Activate;
|
||||
import org.apache.felix.scr.annotations.Component;
|
||||
import org.apache.felix.scr.annotations.Deactivate;
|
||||
import org.apache.felix.scr.annotations.Reference;
|
||||
import org.apache.felix.scr.annotations.ReferenceCardinality;
|
||||
import org.apache.felix.scr.annotations.Service;
|
||||
import org.onlab.packet.Ip4Address;
|
||||
import org.onlab.packet.MacAddress;
|
||||
import org.onlab.util.KryoNamespace;
|
||||
@ -34,12 +28,17 @@ import org.onosproject.store.service.DistributedSet;
|
||||
import org.onosproject.store.service.Serializer;
|
||||
import org.onosproject.store.service.StorageService;
|
||||
import org.onosproject.store.service.Versioned;
|
||||
import org.osgi.service.component.annotations.Activate;
|
||||
import org.osgi.service.component.annotations.Component;
|
||||
import org.osgi.service.component.annotations.Deactivate;
|
||||
import org.osgi.service.component.annotations.Reference;
|
||||
import org.osgi.service.component.annotations.ReferenceCardinality;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import static org.onosproject.dhcp.IpAssignment.AssignmentStatus.Option_Assigned;
|
||||
import static org.onosproject.dhcp.IpAssignment.AssignmentStatus.Option_RangeNotEnforced;
|
||||
@ -49,13 +48,12 @@ import static org.onosproject.dhcp.IpAssignment.AssignmentStatus.Option_RangeNot
|
||||
* Remembers the mapping between MAC ID and IP Addresses assigned.
|
||||
*/
|
||||
|
||||
@Component(immediate = true)
|
||||
@Service
|
||||
@Component(immediate = true, service = DhcpStore.class)
|
||||
public class DistributedDhcpStore implements DhcpStore {
|
||||
|
||||
private final Logger log = LoggerFactory.getLogger(getClass());
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected StorageService storageService;
|
||||
|
||||
private ConsistentMap<HostId, IpAssignment> allocationMap;
|
||||
|
||||
@ -23,14 +23,6 @@ import com.google.common.collect.Lists;
|
||||
import com.google.common.collect.Multimap;
|
||||
import com.google.common.collect.Multimaps;
|
||||
import com.google.common.collect.Sets;
|
||||
import org.apache.felix.scr.annotations.Activate;
|
||||
import org.apache.felix.scr.annotations.Component;
|
||||
import org.apache.felix.scr.annotations.Deactivate;
|
||||
import org.apache.felix.scr.annotations.Modified;
|
||||
import org.apache.felix.scr.annotations.Property;
|
||||
import org.apache.felix.scr.annotations.Reference;
|
||||
import org.apache.felix.scr.annotations.ReferenceCardinality;
|
||||
import org.apache.felix.scr.annotations.Service;
|
||||
import org.onlab.packet.BasePacket;
|
||||
import org.onlab.packet.DHCP;
|
||||
import org.onlab.packet.Ethernet;
|
||||
@ -54,44 +46,50 @@ import org.onosproject.dhcprelay.config.DhcpServerConfig;
|
||||
import org.onosproject.dhcprelay.config.IgnoreDhcpConfig;
|
||||
import org.onosproject.dhcprelay.store.DhcpRecord;
|
||||
import org.onosproject.dhcprelay.store.DhcpRelayStore;
|
||||
import org.onosproject.net.ConnectPoint;
|
||||
import org.onosproject.net.Device;
|
||||
import org.onosproject.net.DeviceId;
|
||||
import org.onosproject.net.Host;
|
||||
import org.onosproject.net.HostId;
|
||||
import org.onosproject.net.HostLocation;
|
||||
import org.onosproject.net.behaviour.Pipeliner;
|
||||
import org.onosproject.net.device.DeviceService;
|
||||
import org.onosproject.net.flow.DefaultTrafficSelector;
|
||||
import org.onosproject.net.flow.DefaultTrafficTreatment;
|
||||
import org.onosproject.net.flow.TrafficSelector;
|
||||
import org.onosproject.net.flow.TrafficTreatment;
|
||||
import org.onosproject.net.flowobjective.DefaultForwardingObjective;
|
||||
import org.onosproject.net.flowobjective.FlowObjectiveService;
|
||||
import org.onosproject.net.flowobjective.ForwardingObjective;
|
||||
import org.onosproject.net.flowobjective.Objective;
|
||||
import org.onosproject.net.flowobjective.ObjectiveContext;
|
||||
import org.onosproject.net.flowobjective.ObjectiveError;
|
||||
import org.onosproject.net.host.DefaultHostDescription;
|
||||
import org.onosproject.net.host.HostDescription;
|
||||
import org.onosproject.net.host.HostEvent;
|
||||
import org.onosproject.net.host.HostListener;
|
||||
import org.onosproject.net.host.HostProvider;
|
||||
import org.onosproject.net.host.HostProviderRegistry;
|
||||
import org.onosproject.net.host.HostProviderService;
|
||||
import org.onosproject.net.intf.Interface;
|
||||
import org.onosproject.net.intf.InterfaceService;
|
||||
import org.onosproject.net.packet.PacketPriority;
|
||||
import org.onosproject.net.provider.ProviderId;
|
||||
import org.onosproject.routeservice.Route;
|
||||
import org.onosproject.routeservice.RouteStore;
|
||||
import org.onosproject.net.ConnectPoint;
|
||||
import org.onosproject.net.Host;
|
||||
import org.onosproject.net.HostId;
|
||||
import org.onosproject.net.HostLocation;
|
||||
import org.onosproject.net.flow.DefaultTrafficTreatment;
|
||||
import org.onosproject.net.flow.TrafficTreatment;
|
||||
import org.onosproject.net.host.DefaultHostDescription;
|
||||
import org.onosproject.net.host.HostDescription;
|
||||
import org.onosproject.net.host.HostService;
|
||||
import org.onosproject.net.host.InterfaceIpAddress;
|
||||
import org.onosproject.net.intf.Interface;
|
||||
import org.onosproject.net.intf.InterfaceService;
|
||||
import org.onosproject.net.packet.DefaultOutboundPacket;
|
||||
import org.onosproject.net.packet.OutboundPacket;
|
||||
import org.onosproject.net.packet.PacketContext;
|
||||
import org.onosproject.net.packet.PacketPriority;
|
||||
import org.onosproject.net.packet.PacketService;
|
||||
import org.onosproject.net.provider.ProviderId;
|
||||
import org.onosproject.routeservice.Route;
|
||||
import org.onosproject.routeservice.RouteStore;
|
||||
import org.osgi.service.component.ComponentContext;
|
||||
import org.osgi.service.component.annotations.Activate;
|
||||
import org.osgi.service.component.annotations.Component;
|
||||
import org.osgi.service.component.annotations.Deactivate;
|
||||
import org.osgi.service.component.annotations.Modified;
|
||||
import org.osgi.service.component.annotations.Reference;
|
||||
import org.osgi.service.component.annotations.ReferenceCardinality;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
@ -121,9 +119,8 @@ import static org.onosproject.net.flowobjective.Objective.Operation.ADD;
|
||||
import static org.onosproject.net.flowobjective.Objective.Operation.REMOVE;
|
||||
|
||||
|
||||
@Component
|
||||
@Service
|
||||
@Property(name = "version", value = "4")
|
||||
@Component(service = { DhcpHandler.class, HostProvider.class })
|
||||
//@Property(name = "version", value = "4")
|
||||
public class Dhcp4HandlerImpl implements DhcpHandler, HostProvider {
|
||||
public static final String DHCP_V4_RELAY_APP = "org.onosproject.Dhcp4HandlerImpl";
|
||||
public static final ProviderId PROVIDER_ID = new ProviderId("dhcp4", DHCP_V4_RELAY_APP);
|
||||
@ -152,34 +149,34 @@ public class Dhcp4HandlerImpl implements DhcpHandler, HostProvider {
|
||||
);
|
||||
private static Logger log = LoggerFactory.getLogger(Dhcp4HandlerImpl.class);
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected DhcpRelayStore dhcpRelayStore;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected PacketService packetService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected RouteStore routeStore;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected InterfaceService interfaceService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected HostService hostService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected HostProviderRegistry providerRegistry;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected CoreService coreService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected DeviceService deviceService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected FlowObjectiveService flowObjectiveService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected ComponentConfigService cfgService;
|
||||
|
||||
protected HostProviderService providerService;
|
||||
@ -190,8 +187,8 @@ public class Dhcp4HandlerImpl implements DhcpHandler, HostProvider {
|
||||
private List<DhcpServerInfo> defaultServerInfoList = new CopyOnWriteArrayList<>();
|
||||
private List<DhcpServerInfo> indirectServerInfoList = new CopyOnWriteArrayList<>();
|
||||
|
||||
@Property(name = Dhcp4HandlerImpl.LQ_ROUTE_PROPERTY_NAME, boolValue = false,
|
||||
label = "Enable learning routing information from LQ")
|
||||
//@Property(name = Dhcp4HandlerImpl.LQ_ROUTE_PROPERTY_NAME, boolValue = false,
|
||||
// label = "Enable learning routing information from LQ")
|
||||
private Boolean learnRouteFromLeasequery = Boolean.TRUE;
|
||||
|
||||
private Executor hostEventExecutor = newSingleThreadExecutor(
|
||||
|
||||
@ -22,14 +22,12 @@ import com.google.common.collect.Multimap;
|
||||
import com.google.common.collect.Multimaps;
|
||||
import com.google.common.collect.Sets;
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
import org.apache.felix.scr.annotations.Activate;
|
||||
import org.apache.felix.scr.annotations.Component;
|
||||
import org.apache.felix.scr.annotations.Deactivate;
|
||||
import org.apache.felix.scr.annotations.Modified;
|
||||
import org.apache.felix.scr.annotations.Property;
|
||||
import org.apache.felix.scr.annotations.Reference;
|
||||
import org.apache.felix.scr.annotations.ReferenceCardinality;
|
||||
import org.apache.felix.scr.annotations.Service;
|
||||
import org.osgi.service.component.annotations.Activate;
|
||||
import org.osgi.service.component.annotations.Component;
|
||||
import org.osgi.service.component.annotations.Deactivate;
|
||||
import org.osgi.service.component.annotations.Modified;
|
||||
import org.osgi.service.component.annotations.Reference;
|
||||
import org.osgi.service.component.annotations.ReferenceCardinality;
|
||||
import org.onlab.packet.BasePacket;
|
||||
import org.onlab.packet.DHCP6;
|
||||
import org.onlab.packet.IPv6;
|
||||
@ -126,9 +124,8 @@ import static org.onosproject.net.flowobjective.Objective.Operation.ADD;
|
||||
import static org.onosproject.net.flowobjective.Objective.Operation.REMOVE;
|
||||
import java.util.concurrent.Semaphore;
|
||||
|
||||
@Component
|
||||
@Service
|
||||
@Property(name = "version", value = "6")
|
||||
@Component(service = { DhcpHandler.class, HostProvider.class })
|
||||
//@Property(name = "version", value = "6")
|
||||
public class Dhcp6HandlerImpl implements DhcpHandler, HostProvider {
|
||||
public static final String DHCP_V6_RELAY_APP = "org.onosproject.Dhcp6HandlerImpl";
|
||||
public static final ProviderId PROVIDER_ID = new ProviderId("dhcp6", DHCP_V6_RELAY_APP);
|
||||
@ -164,44 +161,44 @@ public class Dhcp6HandlerImpl implements DhcpHandler, HostProvider {
|
||||
);
|
||||
private static Logger log = LoggerFactory.getLogger(Dhcp6HandlerImpl.class);
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected DhcpRelayStore dhcpRelayStore;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected DhcpRelayCountersStore dhcpRelayCountersStore;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected PacketService packetService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected RouteStore routeStore;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected InterfaceService interfaceService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected HostService hostService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected HostProviderRegistry providerRegistry;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected CoreService coreService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected DhcpFpmPrefixStore dhcpFpmPrefixStore;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected DeviceService deviceService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected FlowObjectiveService flowObjectiveService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected ComponentConfigService cfgService;
|
||||
|
||||
@Property(name = Dhcp6HandlerImpl.LQ_ROUTE_PROPERTY_NAME, boolValue = false,
|
||||
label = "Enable learning routing information from LQ")
|
||||
//@Property(name = Dhcp6HandlerImpl.LQ_ROUTE_PROPERTY_NAME, boolValue = false,
|
||||
// label = "Enable learning routing information from LQ")
|
||||
private Boolean learnRouteFromLeasequery = Boolean.TRUE;
|
||||
|
||||
protected HostProviderService providerService;
|
||||
|
||||
@ -15,37 +15,19 @@
|
||||
*/
|
||||
package org.onosproject.dhcprelay;
|
||||
|
||||
import java.nio.ByteBuffer;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.Dictionary;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
import java.util.Set;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
import com.google.common.collect.Streams;
|
||||
import org.apache.felix.scr.annotations.Activate;
|
||||
import org.apache.felix.scr.annotations.Component;
|
||||
import org.apache.felix.scr.annotations.Deactivate;
|
||||
import org.apache.felix.scr.annotations.Modified;
|
||||
import org.apache.felix.scr.annotations.Property;
|
||||
import org.apache.felix.scr.annotations.Reference;
|
||||
import org.apache.felix.scr.annotations.ReferenceCardinality;
|
||||
import org.apache.felix.scr.annotations.Service;
|
||||
import org.onlab.packet.ARP;
|
||||
import org.onlab.packet.DHCP;
|
||||
import org.onlab.packet.DHCP6;
|
||||
import org.onlab.packet.IPacket;
|
||||
import org.onlab.packet.IPv6;
|
||||
import org.onlab.packet.Ethernet;
|
||||
import org.onlab.packet.IPacket;
|
||||
import org.onlab.packet.IPv4;
|
||||
import org.onlab.packet.IPv6;
|
||||
import org.onlab.packet.Ip4Address;
|
||||
import org.onlab.packet.MacAddress;
|
||||
import org.onlab.packet.IpPrefix;
|
||||
import org.onlab.packet.MacAddress;
|
||||
import org.onlab.packet.UDP;
|
||||
import org.onlab.packet.VlanId;
|
||||
import org.onlab.util.Tools;
|
||||
@ -58,56 +40,68 @@ import org.onosproject.dhcprelay.api.DhcpServerInfo;
|
||||
import org.onosproject.dhcprelay.config.DefaultDhcpRelayConfig;
|
||||
import org.onosproject.dhcprelay.config.DhcpServerConfig;
|
||||
import org.onosproject.dhcprelay.config.EnableDhcpFpmConfig;
|
||||
import org.onosproject.dhcprelay.config.IndirectDhcpRelayConfig;
|
||||
import org.onosproject.dhcprelay.config.IgnoreDhcpConfig;
|
||||
import org.onosproject.dhcprelay.config.IndirectDhcpRelayConfig;
|
||||
import org.onosproject.dhcprelay.store.DhcpFpmPrefixStore;
|
||||
import org.onosproject.dhcprelay.store.DhcpRecord;
|
||||
import org.onosproject.dhcprelay.store.DhcpRelayStore;
|
||||
import org.onosproject.dhcprelay.store.DhcpFpmPrefixStore;
|
||||
import org.onosproject.routing.fpm.api.FpmRecord;
|
||||
import org.onosproject.net.ConnectPoint;
|
||||
import org.onosproject.net.Device;
|
||||
import org.onosproject.net.Host;
|
||||
import org.onosproject.net.config.Config;
|
||||
import org.onosproject.net.device.DeviceEvent;
|
||||
import org.onosproject.net.device.DeviceListener;
|
||||
import org.onosproject.net.device.DeviceService;
|
||||
import org.onosproject.net.intf.Interface;
|
||||
import org.onosproject.net.intf.InterfaceService;
|
||||
import org.onosproject.net.ConnectPoint;
|
||||
import org.onosproject.net.HostId;
|
||||
import org.onosproject.net.config.Config;
|
||||
import org.onosproject.net.config.ConfigFactory;
|
||||
import org.onosproject.net.config.NetworkConfigEvent;
|
||||
import org.onosproject.net.config.NetworkConfigListener;
|
||||
import org.onosproject.net.config.NetworkConfigRegistry;
|
||||
import org.onosproject.net.device.DeviceEvent;
|
||||
import org.onosproject.net.device.DeviceListener;
|
||||
import org.onosproject.net.device.DeviceService;
|
||||
import org.onosproject.net.flow.DefaultTrafficSelector;
|
||||
import org.onosproject.net.flow.DefaultTrafficTreatment;
|
||||
import org.onosproject.net.flow.TrafficSelector;
|
||||
import org.onosproject.net.flow.TrafficTreatment;
|
||||
import org.onosproject.net.host.HostService;
|
||||
import org.onosproject.net.intf.Interface;
|
||||
import org.onosproject.net.intf.InterfaceService;
|
||||
import org.onosproject.net.packet.DefaultOutboundPacket;
|
||||
import org.onosproject.net.packet.OutboundPacket;
|
||||
import org.onosproject.net.packet.PacketContext;
|
||||
import org.onosproject.net.packet.PacketPriority;
|
||||
import org.onosproject.net.packet.PacketProcessor;
|
||||
import org.onosproject.net.packet.PacketService;
|
||||
|
||||
import org.onosproject.routing.fpm.api.FpmRecord;
|
||||
import org.osgi.service.component.ComponentContext;
|
||||
import org.osgi.service.component.annotations.Activate;
|
||||
import org.osgi.service.component.annotations.Component;
|
||||
import org.osgi.service.component.annotations.Deactivate;
|
||||
import org.osgi.service.component.annotations.Modified;
|
||||
import org.osgi.service.component.annotations.Reference;
|
||||
import org.osgi.service.component.annotations.ReferenceCardinality;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import java.nio.ByteBuffer;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.Dictionary;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.Executors;
|
||||
import java.util.concurrent.ScheduledExecutorService;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
import static org.onlab.util.Tools.groupedThreads;
|
||||
|
||||
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
|
||||
import static org.onosproject.net.config.basics.SubjectFactories.APP_SUBJECT_FACTORY;
|
||||
|
||||
/**
|
||||
* DHCP Relay Agent Application Component.
|
||||
*/
|
||||
@Component(immediate = true)
|
||||
@Service
|
||||
@Component(immediate = true, service = DhcpRelayService.class)
|
||||
public class DhcpRelayManager implements DhcpRelayService {
|
||||
public static final String DHCP_RELAY_APP = "org.onosproject.dhcprelay";
|
||||
public static final String ROUTE_STORE_IMPL =
|
||||
@ -159,51 +153,51 @@ public class DhcpRelayManager implements DhcpRelayService {
|
||||
);
|
||||
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected NetworkConfigRegistry cfgService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected CoreService coreService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected PacketService packetService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected HostService hostService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected InterfaceService interfaceService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected DhcpRelayStore dhcpRelayStore;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected ComponentConfigService compCfgService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected DeviceService deviceService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected DhcpFpmPrefixStore dhcpFpmPrefixStore;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY,
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY,
|
||||
target = "(version=4)")
|
||||
protected DhcpHandler v4Handler;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY,
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY,
|
||||
target = "(version=6)")
|
||||
protected DhcpHandler v6Handler;
|
||||
|
||||
@Property(name = "arpEnabled", boolValue = true,
|
||||
label = "Enable Address resolution protocol")
|
||||
//@Property(name = "arpEnabled", boolValue = true,
|
||||
// label = "Enable Address resolution protocol")
|
||||
protected boolean arpEnabled = true;
|
||||
|
||||
@Property(name = "dhcpPollInterval", intValue = 24 * 3600,
|
||||
label = "dhcp relay poll interval")
|
||||
//@Property(name = "dhcpPollInterval", intValue = 24 * 3600,
|
||||
// label = "dhcp relay poll interval")
|
||||
protected int dhcpPollInterval = 24 * 3600;
|
||||
|
||||
@Property(name = "dhcpFpmEnabled", boolValue = false,
|
||||
label = "Enable DhcpRelay Fpm")
|
||||
//@Property(name = "dhcpFpmEnabled", boolValue = false,
|
||||
// label = "Enable DhcpRelay Fpm")
|
||||
protected boolean dhcpFpmEnabled = false;
|
||||
|
||||
private ScheduledExecutorService timerExecutor;
|
||||
|
||||
@ -15,34 +15,31 @@
|
||||
*/
|
||||
package org.onosproject.dhcprelay.store;
|
||||
|
||||
import org.apache.felix.scr.annotations.Activate;
|
||||
import org.apache.felix.scr.annotations.Component;
|
||||
import org.apache.felix.scr.annotations.Deactivate;
|
||||
import org.apache.felix.scr.annotations.Reference;
|
||||
import org.apache.felix.scr.annotations.ReferenceCardinality;
|
||||
import org.apache.felix.scr.annotations.Service;
|
||||
|
||||
import org.onlab.util.KryoNamespace;
|
||||
import org.onosproject.core.ApplicationId;
|
||||
import org.onosproject.core.CoreService;
|
||||
import org.onosproject.store.serializers.KryoNamespaces;
|
||||
import org.onosproject.store.service.ConsistentMap;
|
||||
import org.onosproject.store.service.Serializer;
|
||||
import org.onosproject.store.service.StorageService;
|
||||
import org.onosproject.store.service.Versioned;
|
||||
import org.osgi.service.component.annotations.Activate;
|
||||
import org.osgi.service.component.annotations.Component;
|
||||
import org.osgi.service.component.annotations.Deactivate;
|
||||
import org.osgi.service.component.annotations.Reference;
|
||||
import org.osgi.service.component.annotations.ReferenceCardinality;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.onosproject.store.serializers.KryoNamespaces;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import org.onosproject.store.service.Versioned;
|
||||
|
||||
import static com.google.common.base.Preconditions.checkNotNull;
|
||||
|
||||
@Component(immediate = true)
|
||||
@Service
|
||||
@Component(immediate = true, service = DhcpRelayCountersStore.class)
|
||||
public class DistributedDhcpRelayCountersStore implements DhcpRelayCountersStore {
|
||||
private static final KryoNamespace.Builder APP_KYRO = KryoNamespace.newBuilder()
|
||||
.register(KryoNamespaces.API)
|
||||
@ -51,10 +48,10 @@ public class DistributedDhcpRelayCountersStore implements DhcpRelayCountersStore
|
||||
private Logger log = LoggerFactory.getLogger(getClass());
|
||||
private ConsistentMap<String, DhcpRelayCounters> counters;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected StorageService storageService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected CoreService coreService;
|
||||
|
||||
|
||||
|
||||
@ -16,12 +16,6 @@
|
||||
|
||||
package org.onosproject.dhcprelay.store;
|
||||
|
||||
import org.apache.felix.scr.annotations.Activate;
|
||||
import org.apache.felix.scr.annotations.Component;
|
||||
import org.apache.felix.scr.annotations.Deactivate;
|
||||
import org.apache.felix.scr.annotations.Reference;
|
||||
import org.apache.felix.scr.annotations.ReferenceCardinality;
|
||||
import org.apache.felix.scr.annotations.Service;
|
||||
import org.onlab.packet.DHCP;
|
||||
import org.onlab.packet.DHCP6;
|
||||
import org.onlab.util.KryoNamespace;
|
||||
@ -33,6 +27,11 @@ import org.onosproject.store.service.EventuallyConsistentMapEvent;
|
||||
import org.onosproject.store.service.EventuallyConsistentMapListener;
|
||||
import org.onosproject.store.service.StorageService;
|
||||
import org.onosproject.store.service.WallClockTimestamp;
|
||||
import org.osgi.service.component.annotations.Activate;
|
||||
import org.osgi.service.component.annotations.Component;
|
||||
import org.osgi.service.component.annotations.Deactivate;
|
||||
import org.osgi.service.component.annotations.Reference;
|
||||
import org.osgi.service.component.annotations.ReferenceCardinality;
|
||||
import org.slf4j.Logger;
|
||||
|
||||
import java.util.Collection;
|
||||
@ -44,8 +43,7 @@ import static org.slf4j.LoggerFactory.getLogger;
|
||||
/**
|
||||
* Distributed DHCP relay store.
|
||||
*/
|
||||
@Component(immediate = true)
|
||||
@Service
|
||||
@Component(immediate = true, service = DhcpRelayStore.class)
|
||||
public class DistributedDhcpRelayStore implements DhcpRelayStore {
|
||||
private static final KryoNamespace APP_KRYO = KryoNamespace.newBuilder()
|
||||
.register(KryoNamespaces.API)
|
||||
@ -60,7 +58,7 @@ public class DistributedDhcpRelayStore implements DhcpRelayStore {
|
||||
private EventuallyConsistentMap<HostId, DhcpRecord> dhcpRecords;
|
||||
private EventuallyConsistentMapListener<HostId, DhcpRecord> listener;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected StorageService storageService;
|
||||
|
||||
@Activate
|
||||
|
||||
@ -16,45 +16,35 @@
|
||||
|
||||
package org.onosproject.dhcprelay.store;
|
||||
|
||||
import org.apache.felix.scr.annotations.Activate;
|
||||
import org.apache.felix.scr.annotations.Component;
|
||||
import org.apache.felix.scr.annotations.Deactivate;
|
||||
import org.apache.felix.scr.annotations.Reference;
|
||||
import org.apache.felix.scr.annotations.ReferenceCardinality;
|
||||
import org.apache.felix.scr.annotations.Service;
|
||||
import org.apache.felix.scr.annotations.Property;
|
||||
import org.onlab.util.KryoNamespace;
|
||||
import org.onosproject.store.StoreDelegate;
|
||||
import org.onlab.packet.IpPrefix;
|
||||
import org.onlab.util.KryoNamespace;
|
||||
import org.onosproject.routing.fpm.api.FpmPrefixStoreEvent;
|
||||
import org.onosproject.routing.fpm.api.FpmRecord;
|
||||
import org.onosproject.store.StoreDelegate;
|
||||
import org.onosproject.store.serializers.KryoNamespaces;
|
||||
import org.onosproject.store.service.EventuallyConsistentMap;
|
||||
import org.onosproject.store.service.EventuallyConsistentMapEvent;
|
||||
import org.onosproject.store.service.EventuallyConsistentMapListener;
|
||||
import org.onosproject.store.service.StorageService;
|
||||
import org.onosproject.store.service.WallClockTimestamp;
|
||||
import org.onosproject.routing.fpm.api.FpmRecord;
|
||||
import org.onosproject.routing.fpm.api.FpmPrefixStoreEvent;
|
||||
|
||||
|
||||
|
||||
|
||||
import org.osgi.service.component.annotations.Activate;
|
||||
import org.osgi.service.component.annotations.Component;
|
||||
import org.osgi.service.component.annotations.Deactivate;
|
||||
import org.osgi.service.component.annotations.Reference;
|
||||
import org.osgi.service.component.annotations.ReferenceCardinality;
|
||||
import org.slf4j.Logger;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Optional;
|
||||
|
||||
|
||||
|
||||
|
||||
import static com.google.common.base.Preconditions.checkNotNull;
|
||||
import static org.slf4j.LoggerFactory.getLogger;
|
||||
|
||||
/**
|
||||
* Persistent Fpm Prefix Store with Listener.
|
||||
*/
|
||||
@Component(immediate = true)
|
||||
@Property(name = "fpm_type", value = "DHCP")
|
||||
@Service
|
||||
@Component(immediate = true, service = DhcpFpmPrefixStore.class)
|
||||
//@Property(name = "fpm_type", value = "DHCP")
|
||||
public class DistributedFpmPrefixStore implements DhcpFpmPrefixStore {
|
||||
|
||||
private static final KryoNamespace APP_KRYO = KryoNamespace.newBuilder()
|
||||
@ -68,7 +58,7 @@ public class DistributedFpmPrefixStore implements DhcpFpmPrefixStore {
|
||||
private EventuallyConsistentMap<IpPrefix, FpmRecord> dhcpFpmRecords;
|
||||
private EventuallyConsistentMapListener<IpPrefix, FpmRecord> listener;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected StorageService storageService;
|
||||
|
||||
@Activate
|
||||
|
||||
@ -16,11 +16,11 @@
|
||||
package org.onosproject.drivermatrix;
|
||||
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import org.apache.felix.scr.annotations.Activate;
|
||||
import org.apache.felix.scr.annotations.Component;
|
||||
import org.apache.felix.scr.annotations.Deactivate;
|
||||
import org.apache.felix.scr.annotations.Reference;
|
||||
import org.apache.felix.scr.annotations.ReferenceCardinality;
|
||||
import org.osgi.service.component.annotations.Activate;
|
||||
import org.osgi.service.component.annotations.Component;
|
||||
import org.osgi.service.component.annotations.Deactivate;
|
||||
import org.osgi.service.component.annotations.Reference;
|
||||
import org.osgi.service.component.annotations.ReferenceCardinality;
|
||||
import org.onosproject.ui.UiExtension;
|
||||
import org.onosproject.ui.UiExtensionService;
|
||||
import org.onosproject.ui.UiMessageHandlerFactory;
|
||||
@ -42,7 +42,7 @@ public class DriverViewComponent {
|
||||
|
||||
private final Logger log = LoggerFactory.getLogger(getClass());
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected UiExtensionService uiExtensionService;
|
||||
|
||||
// List of application views
|
||||
|
||||
@ -15,22 +15,6 @@
|
||||
*/
|
||||
package org.onosproject.events;
|
||||
|
||||
import static java.util.concurrent.Executors.newSingleThreadScheduledExecutor;
|
||||
import static org.onlab.util.Tools.groupedThreads;
|
||||
import static org.onlab.util.Tools.minPriority;
|
||||
|
||||
import java.util.Deque;
|
||||
import java.util.concurrent.ConcurrentLinkedDeque;
|
||||
import java.util.concurrent.ScheduledExecutorService;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import org.apache.felix.scr.annotations.Activate;
|
||||
import org.apache.felix.scr.annotations.Component;
|
||||
import org.apache.felix.scr.annotations.Deactivate;
|
||||
import org.apache.felix.scr.annotations.Property;
|
||||
import org.apache.felix.scr.annotations.Reference;
|
||||
import org.apache.felix.scr.annotations.ReferenceCardinality;
|
||||
import org.apache.felix.scr.annotations.Service;
|
||||
import org.onlab.util.UnmodifiableDeque;
|
||||
import org.onosproject.cluster.ClusterService;
|
||||
import org.onosproject.core.ApplicationId;
|
||||
@ -47,55 +31,68 @@ import org.onosproject.net.host.HostService;
|
||||
import org.onosproject.net.intent.IntentService;
|
||||
import org.onosproject.net.link.LinkService;
|
||||
import org.onosproject.net.topology.TopologyService;
|
||||
import org.osgi.service.component.annotations.Activate;
|
||||
import org.osgi.service.component.annotations.Component;
|
||||
import org.osgi.service.component.annotations.Deactivate;
|
||||
import org.osgi.service.component.annotations.Reference;
|
||||
import org.osgi.service.component.annotations.ReferenceCardinality;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import java.util.Deque;
|
||||
import java.util.concurrent.ConcurrentLinkedDeque;
|
||||
import java.util.concurrent.ScheduledExecutorService;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import static java.util.concurrent.Executors.newSingleThreadScheduledExecutor;
|
||||
import static org.onlab.util.Tools.groupedThreads;
|
||||
import static org.onlab.util.Tools.minPriority;
|
||||
|
||||
/**
|
||||
* Application to store history of instance local ONOS Events.
|
||||
*/
|
||||
@Component(immediate = true)
|
||||
@Service
|
||||
@Component(immediate = true, service = EventHistoryManager.class)
|
||||
public class EventHistoryManager
|
||||
implements EventHistoryService {
|
||||
|
||||
private final Logger log = LoggerFactory.getLogger(getClass());
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected CoreService coreService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected MastershipService mastershipService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected DeviceService deviceService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected LinkService linkService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected TopologyService topologyService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected HostService hostService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected ClusterService clusterService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected EdgePortService edgeService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected IntentService intentService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected NetworkConfigService netcfgService;
|
||||
|
||||
@Property(name = "excludeStatsEvent", boolValue = true,
|
||||
label = "Exclude stats related events")
|
||||
//@Property(name = "excludeStatsEvent", boolValue = true,
|
||||
// label = "Exclude stats related events")
|
||||
private boolean excludeStatsEvent = true;
|
||||
|
||||
@Property(name = "sizeLimit", intValue = 10_000,
|
||||
label = "Number of event history to store")
|
||||
//@Property(name = "sizeLimit", intValue = 10_000,
|
||||
// label = "Number of event history to store")
|
||||
private int sizeLimit = 10_000;
|
||||
|
||||
private ApplicationId appId;
|
||||
|
||||
@ -16,23 +16,6 @@
|
||||
|
||||
package org.onosproject.evpnrouteservice.impl;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.BlockingQueue;
|
||||
import java.util.concurrent.ExecutorService;
|
||||
import java.util.concurrent.LinkedBlockingQueue;
|
||||
import java.util.concurrent.ThreadFactory;
|
||||
|
||||
import javax.annotation.concurrent.GuardedBy;
|
||||
|
||||
import org.apache.felix.scr.annotations.Activate;
|
||||
import org.apache.felix.scr.annotations.Component;
|
||||
import org.apache.felix.scr.annotations.Deactivate;
|
||||
import org.apache.felix.scr.annotations.Reference;
|
||||
import org.apache.felix.scr.annotations.ReferenceCardinality;
|
||||
import org.apache.felix.scr.annotations.Service;
|
||||
|
||||
import org.onosproject.evpnrouteservice.EvpnInternalRouteEvent;
|
||||
import org.onosproject.evpnrouteservice.EvpnRoute;
|
||||
import org.onosproject.evpnrouteservice.EvpnRouteAdminService;
|
||||
@ -43,23 +26,36 @@ import org.onosproject.evpnrouteservice.EvpnRouteSet;
|
||||
import org.onosproject.evpnrouteservice.EvpnRouteStore;
|
||||
import org.onosproject.evpnrouteservice.EvpnRouteStoreDelegate;
|
||||
import org.onosproject.evpnrouteservice.EvpnRouteTableId;
|
||||
import org.osgi.service.component.annotations.Activate;
|
||||
import org.osgi.service.component.annotations.Component;
|
||||
import org.osgi.service.component.annotations.Deactivate;
|
||||
import org.osgi.service.component.annotations.Reference;
|
||||
import org.osgi.service.component.annotations.ReferenceCardinality;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import javax.annotation.concurrent.GuardedBy;
|
||||
import java.util.Collection;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.BlockingQueue;
|
||||
import java.util.concurrent.ExecutorService;
|
||||
import java.util.concurrent.LinkedBlockingQueue;
|
||||
import java.util.concurrent.ThreadFactory;
|
||||
|
||||
import static java.util.concurrent.Executors.newSingleThreadExecutor;
|
||||
import static org.onlab.util.Tools.groupedThreads;
|
||||
|
||||
/**
|
||||
* Implementation of the EVPN route service.
|
||||
*/
|
||||
@Service
|
||||
@Component
|
||||
@Component(service = { EvpnRouteService.class, EvpnRouteAdminService.class })
|
||||
public class EvpnRouteManager implements EvpnRouteService,
|
||||
EvpnRouteAdminService {
|
||||
|
||||
private final Logger log = LoggerFactory.getLogger(getClass());
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected EvpnRouteStore evpnRouteStore;
|
||||
|
||||
@GuardedBy(value = "this")
|
||||
|
||||
@ -17,12 +17,6 @@
|
||||
package org.onosproject.evpnrouteservice.store;
|
||||
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
import org.apache.felix.scr.annotations.Activate;
|
||||
import org.apache.felix.scr.annotations.Component;
|
||||
import org.apache.felix.scr.annotations.Deactivate;
|
||||
import org.apache.felix.scr.annotations.Reference;
|
||||
import org.apache.felix.scr.annotations.ReferenceCardinality;
|
||||
import org.apache.felix.scr.annotations.Service;
|
||||
import org.onlab.packet.IpAddress;
|
||||
import org.onlab.util.KryoNamespace;
|
||||
import org.onosproject.evpnrouteservice.EvpnInternalRouteEvent;
|
||||
@ -38,6 +32,11 @@ import org.onosproject.store.service.Serializer;
|
||||
import org.onosproject.store.service.SetEvent;
|
||||
import org.onosproject.store.service.SetEventListener;
|
||||
import org.onosproject.store.service.StorageService;
|
||||
import org.osgi.service.component.annotations.Activate;
|
||||
import org.osgi.service.component.annotations.Component;
|
||||
import org.osgi.service.component.annotations.Deactivate;
|
||||
import org.osgi.service.component.annotations.Reference;
|
||||
import org.osgi.service.component.annotations.ReferenceCardinality;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
@ -54,8 +53,7 @@ import static org.onlab.util.Tools.groupedThreads;
|
||||
/**
|
||||
* Route store based on distributed storage.
|
||||
*/
|
||||
@Service
|
||||
@Component
|
||||
@Component(service = EvpnRouteStore.class)
|
||||
public class DistributedEvpnRouteStore extends
|
||||
AbstractStore<EvpnInternalRouteEvent,
|
||||
EvpnRouteStoreDelegate>
|
||||
@ -64,7 +62,7 @@ public class DistributedEvpnRouteStore extends
|
||||
private static final Logger log = LoggerFactory
|
||||
.getLogger(DistributedEvpnRouteStore.class);
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
public StorageService storageService;
|
||||
|
||||
private static final EvpnRouteTableId EVPN_IPV4 = new EvpnRouteTableId("evpn_ipv4");
|
||||
|
||||
@ -18,12 +18,6 @@ package org.onosproject.evpnopenflow.manager.impl;
|
||||
|
||||
import com.fasterxml.jackson.databind.JsonNode;
|
||||
import com.google.common.collect.Sets;
|
||||
import org.apache.felix.scr.annotations.Activate;
|
||||
import org.apache.felix.scr.annotations.Component;
|
||||
import org.apache.felix.scr.annotations.Deactivate;
|
||||
import org.apache.felix.scr.annotations.Reference;
|
||||
import org.apache.felix.scr.annotations.ReferenceCardinality;
|
||||
import org.apache.felix.scr.annotations.Service;
|
||||
import org.onlab.osgi.DefaultServiceDirectory;
|
||||
import org.onlab.packet.EthType;
|
||||
import org.onlab.packet.IpAddress;
|
||||
@ -45,11 +39,6 @@ import org.onosproject.evpnopenflow.rsc.vpninstance.VpnInstanceService;
|
||||
import org.onosproject.evpnopenflow.rsc.vpnport.VpnPortEvent;
|
||||
import org.onosproject.evpnopenflow.rsc.vpnport.VpnPortListener;
|
||||
import org.onosproject.evpnopenflow.rsc.vpnport.VpnPortService;
|
||||
import org.onosproject.gluon.rsc.GluonConfig;
|
||||
import org.onosproject.incubator.net.resource.label.LabelResource;
|
||||
import org.onosproject.incubator.net.resource.label.LabelResourceAdminService;
|
||||
import org.onosproject.incubator.net.resource.label.LabelResourceId;
|
||||
import org.onosproject.incubator.net.resource.label.LabelResourceService;
|
||||
import org.onosproject.evpnrouteservice.EvpnInstanceName;
|
||||
import org.onosproject.evpnrouteservice.EvpnInstanceNextHop;
|
||||
import org.onosproject.evpnrouteservice.EvpnInstancePrefix;
|
||||
@ -66,6 +55,11 @@ import org.onosproject.evpnrouteservice.EvpnRouteStore;
|
||||
import org.onosproject.evpnrouteservice.Label;
|
||||
import org.onosproject.evpnrouteservice.RouteDistinguisher;
|
||||
import org.onosproject.evpnrouteservice.VpnRouteTarget;
|
||||
import org.onosproject.gluon.rsc.GluonConfig;
|
||||
import org.onosproject.incubator.net.resource.label.LabelResource;
|
||||
import org.onosproject.incubator.net.resource.label.LabelResourceAdminService;
|
||||
import org.onosproject.incubator.net.resource.label.LabelResourceId;
|
||||
import org.onosproject.incubator.net.resource.label.LabelResourceService;
|
||||
import org.onosproject.mastership.MastershipService;
|
||||
import org.onosproject.net.AnnotationKeys;
|
||||
import org.onosproject.net.Device;
|
||||
@ -94,6 +88,11 @@ import org.onosproject.net.flowobjective.Objective.Operation;
|
||||
import org.onosproject.net.host.HostEvent;
|
||||
import org.onosproject.net.host.HostListener;
|
||||
import org.onosproject.net.host.HostService;
|
||||
import org.osgi.service.component.annotations.Activate;
|
||||
import org.osgi.service.component.annotations.Component;
|
||||
import org.osgi.service.component.annotations.Deactivate;
|
||||
import org.osgi.service.component.annotations.Reference;
|
||||
import org.osgi.service.component.annotations.ReferenceCardinality;
|
||||
import org.slf4j.Logger;
|
||||
|
||||
import java.util.ArrayList;
|
||||
@ -151,56 +150,55 @@ import static org.slf4j.LoggerFactory.getLogger;
|
||||
/**
|
||||
* Implementation of the EVPN service.
|
||||
*/
|
||||
@Component(immediate = true)
|
||||
@Service
|
||||
@Component(immediate = true, service = EvpnService.class)
|
||||
public class EvpnManager implements EvpnService {
|
||||
private final Logger log = getLogger(getClass());
|
||||
private static final EthType.EtherType ARP_TYPE = EthType.EtherType.ARP;
|
||||
|
||||
protected ApplicationId appId;
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected HostService hostService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected CoreService coreService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected EvpnRouteService evpnRouteService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected EvpnRouteStore evpnRouteStore;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected DeviceService deviceService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected EvpnRouteAdminService evpnRouteAdminService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected MastershipService mastershipService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected LabelResourceAdminService labelAdminService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected LabelResourceService labelService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected VpnInstanceService vpnInstanceService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected FlowObjectiveService flowObjectiveService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected DriverService driverService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected VpnPortService vpnPortService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected VpnAfConfigService vpnAfConfigService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected NetworkConfigService configService;
|
||||
|
||||
public Set<EvpnInstanceRoute> evpnInstanceRoutes = new HashSet<>();
|
||||
|
||||
@ -18,12 +18,6 @@ package org.onosproject.evpnopenflow.rsc.baseport.impl;
|
||||
|
||||
import com.fasterxml.jackson.databind.JsonNode;
|
||||
import com.google.common.collect.Sets;
|
||||
import org.apache.felix.scr.annotations.Activate;
|
||||
import org.apache.felix.scr.annotations.Component;
|
||||
import org.apache.felix.scr.annotations.Deactivate;
|
||||
import org.apache.felix.scr.annotations.Reference;
|
||||
import org.apache.felix.scr.annotations.ReferenceCardinality;
|
||||
import org.apache.felix.scr.annotations.Service;
|
||||
import org.onlab.packet.IpAddress;
|
||||
import org.onlab.packet.MacAddress;
|
||||
import org.onlab.util.KryoNamespace;
|
||||
@ -55,6 +49,11 @@ import org.onosproject.vtnrsc.TenantId;
|
||||
import org.onosproject.vtnrsc.TenantNetwork;
|
||||
import org.onosproject.vtnrsc.TenantNetworkId;
|
||||
import org.onosproject.vtnrsc.TenantRouter;
|
||||
import org.osgi.service.component.annotations.Activate;
|
||||
import org.osgi.service.component.annotations.Component;
|
||||
import org.osgi.service.component.annotations.Deactivate;
|
||||
import org.osgi.service.component.annotations.Reference;
|
||||
import org.osgi.service.component.annotations.ReferenceCardinality;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
@ -77,8 +76,7 @@ import static org.onosproject.evpnopenflow.rsc.EvpnConstants.RESPONSE_NOT_NULL;
|
||||
/**
|
||||
* Provides implementation of the BasePort APIs.
|
||||
*/
|
||||
@Component(immediate = true)
|
||||
@Service
|
||||
@Component(immediate = true, service = BasePortService.class)
|
||||
public class BasePortManager implements BasePortService {
|
||||
|
||||
private final Set<BasePortListener> listeners = Sets
|
||||
@ -105,10 +103,10 @@ public class BasePortManager implements BasePortService {
|
||||
protected EventuallyConsistentMap<BasePortId, BasePort> vPortStore;
|
||||
protected ApplicationId appId;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected StorageService storageService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected CoreService coreService;
|
||||
|
||||
@Activate
|
||||
|
||||
@ -18,12 +18,6 @@ package org.onosproject.evpnopenflow.rsc.vpnafconfig.impl;
|
||||
|
||||
import com.fasterxml.jackson.databind.JsonNode;
|
||||
import com.google.common.collect.Sets;
|
||||
import org.apache.felix.scr.annotations.Activate;
|
||||
import org.apache.felix.scr.annotations.Component;
|
||||
import org.apache.felix.scr.annotations.Deactivate;
|
||||
import org.apache.felix.scr.annotations.Reference;
|
||||
import org.apache.felix.scr.annotations.ReferenceCardinality;
|
||||
import org.apache.felix.scr.annotations.Service;
|
||||
import org.onlab.util.KryoNamespace;
|
||||
import org.onosproject.core.CoreService;
|
||||
import org.onosproject.evpnopenflow.rsc.DefaultVpnAfConfig;
|
||||
@ -36,6 +30,11 @@ import org.onosproject.store.serializers.KryoNamespaces;
|
||||
import org.onosproject.store.service.EventuallyConsistentMap;
|
||||
import org.onosproject.store.service.StorageService;
|
||||
import org.onosproject.store.service.WallClockTimestamp;
|
||||
import org.osgi.service.component.annotations.Activate;
|
||||
import org.osgi.service.component.annotations.Component;
|
||||
import org.osgi.service.component.annotations.Deactivate;
|
||||
import org.osgi.service.component.annotations.Reference;
|
||||
import org.osgi.service.component.annotations.ReferenceCardinality;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
@ -75,8 +74,7 @@ import static org.onosproject.evpnopenflow.rsc.EvpnConstants.VRF_RT_VALUE;
|
||||
/**
|
||||
* Provides implementation of the VPN af config APIs.
|
||||
*/
|
||||
@Component(immediate = true)
|
||||
@Service
|
||||
@Component(immediate = true, service = VpnAfConfigService.class)
|
||||
public class VpnAfConfigManager implements VpnAfConfigService {
|
||||
private final Logger log = LoggerFactory.getLogger(getClass());
|
||||
private final Set<VpnAfConfigListener> listeners = Sets
|
||||
@ -84,10 +82,10 @@ public class VpnAfConfigManager implements VpnAfConfigService {
|
||||
|
||||
protected EventuallyConsistentMap<VpnRouteTarget, VpnAfConfig>
|
||||
vpnAfConfigStore;
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected StorageService storageService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected CoreService coreService;
|
||||
|
||||
@Activate
|
||||
|
||||
@ -18,12 +18,6 @@ package org.onosproject.evpnopenflow.rsc.vpninstance.impl;
|
||||
|
||||
import com.fasterxml.jackson.databind.JsonNode;
|
||||
import com.google.common.collect.Sets;
|
||||
import org.apache.felix.scr.annotations.Activate;
|
||||
import org.apache.felix.scr.annotations.Component;
|
||||
import org.apache.felix.scr.annotations.Deactivate;
|
||||
import org.apache.felix.scr.annotations.Reference;
|
||||
import org.apache.felix.scr.annotations.ReferenceCardinality;
|
||||
import org.apache.felix.scr.annotations.Service;
|
||||
import org.onlab.util.KryoNamespace;
|
||||
import org.onosproject.core.ApplicationId;
|
||||
import org.onosproject.core.CoreService;
|
||||
@ -34,13 +28,18 @@ import org.onosproject.evpnopenflow.rsc.VpnInstanceId;
|
||||
import org.onosproject.evpnopenflow.rsc.vpnafconfig.VpnAfConfigService;
|
||||
import org.onosproject.evpnopenflow.rsc.vpninstance.VpnInstanceService;
|
||||
import org.onosproject.evpnrouteservice.EvpnInstanceName;
|
||||
import org.onosproject.routeservice.RouteAdminService;
|
||||
import org.onosproject.evpnrouteservice.RouteDistinguisher;
|
||||
import org.onosproject.evpnrouteservice.VpnRouteTarget;
|
||||
import org.onosproject.routeservice.RouteAdminService;
|
||||
import org.onosproject.store.serializers.KryoNamespaces;
|
||||
import org.onosproject.store.service.EventuallyConsistentMap;
|
||||
import org.onosproject.store.service.StorageService;
|
||||
import org.onosproject.store.service.WallClockTimestamp;
|
||||
import org.osgi.service.component.annotations.Activate;
|
||||
import org.osgi.service.component.annotations.Component;
|
||||
import org.osgi.service.component.annotations.Deactivate;
|
||||
import org.osgi.service.component.annotations.Reference;
|
||||
import org.osgi.service.component.annotations.ReferenceCardinality;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
@ -80,8 +79,7 @@ import static org.onosproject.evpnopenflow.rsc.EvpnConstants.VPN_INSTANCE_UPDATE
|
||||
/**
|
||||
* Provides implementation of the VpnInstance APIs.
|
||||
*/
|
||||
@Component(immediate = true)
|
||||
@Service
|
||||
@Component(immediate = true, service = VpnInstanceService.class)
|
||||
public class VpnInstanceManager implements VpnInstanceService {
|
||||
|
||||
private final Logger log = LoggerFactory.getLogger(getClass());
|
||||
@ -89,16 +87,16 @@ public class VpnInstanceManager implements VpnInstanceService {
|
||||
protected EventuallyConsistentMap<VpnInstanceId, VpnInstance> vpnInstanceStore;
|
||||
protected ApplicationId appId;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected StorageService storageService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected RouteAdminService routeService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected CoreService coreService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected VpnAfConfigService vpnAfConfigService;
|
||||
|
||||
@Activate
|
||||
|
||||
@ -18,12 +18,6 @@ package org.onosproject.evpnopenflow.rsc.vpnport.impl;
|
||||
|
||||
import com.fasterxml.jackson.databind.JsonNode;
|
||||
import com.google.common.collect.Sets;
|
||||
import org.apache.felix.scr.annotations.Activate;
|
||||
import org.apache.felix.scr.annotations.Component;
|
||||
import org.apache.felix.scr.annotations.Deactivate;
|
||||
import org.apache.felix.scr.annotations.Reference;
|
||||
import org.apache.felix.scr.annotations.ReferenceCardinality;
|
||||
import org.apache.felix.scr.annotations.Service;
|
||||
import org.onlab.packet.IpAddress;
|
||||
import org.onlab.packet.IpPrefix;
|
||||
import org.onlab.packet.MacAddress;
|
||||
@ -64,6 +58,11 @@ import org.onosproject.vtnrsc.VirtualPortId;
|
||||
import org.onosproject.vtnrsc.subnet.SubnetService;
|
||||
import org.onosproject.vtnrsc.tenantnetwork.TenantNetworkService;
|
||||
import org.onosproject.vtnrsc.virtualport.VirtualPortService;
|
||||
import org.osgi.service.component.annotations.Activate;
|
||||
import org.osgi.service.component.annotations.Component;
|
||||
import org.osgi.service.component.annotations.Deactivate;
|
||||
import org.osgi.service.component.annotations.Reference;
|
||||
import org.osgi.service.component.annotations.ReferenceCardinality;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
@ -100,8 +99,7 @@ import static org.onosproject.evpnopenflow.rsc.EvpnConstants.VPN_PORT_UPDATE_FAI
|
||||
/**
|
||||
* Provides implementation of the VpnPort service.
|
||||
*/
|
||||
@Component(immediate = true)
|
||||
@Service
|
||||
@Component(immediate = true, service = VpnPortService.class)
|
||||
public class VpnPortManager implements VpnPortService {
|
||||
|
||||
private final Logger log = LoggerFactory.getLogger(getClass());
|
||||
@ -111,22 +109,22 @@ public class VpnPortManager implements VpnPortService {
|
||||
protected EventuallyConsistentMap<VpnPortId, VpnPort> vpnPortStore;
|
||||
protected ApplicationId appId;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected StorageService storageService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected CoreService coreService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected BasePortService basePortService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected VirtualPortService virtualPortService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected TenantNetworkService tenantNetworkService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected SubnetService subnetService;
|
||||
|
||||
@Activate
|
||||
|
||||
@ -16,11 +16,11 @@
|
||||
package org.onosproject.faultmanagement.alarms.gui;
|
||||
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import org.apache.felix.scr.annotations.Activate;
|
||||
import org.apache.felix.scr.annotations.Component;
|
||||
import org.apache.felix.scr.annotations.Deactivate;
|
||||
import org.apache.felix.scr.annotations.Reference;
|
||||
import org.apache.felix.scr.annotations.ReferenceCardinality;
|
||||
import org.osgi.service.component.annotations.Activate;
|
||||
import org.osgi.service.component.annotations.Component;
|
||||
import org.osgi.service.component.annotations.Deactivate;
|
||||
import org.osgi.service.component.annotations.Reference;
|
||||
import org.osgi.service.component.annotations.ReferenceCardinality;
|
||||
import org.onosproject.ui.UiExtension;
|
||||
import org.onosproject.ui.UiExtensionService;
|
||||
import org.onosproject.ui.UiMessageHandlerFactory;
|
||||
@ -43,7 +43,7 @@ public class AlarmTableComponent {
|
||||
|
||||
private final Logger log = LoggerFactory.getLogger(getClass());
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected UiExtensionService uiExtensionService;
|
||||
|
||||
// List of application views
|
||||
|
||||
@ -16,11 +16,11 @@
|
||||
package org.onosproject.faultmanagement.alarms.gui;
|
||||
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import org.apache.felix.scr.annotations.Activate;
|
||||
import org.apache.felix.scr.annotations.Component;
|
||||
import org.apache.felix.scr.annotations.Deactivate;
|
||||
import org.apache.felix.scr.annotations.Reference;
|
||||
import org.apache.felix.scr.annotations.ReferenceCardinality;
|
||||
import org.osgi.service.component.annotations.Activate;
|
||||
import org.osgi.service.component.annotations.Component;
|
||||
import org.osgi.service.component.annotations.Deactivate;
|
||||
import org.osgi.service.component.annotations.Reference;
|
||||
import org.osgi.service.component.annotations.ReferenceCardinality;
|
||||
import org.onosproject.ui.UiExtension;
|
||||
import org.onosproject.ui.UiExtensionService;
|
||||
import org.onosproject.ui.UiMessageHandlerFactory;
|
||||
@ -43,7 +43,7 @@ public class AlarmTopovComponent {
|
||||
|
||||
private final Logger log = LoggerFactory.getLogger(getClass());
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected UiExtensionService uiExtensionService;
|
||||
|
||||
// List of application views
|
||||
|
||||
@ -16,13 +16,6 @@
|
||||
package org.onosproject.faultmanagement.impl;
|
||||
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
import org.apache.felix.scr.annotations.Activate;
|
||||
import org.apache.felix.scr.annotations.Component;
|
||||
import org.apache.felix.scr.annotations.Deactivate;
|
||||
import org.apache.felix.scr.annotations.Modified;
|
||||
import org.apache.felix.scr.annotations.Reference;
|
||||
import org.apache.felix.scr.annotations.ReferenceCardinality;
|
||||
import org.apache.felix.scr.annotations.Service;
|
||||
import org.onlab.util.ItemNotFoundException;
|
||||
import org.onosproject.faultmanagement.api.AlarmStore;
|
||||
import org.onosproject.faultmanagement.api.AlarmStoreDelegate;
|
||||
@ -44,6 +37,12 @@ import org.onosproject.net.device.DeviceListener;
|
||||
import org.onosproject.net.device.DeviceService;
|
||||
import org.onosproject.net.provider.AbstractListenerProviderRegistry;
|
||||
import org.onosproject.net.provider.AbstractProviderService;
|
||||
import org.osgi.service.component.annotations.Activate;
|
||||
import org.osgi.service.component.annotations.Component;
|
||||
import org.osgi.service.component.annotations.Deactivate;
|
||||
import org.osgi.service.component.annotations.Modified;
|
||||
import org.osgi.service.component.annotations.Reference;
|
||||
import org.osgi.service.component.annotations.ReferenceCardinality;
|
||||
import org.slf4j.Logger;
|
||||
|
||||
import java.util.Collection;
|
||||
@ -59,21 +58,20 @@ import static org.slf4j.LoggerFactory.getLogger;
|
||||
/**
|
||||
* Implementation of the Alarm service.
|
||||
*/
|
||||
@Component(immediate = true)
|
||||
@Service
|
||||
@Component(immediate = true, service = { AlarmService.class, AlarmProviderRegistry.class })
|
||||
public class AlarmManager
|
||||
extends AbstractListenerProviderRegistry<AlarmEvent, AlarmListener, AlarmProvider, AlarmProviderService>
|
||||
implements AlarmService, AlarmProviderRegistry {
|
||||
|
||||
private final Logger log = getLogger(getClass());
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected DeviceService deviceService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected MastershipService mastershipService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected AlarmStore store;
|
||||
|
||||
protected AlarmStoreDelegate delegate = this::post;
|
||||
|
||||
@ -17,13 +17,6 @@
|
||||
package org.onosproject.faultmanagement.impl;
|
||||
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
import org.apache.felix.scr.annotations.Activate;
|
||||
import org.apache.felix.scr.annotations.Component;
|
||||
import org.apache.felix.scr.annotations.Deactivate;
|
||||
import org.apache.felix.scr.annotations.Modified;
|
||||
import org.apache.felix.scr.annotations.Reference;
|
||||
import org.apache.felix.scr.annotations.ReferenceCardinality;
|
||||
import org.apache.felix.scr.annotations.Service;
|
||||
import org.onosproject.faultmanagement.api.AlarmStore;
|
||||
import org.onosproject.faultmanagement.api.AlarmStoreDelegate;
|
||||
import org.onosproject.incubator.net.faultmanagement.alarm.Alarm;
|
||||
@ -39,6 +32,12 @@ import org.onosproject.store.service.MapEvent;
|
||||
import org.onosproject.store.service.MapEventListener;
|
||||
import org.onosproject.store.service.Serializer;
|
||||
import org.onosproject.store.service.StorageService;
|
||||
import org.osgi.service.component.annotations.Activate;
|
||||
import org.osgi.service.component.annotations.Component;
|
||||
import org.osgi.service.component.annotations.Deactivate;
|
||||
import org.osgi.service.component.annotations.Modified;
|
||||
import org.osgi.service.component.annotations.Reference;
|
||||
import org.osgi.service.component.annotations.ReferenceCardinality;
|
||||
import org.slf4j.Logger;
|
||||
|
||||
import java.util.Collection;
|
||||
@ -52,8 +51,7 @@ import static org.slf4j.LoggerFactory.getLogger;
|
||||
* Manages information of alarms using gossip protocol to distribute
|
||||
* information.
|
||||
*/
|
||||
@Component(immediate = true)
|
||||
@Service
|
||||
@Component(immediate = true, service = AlarmStore.class)
|
||||
public class DistributedAlarmStore
|
||||
extends AbstractStore<AlarmEvent, AlarmStoreDelegate>
|
||||
implements AlarmStore {
|
||||
@ -62,7 +60,7 @@ public class DistributedAlarmStore
|
||||
private ConsistentMap<AlarmId, Alarm> alarms;
|
||||
private Map<AlarmId, Alarm> alarmsMap;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected StorageService storageService;
|
||||
|
||||
private final MapEventListener<AlarmId, Alarm> listener = new InternalListener();
|
||||
|
||||
@ -15,13 +15,6 @@
|
||||
*/
|
||||
package org.onosproject.faultmanagement.impl;
|
||||
|
||||
import org.apache.felix.scr.annotations.Activate;
|
||||
import org.apache.felix.scr.annotations.Component;
|
||||
import org.apache.felix.scr.annotations.Deactivate;
|
||||
import org.apache.felix.scr.annotations.Modified;
|
||||
import org.apache.felix.scr.annotations.Property;
|
||||
import org.apache.felix.scr.annotations.Reference;
|
||||
import org.apache.felix.scr.annotations.ReferenceCardinality;
|
||||
import org.onosproject.cfg.ComponentConfigService;
|
||||
import org.onosproject.incubator.net.faultmanagement.alarm.AlarmConsumer;
|
||||
import org.onosproject.incubator.net.faultmanagement.alarm.AlarmProvider;
|
||||
@ -38,6 +31,12 @@ import org.onosproject.net.device.DeviceService;
|
||||
import org.onosproject.net.provider.AbstractProvider;
|
||||
import org.onosproject.net.provider.ProviderId;
|
||||
import org.osgi.service.component.ComponentContext;
|
||||
import org.osgi.service.component.annotations.Activate;
|
||||
import org.osgi.service.component.annotations.Component;
|
||||
import org.osgi.service.component.annotations.Deactivate;
|
||||
import org.osgi.service.component.annotations.Modified;
|
||||
import org.osgi.service.component.annotations.Reference;
|
||||
import org.osgi.service.component.annotations.ReferenceCardinality;
|
||||
import org.slf4j.Logger;
|
||||
|
||||
import java.util.Dictionary;
|
||||
@ -62,16 +61,16 @@ public class PollingAlarmProvider extends AbstractProvider implements AlarmProvi
|
||||
|
||||
private final Logger log = getLogger(getClass());
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected DeviceService deviceService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected MastershipService mastershipService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected AlarmProviderRegistry providerRegistry;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected ComponentConfigService cfgService;
|
||||
|
||||
protected AlarmProviderService providerService;
|
||||
@ -89,14 +88,14 @@ public class PollingAlarmProvider extends AbstractProvider implements AlarmProvi
|
||||
private static final int CORE_POOL_SIZE = 10;
|
||||
|
||||
private static final int DEFAULT_POLL_FREQUENCY_SECONDS = 60;
|
||||
@Property(name = "alarmPollFrequencySeconds", intValue = DEFAULT_POLL_FREQUENCY_SECONDS,
|
||||
label = "Frequency (in seconds) for polling alarm from devices")
|
||||
//@Property(name = "alarmPollFrequencySeconds", intValue = DEFAULT_POLL_FREQUENCY_SECONDS,
|
||||
// label = "Frequency (in seconds) for polling alarm from devices")
|
||||
protected int alarmPollFrequencySeconds = DEFAULT_POLL_FREQUENCY_SECONDS;
|
||||
|
||||
// TODO implement purging of old alarms.
|
||||
private static final int DEFAULT_CLEAR_FREQUENCY_SECONDS = 500;
|
||||
@Property(name = "clearedAlarmPurgeSeconds", intValue = DEFAULT_CLEAR_FREQUENCY_SECONDS,
|
||||
label = "Frequency (in seconds) for deleting cleared alarms")
|
||||
//@Property(name = "clearedAlarmPurgeSeconds", intValue = DEFAULT_CLEAR_FREQUENCY_SECONDS,
|
||||
// label = "Frequency (in seconds) for deleting cleared alarms")
|
||||
private int clearedAlarmPurgeFrequencySeconds = DEFAULT_CLEAR_FREQUENCY_SECONDS;
|
||||
|
||||
public PollingAlarmProvider() {
|
||||
|
||||
@ -15,11 +15,11 @@
|
||||
*/
|
||||
package org.onosproject.faultmanagement.web;
|
||||
|
||||
import org.apache.felix.scr.annotations.Activate;
|
||||
import org.apache.felix.scr.annotations.Component;
|
||||
import org.apache.felix.scr.annotations.Deactivate;
|
||||
import org.apache.felix.scr.annotations.Reference;
|
||||
import org.apache.felix.scr.annotations.ReferenceCardinality;
|
||||
import org.osgi.service.component.annotations.Activate;
|
||||
import org.osgi.service.component.annotations.Component;
|
||||
import org.osgi.service.component.annotations.Deactivate;
|
||||
import org.osgi.service.component.annotations.Reference;
|
||||
import org.osgi.service.component.annotations.ReferenceCardinality;
|
||||
import org.onosproject.codec.CodecService;
|
||||
import org.onosproject.incubator.net.faultmanagement.alarm.Alarm;
|
||||
|
||||
@ -34,7 +34,7 @@ public class AlarmCodecRegistrator {
|
||||
|
||||
private static final Logger log = LoggerFactory.getLogger(AlarmCodecRegistrator.class);
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected CodecService codecService;
|
||||
|
||||
@Activate
|
||||
|
||||
@ -15,34 +15,33 @@
|
||||
*/
|
||||
package org.onosproject.flowanalyzer;
|
||||
|
||||
import org.apache.felix.scr.annotations.Activate;
|
||||
import org.apache.felix.scr.annotations.Component;
|
||||
import org.apache.felix.scr.annotations.Deactivate;
|
||||
import org.apache.felix.scr.annotations.Reference;
|
||||
import org.apache.felix.scr.annotations.ReferenceCardinality;
|
||||
import org.apache.felix.scr.annotations.Service;
|
||||
import org.onosproject.net.ConnectPoint;
|
||||
import org.onosproject.net.DeviceId;
|
||||
import org.onosproject.net.HostId;
|
||||
import org.onosproject.net.Link;
|
||||
import org.onosproject.net.PortNumber;
|
||||
import org.onosproject.net.flow.FlowEntry;
|
||||
import org.onosproject.net.flow.FlowRuleService;
|
||||
import org.onosproject.net.DeviceId;
|
||||
import org.onosproject.net.HostId;
|
||||
import org.onosproject.net.flow.criteria.Criteria;
|
||||
import org.onosproject.net.flow.criteria.Criterion;
|
||||
import org.onosproject.net.flow.criteria.PortCriterion;
|
||||
import org.onosproject.net.flow.instructions.Instruction;
|
||||
import org.onosproject.net.flow.instructions.Instructions;
|
||||
import org.onosproject.net.topology.TopologyService;
|
||||
import org.onosproject.net.topology.TopologyGraph;
|
||||
import org.onosproject.net.link.LinkService;
|
||||
import org.onosproject.net.Link;
|
||||
import org.onosproject.net.topology.TopologyGraph;
|
||||
import org.onosproject.net.topology.TopologyService;
|
||||
import org.onosproject.net.topology.TopologyVertex;
|
||||
import org.osgi.service.component.ComponentContext;
|
||||
import org.osgi.service.component.annotations.Activate;
|
||||
import org.osgi.service.component.annotations.Component;
|
||||
import org.osgi.service.component.annotations.Deactivate;
|
||||
import org.osgi.service.component.annotations.Reference;
|
||||
import org.osgi.service.component.annotations.ReferenceCardinality;
|
||||
import org.slf4j.Logger;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
@ -51,19 +50,18 @@ import static org.slf4j.LoggerFactory.getLogger;
|
||||
/**
|
||||
* Simple flow space analyzer app.
|
||||
*/
|
||||
@Component(immediate = true)
|
||||
@Service(value = FlowAnalyzer.class)
|
||||
@Component(immediate = true, service = FlowAnalyzer.class)
|
||||
public class FlowAnalyzer {
|
||||
|
||||
private final Logger log = getLogger(getClass());
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected FlowRuleService flowRuleService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected TopologyService topologyService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected LinkService linkService;
|
||||
|
||||
@Activate
|
||||
|
||||
@ -16,14 +16,6 @@
|
||||
package org.onosproject.fwd;
|
||||
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
import org.apache.felix.scr.annotations.Activate;
|
||||
import org.apache.felix.scr.annotations.Component;
|
||||
import org.apache.felix.scr.annotations.Deactivate;
|
||||
import org.apache.felix.scr.annotations.Modified;
|
||||
import org.apache.felix.scr.annotations.Property;
|
||||
import org.apache.felix.scr.annotations.Reference;
|
||||
import org.apache.felix.scr.annotations.ReferenceCardinality;
|
||||
import org.apache.felix.scr.annotations.Service;
|
||||
import org.onlab.packet.Ethernet;
|
||||
import org.onlab.packet.ICMP;
|
||||
import org.onlab.packet.ICMP6;
|
||||
@ -79,6 +71,12 @@ import org.onosproject.store.service.MultiValuedTimestamp;
|
||||
import org.onosproject.store.service.StorageService;
|
||||
import org.onosproject.store.service.WallClockTimestamp;
|
||||
import org.osgi.service.component.ComponentContext;
|
||||
import org.osgi.service.component.annotations.Activate;
|
||||
import org.osgi.service.component.annotations.Component;
|
||||
import org.osgi.service.component.annotations.Deactivate;
|
||||
import org.osgi.service.component.annotations.Modified;
|
||||
import org.osgi.service.component.annotations.Reference;
|
||||
import org.osgi.service.component.annotations.ReferenceCardinality;
|
||||
import org.slf4j.Logger;
|
||||
|
||||
import java.util.Dictionary;
|
||||
@ -96,8 +94,7 @@ import static org.slf4j.LoggerFactory.getLogger;
|
||||
/**
|
||||
* Sample reactive forwarding application.
|
||||
*/
|
||||
@Component(immediate = true)
|
||||
@Service(value = ReactiveForwarding.class)
|
||||
@Component(immediate = true, service = ReactiveForwarding.class)
|
||||
public class ReactiveForwarding {
|
||||
|
||||
private static final int DEFAULT_TIMEOUT = 10;
|
||||
@ -105,28 +102,28 @@ public class ReactiveForwarding {
|
||||
|
||||
private final Logger log = getLogger(getClass());
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected TopologyService topologyService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected PacketService packetService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected HostService hostService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected FlowRuleService flowRuleService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected FlowObjectiveService flowObjectiveService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected CoreService coreService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected ComponentConfigService cfgService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected StorageService storageService;
|
||||
|
||||
private ReactivePacketProcessor processor = new ReactivePacketProcessor();
|
||||
@ -135,69 +132,69 @@ public class ReactiveForwarding {
|
||||
|
||||
private ApplicationId appId;
|
||||
|
||||
@Property(name = "packetOutOnly", boolValue = false,
|
||||
label = "Enable packet-out only forwarding; default is false")
|
||||
//@Property(name = "packetOutOnly", boolValue = false,
|
||||
// label = "Enable packet-out only forwarding; default is false")
|
||||
private boolean packetOutOnly = false;
|
||||
|
||||
@Property(name = "packetOutOfppTable", boolValue = false,
|
||||
label = "Enable first packet forwarding using OFPP_TABLE port " +
|
||||
"instead of PacketOut with actual port; default is false")
|
||||
//@Property(name = "packetOutOfppTable", boolValue = false,
|
||||
// label = "Enable first packet forwarding using OFPP_TABLE port " +
|
||||
// "instead of PacketOut with actual port; default is false")
|
||||
private boolean packetOutOfppTable = false;
|
||||
|
||||
@Property(name = "flowTimeout", intValue = DEFAULT_TIMEOUT,
|
||||
label = "Configure Flow Timeout for installed flow rules; " +
|
||||
"default is 10 sec")
|
||||
//@Property(name = "flowTimeout", intValue = DEFAULT_TIMEOUT,
|
||||
// label = "Configure Flow Timeout for installed flow rules; " +
|
||||
// "default is 10 sec")
|
||||
private int flowTimeout = DEFAULT_TIMEOUT;
|
||||
|
||||
@Property(name = "flowPriority", intValue = DEFAULT_PRIORITY,
|
||||
label = "Configure Flow Priority for installed flow rules; " +
|
||||
"default is 10")
|
||||
//@Property(name = "flowPriority", intValue = DEFAULT_PRIORITY,
|
||||
// label = "Configure Flow Priority for installed flow rules; " +
|
||||
// "default is 10")
|
||||
private int flowPriority = DEFAULT_PRIORITY;
|
||||
|
||||
@Property(name = "ipv6Forwarding", boolValue = false,
|
||||
label = "Enable IPv6 forwarding; default is false")
|
||||
//@Property(name = "ipv6Forwarding", boolValue = false,
|
||||
// label = "Enable IPv6 forwarding; default is false")
|
||||
private boolean ipv6Forwarding = false;
|
||||
|
||||
@Property(name = "matchDstMacOnly", boolValue = false,
|
||||
label = "Enable matching Dst Mac Only; default is false")
|
||||
//@Property(name = "matchDstMacOnly", boolValue = false,
|
||||
// label = "Enable matching Dst Mac Only; default is false")
|
||||
private boolean matchDstMacOnly = false;
|
||||
|
||||
@Property(name = "matchVlanId", boolValue = false,
|
||||
label = "Enable matching Vlan ID; default is false")
|
||||
//@Property(name = "matchVlanId", boolValue = false,
|
||||
// label = "Enable matching Vlan ID; default is false")
|
||||
private boolean matchVlanId = false;
|
||||
|
||||
@Property(name = "matchIpv4Address", boolValue = false,
|
||||
label = "Enable matching IPv4 Addresses; default is false")
|
||||
//@Property(name = "matchIpv4Address", boolValue = false,
|
||||
// label = "Enable matching IPv4 Addresses; default is false")
|
||||
private boolean matchIpv4Address = false;
|
||||
|
||||
@Property(name = "matchIpv4Dscp", boolValue = false,
|
||||
label = "Enable matching IPv4 DSCP and ECN; default is false")
|
||||
//@Property(name = "matchIpv4Dscp", boolValue = false,
|
||||
// label = "Enable matching IPv4 DSCP and ECN; default is false")
|
||||
private boolean matchIpv4Dscp = false;
|
||||
|
||||
@Property(name = "matchIpv6Address", boolValue = false,
|
||||
label = "Enable matching IPv6 Addresses; default is false")
|
||||
//@Property(name = "matchIpv6Address", boolValue = false,
|
||||
// label = "Enable matching IPv6 Addresses; default is false")
|
||||
private boolean matchIpv6Address = false;
|
||||
|
||||
@Property(name = "matchIpv6FlowLabel", boolValue = false,
|
||||
label = "Enable matching IPv6 FlowLabel; default is false")
|
||||
//@Property(name = "matchIpv6FlowLabel", boolValue = false,
|
||||
// label = "Enable matching IPv6 FlowLabel; default is false")
|
||||
private boolean matchIpv6FlowLabel = false;
|
||||
|
||||
@Property(name = "matchTcpUdpPorts", boolValue = false,
|
||||
label = "Enable matching TCP/UDP ports; default is false")
|
||||
//@Property(name = "matchTcpUdpPorts", boolValue = false,
|
||||
// label = "Enable matching TCP/UDP ports; default is false")
|
||||
private boolean matchTcpUdpPorts = false;
|
||||
|
||||
@Property(name = "matchIcmpFields", boolValue = false,
|
||||
label = "Enable matching ICMPv4 and ICMPv6 fields; " +
|
||||
"default is false")
|
||||
//@Property(name = "matchIcmpFields", boolValue = false,
|
||||
// label = "Enable matching ICMPv4 and ICMPv6 fields; " +
|
||||
// "default is false")
|
||||
private boolean matchIcmpFields = false;
|
||||
|
||||
|
||||
@Property(name = "ignoreIPv4Multicast", boolValue = false,
|
||||
label = "Ignore (do not forward) IPv4 multicast packets; default is false")
|
||||
//@Property(name = "ignoreIPv4Multicast", boolValue = false,
|
||||
// label = "Ignore (do not forward) IPv4 multicast packets; default is false")
|
||||
private boolean ignoreIpv4McastPackets = false;
|
||||
|
||||
@Property(name = "recordMetrics", boolValue = false,
|
||||
label = "Enable record metrics for reactive forwarding")
|
||||
//@Property(name = "recordMetrics", boolValue = false,
|
||||
// label = "Enable record metrics for reactive forwarding")
|
||||
private boolean recordMetrics = false;
|
||||
|
||||
private final TopologyListener topologyListener = new InternalTopologyListener();
|
||||
|
||||
@ -19,18 +19,17 @@ import com.codahale.metrics.MetricRegistry;
|
||||
import com.codahale.metrics.ganglia.GangliaReporter;
|
||||
import info.ganglia.gmetric4j.gmetric.GMetric;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.felix.scr.annotations.Activate;
|
||||
import org.apache.felix.scr.annotations.Component;
|
||||
import org.apache.felix.scr.annotations.Deactivate;
|
||||
import org.apache.felix.scr.annotations.Modified;
|
||||
import org.apache.felix.scr.annotations.Property;
|
||||
import org.apache.felix.scr.annotations.Reference;
|
||||
import org.apache.felix.scr.annotations.ReferenceCardinality;
|
||||
import org.onlab.metrics.MetricsService;
|
||||
import org.onlab.util.Tools;
|
||||
import org.onosproject.cfg.ComponentConfigService;
|
||||
import org.onosproject.core.CoreService;
|
||||
import org.osgi.service.component.ComponentContext;
|
||||
import org.osgi.service.component.annotations.Activate;
|
||||
import org.osgi.service.component.annotations.Component;
|
||||
import org.osgi.service.component.annotations.Deactivate;
|
||||
import org.osgi.service.component.annotations.Modified;
|
||||
import org.osgi.service.component.annotations.Reference;
|
||||
import org.osgi.service.component.annotations.ReferenceCardinality;
|
||||
import org.slf4j.Logger;
|
||||
|
||||
import java.io.IOException;
|
||||
@ -57,33 +56,33 @@ public class DefaultGangliaMetricsReporter implements GangliaMetricsReporter {
|
||||
private static final int DEFAULT_TTL = 1;
|
||||
private static final String DEFAULT_METRIC_NAMES = "default";
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected CoreService coreService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected MetricsService metricsService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected ComponentConfigService cfgService;
|
||||
|
||||
@Property(name = "monitorAll", boolValue = true,
|
||||
label = "Enable to monitor all of metrics stored in metric registry default is true")
|
||||
//@Property(name = "monitorAll", boolValue = true,
|
||||
// label = "Enable to monitor all of metrics stored in metric registry default is true")
|
||||
protected boolean monitorAll = true;
|
||||
|
||||
@Property(name = "metricNames", value = DEFAULT_METRIC_NAMES,
|
||||
label = "Names of metric to be monitored; default metric names are 'default'")
|
||||
//@Property(name = "metricNames", value = DEFAULT_METRIC_NAMES,
|
||||
// label = "Names of metric to be monitored; default metric names are 'default'")
|
||||
protected String metricNames = DEFAULT_METRIC_NAMES;
|
||||
|
||||
@Property(name = "address", value = DEFAULT_ADDRESS,
|
||||
label = "IP address of ganglia monitoring server; default is localhost")
|
||||
//@Property(name = "address", value = DEFAULT_ADDRESS,
|
||||
// label = "IP address of ganglia monitoring server; default is localhost")
|
||||
protected String address = DEFAULT_ADDRESS;
|
||||
|
||||
@Property(name = "port", intValue = DEFAULT_PORT,
|
||||
label = "Port number of ganglia monitoring server; default is 8649")
|
||||
//@Property(name = "port", intValue = DEFAULT_PORT,
|
||||
// label = "Port number of ganglia monitoring server; default is 8649")
|
||||
protected int port = DEFAULT_PORT;
|
||||
|
||||
@Property(name = "ttl", intValue = DEFAULT_TTL,
|
||||
label = "TTL value of ganglia monitoring server; default is 1")
|
||||
//@Property(name = "ttl", intValue = DEFAULT_TTL,
|
||||
// label = "TTL value of ganglia monitoring server; default is 1")
|
||||
protected int ttl = DEFAULT_TTL;
|
||||
|
||||
private GMetric ganglia;
|
||||
|
||||
@ -15,11 +15,11 @@
|
||||
*/
|
||||
package org.onosproject.gluon.manager;
|
||||
|
||||
import org.apache.felix.scr.annotations.Activate;
|
||||
import org.apache.felix.scr.annotations.Component;
|
||||
import org.apache.felix.scr.annotations.Deactivate;
|
||||
import org.apache.felix.scr.annotations.Reference;
|
||||
import org.apache.felix.scr.annotations.ReferenceCardinality;
|
||||
import org.osgi.service.component.annotations.Activate;
|
||||
import org.osgi.service.component.annotations.Component;
|
||||
import org.osgi.service.component.annotations.Deactivate;
|
||||
import org.osgi.service.component.annotations.Reference;
|
||||
import org.osgi.service.component.annotations.ReferenceCardinality;
|
||||
import org.onosproject.core.CoreService;
|
||||
import org.onosproject.gluon.rsc.GluonConfig;
|
||||
import org.onosproject.gluon.rsc.GluonServer;
|
||||
@ -41,10 +41,10 @@ public class GluonManager {
|
||||
private final Logger log = LoggerFactory.getLogger(getClass());
|
||||
private static final String APP_ID = "org.onosproject.gluon";
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected CoreService coreService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected NetworkConfigRegistry configRegistry;
|
||||
|
||||
|
||||
|
||||
@ -20,18 +20,17 @@ import com.codahale.metrics.MetricRegistry;
|
||||
import com.codahale.metrics.graphite.Graphite;
|
||||
import com.codahale.metrics.graphite.GraphiteReporter;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.felix.scr.annotations.Activate;
|
||||
import org.apache.felix.scr.annotations.Component;
|
||||
import org.apache.felix.scr.annotations.Deactivate;
|
||||
import org.apache.felix.scr.annotations.Modified;
|
||||
import org.apache.felix.scr.annotations.Property;
|
||||
import org.apache.felix.scr.annotations.Reference;
|
||||
import org.apache.felix.scr.annotations.ReferenceCardinality;
|
||||
import org.onlab.metrics.MetricsService;
|
||||
import org.onlab.util.Tools;
|
||||
import org.onosproject.cfg.ComponentConfigService;
|
||||
import org.onosproject.core.CoreService;
|
||||
import org.osgi.service.component.ComponentContext;
|
||||
import org.osgi.service.component.annotations.Activate;
|
||||
import org.osgi.service.component.annotations.Component;
|
||||
import org.osgi.service.component.annotations.Deactivate;
|
||||
import org.osgi.service.component.annotations.Modified;
|
||||
import org.osgi.service.component.annotations.Reference;
|
||||
import org.osgi.service.component.annotations.ReferenceCardinality;
|
||||
import org.slf4j.Logger;
|
||||
|
||||
import java.net.InetSocketAddress;
|
||||
@ -57,37 +56,37 @@ public class DefaultGraphiteMetricsReporter implements GraphiteMetricsReporter {
|
||||
private static final String DEFAULT_METRIC_NAME_PREFIX = "onos";
|
||||
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected CoreService coreService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected MetricsService metricsService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected ComponentConfigService cfgService;
|
||||
|
||||
@Property(name = "monitorAll", boolValue = true,
|
||||
label = "Enable to monitor all of metrics stored in metric registry default is true")
|
||||
//@Property(name = "monitorAll", boolValue = true,
|
||||
// label = "Enable to monitor all of metrics stored in metric registry default is true")
|
||||
protected boolean monitorAll = true;
|
||||
|
||||
@Property(name = "metricNames", value = DEFAULT_METRIC_NAMES,
|
||||
label = "Names of metric to be monitored; default metric names are 'default'")
|
||||
//@Property(name = "metricNames", value = DEFAULT_METRIC_NAMES,
|
||||
// label = "Names of metric to be monitored; default metric names are 'default'")
|
||||
protected String metricNames = DEFAULT_METRIC_NAMES;
|
||||
|
||||
@Property(name = "address", value = DEFAULT_ADDRESS,
|
||||
label = "IP address of graphite monitoring server; default is localhost")
|
||||
//@Property(name = "address", value = DEFAULT_ADDRESS,
|
||||
// label = "IP address of graphite monitoring server; default is localhost")
|
||||
protected String address = DEFAULT_ADDRESS;
|
||||
|
||||
@Property(name = "port", intValue = DEFAULT_PORT,
|
||||
label = "Port number of graphite monitoring server; default is 2003")
|
||||
//@Property(name = "port", intValue = DEFAULT_PORT,
|
||||
// label = "Port number of graphite monitoring server; default is 2003")
|
||||
protected int port = DEFAULT_PORT;
|
||||
|
||||
@Property(name = "reportPeriod", intValue = DEFAULT_REPORT_PERIOD,
|
||||
label = "Reporting period of graphite monitoring server; default is 1")
|
||||
//@Property(name = "reportPeriod", intValue = DEFAULT_REPORT_PERIOD,
|
||||
// label = "Reporting period of graphite monitoring server; default is 1")
|
||||
protected int reportPeriod = DEFAULT_REPORT_PERIOD;
|
||||
|
||||
@Property(name = "metricNamePrefix", value = DEFAULT_METRIC_NAME_PREFIX,
|
||||
label = "Prefix of metric name for graphite back-end server; default is 'onos'")
|
||||
//@Property(name = "metricNamePrefix", value = DEFAULT_METRIC_NAME_PREFIX,
|
||||
// label = "Prefix of metric name for graphite back-end server; default is 'onos'")
|
||||
protected String metricNamePrefix = DEFAULT_METRIC_NAME_PREFIX;
|
||||
|
||||
private Graphite graphite;
|
||||
|
||||
@ -18,12 +18,6 @@ package org.onosproject.imr;
|
||||
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
import org.apache.commons.lang3.tuple.Pair;
|
||||
import org.apache.felix.scr.annotations.Activate;
|
||||
import org.apache.felix.scr.annotations.Component;
|
||||
import org.apache.felix.scr.annotations.Deactivate;
|
||||
import org.apache.felix.scr.annotations.Reference;
|
||||
import org.apache.felix.scr.annotations.ReferenceCardinality;
|
||||
import org.apache.felix.scr.annotations.Service;
|
||||
import org.onlab.util.KryoNamespace;
|
||||
import org.onosproject.core.ApplicationId;
|
||||
import org.onosproject.imr.data.Path;
|
||||
@ -61,6 +55,11 @@ import org.onosproject.store.service.ConsistentMap;
|
||||
import org.onosproject.store.service.DistributedSet;
|
||||
import org.onosproject.store.service.Serializer;
|
||||
import org.onosproject.store.service.StorageService;
|
||||
import org.osgi.service.component.annotations.Activate;
|
||||
import org.osgi.service.component.annotations.Component;
|
||||
import org.osgi.service.component.annotations.Deactivate;
|
||||
import org.osgi.service.component.annotations.Reference;
|
||||
import org.osgi.service.component.annotations.ReferenceCardinality;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
@ -82,8 +81,7 @@ import static com.google.common.base.Preconditions.checkNotNull;
|
||||
/**
|
||||
* Manager of Intent Monitor and Reroute.
|
||||
*/
|
||||
@Component(immediate = true)
|
||||
@Service
|
||||
@Component(immediate = true, service = IntentMonitorAndRerouteService.class)
|
||||
public class IntentMonitorAndRerouteManager implements IntentMonitorAndRerouteService {
|
||||
|
||||
private final Logger log = LoggerFactory.getLogger(getClass());
|
||||
@ -93,22 +91,22 @@ public class IntentMonitorAndRerouteManager implements IntentMonitorAndRerouteSe
|
||||
|
||||
private DistributedSet<Key> toBeMonitoredIntents;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected IntentService intentService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected FlowRuleService flowRuleService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected LinkService linkService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected HostService hostService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected FlowStatisticStore statsStore;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected StorageService storageService;
|
||||
|
||||
private InternalIntentListener intentListener = new InternalIntentListener();
|
||||
|
||||
@ -15,11 +15,11 @@
|
||||
*/
|
||||
package org.onosproject.inbandtelemetry.app;
|
||||
|
||||
import org.apache.felix.scr.annotations.Activate;
|
||||
import org.apache.felix.scr.annotations.Deactivate;
|
||||
import org.apache.felix.scr.annotations.Reference;
|
||||
import org.apache.felix.scr.annotations.Component;
|
||||
import org.apache.felix.scr.annotations.ReferenceCardinality;
|
||||
import org.osgi.service.component.annotations.Activate;
|
||||
import org.osgi.service.component.annotations.Deactivate;
|
||||
import org.osgi.service.component.annotations.Reference;
|
||||
import org.osgi.service.component.annotations.Component;
|
||||
import org.osgi.service.component.annotations.ReferenceCardinality;
|
||||
import org.onosproject.core.CoreService;
|
||||
import org.onosproject.inbandtelemetry.api.IntService;
|
||||
import org.onosproject.net.host.HostService;
|
||||
@ -33,13 +33,13 @@ public class IntControl {
|
||||
// private static final int collectorPort = 1234;
|
||||
// private static final IpAddress collectorIp = IpAddress.valueOf("10.0.0.3");
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected CoreService coreService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected IntService intService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected HostService hostService;
|
||||
|
||||
@Activate
|
||||
|
||||
@ -16,11 +16,11 @@
|
||||
package org.onosproject.inbandtelemetry.app.ui;
|
||||
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import org.apache.felix.scr.annotations.Activate;
|
||||
import org.apache.felix.scr.annotations.Component;
|
||||
import org.apache.felix.scr.annotations.Deactivate;
|
||||
import org.apache.felix.scr.annotations.Reference;
|
||||
import org.apache.felix.scr.annotations.ReferenceCardinality;
|
||||
import org.osgi.service.component.annotations.Activate;
|
||||
import org.osgi.service.component.annotations.Component;
|
||||
import org.osgi.service.component.annotations.Deactivate;
|
||||
import org.osgi.service.component.annotations.Reference;
|
||||
import org.osgi.service.component.annotations.ReferenceCardinality;
|
||||
import org.onosproject.ui.UiExtension;
|
||||
import org.onosproject.ui.UiExtensionService;
|
||||
import org.onosproject.ui.UiMessageHandlerFactory;
|
||||
@ -41,7 +41,7 @@ public class IntAppUiComponent {
|
||||
|
||||
private final Logger log = LoggerFactory.getLogger(getClass());
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected UiExtensionService uiExtensionService;
|
||||
|
||||
// List of application views
|
||||
|
||||
@ -15,12 +15,6 @@
|
||||
*/
|
||||
package org.onosproject.inbandtelemetry.impl;
|
||||
|
||||
import org.apache.felix.scr.annotations.Activate;
|
||||
import org.apache.felix.scr.annotations.Component;
|
||||
import org.apache.felix.scr.annotations.Deactivate;
|
||||
import org.apache.felix.scr.annotations.Reference;
|
||||
import org.apache.felix.scr.annotations.ReferenceCardinality;
|
||||
import org.apache.felix.scr.annotations.Service;
|
||||
import org.onlab.util.KryoNamespace;
|
||||
import org.onosproject.core.ApplicationId;
|
||||
import org.onosproject.core.CoreService;
|
||||
@ -42,6 +36,11 @@ import org.onosproject.store.service.AtomicIdGenerator;
|
||||
import org.onosproject.store.service.ConsistentMap;
|
||||
import org.onosproject.store.service.Serializer;
|
||||
import org.onosproject.store.service.StorageService;
|
||||
import org.osgi.service.component.annotations.Activate;
|
||||
import org.osgi.service.component.annotations.Component;
|
||||
import org.osgi.service.component.annotations.Deactivate;
|
||||
import org.osgi.service.component.annotations.Reference;
|
||||
import org.osgi.service.component.annotations.ReferenceCardinality;
|
||||
import org.slf4j.Logger;
|
||||
|
||||
import java.util.Map;
|
||||
@ -53,8 +52,7 @@ import static org.slf4j.LoggerFactory.getLogger;
|
||||
/**
|
||||
* Implementation of IntService, for controlling INT-capable pipelines.
|
||||
*/
|
||||
@Component(immediate = true)
|
||||
@Service
|
||||
@Component(immediate = true, service = IntService.class)
|
||||
public class IntManager implements IntService {
|
||||
private final String appName = "org.onosproject.inbandtelemetry";
|
||||
private ApplicationId appId;
|
||||
@ -66,19 +64,19 @@ public class IntManager implements IntService {
|
||||
|
||||
private InternalHostListener hostListener = new InternalHostListener();
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
private CoreService coreService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
private DeviceService deviceService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
private StorageService storageService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
private HostService hostService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
private FlowRuleService flowRuleService;
|
||||
|
||||
@Activate
|
||||
|
||||
@ -19,14 +19,6 @@ import com.codahale.metrics.MetricRegistry;
|
||||
import com.izettle.metrics.influxdb.InfluxDbHttpSender;
|
||||
import com.izettle.metrics.influxdb.InfluxDbReporter;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.felix.scr.annotations.Activate;
|
||||
import org.apache.felix.scr.annotations.Component;
|
||||
import org.apache.felix.scr.annotations.Deactivate;
|
||||
import org.apache.felix.scr.annotations.Modified;
|
||||
import org.apache.felix.scr.annotations.Property;
|
||||
import org.apache.felix.scr.annotations.Reference;
|
||||
import org.apache.felix.scr.annotations.ReferenceCardinality;
|
||||
import org.apache.felix.scr.annotations.Service;
|
||||
import org.onlab.metrics.MetricsService;
|
||||
import org.onlab.util.Tools;
|
||||
import org.onosproject.cfg.ComponentConfigService;
|
||||
@ -34,6 +26,12 @@ import org.onosproject.cluster.ClusterService;
|
||||
import org.onosproject.cluster.ControllerNode;
|
||||
import org.onosproject.core.CoreService;
|
||||
import org.osgi.service.component.ComponentContext;
|
||||
import org.osgi.service.component.annotations.Activate;
|
||||
import org.osgi.service.component.annotations.Component;
|
||||
import org.osgi.service.component.annotations.Deactivate;
|
||||
import org.osgi.service.component.annotations.Modified;
|
||||
import org.osgi.service.component.annotations.Reference;
|
||||
import org.osgi.service.component.annotations.ReferenceCardinality;
|
||||
import org.slf4j.Logger;
|
||||
|
||||
import java.util.Dictionary;
|
||||
@ -44,8 +42,7 @@ import static org.slf4j.LoggerFactory.getLogger;
|
||||
/**
|
||||
* A Metric reporter that reports all metrics value to influxDB server.
|
||||
*/
|
||||
@Component(immediate = true)
|
||||
@Service
|
||||
@Component(immediate = true, service = InfluxDbMetricsReporter.class)
|
||||
public class DefaultInfluxDbMetricsReporter implements InfluxDbMetricsReporter {
|
||||
private final Logger log = getLogger(getClass());
|
||||
|
||||
@ -58,26 +55,26 @@ public class DefaultInfluxDbMetricsReporter implements InfluxDbMetricsReporter {
|
||||
private static final int DEFAULT_CONN_TIMEOUT = 1000;
|
||||
private static final int DEFAULT_READ_TIMEOUT = 1000;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected CoreService coreService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected MetricsService metricsService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected ComponentConfigService cfgService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected ClusterService clusterService;
|
||||
|
||||
@Property(name = "monitorAll", boolValue = true,
|
||||
label = "Enable to monitor all of metrics stored in metric registry " +
|
||||
"default is true")
|
||||
//@Property(name = "monitorAll", boolValue = true,
|
||||
// label = "Enable to monitor all of metrics stored in metric registry " +
|
||||
// "default is true")
|
||||
protected boolean monitorAll = true;
|
||||
|
||||
@Property(name = "metricNames", value = DEFAULT_METRIC_NAMES,
|
||||
label = "Names of metric to be monitored in third party monitoring " +
|
||||
"server; default metric names are 'default'")
|
||||
//@Property(name = "metricNames", value = DEFAULT_METRIC_NAMES,
|
||||
// label = "Names of metric to be monitored in third party monitoring " +
|
||||
// "server; default metric names are 'default'")
|
||||
protected String metricNames = DEFAULT_METRIC_NAMES;
|
||||
|
||||
protected String address;
|
||||
|
||||
@ -21,18 +21,17 @@ import com.google.common.collect.Lists;
|
||||
import com.google.common.collect.Maps;
|
||||
import com.google.common.collect.Sets;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.felix.scr.annotations.Activate;
|
||||
import org.apache.felix.scr.annotations.Component;
|
||||
import org.apache.felix.scr.annotations.Deactivate;
|
||||
import org.apache.felix.scr.annotations.Reference;
|
||||
import org.apache.felix.scr.annotations.ReferenceCardinality;
|
||||
import org.apache.felix.scr.annotations.Service;
|
||||
import org.influxdb.InfluxDB;
|
||||
import org.influxdb.InfluxDBFactory;
|
||||
import org.influxdb.dto.Query;
|
||||
import org.influxdb.dto.QueryResult;
|
||||
import org.onosproject.cluster.NodeId;
|
||||
import org.onosproject.core.CoreService;
|
||||
import org.osgi.service.component.annotations.Activate;
|
||||
import org.osgi.service.component.annotations.Component;
|
||||
import org.osgi.service.component.annotations.Deactivate;
|
||||
import org.osgi.service.component.annotations.Reference;
|
||||
import org.osgi.service.component.annotations.ReferenceCardinality;
|
||||
import org.slf4j.Logger;
|
||||
|
||||
import java.util.List;
|
||||
@ -45,8 +44,7 @@ import static org.slf4j.LoggerFactory.getLogger;
|
||||
/**
|
||||
* A Metric retriever implementation for querying metrics from influxDB server.
|
||||
*/
|
||||
@Component(immediate = true)
|
||||
@Service
|
||||
@Component(immediate = true, service = InfluxDbMetricsRetriever.class)
|
||||
public class DefaultInfluxDbMetricsRetriever implements InfluxDbMetricsRetriever {
|
||||
|
||||
private final Logger log = getLogger(getClass());
|
||||
@ -72,7 +70,7 @@ public class DefaultInfluxDbMetricsRetriever implements InfluxDbMetricsRetriever
|
||||
TIME_UNIT_MAP.put(TimeUnit.SECONDS, "s");
|
||||
}
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected CoreService coreService;
|
||||
|
||||
protected String database;
|
||||
|
||||
@ -15,17 +15,16 @@
|
||||
*/
|
||||
package org.onosproject.influxdbmetrics;
|
||||
|
||||
import org.apache.felix.scr.annotations.Activate;
|
||||
import org.apache.felix.scr.annotations.Component;
|
||||
import org.apache.felix.scr.annotations.Deactivate;
|
||||
import org.apache.felix.scr.annotations.Modified;
|
||||
import org.apache.felix.scr.annotations.Property;
|
||||
import org.apache.felix.scr.annotations.Reference;
|
||||
import org.apache.felix.scr.annotations.ReferenceCardinality;
|
||||
import org.onlab.util.Tools;
|
||||
import org.onosproject.cfg.ComponentConfigService;
|
||||
import org.onosproject.core.CoreService;
|
||||
import org.osgi.service.component.ComponentContext;
|
||||
import org.osgi.service.component.annotations.Activate;
|
||||
import org.osgi.service.component.annotations.Component;
|
||||
import org.osgi.service.component.annotations.Deactivate;
|
||||
import org.osgi.service.component.annotations.Modified;
|
||||
import org.osgi.service.component.annotations.Reference;
|
||||
import org.osgi.service.component.annotations.ReferenceCardinality;
|
||||
import org.slf4j.Logger;
|
||||
|
||||
import java.util.Dictionary;
|
||||
@ -47,36 +46,36 @@ public class InfluxDbMetricsConfig {
|
||||
private static final String DEFAULT_USERNAME = "onos";
|
||||
private static final String DEFAULT_PASSWORD = "onos.password";
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected CoreService coreService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected InfluxDbMetricsReporter influxDbMetricsReporter;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected InfluxDbMetricsRetriever influxDbMetricsRetriever;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected ComponentConfigService cfgService;
|
||||
|
||||
@Property(name = "address", value = DEFAULT_ADDRESS,
|
||||
label = "IP address of influxDB server; default is localhost")
|
||||
//@Property(name = "address", value = DEFAULT_ADDRESS,
|
||||
// label = "IP address of influxDB server; default is localhost")
|
||||
protected String address = DEFAULT_ADDRESS;
|
||||
|
||||
@Property(name = "port", intValue = DEFAULT_PORT,
|
||||
label = "Port number of influxDB server; default is 8086")
|
||||
//@Property(name = "port", intValue = DEFAULT_PORT,
|
||||
// label = "Port number of influxDB server; default is 8086")
|
||||
protected int port = DEFAULT_PORT;
|
||||
|
||||
@Property(name = "database", value = DEFAULT_DATABASE,
|
||||
label = "Database name of influxDB server; default is onos")
|
||||
//@Property(name = "database", value = DEFAULT_DATABASE,
|
||||
// label = "Database name of influxDB server; default is onos")
|
||||
protected String database = DEFAULT_DATABASE;
|
||||
|
||||
@Property(name = "username", value = DEFAULT_USERNAME,
|
||||
label = "Username of influxDB server; default is onos")
|
||||
//@Property(name = "username", value = DEFAULT_USERNAME,
|
||||
// label = "Username of influxDB server; default is onos")
|
||||
protected String username = DEFAULT_USERNAME;
|
||||
|
||||
@Property(name = "password", value = DEFAULT_PASSWORD,
|
||||
label = "Password of influxDB server; default is onos.password")
|
||||
//@Property(name = "password", value = DEFAULT_PASSWORD,
|
||||
// label = "Password of influxDB server; default is onos.password")
|
||||
protected String password = DEFAULT_PASSWORD;
|
||||
|
||||
@Activate
|
||||
|
||||
@ -16,12 +16,6 @@
|
||||
|
||||
package org.onosproject.intentsync;
|
||||
|
||||
import org.apache.felix.scr.annotations.Activate;
|
||||
import org.apache.felix.scr.annotations.Component;
|
||||
import org.apache.felix.scr.annotations.Deactivate;
|
||||
import org.apache.felix.scr.annotations.Reference;
|
||||
import org.apache.felix.scr.annotations.ReferenceCardinality;
|
||||
import org.apache.felix.scr.annotations.Service;
|
||||
import org.onosproject.cluster.ClusterService;
|
||||
import org.onosproject.cluster.LeadershipEvent;
|
||||
import org.onosproject.cluster.LeadershipEventListener;
|
||||
@ -34,6 +28,11 @@ import org.onosproject.net.intent.IntentService;
|
||||
import org.onosproject.net.intent.IntentState;
|
||||
import org.onosproject.net.intent.IntentUtils;
|
||||
import org.onosproject.net.intent.Key;
|
||||
import org.osgi.service.component.annotations.Activate;
|
||||
import org.osgi.service.component.annotations.Component;
|
||||
import org.osgi.service.component.annotations.Deactivate;
|
||||
import org.osgi.service.component.annotations.Reference;
|
||||
import org.osgi.service.component.annotations.ReferenceCardinality;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
@ -51,8 +50,8 @@ import static org.onlab.util.Tools.groupedThreads;
|
||||
/**
|
||||
* Synchronizes intents between an in-memory intent store and the IntentService.
|
||||
*/
|
||||
@Service
|
||||
@Component(immediate = true)
|
||||
@Component(immediate = true, service = { IntentSynchronizationService.class,
|
||||
IntentSynchronizationAdminService.class })
|
||||
public class IntentSynchronizer implements IntentSynchronizationService,
|
||||
IntentSynchronizationAdminService {
|
||||
|
||||
@ -60,16 +59,16 @@ public class IntentSynchronizer implements IntentSynchronizationService,
|
||||
|
||||
private static final String APP_NAME = "org.onosproject.intentsynchronizer";
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected CoreService coreService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected LeadershipService leadershipService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected ClusterService clusterService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected IntentService intentService;
|
||||
|
||||
private NodeId localNodeId;
|
||||
|
||||
@ -16,10 +16,9 @@
|
||||
|
||||
package org.onosproject.kafkaintegration.impl;
|
||||
|
||||
import org.apache.felix.scr.annotations.Activate;
|
||||
import org.apache.felix.scr.annotations.Component;
|
||||
import org.apache.felix.scr.annotations.Deactivate;
|
||||
import org.apache.felix.scr.annotations.Service;
|
||||
import org.osgi.service.component.annotations.Activate;
|
||||
import org.osgi.service.component.annotations.Component;
|
||||
import org.osgi.service.component.annotations.Deactivate;
|
||||
import org.onosproject.event.Event;
|
||||
import org.onosproject.kafkaintegration.api.EventConversionService;
|
||||
import org.onosproject.kafkaintegration.api.dto.OnosEvent;
|
||||
@ -38,8 +37,7 @@ import static org.onosproject.kafkaintegration.api.dto.OnosEvent.Type.LINK;
|
||||
* Implementation of Event Conversion Service.
|
||||
*
|
||||
*/
|
||||
@Component(immediate = true)
|
||||
@Service
|
||||
@Component(immediate = true, service = EventConversionService.class)
|
||||
public class EventConversionManager implements EventConversionService {
|
||||
|
||||
private final Logger log = LoggerFactory.getLogger(getClass());
|
||||
|
||||
@ -15,19 +15,7 @@
|
||||
*/
|
||||
package org.onosproject.kafkaintegration.impl;
|
||||
|
||||
import static com.google.common.base.Preconditions.checkNotNull;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.UUID;
|
||||
|
||||
import org.apache.felix.scr.annotations.Activate;
|
||||
import org.apache.felix.scr.annotations.Component;
|
||||
import org.apache.felix.scr.annotations.Deactivate;
|
||||
import org.apache.felix.scr.annotations.Reference;
|
||||
import org.apache.felix.scr.annotations.ReferenceCardinality;
|
||||
import org.apache.felix.scr.annotations.Service;
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import org.onosproject.core.ApplicationId;
|
||||
import org.onosproject.core.CoreService;
|
||||
import org.onosproject.kafkaintegration.api.EventSubscriptionService;
|
||||
@ -35,25 +23,34 @@ import org.onosproject.kafkaintegration.api.KafkaConfigService;
|
||||
import org.onosproject.kafkaintegration.api.dto.DefaultEventSubscriber;
|
||||
import org.onosproject.kafkaintegration.api.dto.EventSubscriber;
|
||||
import org.onosproject.kafkaintegration.api.dto.EventSubscriberGroupId;
|
||||
import org.onosproject.kafkaintegration.api.dto.RegistrationResponse;
|
||||
import org.onosproject.kafkaintegration.api.dto.OnosEvent;
|
||||
import org.onosproject.kafkaintegration.api.dto.OnosEvent.Type;
|
||||
import org.onosproject.kafkaintegration.api.dto.RegistrationResponse;
|
||||
import org.onosproject.kafkaintegration.errors.InvalidApplicationException;
|
||||
import org.onosproject.kafkaintegration.errors.InvalidGroupIdException;
|
||||
import org.onosproject.store.serializers.KryoNamespaces;
|
||||
import org.onosproject.store.service.Serializer;
|
||||
import org.onosproject.store.service.StorageService;
|
||||
import org.osgi.service.component.annotations.Activate;
|
||||
import org.osgi.service.component.annotations.Component;
|
||||
import org.osgi.service.component.annotations.Deactivate;
|
||||
import org.osgi.service.component.annotations.Reference;
|
||||
import org.osgi.service.component.annotations.ReferenceCardinality;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.UUID;
|
||||
|
||||
import static com.google.common.base.Preconditions.checkNotNull;
|
||||
|
||||
/**
|
||||
* Implementation of Event Subscription Manager.
|
||||
*
|
||||
*/
|
||||
@Component(immediate = true)
|
||||
@Service
|
||||
@Component(immediate = true, service = EventSubscriptionService.class)
|
||||
public class EventSubscriptionManager implements EventSubscriptionService {
|
||||
|
||||
private final Logger log = LoggerFactory.getLogger(getClass());
|
||||
@ -67,13 +64,13 @@ public class EventSubscriptionManager implements EventSubscriptionService {
|
||||
|
||||
private static final String SUBSCRIBED_APPS = "event-subscriptions";
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected CoreService coreService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected StorageService storageService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected KafkaConfigService kafkaConfigService;
|
||||
|
||||
private ApplicationId appId;
|
||||
|
||||
@ -15,11 +15,11 @@
|
||||
*/
|
||||
package org.onosproject.kafkaintegration.impl;
|
||||
|
||||
import org.apache.felix.scr.annotations.Activate;
|
||||
import org.apache.felix.scr.annotations.Component;
|
||||
import org.apache.felix.scr.annotations.Deactivate;
|
||||
import org.apache.felix.scr.annotations.Reference;
|
||||
import org.apache.felix.scr.annotations.ReferenceCardinality;
|
||||
import org.osgi.service.component.annotations.Activate;
|
||||
import org.osgi.service.component.annotations.Component;
|
||||
import org.osgi.service.component.annotations.Deactivate;
|
||||
import org.osgi.service.component.annotations.Reference;
|
||||
import org.osgi.service.component.annotations.ReferenceCardinality;
|
||||
import org.onosproject.codec.CodecService;
|
||||
import org.onosproject.kafkaintegration.api.dto.EventSubscriber;
|
||||
import org.slf4j.Logger;
|
||||
@ -32,7 +32,7 @@ import org.slf4j.LoggerFactory;
|
||||
public class KafkaCodecRegistrator {
|
||||
private static Logger log = LoggerFactory.getLogger(KafkaCodecRegistrator
|
||||
.class);
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected CodecService codecService;
|
||||
|
||||
@Activate
|
||||
|
||||
@ -15,12 +15,6 @@
|
||||
*/
|
||||
package org.onosproject.kafkaintegration.impl;
|
||||
|
||||
import org.apache.felix.scr.annotations.Activate;
|
||||
import org.apache.felix.scr.annotations.Component;
|
||||
import org.apache.felix.scr.annotations.Service;
|
||||
import org.apache.felix.scr.annotations.Deactivate;
|
||||
import org.apache.felix.scr.annotations.Reference;
|
||||
import org.apache.felix.scr.annotations.ReferenceCardinality;
|
||||
import org.onosproject.kafkaintegration.api.KafkaEventStorageService;
|
||||
import org.onosproject.kafkaintegration.api.dto.OnosEvent;
|
||||
import org.onosproject.store.serializers.KryoNamespaces;
|
||||
@ -28,17 +22,21 @@ import org.onosproject.store.service.Serializer;
|
||||
import org.onosproject.store.service.StorageService;
|
||||
import org.onosproject.store.service.Task;
|
||||
import org.onosproject.store.service.WorkQueue;
|
||||
import org.osgi.service.component.annotations.Activate;
|
||||
import org.osgi.service.component.annotations.Component;
|
||||
import org.osgi.service.component.annotations.Deactivate;
|
||||
import org.osgi.service.component.annotations.Reference;
|
||||
import org.osgi.service.component.annotations.ReferenceCardinality;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
import java.util.concurrent.ExecutionException;
|
||||
|
||||
@Component(immediate = false)
|
||||
@Service
|
||||
@Component(service = KafkaEventStorageService.class)
|
||||
public class KafkaStorageManager implements KafkaEventStorageService {
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected StorageService storageService;
|
||||
|
||||
private final Logger log = LoggerFactory.getLogger(getClass());
|
||||
|
||||
@ -16,13 +16,13 @@
|
||||
|
||||
package org.onosproject.kafkaintegration.kafka;
|
||||
|
||||
import org.apache.felix.scr.annotations.Activate;
|
||||
import org.apache.felix.scr.annotations.Component;
|
||||
import org.apache.felix.scr.annotations.Deactivate;
|
||||
import org.apache.felix.scr.annotations.Reference;
|
||||
import org.osgi.service.component.annotations.Activate;
|
||||
import org.osgi.service.component.annotations.Component;
|
||||
import org.osgi.service.component.annotations.Deactivate;
|
||||
import org.osgi.service.component.annotations.Reference;
|
||||
import org.onosproject.cluster.ClusterService;
|
||||
import org.onosproject.cluster.NodeId;
|
||||
import org.apache.felix.scr.annotations.ReferenceCardinality;
|
||||
import org.osgi.service.component.annotations.ReferenceCardinality;
|
||||
import org.onosproject.cluster.LeadershipService;
|
||||
import org.onosproject.kafkaintegration.api.EventConversionService;
|
||||
import org.onosproject.kafkaintegration.api.EventSubscriptionService;
|
||||
@ -53,25 +53,25 @@ import static org.onosproject.kafkaintegration.api.dto.OnosEvent.Type.LINK;
|
||||
public class EventListener {
|
||||
private final Logger log = LoggerFactory.getLogger(getClass());
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected EventSubscriptionService eventSubscriptionService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected EventConversionService eventConversionService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected DeviceService deviceService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected LinkService linkService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected KafkaEventStorageService kafkaStoreService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected LeadershipService leadershipService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected ClusterService clusterService;
|
||||
|
||||
private final DeviceListener deviceListener = new InternalDeviceListener();
|
||||
|
||||
@ -15,11 +15,11 @@
|
||||
*/
|
||||
package org.onosproject.kafkaintegration.kafka;
|
||||
|
||||
import org.apache.felix.scr.annotations.Activate;
|
||||
import org.apache.felix.scr.annotations.Component;
|
||||
import org.apache.felix.scr.annotations.Deactivate;
|
||||
import org.apache.felix.scr.annotations.Reference;
|
||||
import org.apache.felix.scr.annotations.ReferenceCardinality;
|
||||
import org.osgi.service.component.annotations.Activate;
|
||||
import org.osgi.service.component.annotations.Component;
|
||||
import org.osgi.service.component.annotations.Deactivate;
|
||||
import org.osgi.service.component.annotations.Reference;
|
||||
import org.osgi.service.component.annotations.ReferenceCardinality;
|
||||
import org.apache.kafka.clients.producer.ProducerRecord;
|
||||
import org.onosproject.cluster.ClusterService;
|
||||
import org.onosproject.cluster.LeadershipService;
|
||||
@ -42,19 +42,19 @@ public class EventPublisher {
|
||||
|
||||
private final Logger log = LoggerFactory.getLogger(getClass());
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected LeadershipService leadershipService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected ClusterService clusterService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected KafkaConfigService kafkaConfigService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected KafkaEventStorageService kafkaStore;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected KafkaPublisherService kafkaPublisher;
|
||||
|
||||
protected ScheduledExecutorService exService;
|
||||
|
||||
@ -15,37 +15,35 @@
|
||||
*/
|
||||
package org.onosproject.kafkaintegration.kafka;
|
||||
|
||||
import static com.google.common.base.Strings.isNullOrEmpty;
|
||||
import static org.onlab.util.Tools.get;
|
||||
|
||||
import java.util.Dictionary;
|
||||
|
||||
import org.apache.felix.scr.annotations.Activate;
|
||||
import org.apache.felix.scr.annotations.Component;
|
||||
import org.apache.felix.scr.annotations.Deactivate;
|
||||
import org.apache.felix.scr.annotations.Modified;
|
||||
import org.apache.felix.scr.annotations.Property;
|
||||
import org.apache.felix.scr.annotations.Reference;
|
||||
import org.apache.felix.scr.annotations.ReferenceCardinality;
|
||||
import org.apache.felix.scr.annotations.Service;
|
||||
import org.onosproject.cfg.ComponentConfigService;
|
||||
import org.onosproject.kafkaintegration.api.KafkaConfigService;
|
||||
import org.onosproject.kafkaintegration.api.KafkaPublisherAdminService;
|
||||
import org.onosproject.kafkaintegration.api.dto.KafkaServerConfig;
|
||||
import org.osgi.service.component.ComponentContext;
|
||||
import org.osgi.service.component.annotations.Activate;
|
||||
import org.osgi.service.component.annotations.Component;
|
||||
import org.osgi.service.component.annotations.Deactivate;
|
||||
import org.osgi.service.component.annotations.Modified;
|
||||
import org.osgi.service.component.annotations.Property;
|
||||
import org.osgi.service.component.annotations.Reference;
|
||||
import org.osgi.service.component.annotations.ReferenceCardinality;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
@Component(immediate = true)
|
||||
@Service
|
||||
import java.util.Dictionary;
|
||||
|
||||
import static com.google.common.base.Strings.isNullOrEmpty;
|
||||
import static org.onlab.util.Tools.get;
|
||||
|
||||
@Component(immediate = true, service = KafkaConfigService.class)
|
||||
public class KafkaConfigManager implements KafkaConfigService {
|
||||
|
||||
private final Logger log = LoggerFactory.getLogger(getClass());
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected ComponentConfigService componentConfigService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected KafkaPublisherAdminService kafkaPublisherAdminService;
|
||||
|
||||
public static final String BOOTSTRAP_SERVERS = "localhost:9092";
|
||||
|
||||
@ -16,27 +16,25 @@
|
||||
|
||||
package org.onosproject.kafkaintegration.kafka;
|
||||
|
||||
import java.util.Properties;
|
||||
import java.util.concurrent.Future;
|
||||
|
||||
import org.apache.felix.scr.annotations.Activate;
|
||||
import org.apache.felix.scr.annotations.Component;
|
||||
import org.apache.felix.scr.annotations.Deactivate;
|
||||
import org.apache.felix.scr.annotations.Service;
|
||||
import org.apache.kafka.clients.producer.KafkaProducer;
|
||||
import org.apache.kafka.clients.producer.ProducerRecord;
|
||||
import org.apache.kafka.clients.producer.RecordMetadata;
|
||||
import org.onosproject.kafkaintegration.api.KafkaPublisherService;
|
||||
import org.onosproject.kafkaintegration.api.KafkaPublisherAdminService;
|
||||
import org.onosproject.kafkaintegration.api.KafkaPublisherService;
|
||||
import org.onosproject.kafkaintegration.api.dto.KafkaServerConfig;
|
||||
import org.osgi.service.component.annotations.Activate;
|
||||
import org.osgi.service.component.annotations.Component;
|
||||
import org.osgi.service.component.annotations.Deactivate;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import java.util.Properties;
|
||||
import java.util.concurrent.Future;
|
||||
|
||||
/**
|
||||
* Implementation of a Kafka Producer.
|
||||
*/
|
||||
@Component
|
||||
@Service
|
||||
@Component(service = { KafkaPublisherService.class, KafkaPublisherAdminService.class })
|
||||
public class PublishManager implements KafkaPublisherService, KafkaPublisherAdminService {
|
||||
private KafkaProducer<String, byte[]> kafkaProducer = null;
|
||||
|
||||
|
||||
@ -16,12 +16,6 @@
|
||||
package org.onosproject.l3vpn.netl3vpn.impl;
|
||||
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
import org.apache.felix.scr.annotations.Activate;
|
||||
import org.apache.felix.scr.annotations.Component;
|
||||
import org.apache.felix.scr.annotations.Deactivate;
|
||||
import org.apache.felix.scr.annotations.Reference;
|
||||
import org.apache.felix.scr.annotations.ReferenceCardinality;
|
||||
import org.apache.felix.scr.annotations.Service;
|
||||
import org.onlab.util.KryoNamespace;
|
||||
import org.onosproject.l3vpn.netl3vpn.AccessInfo;
|
||||
import org.onosproject.l3vpn.netl3vpn.BgpInfo;
|
||||
@ -47,6 +41,11 @@ import org.onosproject.yang.model.ListKey;
|
||||
import org.onosproject.yang.model.NodeKey;
|
||||
import org.onosproject.yang.model.ResourceId;
|
||||
import org.onosproject.yang.model.SchemaId;
|
||||
import org.osgi.service.component.annotations.Activate;
|
||||
import org.osgi.service.component.annotations.Component;
|
||||
import org.osgi.service.component.annotations.Deactivate;
|
||||
import org.osgi.service.component.annotations.Reference;
|
||||
import org.osgi.service.component.annotations.ReferenceCardinality;
|
||||
import org.slf4j.Logger;
|
||||
|
||||
import java.util.Map;
|
||||
@ -59,8 +58,7 @@ import static org.slf4j.LoggerFactory.getLogger;
|
||||
* Manages the pool of available VPN instances and its associated devices
|
||||
* and interface information.
|
||||
*/
|
||||
@Component(immediate = true)
|
||||
@Service
|
||||
@Component(immediate = true, service = NetL3VpnStore.class)
|
||||
public class DistributedNetL3VpnStore implements NetL3VpnStore {
|
||||
|
||||
private static final Serializer L3VPN_SERIALIZER = Serializer
|
||||
@ -95,7 +93,7 @@ public class DistributedNetL3VpnStore implements NetL3VpnStore {
|
||||
|
||||
private final Logger log = getLogger(getClass());
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected StorageService storageService;
|
||||
|
||||
/**
|
||||
|
||||
@ -15,11 +15,11 @@
|
||||
*/
|
||||
package org.onosproject.l3vpn.netl3vpn.impl;
|
||||
|
||||
import org.apache.felix.scr.annotations.Activate;
|
||||
import org.apache.felix.scr.annotations.Component;
|
||||
import org.apache.felix.scr.annotations.Deactivate;
|
||||
import org.apache.felix.scr.annotations.Reference;
|
||||
import org.apache.felix.scr.annotations.ReferenceCardinality;
|
||||
import org.osgi.service.component.annotations.Activate;
|
||||
import org.osgi.service.component.annotations.Component;
|
||||
import org.osgi.service.component.annotations.Deactivate;
|
||||
import org.osgi.service.component.annotations.Reference;
|
||||
import org.osgi.service.component.annotations.ReferenceCardinality;
|
||||
import org.onlab.util.AbstractAccumulator;
|
||||
import org.onlab.util.Accumulator;
|
||||
import org.onosproject.cluster.ClusterService;
|
||||
@ -154,31 +154,31 @@ public class NetL3VpnManager {
|
||||
private final InternalLeadershipListener leadershipEventListener =
|
||||
new InternalLeadershipListener();
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected CoreService coreService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected DriverService driverService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected DeviceService deviceService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected ModelConverter modelConverter;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected DynamicConfigService configService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected NetL3VpnStore l3VpnStore;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected LeadershipService leadershipService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected ClusterService clusterService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected PceService pceService;
|
||||
|
||||
protected IdGenerator l3VpnIdGen;
|
||||
|
||||
@ -17,12 +17,6 @@
|
||||
package org.onosproject.layout;
|
||||
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import org.apache.felix.scr.annotations.Activate;
|
||||
import org.apache.felix.scr.annotations.Component;
|
||||
import org.apache.felix.scr.annotations.Deactivate;
|
||||
import org.apache.felix.scr.annotations.Reference;
|
||||
import org.apache.felix.scr.annotations.ReferenceCardinality;
|
||||
import org.apache.felix.scr.annotations.Service;
|
||||
import org.onosproject.net.config.NetworkConfigService;
|
||||
import org.onosproject.net.device.DeviceService;
|
||||
import org.onosproject.net.host.HostService;
|
||||
@ -34,6 +28,11 @@ import org.onosproject.ui.UiTopoOverlay;
|
||||
import org.onosproject.ui.UiTopoOverlayFactory;
|
||||
import org.onosproject.ui.UiView;
|
||||
import org.onosproject.ui.UiViewHidden;
|
||||
import org.osgi.service.component.annotations.Activate;
|
||||
import org.osgi.service.component.annotations.Component;
|
||||
import org.osgi.service.component.annotations.Deactivate;
|
||||
import org.osgi.service.component.annotations.Reference;
|
||||
import org.osgi.service.component.annotations.ReferenceCardinality;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
@ -44,8 +43,7 @@ import java.util.List;
|
||||
* supported layout variants using roles assigned to network elements using
|
||||
* network configuration.
|
||||
*/
|
||||
@Component(immediate = true)
|
||||
@Service(value = RoleBasedLayoutManager.class)
|
||||
@Component(immediate = true, service = RoleBasedLayoutManager.class)
|
||||
public class RoleBasedLayoutManager {
|
||||
|
||||
private Logger log = LoggerFactory.getLogger(getClass());
|
||||
@ -74,19 +72,19 @@ public class RoleBasedLayoutManager {
|
||||
.topoOverlayFactory(topoOverlayFactory)
|
||||
.build();
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected NetworkConfigService networkConfigService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected DeviceService deviceService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected HostService hostService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected LinkService linkService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected UiExtensionService uiExtensionService;
|
||||
|
||||
@Activate
|
||||
|
||||
@ -16,11 +16,11 @@
|
||||
package org.onosproject.learningswitch;
|
||||
|
||||
import com.google.common.collect.Maps;
|
||||
import org.apache.felix.scr.annotations.Activate;
|
||||
import org.apache.felix.scr.annotations.Deactivate;
|
||||
import org.apache.felix.scr.annotations.Component;
|
||||
import org.apache.felix.scr.annotations.Reference;
|
||||
import org.apache.felix.scr.annotations.ReferenceCardinality;
|
||||
import org.osgi.service.component.annotations.Activate;
|
||||
import org.osgi.service.component.annotations.Deactivate;
|
||||
import org.osgi.service.component.annotations.Component;
|
||||
import org.osgi.service.component.annotations.Reference;
|
||||
import org.osgi.service.component.annotations.ReferenceCardinality;
|
||||
import org.onlab.packet.Ethernet;
|
||||
import org.onlab.packet.MacAddress;
|
||||
import org.onosproject.core.ApplicationId;
|
||||
@ -52,13 +52,13 @@ import java.util.Optional;
|
||||
public class LearningSwitchSolution {
|
||||
|
||||
// Instantiates the relevant services.
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected PacketService packetService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected FlowRuleService flowRuleService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected CoreService coreService;
|
||||
|
||||
private final Logger log = LoggerFactory.getLogger(getClass());
|
||||
|
||||
@ -16,11 +16,11 @@
|
||||
package org.onosproject.learningswitch;
|
||||
|
||||
import com.google.common.collect.Maps;
|
||||
import org.apache.felix.scr.annotations.Activate;
|
||||
import org.apache.felix.scr.annotations.Deactivate;
|
||||
import org.apache.felix.scr.annotations.Component;
|
||||
import org.apache.felix.scr.annotations.Reference;
|
||||
import org.apache.felix.scr.annotations.ReferenceCardinality;
|
||||
import org.osgi.service.component.annotations.Activate;
|
||||
import org.osgi.service.component.annotations.Deactivate;
|
||||
import org.osgi.service.component.annotations.Component;
|
||||
import org.osgi.service.component.annotations.Reference;
|
||||
import org.osgi.service.component.annotations.ReferenceCardinality;
|
||||
import org.onlab.packet.Ethernet;
|
||||
import org.onlab.packet.MacAddress;
|
||||
import org.onosproject.core.ApplicationId;
|
||||
@ -48,13 +48,13 @@ import java.util.Optional;
|
||||
public class LearningSwitchTutorial {
|
||||
// Instantiates the relevant services.
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected PacketService packetService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected FlowRuleService flowRuleService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected CoreService coreService;
|
||||
|
||||
private final Logger log = LoggerFactory.getLogger(getClass());
|
||||
|
||||
@ -16,11 +16,11 @@
|
||||
package org.onosproject.linkprops;
|
||||
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import org.apache.felix.scr.annotations.Activate;
|
||||
import org.apache.felix.scr.annotations.Component;
|
||||
import org.apache.felix.scr.annotations.Deactivate;
|
||||
import org.apache.felix.scr.annotations.Reference;
|
||||
import org.apache.felix.scr.annotations.ReferenceCardinality;
|
||||
import org.osgi.service.component.annotations.Activate;
|
||||
import org.osgi.service.component.annotations.Component;
|
||||
import org.osgi.service.component.annotations.Deactivate;
|
||||
import org.osgi.service.component.annotations.Reference;
|
||||
import org.osgi.service.component.annotations.ReferenceCardinality;
|
||||
import org.onosproject.ui.UiExtension;
|
||||
import org.onosproject.ui.UiExtensionService;
|
||||
import org.onosproject.ui.UiMessageHandlerFactory;
|
||||
@ -43,7 +43,7 @@ public class LinkPropApp {
|
||||
|
||||
private final Logger log = LoggerFactory.getLogger(getClass());
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected UiExtensionService uiExtensionService;
|
||||
|
||||
// List of application views
|
||||
|
||||
@ -15,11 +15,11 @@
|
||||
*/
|
||||
package org.onosproject.mapping;
|
||||
|
||||
import org.apache.felix.scr.annotations.Activate;
|
||||
import org.apache.felix.scr.annotations.Component;
|
||||
import org.apache.felix.scr.annotations.Deactivate;
|
||||
import org.apache.felix.scr.annotations.Reference;
|
||||
import org.apache.felix.scr.annotations.ReferenceCardinality;
|
||||
import org.osgi.service.component.annotations.Activate;
|
||||
import org.osgi.service.component.annotations.Component;
|
||||
import org.osgi.service.component.annotations.Deactivate;
|
||||
import org.osgi.service.component.annotations.Reference;
|
||||
import org.osgi.service.component.annotations.ReferenceCardinality;
|
||||
import org.onosproject.codec.CodecService;
|
||||
import org.onosproject.mapping.actions.MappingAction;
|
||||
import org.onosproject.mapping.addresses.MappingAddress;
|
||||
@ -43,7 +43,7 @@ public class MappingCodecRegistrator {
|
||||
|
||||
private final Logger log = getLogger(getClass());
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
public CodecService codecService;
|
||||
|
||||
@Activate
|
||||
|
||||
@ -18,12 +18,6 @@ package org.onosproject.mapping.impl;
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import com.google.common.collect.Iterables;
|
||||
import com.google.common.collect.Maps;
|
||||
import org.apache.felix.scr.annotations.Activate;
|
||||
import org.apache.felix.scr.annotations.Component;
|
||||
import org.apache.felix.scr.annotations.Deactivate;
|
||||
import org.apache.felix.scr.annotations.Reference;
|
||||
import org.apache.felix.scr.annotations.ReferenceCardinality;
|
||||
import org.apache.felix.scr.annotations.Service;
|
||||
import org.onosproject.mapping.DefaultMapping;
|
||||
import org.onosproject.mapping.DefaultMappingEntry;
|
||||
import org.onosproject.mapping.Mapping;
|
||||
@ -47,6 +41,11 @@ import org.onosproject.store.service.MapEvent;
|
||||
import org.onosproject.store.service.MapEventListener;
|
||||
import org.onosproject.store.service.Serializer;
|
||||
import org.onosproject.store.service.StorageService;
|
||||
import org.osgi.service.component.annotations.Activate;
|
||||
import org.osgi.service.component.annotations.Component;
|
||||
import org.osgi.service.component.annotations.Deactivate;
|
||||
import org.osgi.service.component.annotations.Reference;
|
||||
import org.osgi.service.component.annotations.ReferenceCardinality;
|
||||
import org.slf4j.Logger;
|
||||
|
||||
import java.util.Map;
|
||||
@ -58,8 +57,7 @@ import static org.slf4j.LoggerFactory.getLogger;
|
||||
/**
|
||||
* Implementation of a distributed store for managing mapping information.
|
||||
*/
|
||||
@Component(immediate = true)
|
||||
@Service
|
||||
@Component(immediate = true, service = MappingStore.class)
|
||||
public class DistributedMappingStore
|
||||
extends AbstractStore<MappingEvent, MappingStoreDelegate>
|
||||
implements MappingStore {
|
||||
@ -72,10 +70,10 @@ public class DistributedMappingStore
|
||||
private Map<MappingId, Mapping> databaseMap;
|
||||
private Map<MappingId, Mapping> cacheMap;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected StorageService storageService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected DeviceService deviceService;
|
||||
|
||||
private final MapEventListener<MappingId, Mapping> listener = new InternalListener();
|
||||
|
||||
@ -19,12 +19,6 @@ import com.google.common.collect.ImmutableList;
|
||||
import com.google.common.collect.Iterables;
|
||||
import com.google.common.collect.Lists;
|
||||
import com.google.common.collect.Sets;
|
||||
import org.apache.felix.scr.annotations.Activate;
|
||||
import org.apache.felix.scr.annotations.Component;
|
||||
import org.apache.felix.scr.annotations.Deactivate;
|
||||
import org.apache.felix.scr.annotations.Reference;
|
||||
import org.apache.felix.scr.annotations.ReferenceCardinality;
|
||||
import org.apache.felix.scr.annotations.Service;
|
||||
import org.onosproject.core.ApplicationId;
|
||||
import org.onosproject.mapping.MappingAdminService;
|
||||
import org.onosproject.mapping.MappingEntry;
|
||||
@ -44,6 +38,11 @@ import org.onosproject.net.DeviceId;
|
||||
import org.onosproject.net.device.DeviceService;
|
||||
import org.onosproject.net.provider.AbstractListenerProviderRegistry;
|
||||
import org.onosproject.net.provider.AbstractProviderService;
|
||||
import org.osgi.service.component.annotations.Activate;
|
||||
import org.osgi.service.component.annotations.Component;
|
||||
import org.osgi.service.component.annotations.Deactivate;
|
||||
import org.osgi.service.component.annotations.Reference;
|
||||
import org.osgi.service.component.annotations.ReferenceCardinality;
|
||||
import org.slf4j.Logger;
|
||||
|
||||
import java.util.List;
|
||||
@ -54,8 +53,7 @@ import static org.slf4j.LoggerFactory.getLogger;
|
||||
/**
|
||||
* Implementation of mapping management service.
|
||||
*/
|
||||
@Component(immediate = true)
|
||||
@Service
|
||||
@Component(immediate = true, service = { MappingService.class, MappingAdminService.class, MappingProviderRegistry.class })
|
||||
public class MappingManager
|
||||
extends AbstractListenerProviderRegistry<MappingEvent, MappingListener,
|
||||
MappingProvider, MappingProviderService>
|
||||
@ -66,10 +64,10 @@ public class MappingManager
|
||||
private static final String MAPPING_OP_TOPIC = "mapping-ops-ids";
|
||||
private final MappingStoreDelegate delegate = new InternalStoreDelegate();
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected MappingStore store;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected DeviceService deviceService;
|
||||
|
||||
@Activate
|
||||
|
||||
@ -18,11 +18,6 @@ package org.onosproject.mapping.impl;
|
||||
import com.google.common.collect.FluentIterable;
|
||||
import com.google.common.collect.Lists;
|
||||
import com.google.common.collect.Maps;
|
||||
import org.apache.felix.scr.annotations.Activate;
|
||||
import org.apache.felix.scr.annotations.Component;
|
||||
import org.apache.felix.scr.annotations.Deactivate;
|
||||
import org.apache.felix.scr.annotations.Modified;
|
||||
import org.apache.felix.scr.annotations.Service;
|
||||
import org.onosproject.mapping.DefaultMappingEntry;
|
||||
import org.onosproject.mapping.Mapping;
|
||||
import org.onosproject.mapping.MappingEntry;
|
||||
@ -35,6 +30,10 @@ import org.onosproject.mapping.StoredMappingEntry;
|
||||
import org.onosproject.net.DeviceId;
|
||||
import org.onosproject.store.AbstractStore;
|
||||
import org.osgi.service.component.ComponentContext;
|
||||
import org.osgi.service.component.annotations.Activate;
|
||||
import org.osgi.service.component.annotations.Component;
|
||||
import org.osgi.service.component.annotations.Deactivate;
|
||||
import org.osgi.service.component.annotations.Modified;
|
||||
import org.slf4j.Logger;
|
||||
|
||||
import java.util.Collections;
|
||||
@ -52,8 +51,7 @@ import static org.slf4j.LoggerFactory.getLogger;
|
||||
/**
|
||||
* Manages inventory of mappings using trivial in-memory implementation.
|
||||
*/
|
||||
@Component(immediate = true)
|
||||
@Service
|
||||
@Component(immediate = true, service = MappingStore.class)
|
||||
public class SimpleMappingStore
|
||||
extends AbstractStore<MappingEvent, MappingStoreDelegate>
|
||||
implements MappingStore {
|
||||
|
||||
@ -16,11 +16,11 @@
|
||||
package org.onosproject.mapping.web.gui;
|
||||
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import org.apache.felix.scr.annotations.Activate;
|
||||
import org.apache.felix.scr.annotations.Component;
|
||||
import org.apache.felix.scr.annotations.Deactivate;
|
||||
import org.apache.felix.scr.annotations.Reference;
|
||||
import org.apache.felix.scr.annotations.ReferenceCardinality;
|
||||
import org.osgi.service.component.annotations.Activate;
|
||||
import org.osgi.service.component.annotations.Component;
|
||||
import org.osgi.service.component.annotations.Deactivate;
|
||||
import org.osgi.service.component.annotations.Reference;
|
||||
import org.osgi.service.component.annotations.ReferenceCardinality;
|
||||
import org.onosproject.ui.UiExtension;
|
||||
import org.onosproject.ui.UiExtensionService;
|
||||
import org.onosproject.ui.UiMessageHandlerFactory;
|
||||
@ -44,7 +44,7 @@ public class MappingsTopoUI {
|
||||
|
||||
private final Logger log = LoggerFactory.getLogger(getClass());
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected UiExtensionService uiExtensionService;
|
||||
|
||||
// Factory for UI message handlers
|
||||
|
||||
@ -16,17 +16,16 @@
|
||||
package org.onosproject.mapping.web.gui;
|
||||
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import org.apache.felix.scr.annotations.Activate;
|
||||
import org.apache.felix.scr.annotations.Component;
|
||||
import org.apache.felix.scr.annotations.Deactivate;
|
||||
import org.apache.felix.scr.annotations.Reference;
|
||||
import org.apache.felix.scr.annotations.ReferenceCardinality;
|
||||
import org.apache.felix.scr.annotations.Service;
|
||||
import org.onosproject.ui.UiExtension;
|
||||
import org.onosproject.ui.UiExtensionService;
|
||||
import org.onosproject.ui.UiMessageHandlerFactory;
|
||||
import org.onosproject.ui.UiView;
|
||||
import org.onosproject.ui.UiViewHidden;
|
||||
import org.osgi.service.component.annotations.Activate;
|
||||
import org.osgi.service.component.annotations.Component;
|
||||
import org.osgi.service.component.annotations.Deactivate;
|
||||
import org.osgi.service.component.annotations.Reference;
|
||||
import org.osgi.service.component.annotations.ReferenceCardinality;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
@ -35,8 +34,7 @@ import java.util.List;
|
||||
/**
|
||||
* Mechanism to stream data to the GUI.
|
||||
*/
|
||||
@Component(immediate = true, enabled = true)
|
||||
@Service(value = MappingsUI.class)
|
||||
@Component(immediate = true, service = MappingsUI.class)
|
||||
public class MappingsUI {
|
||||
private static final String MAPPING_ID = "mapping";
|
||||
private static final String RES_PATH = "gui";
|
||||
@ -44,7 +42,7 @@ public class MappingsUI {
|
||||
|
||||
private final Logger log = LoggerFactory.getLogger(getClass());
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected UiExtensionService uiExtensionService;
|
||||
|
||||
// Factory for UI message handlers
|
||||
|
||||
@ -17,12 +17,6 @@ package org.onosproject.mcast.impl;
|
||||
|
||||
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
import org.apache.felix.scr.annotations.Activate;
|
||||
import org.apache.felix.scr.annotations.Component;
|
||||
import org.apache.felix.scr.annotations.Deactivate;
|
||||
import org.apache.felix.scr.annotations.Reference;
|
||||
import org.apache.felix.scr.annotations.ReferenceCardinality;
|
||||
import org.apache.felix.scr.annotations.Service;
|
||||
import org.onlab.util.KryoNamespace;
|
||||
import org.onosproject.mcast.api.McastEvent;
|
||||
import org.onosproject.mcast.api.McastRoute;
|
||||
@ -39,6 +33,11 @@ import org.onosproject.store.service.MapEventListener;
|
||||
import org.onosproject.store.service.Serializer;
|
||||
import org.onosproject.store.service.StorageService;
|
||||
import org.onosproject.store.service.Versioned;
|
||||
import org.osgi.service.component.annotations.Activate;
|
||||
import org.osgi.service.component.annotations.Component;
|
||||
import org.osgi.service.component.annotations.Deactivate;
|
||||
import org.osgi.service.component.annotations.Reference;
|
||||
import org.osgi.service.component.annotations.ReferenceCardinality;
|
||||
import org.slf4j.Logger;
|
||||
|
||||
import java.util.Collection;
|
||||
@ -56,8 +55,7 @@ import static org.slf4j.LoggerFactory.getLogger;
|
||||
* New distributed mcast route store implementation. Routes are stored consistently
|
||||
* across the cluster.
|
||||
*/
|
||||
@Component(immediate = true)
|
||||
@Service
|
||||
@Component(immediate = true, service = McastStore.class)
|
||||
public class DistributedMcastRoutesStore
|
||||
extends AbstractStore<McastEvent, McastStoreDelegate>
|
||||
implements McastStore {
|
||||
@ -65,7 +63,7 @@ public class DistributedMcastRoutesStore
|
||||
private static final String MCASTRIB = "onos-mcast-route-table";
|
||||
private Logger log = getLogger(getClass());
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected StorageService storageService;
|
||||
|
||||
private Map<McastRoute, McastRouteData> mcastRoutes;
|
||||
|
||||
@ -18,12 +18,6 @@ package org.onosproject.mcast.impl;
|
||||
import com.google.common.base.Objects;
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
import com.google.common.collect.Sets;
|
||||
import org.apache.felix.scr.annotations.Activate;
|
||||
import org.apache.felix.scr.annotations.Component;
|
||||
import org.apache.felix.scr.annotations.Deactivate;
|
||||
import org.apache.felix.scr.annotations.Reference;
|
||||
import org.apache.felix.scr.annotations.ReferenceCardinality;
|
||||
import org.apache.felix.scr.annotations.Service;
|
||||
import org.onlab.packet.IpAddress;
|
||||
import org.onosproject.event.AbstractListenerManager;
|
||||
import org.onosproject.mcast.api.McastEvent;
|
||||
@ -40,6 +34,11 @@ import org.onosproject.net.HostLocation;
|
||||
import org.onosproject.net.host.HostEvent;
|
||||
import org.onosproject.net.host.HostListener;
|
||||
import org.onosproject.net.host.HostService;
|
||||
import org.osgi.service.component.annotations.Activate;
|
||||
import org.osgi.service.component.annotations.Component;
|
||||
import org.osgi.service.component.annotations.Deactivate;
|
||||
import org.osgi.service.component.annotations.Reference;
|
||||
import org.osgi.service.component.annotations.ReferenceCardinality;
|
||||
import org.slf4j.Logger;
|
||||
|
||||
import java.util.HashSet;
|
||||
@ -56,8 +55,7 @@ import static org.slf4j.LoggerFactory.getLogger;
|
||||
/**
|
||||
* An implementation of a multicast route table.
|
||||
*/
|
||||
@Component(immediate = true)
|
||||
@Service
|
||||
@Component(immediate = true, service = MulticastRouteService.class)
|
||||
public class MulticastRouteManager
|
||||
extends AbstractListenerManager<McastEvent, McastListener>
|
||||
implements MulticastRouteService {
|
||||
@ -67,10 +65,10 @@ public class MulticastRouteManager
|
||||
|
||||
private final McastStoreDelegate delegate = new InternalMcastStoreDelegate();
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected McastStore store;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected HostService hostService;
|
||||
|
||||
private HostListener hostListener = new InternalHostListener();
|
||||
|
||||
@ -15,11 +15,11 @@
|
||||
*/
|
||||
package org.onosproject.mcast.web;
|
||||
|
||||
import org.apache.felix.scr.annotations.Activate;
|
||||
import org.apache.felix.scr.annotations.Component;
|
||||
import org.apache.felix.scr.annotations.Deactivate;
|
||||
import org.apache.felix.scr.annotations.Reference;
|
||||
import org.apache.felix.scr.annotations.ReferenceCardinality;
|
||||
import org.osgi.service.component.annotations.Activate;
|
||||
import org.osgi.service.component.annotations.Component;
|
||||
import org.osgi.service.component.annotations.Deactivate;
|
||||
import org.osgi.service.component.annotations.Reference;
|
||||
import org.osgi.service.component.annotations.ReferenceCardinality;
|
||||
import org.onosproject.codec.CodecService;
|
||||
import org.onosproject.mcast.api.McastRoute;
|
||||
import org.slf4j.Logger;
|
||||
@ -34,7 +34,7 @@ public class McastServiceCodecRegistrator {
|
||||
|
||||
private static Logger log = LoggerFactory.getLogger(McastServiceCodecRegistrator.class);
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected CodecService codecService;
|
||||
|
||||
@Activate
|
||||
|
||||
@ -15,18 +15,7 @@
|
||||
*/
|
||||
package org.onosproject.metrics.intent;
|
||||
|
||||
import static org.slf4j.LoggerFactory.getLogger;
|
||||
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import org.apache.felix.scr.annotations.Activate;
|
||||
import org.apache.felix.scr.annotations.Component;
|
||||
import org.apache.felix.scr.annotations.Deactivate;
|
||||
import org.apache.felix.scr.annotations.Reference;
|
||||
import org.apache.felix.scr.annotations.ReferenceCardinality;
|
||||
import org.apache.felix.scr.annotations.Service;
|
||||
import org.onlab.metrics.EventMetric;
|
||||
import org.onlab.metrics.MetricsService;
|
||||
import org.onosproject.core.ApplicationId;
|
||||
@ -34,24 +23,33 @@ import org.onosproject.core.CoreService;
|
||||
import org.onosproject.net.intent.IntentEvent;
|
||||
import org.onosproject.net.intent.IntentListener;
|
||||
import org.onosproject.net.intent.IntentService;
|
||||
import org.osgi.service.component.annotations.Activate;
|
||||
import org.osgi.service.component.annotations.Component;
|
||||
import org.osgi.service.component.annotations.Deactivate;
|
||||
import org.osgi.service.component.annotations.Reference;
|
||||
import org.osgi.service.component.annotations.ReferenceCardinality;
|
||||
import org.slf4j.Logger;
|
||||
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
|
||||
import static org.slf4j.LoggerFactory.getLogger;
|
||||
|
||||
/**
|
||||
* ONOS Intent Metrics Application that collects intent-related metrics.
|
||||
*/
|
||||
@Component(immediate = true)
|
||||
@Service
|
||||
@Component(immediate = true, service = { IntentMetricsService.class, IntentListener.class })
|
||||
public class IntentMetrics implements IntentMetricsService,
|
||||
IntentListener {
|
||||
private static final Logger log = getLogger(IntentMetrics.class);
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected CoreService coreService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected IntentService intentService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected MetricsService metricsService;
|
||||
|
||||
private ApplicationId appId;
|
||||
|
||||
@ -15,18 +15,7 @@
|
||||
*/
|
||||
package org.onosproject.metrics.topology;
|
||||
|
||||
import static org.slf4j.LoggerFactory.getLogger;
|
||||
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import org.apache.felix.scr.annotations.Activate;
|
||||
import org.apache.felix.scr.annotations.Component;
|
||||
import org.apache.felix.scr.annotations.Deactivate;
|
||||
import org.apache.felix.scr.annotations.Reference;
|
||||
import org.apache.felix.scr.annotations.ReferenceCardinality;
|
||||
import org.apache.felix.scr.annotations.Service;
|
||||
import org.onlab.metrics.EventMetric;
|
||||
import org.onlab.metrics.MetricsService;
|
||||
import org.onosproject.core.ApplicationId;
|
||||
@ -44,32 +33,41 @@ import org.onosproject.net.link.LinkService;
|
||||
import org.onosproject.net.topology.TopologyEvent;
|
||||
import org.onosproject.net.topology.TopologyListener;
|
||||
import org.onosproject.net.topology.TopologyService;
|
||||
import org.osgi.service.component.annotations.Activate;
|
||||
import org.osgi.service.component.annotations.Component;
|
||||
import org.osgi.service.component.annotations.Deactivate;
|
||||
import org.osgi.service.component.annotations.Reference;
|
||||
import org.osgi.service.component.annotations.ReferenceCardinality;
|
||||
import org.slf4j.Logger;
|
||||
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
|
||||
import static org.slf4j.LoggerFactory.getLogger;
|
||||
|
||||
/**
|
||||
* ONOS Topology Metrics Application that collects topology-related metrics.
|
||||
*/
|
||||
@Component(immediate = true)
|
||||
@Service
|
||||
@Component(immediate = true, service = TopologyMetricsService.class)
|
||||
public class TopologyMetrics implements TopologyMetricsService {
|
||||
private static final Logger log = getLogger(TopologyMetrics.class);
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected CoreService coreService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected DeviceService deviceService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected HostService hostService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected LinkService linkService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected MetricsService metricsService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected TopologyService topologyService;
|
||||
|
||||
private ApplicationId appId;
|
||||
|
||||
@ -15,11 +15,11 @@
|
||||
*/
|
||||
package org.onosproject.mfwd.impl;
|
||||
|
||||
import org.apache.felix.scr.annotations.Activate;
|
||||
import org.apache.felix.scr.annotations.Component;
|
||||
import org.apache.felix.scr.annotations.Deactivate;
|
||||
import org.apache.felix.scr.annotations.Reference;
|
||||
import org.apache.felix.scr.annotations.ReferenceCardinality;
|
||||
import org.osgi.service.component.annotations.Activate;
|
||||
import org.osgi.service.component.annotations.Component;
|
||||
import org.osgi.service.component.annotations.Deactivate;
|
||||
import org.osgi.service.component.annotations.Reference;
|
||||
import org.osgi.service.component.annotations.ReferenceCardinality;
|
||||
import org.onlab.packet.Ethernet;
|
||||
import org.onlab.packet.IPv4;
|
||||
import org.onlab.packet.Ip4Address;
|
||||
@ -68,16 +68,16 @@ public class McastForwarding {
|
||||
|
||||
private final Logger log = getLogger(getClass());
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected PacketService packetService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected CoreService coreService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
private IntentService intentService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected MulticastRouteService mcastRouteManager;
|
||||
|
||||
protected McastIntentManager mcastIntentManager;
|
||||
|
||||
@ -16,13 +16,6 @@
|
||||
|
||||
package org.onosproject.mlb;
|
||||
|
||||
import org.apache.felix.scr.annotations.Activate;
|
||||
import org.apache.felix.scr.annotations.Component;
|
||||
import org.apache.felix.scr.annotations.Deactivate;
|
||||
import org.apache.felix.scr.annotations.Modified;
|
||||
import org.apache.felix.scr.annotations.Property;
|
||||
import org.apache.felix.scr.annotations.Reference;
|
||||
import org.apache.felix.scr.annotations.ReferenceCardinality;
|
||||
import org.onlab.util.Tools;
|
||||
import org.onosproject.cfg.ComponentConfigService;
|
||||
import org.onosproject.cluster.ClusterService;
|
||||
@ -34,10 +27,16 @@ import org.onosproject.mastership.MastershipAdminService;
|
||||
import org.onosproject.mastership.MastershipEvent;
|
||||
import org.onosproject.mastership.MastershipListener;
|
||||
import org.onosproject.mastership.MastershipService;
|
||||
import org.osgi.service.component.ComponentContext;
|
||||
import org.onosproject.net.region.RegionEvent;
|
||||
import org.onosproject.net.region.RegionListener;
|
||||
import org.onosproject.net.region.RegionService;
|
||||
import org.osgi.service.component.ComponentContext;
|
||||
import org.osgi.service.component.annotations.Activate;
|
||||
import org.osgi.service.component.annotations.Component;
|
||||
import org.osgi.service.component.annotations.Deactivate;
|
||||
import org.osgi.service.component.annotations.Modified;
|
||||
import org.osgi.service.component.annotations.Reference;
|
||||
import org.osgi.service.component.annotations.ReferenceCardinality;
|
||||
import org.slf4j.Logger;
|
||||
|
||||
import java.util.Dictionary;
|
||||
@ -63,8 +62,8 @@ public class MastershipLoadBalancer {
|
||||
private final Logger log = getLogger(getClass());
|
||||
|
||||
private static final int DEFAULT_SCHEDULE_PERIOD = 30;
|
||||
@Property(name = "schedulePeriod", intValue = DEFAULT_SCHEDULE_PERIOD,
|
||||
label = "Period to schedule balancing the mastership to be shared as evenly as by all online instances.")
|
||||
//@Property(name = "schedulePeriod", intValue = DEFAULT_SCHEDULE_PERIOD,
|
||||
// label = "Period to schedule balancing the mastership to be shared as evenly as by all online instances.")
|
||||
private int schedulePeriod = DEFAULT_SCHEDULE_PERIOD;
|
||||
|
||||
private static final String REBALANCE_MASTERSHIP = "rebalance/mastership";
|
||||
@ -75,22 +74,22 @@ public class MastershipLoadBalancer {
|
||||
|
||||
private AtomicReference<Future> nextTask = new AtomicReference<>();
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected MastershipService mastershipService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected MastershipAdminService mastershipAdminService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected LeadershipService leadershipService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected RegionService regionService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected ClusterService clusterService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected ComponentConfigService cfgService;
|
||||
|
||||
private InnerLeadershipListener leadershipListener = new InnerLeadershipListener();
|
||||
|
||||
@ -22,11 +22,11 @@ import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.ExecutorService;
|
||||
|
||||
import org.apache.felix.scr.annotations.Activate;
|
||||
import org.apache.felix.scr.annotations.Component;
|
||||
import org.apache.felix.scr.annotations.Deactivate;
|
||||
import org.apache.felix.scr.annotations.Reference;
|
||||
import org.apache.felix.scr.annotations.ReferenceCardinality;
|
||||
import org.osgi.service.component.annotations.Activate;
|
||||
import org.osgi.service.component.annotations.Component;
|
||||
import org.osgi.service.component.annotations.Deactivate;
|
||||
import org.osgi.service.component.annotations.Reference;
|
||||
import org.osgi.service.component.annotations.ReferenceCardinality;
|
||||
import org.onosproject.core.ApplicationId;
|
||||
import org.onosproject.core.CoreService;
|
||||
import org.onosproject.net.Device;
|
||||
@ -54,16 +54,16 @@ public class HostMobility {
|
||||
|
||||
private final Logger log = getLogger(getClass());
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected HostService hostService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected FlowRuleService flowRuleService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected DeviceService deviceService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected CoreService coreService;
|
||||
|
||||
private ApplicationId appId;
|
||||
|
||||
@ -17,11 +17,11 @@
|
||||
package org.onosproject.netconf.client.impl;
|
||||
|
||||
import com.google.common.annotations.Beta;
|
||||
import org.apache.felix.scr.annotations.Activate;
|
||||
import org.apache.felix.scr.annotations.Component;
|
||||
import org.apache.felix.scr.annotations.Deactivate;
|
||||
import org.apache.felix.scr.annotations.Reference;
|
||||
import org.apache.felix.scr.annotations.ReferenceCardinality;
|
||||
import org.osgi.service.component.annotations.Activate;
|
||||
import org.osgi.service.component.annotations.Component;
|
||||
import org.osgi.service.component.annotations.Deactivate;
|
||||
import org.osgi.service.component.annotations.Reference;
|
||||
import org.osgi.service.component.annotations.ReferenceCardinality;
|
||||
import org.onosproject.config.DynamicConfigEvent;
|
||||
import org.onosproject.config.DynamicConfigListener;
|
||||
import org.onosproject.config.DynamicConfigService;
|
||||
@ -63,16 +63,16 @@ import static com.google.common.base.Preconditions.checkNotNull;
|
||||
public class NetconfActiveComponent implements DynamicConfigListener {
|
||||
|
||||
private static final Logger log = LoggerFactory.getLogger(NetconfActiveComponent.class);
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected DynamicConfigService cfgService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected NetconfTranslator netconfTranslator;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected MastershipService mastershipService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected NetconfController controller;
|
||||
|
||||
private final Accumulator<DynamicConfigEvent> accumulator = new InternalEventAccummulator();
|
||||
|
||||
@ -17,12 +17,6 @@
|
||||
package org.onosproject.netconf.client.impl;
|
||||
|
||||
import com.google.common.annotations.Beta;
|
||||
import org.apache.felix.scr.annotations.Activate;
|
||||
import org.apache.felix.scr.annotations.Component;
|
||||
import org.apache.felix.scr.annotations.Deactivate;
|
||||
import org.apache.felix.scr.annotations.Reference;
|
||||
import org.apache.felix.scr.annotations.ReferenceCardinality;
|
||||
import org.apache.felix.scr.annotations.Service;
|
||||
import org.onosproject.cluster.NodeId;
|
||||
import org.onosproject.net.DeviceId;
|
||||
import org.onosproject.netconf.NetconfController;
|
||||
@ -31,6 +25,7 @@ import org.onosproject.netconf.NetconfException;
|
||||
import org.onosproject.netconf.NetconfSession;
|
||||
import org.onosproject.netconf.client.NetconfTranslator;
|
||||
import org.onosproject.yang.model.DataNode;
|
||||
import org.onosproject.yang.model.DefaultResourceData;
|
||||
import org.onosproject.yang.model.InnerNode;
|
||||
import org.onosproject.yang.model.KeyLeaf;
|
||||
import org.onosproject.yang.model.LeafListKey;
|
||||
@ -47,13 +42,17 @@ import org.onosproject.yang.runtime.DefaultAnnotatedNodeInfo;
|
||||
import org.onosproject.yang.runtime.DefaultAnnotation;
|
||||
import org.onosproject.yang.runtime.DefaultCompositeData;
|
||||
import org.onosproject.yang.runtime.DefaultCompositeStream;
|
||||
import org.onosproject.yang.model.DefaultResourceData;
|
||||
import org.onosproject.yang.runtime.DefaultRuntimeContext;
|
||||
import org.onosproject.yang.runtime.DefaultYangSerializerContext;
|
||||
import org.onosproject.yang.runtime.SerializerHelper;
|
||||
import org.onosproject.yang.runtime.YangRuntimeService;
|
||||
import org.onosproject.yang.runtime.YangSerializerContext;
|
||||
import org.onosproject.yang.runtime.SerializerHelper;
|
||||
import org.osgi.service.component.ComponentContext;
|
||||
import org.osgi.service.component.annotations.Activate;
|
||||
import org.osgi.service.component.annotations.Component;
|
||||
import org.osgi.service.component.annotations.Deactivate;
|
||||
import org.osgi.service.component.annotations.Reference;
|
||||
import org.osgi.service.component.annotations.ReferenceCardinality;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
@ -89,8 +88,7 @@ import static org.onosproject.yang.runtime.SerializerHelper.addDataNode;
|
||||
* will be no session available.
|
||||
*/
|
||||
@Beta
|
||||
@Service
|
||||
@Component(immediate = true)
|
||||
@Component(immediate = true, service = NetconfTranslator.class)
|
||||
public class NetconfTranslatorImpl implements NetconfTranslator {
|
||||
|
||||
private static final Logger log = LoggerFactory
|
||||
@ -120,13 +118,13 @@ public class NetconfTranslatorImpl implements NetconfTranslator {
|
||||
private static final String XMLNS_XC_SPECIFIER = "xmlns:xc";
|
||||
private static final String XMLNS_SPECIFIER = "xmlns";
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected NetconfController netconfController;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected YangRuntimeService yangRuntimeService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected SchemaContextProvider schemaContextProvider;
|
||||
|
||||
@Activate
|
||||
|
||||
@ -15,27 +15,25 @@
|
||||
*/
|
||||
package org.onosproject.fnl.impl;
|
||||
|
||||
import org.apache.felix.scr.annotations.Component;
|
||||
import org.apache.felix.scr.annotations.Modified;
|
||||
import org.apache.felix.scr.annotations.Reference;
|
||||
import org.apache.felix.scr.annotations.ReferenceCardinality;
|
||||
import org.apache.felix.scr.annotations.Service;
|
||||
import org.apache.felix.scr.annotations.Property;
|
||||
import org.apache.felix.scr.annotations.Activate;
|
||||
import org.apache.felix.scr.annotations.Deactivate;
|
||||
import org.onlab.util.Tools;
|
||||
import org.onosproject.cfg.ComponentConfigService;
|
||||
import org.onosproject.core.ApplicationId;
|
||||
import org.onosproject.core.CoreService;
|
||||
import org.onosproject.fnl.intf.NetworkAnomaly;
|
||||
import org.onosproject.fnl.intf.NetworkDiagnostic;
|
||||
import org.onosproject.fnl.intf.NetworkDiagnostic.Type;
|
||||
import org.onosproject.fnl.intf.NetworkDiagnosticService;
|
||||
import org.onosproject.core.ApplicationId;
|
||||
import org.onosproject.core.CoreService;
|
||||
import org.onosproject.net.device.DeviceService;
|
||||
import org.onosproject.net.flow.FlowRuleService;
|
||||
import org.onosproject.net.host.HostService;
|
||||
import org.onosproject.net.link.LinkService;
|
||||
import org.osgi.service.component.ComponentContext;
|
||||
import org.osgi.service.component.annotations.Activate;
|
||||
import org.osgi.service.component.annotations.Component;
|
||||
import org.osgi.service.component.annotations.Deactivate;
|
||||
import org.osgi.service.component.annotations.Modified;
|
||||
import org.osgi.service.component.annotations.Reference;
|
||||
import org.osgi.service.component.annotations.ReferenceCardinality;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
@ -52,8 +50,7 @@ import static com.google.common.base.Preconditions.checkNotNull;
|
||||
*
|
||||
* It is simply modularized at present.
|
||||
*/
|
||||
@Component(immediate = true)
|
||||
@Service
|
||||
@Component(immediate = true, service = NetworkDiagnosticService.class)
|
||||
public class NetworkDiagnosticManager implements NetworkDiagnosticService {
|
||||
|
||||
/**
|
||||
@ -67,30 +64,30 @@ public class NetworkDiagnosticManager implements NetworkDiagnosticService {
|
||||
|
||||
private final Logger log = LoggerFactory.getLogger(getClass());
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected CoreService coreService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected ComponentConfigService cfgService;
|
||||
|
||||
|
||||
// ------ service below is for auto register ------
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected DeviceService ds;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected HostService hs;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected FlowRuleService frs;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected LinkService ls;
|
||||
|
||||
|
||||
@Property(name = PROPERTY_AUTO_REGISTER_DIAG, boolValue = true,
|
||||
label = "Automatically register all of default diagnostic modules.")
|
||||
//@Property(name = PROPERTY_AUTO_REGISTER_DIAG, boolValue = true,
|
||||
// label = "Automatically register all of default diagnostic modules.")
|
||||
private boolean autoRegister = true;
|
||||
|
||||
|
||||
|
||||
@ -18,14 +18,12 @@ package org.onosproject.newoptical;
|
||||
import com.google.common.annotations.Beta;
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import org.apache.commons.lang3.tuple.Pair;
|
||||
import org.apache.felix.scr.annotations.Activate;
|
||||
import org.apache.felix.scr.annotations.Component;
|
||||
import org.apache.felix.scr.annotations.Deactivate;
|
||||
import org.apache.felix.scr.annotations.Modified;
|
||||
import org.apache.felix.scr.annotations.Property;
|
||||
import org.apache.felix.scr.annotations.Reference;
|
||||
import org.apache.felix.scr.annotations.ReferenceCardinality;
|
||||
import org.apache.felix.scr.annotations.Service;
|
||||
import org.osgi.service.component.annotations.Activate;
|
||||
import org.osgi.service.component.annotations.Component;
|
||||
import org.osgi.service.component.annotations.Deactivate;
|
||||
import org.osgi.service.component.annotations.Modified;
|
||||
import org.osgi.service.component.annotations.Reference;
|
||||
import org.osgi.service.component.annotations.ReferenceCardinality;
|
||||
import org.onlab.graph.DefaultEdgeWeigher;
|
||||
import org.onlab.graph.ScalarWeight;
|
||||
import org.onlab.graph.Weight;
|
||||
@ -114,8 +112,7 @@ import static org.onosproject.net.optical.device.OpticalDeviceServiceView.optica
|
||||
* Main component to configure optical connectivity.
|
||||
*/
|
||||
@Beta
|
||||
@Service
|
||||
@Component(immediate = true)
|
||||
@Component(immediate = true, service = OpticalPathService.class)
|
||||
public class OpticalPathProvisioner
|
||||
extends AbstractListenerManager<OpticalPathEvent, OpticalPathListener>
|
||||
implements OpticalPathService {
|
||||
@ -132,40 +129,40 @@ public class OpticalPathProvisioner
|
||||
private static final String CONNECTIVITY_MAP_NAME = "newoptical-connectivity";
|
||||
private static final String CROSSCONNECTLINK_SET_NAME = "newoptical-crossconnectlink";
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected IntentService intentService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected TopologyService topologyService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected CoreService coreService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected LinkService linkService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected MastershipService mastershipService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected ClusterService clusterService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected DeviceService deviceService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected StorageService storageService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected NetworkConfigService networkConfigService;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
|
||||
@Reference(cardinality = ReferenceCardinality.MANDATORY)
|
||||
protected ResourceService resourceService;
|
||||
|
||||
private static final String MAX_PATHS = "maxPaths";
|
||||
private static final int DEFAULT_MAX_PATHS = 10;
|
||||
@Property(name = MAX_PATHS, intValue = DEFAULT_MAX_PATHS,
|
||||
label = "Maximum number of paths to consider for path provisioning")
|
||||
//@Property(name = MAX_PATHS, intValue = DEFAULT_MAX_PATHS,
|
||||
// label = "Maximum number of paths to consider for path provisioning")
|
||||
private int maxPaths = DEFAULT_MAX_PATHS;
|
||||
|
||||
private ApplicationId appId;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user