* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
-package org.opendaylight.sfc.ofrenderer;
+package org.opendaylight.sfc.renderers.openflow;
import org.opendaylight.controller.md.sal.binding.api.DataBroker;
import org.opendaylight.controller.sal.binding.api.NotificationProviderService;
import org.opendaylight.controller.sal.binding.api.RpcProviderRegistry;
-import org.opendaylight.sfc.ofrenderer.listeners.SfcOfRendererDataListener;
-import org.opendaylight.sfc.ofrenderer.listeners.SfcOfRspDataListener;
-import org.opendaylight.sfc.ofrenderer.listeners.SfcOfSfgDataListener;
-import org.opendaylight.sfc.ofrenderer.openflow.SfcIpv4PacketInHandler;
-import org.opendaylight.sfc.ofrenderer.openflow.SfcOfFlowProgrammerImpl;
-import org.opendaylight.sfc.ofrenderer.openflow.SfcOfFlowProgrammerInterface;
-import org.opendaylight.sfc.ofrenderer.processors.SfcOfRspProcessor;
-import org.opendaylight.sfc.ofrenderer.utils.SfcOfBaseProviderUtils;
-import org.opendaylight.sfc.ofrenderer.utils.SfcOfProviderUtils;
-import org.opendaylight.sfc.ofrenderer.utils.SfcSynchronizer;
+import org.opendaylight.sfc.renderers.openflow.listeners.SfcOfRendererDataListener;
+import org.opendaylight.sfc.renderers.openflow.listeners.SfcOfRspDataListener;
+import org.opendaylight.sfc.renderers.openflow.listeners.SfcOfSfgDataListener;
+import org.opendaylight.sfc.renderers.openflow.openflow.SfcIpv4PacketInHandler;
+import org.opendaylight.sfc.renderers.openflow.openflow.SfcOfFlowProgrammerImpl;
+import org.opendaylight.sfc.renderers.openflow.openflow.SfcOfFlowProgrammerInterface;
+import org.opendaylight.sfc.renderers.openflow.processors.SfcOfRspProcessor;
+import org.opendaylight.sfc.renderers.openflow.utils.SfcOfBaseProviderUtils;
+import org.opendaylight.sfc.renderers.openflow.utils.SfcOfProviderUtils;
+import org.opendaylight.sfc.renderers.openflow.utils.SfcSynchronizer;
import org.opendaylight.sfc.util.openflow.writer.SfcOfFlowWriterImpl;
import org.opendaylight.yangtools.concepts.Registration;
import org.slf4j.Logger;
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
-package org.opendaylight.sfc.ofrenderer.listeners;
+package org.opendaylight.sfc.renderers.openflow.listeners;
import org.opendaylight.controller.md.sal.binding.api.DataBroker;
import org.opendaylight.controller.md.sal.binding.api.DataTreeChangeListener;
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
-package org.opendaylight.sfc.ofrenderer.listeners;
+package org.opendaylight.sfc.renderers.openflow.listeners;
import java.util.Collection;
import java.util.concurrent.ExecutorService;
import org.opendaylight.controller.md.sal.binding.api.DataObjectModification;
import org.opendaylight.controller.md.sal.binding.api.DataTreeModification;
import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType;
-import org.opendaylight.sfc.ofrenderer.openflow.SfcOfFlowProgrammerInterface;
-import org.opendaylight.sfc.ofrenderer.utils.SfcSynchronizer;
+import org.opendaylight.sfc.renderers.openflow.openflow.SfcOfFlowProgrammerInterface;
+import org.opendaylight.sfc.renderers.openflow.utils.SfcSynchronizer;
import org.opendaylight.yang.gen.v1.urn.ericsson.params.xml.ns.yang.sfc.of.renderer.rev151123.SfcOfRendererConfig;
import org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.TableId;
import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
-package org.opendaylight.sfc.ofrenderer.listeners;
+package org.opendaylight.sfc.renderers.openflow.listeners;
import java.util.Collection;
import javax.annotation.Nonnull;
import org.opendaylight.controller.md.sal.binding.api.DataTreeIdentifier;
import org.opendaylight.controller.md.sal.binding.api.DataTreeModification;
import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType;
-import org.opendaylight.sfc.ofrenderer.processors.SfcOfRspProcessor;
import org.opendaylight.sfc.provider.api.SfcInstanceIdentifiers;
+import org.opendaylight.sfc.renderers.openflow.processors.SfcOfRspProcessor;
import org.opendaylight.yang.gen.v1.urn.cisco.params.xml.ns.yang.sfc.rsp.rev140701.rendered.service.paths.RenderedServicePath;
import org.opendaylight.yangtools.concepts.ListenerRegistration;
import org.slf4j.Logger;
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
-package org.opendaylight.sfc.ofrenderer.listeners;
+package org.opendaylight.sfc.renderers.openflow.listeners;
import java.util.ArrayList;
import java.util.Collection;
import org.opendaylight.controller.md.sal.binding.api.DataObjectModification;
import org.opendaylight.controller.md.sal.binding.api.DataTreeModification;
import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType;
-import org.opendaylight.sfc.ofrenderer.openflow.SfcOfFlowProgrammerInterface;
-import org.opendaylight.sfc.ofrenderer.sfg.GroupBucketInfo;
-import org.opendaylight.sfc.ofrenderer.utils.SfcOfBaseProviderUtils;
import org.opendaylight.sfc.provider.api.SfcInstanceIdentifiers;
import org.opendaylight.sfc.provider.api.SfcProviderServiceForwarderAPI;
import org.opendaylight.sfc.provider.api.SfcProviderServiceFunctionAPI;
import org.opendaylight.sfc.provider.api.SfcProviderServiceFunctionGroupAlgAPI;
+import org.opendaylight.sfc.renderers.openflow.openflow.SfcOfFlowProgrammerInterface;
+import org.opendaylight.sfc.renderers.openflow.sfg.GroupBucketInfo;
+import org.opendaylight.sfc.renderers.openflow.utils.SfcOfBaseProviderUtils;
import org.opendaylight.yang.gen.v1.urn.cisco.params.xml.ns.yang.sfc.common.rev151017.SfName;
import org.opendaylight.yang.gen.v1.urn.cisco.params.xml.ns.yang.sfc.common.rev151017.SffName;
import org.opendaylight.yang.gen.v1.urn.cisco.params.xml.ns.yang.sfc.sf.rev140701.service.function.base.SfDataPlaneLocator;
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
-package org.opendaylight.sfc.ofrenderer.openflow;
+package org.opendaylight.sfc.renderers.openflow.openflow;
import java.math.BigInteger;
import java.net.InetAddress;
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
-package org.opendaylight.sfc.ofrenderer.openflow;
+package org.opendaylight.sfc.renderers.openflow.openflow;
import com.google.common.net.InetAddresses;
import java.math.BigInteger;
import java.util.concurrent.ExecutionException;
import org.opendaylight.genius.mdsalutil.NwConstants;
import org.opendaylight.sfc.genius.util.appcoexistence.SfcTableIndexMapper;
-import org.opendaylight.sfc.ofrenderer.sfg.GroupBucketInfo;
import org.opendaylight.sfc.ovs.provider.SfcOvsUtil;
+import org.opendaylight.sfc.renderers.openflow.sfg.GroupBucketInfo;
import org.opendaylight.sfc.util.openflow.OpenflowConstants;
import org.opendaylight.sfc.util.openflow.SfcOpenflowUtils;
import org.opendaylight.sfc.util.openflow.writer.SfcOfFlowWriterInterface;
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
-package org.opendaylight.sfc.ofrenderer.openflow;
+package org.opendaylight.sfc.renderers.openflow.openflow;
import java.util.List;
import java.util.Set;
import java.util.concurrent.ExecutionException;
import org.opendaylight.sfc.genius.util.appcoexistence.SfcTableIndexMapper;
-import org.opendaylight.sfc.ofrenderer.sfg.GroupBucketInfo;
+import org.opendaylight.sfc.renderers.openflow.sfg.GroupBucketInfo;
import org.opendaylight.sfc.util.openflow.writer.SfcOfFlowWriterInterface;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.MacAddress;
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
-package org.opendaylight.sfc.ofrenderer.processors;
+package org.opendaylight.sfc.renderers.openflow.processors;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Optional;
import java.util.Set;
import java.util.stream.Collectors;
-
import org.opendaylight.controller.md.sal.binding.api.DataBroker;
import org.opendaylight.controller.sal.binding.api.RpcProviderRegistry;
import org.opendaylight.genius.mdsalutil.NwConstants;
import org.opendaylight.sfc.genius.util.SfcGeniusDataUtils;
import org.opendaylight.sfc.genius.util.SfcGeniusRpcClient;
-import org.opendaylight.sfc.ofrenderer.openflow.SfcOfFlowProgrammerInterface;
-import org.opendaylight.sfc.ofrenderer.utils.SfcOfBaseProviderUtils;
-import org.opendaylight.sfc.ofrenderer.utils.SfcSynchronizer;
-import org.opendaylight.sfc.ofrenderer.utils.operdsupdate.OperDsUpdateHandlerInterface;
-import org.opendaylight.sfc.ofrenderer.utils.operdsupdate.OperDsUpdateHandlerLSFFImpl;
import org.opendaylight.sfc.ovs.provider.SfcOvsUtil;
+import org.opendaylight.sfc.renderers.openflow.openflow.SfcOfFlowProgrammerInterface;
+import org.opendaylight.sfc.renderers.openflow.utils.SfcOfBaseProviderUtils;
+import org.opendaylight.sfc.renderers.openflow.utils.SfcSynchronizer;
+import org.opendaylight.sfc.renderers.openflow.utils.operdsupdate.OperDsUpdateHandlerInterface;
+import org.opendaylight.sfc.renderers.openflow.utils.operdsupdate.OperDsUpdateHandlerLSFFImpl;
import org.opendaylight.sfc.util.openflow.OpenflowConstants;
import org.opendaylight.yang.gen.v1.urn.cisco.params.xml.ns.yang.sfc.common.rev151017.SfName;
import org.opendaylight.yang.gen.v1.urn.cisco.params.xml.ns.yang.sfc.common.rev151017.SffDataPlaneLocatorName;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-
public class SfcOfRspProcessor {
private static final Logger LOG = LoggerFactory.getLogger(SfcOfRspProcessor.class);
private final SfcOfFlowProgrammerInterface sfcOfFlowProgrammer;
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
-package org.opendaylight.sfc.ofrenderer.processors;
+package org.opendaylight.sfc.renderers.openflow.processors;
/**
* Exception thrown when an error or other exception is encountered in the
* terms of the Eclipse Public License v1.0 which accompanies this distribution,
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
-package org.opendaylight.sfc.ofrenderer.processors;
+package org.opendaylight.sfc.renderers.openflow.processors;
import java.util.List;
import java.util.Optional;
import org.opendaylight.sfc.genius.util.SfcGeniusRpcClient;
import org.opendaylight.sfc.genius.util.appcoexistence.SfcTableIndexMapper;
import org.opendaylight.sfc.genius.util.appcoexistence.SfcTableIndexMapperBuilder;
-import org.opendaylight.sfc.ofrenderer.openflow.SfcOfFlowProgrammerImpl;
-import org.opendaylight.sfc.ofrenderer.processors.SffGraph.SffGraphEntry;
-import org.opendaylight.sfc.ofrenderer.utils.operdsupdate.OperDsUpdateHandlerInterface;
+import org.opendaylight.sfc.renderers.openflow.openflow.SfcOfFlowProgrammerImpl;
+import org.opendaylight.sfc.renderers.openflow.processors.SffGraph.SffGraphEntry;
+import org.opendaylight.sfc.renderers.openflow.utils.operdsupdate.OperDsUpdateHandlerInterface;
import org.opendaylight.sfc.util.openflow.OpenflowConstants;
import org.opendaylight.sfc.util.openflow.SfcOpenflowUtils;
import org.opendaylight.yang.gen.v1.urn.cisco.params.xml.ns.yang.sfc.common.rev151017.SfName;
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
-package org.opendaylight.sfc.ofrenderer.processors;
+package org.opendaylight.sfc.renderers.openflow.processors;
import java.util.Iterator;
import org.opendaylight.sfc.util.macchaining.SfcModelUtil;
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
-package org.opendaylight.sfc.ofrenderer.processors;
+package org.opendaylight.sfc.renderers.openflow.processors;
import java.util.Iterator;
import java.util.concurrent.atomic.AtomicLong;
-import org.opendaylight.sfc.ofrenderer.processors.SffGraph.SffGraphEntry;
+import org.opendaylight.sfc.renderers.openflow.processors.SffGraph.SffGraphEntry;
import org.opendaylight.yang.gen.v1.urn.cisco.params.xml.ns.yang.sfc.sf.rev140701.service.function.base.SfDataPlaneLocator;
import org.opendaylight.yang.gen.v1.urn.cisco.params.xml.ns.yang.sfc.sf.rev140701.service.functions.ServiceFunction;
import org.opendaylight.yang.gen.v1.urn.cisco.params.xml.ns.yang.sfc.sff.rev140701.service.function.forwarder.base.SffDataPlaneLocator;
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
-package org.opendaylight.sfc.ofrenderer.processors;
+package org.opendaylight.sfc.renderers.openflow.processors;
import java.util.Iterator;
-import org.opendaylight.sfc.ofrenderer.processors.SffGraph.SffGraphEntry;
+import org.opendaylight.sfc.renderers.openflow.processors.SffGraph.SffGraphEntry;
import org.opendaylight.yang.gen.v1.urn.cisco.params.xml.ns.yang.sfc.common.rev151017.SffDataPlaneLocatorName;
import org.opendaylight.yang.gen.v1.urn.cisco.params.xml.ns.yang.sfc.common.rev151017.SffName;
import org.opendaylight.yang.gen.v1.urn.cisco.params.xml.ns.yang.sfc.sf.rev140701.service.function.base.SfDataPlaneLocator;
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
-package org.opendaylight.sfc.ofrenderer.processors;
+package org.opendaylight.sfc.renderers.openflow.processors;
import java.util.Iterator;
-import org.opendaylight.sfc.ofrenderer.processors.SffGraph.SffGraphEntry;
+import org.opendaylight.sfc.renderers.openflow.processors.SffGraph.SffGraphEntry;
import org.opendaylight.yang.gen.v1.urn.cisco.params.xml.ns.yang.sfc.common.rev151017.SffDataPlaneLocatorName;
import org.opendaylight.yang.gen.v1.urn.cisco.params.xml.ns.yang.sfc.common.rev151017.SffName;
import org.opendaylight.yang.gen.v1.urn.cisco.params.xml.ns.yang.sfc.sf.rev140701.service.function.base.SfDataPlaneLocator;
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
-package org.opendaylight.sfc.ofrenderer.processors;
+package org.opendaylight.sfc.renderers.openflow.processors;
import java.util.Iterator;
import java.util.concurrent.atomic.AtomicInteger;
-import org.opendaylight.sfc.ofrenderer.processors.SffGraph.SffGraphEntry;
import org.opendaylight.yang.gen.v1.urn.cisco.params.xml.ns.yang.sfc.sf.rev140701.service.function.base.SfDataPlaneLocator;
import org.opendaylight.yang.gen.v1.urn.cisco.params.xml.ns.yang.sfc.sf.rev140701.service.functions.ServiceFunction;
import org.opendaylight.yang.gen.v1.urn.cisco.params.xml.ns.yang.sfc.sff.rev140701.service.function.forwarder.base.SffDataPlaneLocator;
* - RSP hop info used to create the flow
*/
@Override
- public void configureSfTransportIngressFlow(SffGraphEntry entry, SfDataPlaneLocator sfDpl) {
+ public void configureSfTransportIngressFlow(SffGraph.SffGraphEntry entry, SfDataPlaneLocator sfDpl) {
String sffNodeName = sfcProviderUtils.getSffOpenFlowNodeName(entry.getDstSff(), entry.getPathId());
this.sfcFlowProgrammer.configureVlanTransportIngressFlow(sffNodeName);
}
* - RSP hop info used to create the flow
*/
@Override
- public void configureSffTransportIngressFlow(SffGraphEntry entry, SffDataPlaneLocator dstSffDpl) {
+ public void configureSffTransportIngressFlow(SffGraph.SffGraphEntry entry, SffDataPlaneLocator dstSffDpl) {
String sffNodeName = sfcProviderUtils.getSffOpenFlowNodeName(entry.getDstSff(), entry.getPathId());
this.sfcFlowProgrammer.configureVlanTransportIngressFlow(sffNodeName);
}
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
-package org.opendaylight.sfc.ofrenderer.processors;
+package org.opendaylight.sfc.renderers.openflow.processors;
import java.util.Iterator;
import java.util.List;
import java.util.Locale;
import java.util.Optional;
import org.opendaylight.sfc.genius.util.appcoexistence.SfcTableIndexMapper;
-import org.opendaylight.sfc.ofrenderer.openflow.SfcOfFlowProgrammerInterface;
-import org.opendaylight.sfc.ofrenderer.utils.SfcOfBaseProviderUtils;
-import org.opendaylight.sfc.ofrenderer.utils.operdsupdate.OperDsUpdateHandlerInterface;
+import org.opendaylight.sfc.renderers.openflow.openflow.SfcOfFlowProgrammerInterface;
+import org.opendaylight.sfc.renderers.openflow.utils.SfcOfBaseProviderUtils;
+import org.opendaylight.sfc.renderers.openflow.utils.operdsupdate.OperDsUpdateHandlerInterface;
import org.opendaylight.yang.gen.v1.urn.cisco.params.xml.ns.yang.sfc.common.rev151017.SffDataPlaneLocatorName;
import org.opendaylight.yang.gen.v1.urn.cisco.params.xml.ns.yang.sfc.rsp.rev140701.rendered.service.paths.RenderedServicePath;
import org.opendaylight.yang.gen.v1.urn.cisco.params.xml.ns.yang.sfc.sf.rev140701.service.function.base.SfDataPlaneLocator;
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
-package org.opendaylight.sfc.ofrenderer.processors;
+package org.opendaylight.sfc.renderers.openflow.processors;
import java.util.ArrayList;
import java.util.HashMap;
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
-package org.opendaylight.sfc.ofrenderer.sfg;
+package org.opendaylight.sfc.renderers.openflow.sfg;
public class GroupBucketInfo {
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
-package org.opendaylight.sfc.ofrenderer.utils;
+package org.opendaylight.sfc.renderers.openflow.utils;
import java.util.List;
import org.opendaylight.yang.gen.v1.urn.cisco.params.xml.ns.yang.sfc.common.rev151017.SfDataPlaneLocatorName;
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
-package org.opendaylight.sfc.ofrenderer.utils;
+package org.opendaylight.sfc.renderers.openflow.utils;
import java.util.ArrayList;
import java.util.Collections;
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
-package org.opendaylight.sfc.ofrenderer.utils;
+package org.opendaylight.sfc.renderers.openflow.utils;
import java.util.concurrent.locks.ReentrantLock;
* terms of the Eclipse Public License v1.0 which accompanies this distribution,
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
-package org.opendaylight.sfc.ofrenderer.utils.operdsupdate;
+package org.opendaylight.sfc.renderers.openflow.utils.operdsupdate;
-import org.opendaylight.sfc.ofrenderer.processors.SffGraph;
+import org.opendaylight.sfc.renderers.openflow.processors.SffGraph;
import org.opendaylight.yang.gen.v1.urn.cisco.params.xml.ns.yang.sfc.rsp.rev140701.rendered.service.paths.RenderedServicePath;
/**
* terms of the Eclipse Public License v1.0 which accompanies this distribution,
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
-package org.opendaylight.sfc.ofrenderer.utils.operdsupdate;
+package org.opendaylight.sfc.renderers.openflow.utils.operdsupdate;
import com.google.common.util.concurrent.ListenableFuture;
import java.math.BigInteger;
import org.opendaylight.controller.md.sal.binding.api.DataBroker;
import org.opendaylight.controller.md.sal.binding.api.WriteTransaction;
import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType;
-import org.opendaylight.sfc.ofrenderer.processors.SffGraph;
-import org.opendaylight.sfc.ofrenderer.processors.SffGraph.SffGraphEntry;
+import org.opendaylight.sfc.renderers.openflow.processors.SffGraph;
import org.opendaylight.yang.gen.v1.urn.cisco.params.xml.ns.yang.sfc.common.rev151017.SffName;
import org.opendaylight.yang.gen.v1.urn.cisco.params.xml.ns.yang.sfc.common.rev151017.SfpName;
import org.opendaylight.yang.gen.v1.urn.cisco.params.xml.ns.yang.sfc.rsp.rev140701.RenderedServicePaths;
*/
private void updateSffStateWithDpnIds(SffGraph theGraph, RenderedServicePath rsp, WriteTransaction trans) {
LOG.debug("updateSffStateWithDpnIds: starting addition of dpnids-rsps to RSP state");
- Iterator<SffGraphEntry> graphEntries = theGraph.getGraphEntryIterator();
+ Iterator<SffGraph.SffGraphEntry> graphEntries = theGraph.getGraphEntryIterator();
Map<BigInteger, List<Rsps>> valuesMap = new HashMap<>();
- SffGraphEntry graphEntry;
+ SffGraph.SffGraphEntry graphEntry;
while (graphEntries.hasNext()) {
graphEntry = graphEntries.next();
if (graphEntry.getDstSff().equals(SffGraph.EGRESS) || graphEntry.getDstDpnId() == null) {
private void updateRenderedServicePathOperationalStateWithDpnIds(SffGraph theGraph, RenderedServicePath rsp,
WriteTransaction transaction) {
LOG.debug("updateRenderedServicePathOperationalStateWithDpnIds: " + "starting addition of dpnids to the RSP");
- Iterator<SffGraphEntry> graphEntries = theGraph.getGraphEntryIterator();
- SffGraphEntry graphEntry;
+ Iterator<SffGraph.SffGraphEntry> graphEntries = theGraph.getGraphEntryIterator();
+ SffGraph.SffGraphEntry graphEntry;
RenderedServicePathKey rspKey = new RenderedServicePathKey(rsp.getName());
short hopIndex = 0;
while (graphEntries.hasNext()) {
interface="org.opendaylight.controller.sal.binding.api.RpcProviderRegistry"/>
<bean id="renderer"
- class="org.opendaylight.sfc.ofrenderer.SfcOfRenderer"
+ class="org.opendaylight.sfc.renderers.openflow.SfcOfRenderer"
destroy-method="close">
<argument ref="dataBroker"/>
<argument ref="notificationService"/>
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
-package org.opendaylight.sfc.ofrenderer;
+package org.opendaylight.sfc.renderers.openflow;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
-import org.opendaylight.sfc.ofrenderer.utils.SfcOfProviderUtilsTestMock;
+import org.opendaylight.sfc.renderers.openflow.utils.SfcOfProviderUtilsTestMock;
import org.opendaylight.yang.gen.v1.urn.cisco.params.xml.ns.yang.sfc.common.rev151017.RspName;
import org.opendaylight.yang.gen.v1.urn.cisco.params.xml.ns.yang.sfc.common.rev151017.SfDataPlaneLocatorName;
import org.opendaylight.yang.gen.v1.urn.cisco.params.xml.ns.yang.sfc.common.rev151017.SfName;
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
-package org.opendaylight.sfc.ofrenderer;
+package org.opendaylight.sfc.renderers.openflow;
import static org.junit.Assert.assertEquals;
import static org.mockito.Matchers.anyLong;
import java.math.BigInteger;
import org.junit.Test;
-import org.opendaylight.sfc.ofrenderer.openflow.SfcIpv4PacketInHandler;
-import org.opendaylight.sfc.ofrenderer.openflow.SfcOfFlowProgrammerImpl;
+import org.opendaylight.sfc.renderers.openflow.openflow.SfcIpv4PacketInHandler;
+import org.opendaylight.sfc.renderers.openflow.openflow.SfcOfFlowProgrammerImpl;
import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.FlowCookie;
import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeConnectorRef;
import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeId;
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
-package org.opendaylight.sfc.ofrenderer;
+package org.opendaylight.sfc.renderers.openflow;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import org.junit.Test;
import org.opendaylight.genius.mdsalutil.NwConstants;
-import org.opendaylight.sfc.ofrenderer.openflow.SfcOfFlowProgrammerImpl;
+import org.opendaylight.sfc.renderers.openflow.openflow.SfcOfFlowProgrammerImpl;
import org.opendaylight.sfc.util.macchaining.VirtualMacAddress;
import org.opendaylight.sfc.util.openflow.OpenflowConstants;
import org.opendaylight.sfc.util.openflow.SfcOpenflowUtils;
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
-package org.opendaylight.sfc.ofrenderer;
+package org.opendaylight.sfc.renderers.openflow;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.core.Is.is;
import org.mockito.Mockito;
import org.opendaylight.controller.md.sal.binding.api.DataBroker;
import org.opendaylight.controller.md.sal.binding.api.WriteTransaction;
-import org.opendaylight.sfc.ofrenderer.openflow.SfcOfFlowProgrammerImpl;
-import org.opendaylight.sfc.ofrenderer.openflow.SfcOfFlowProgrammerInterface;
-import org.opendaylight.sfc.ofrenderer.processors.SfcOfRspProcessor;
-import org.opendaylight.sfc.ofrenderer.utils.SfcOfProviderUtilsTestMock;
-import org.opendaylight.sfc.ofrenderer.utils.SfcSynchronizer;
+import org.opendaylight.sfc.renderers.openflow.openflow.SfcOfFlowProgrammerImpl;
+import org.opendaylight.sfc.renderers.openflow.openflow.SfcOfFlowProgrammerInterface;
+import org.opendaylight.sfc.renderers.openflow.processors.SfcOfRspProcessor;
+import org.opendaylight.sfc.renderers.openflow.utils.SfcOfProviderUtilsTestMock;
+import org.opendaylight.sfc.renderers.openflow.utils.SfcSynchronizer;
import org.opendaylight.sfc.util.openflow.OpenflowConstants;
import org.opendaylight.sfc.util.openflow.writer.FlowDetails;
import org.opendaylight.sfc.util.openflow.writer.SfcOfFlowWriterImpl;
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
-package org.opendaylight.sfc.ofrenderer.listeners;
+package org.opendaylight.sfc.renderers.openflow.listeners;
import static org.junit.Assert.assertEquals;
import static org.mockito.Mockito.mock;
import org.opendaylight.controller.md.sal.binding.api.DataTreeIdentifier;
import org.opendaylight.controller.md.sal.binding.api.DataTreeModification;
import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType;
-import org.opendaylight.sfc.ofrenderer.openflow.SfcOfFlowProgrammerImpl;
-import org.opendaylight.sfc.ofrenderer.openflow.SfcOfFlowProgrammerInterface;
-import org.opendaylight.sfc.ofrenderer.utils.SfcSynchronizer;
+import org.opendaylight.sfc.renderers.openflow.openflow.SfcOfFlowProgrammerImpl;
+import org.opendaylight.sfc.renderers.openflow.openflow.SfcOfFlowProgrammerInterface;
+import org.opendaylight.sfc.renderers.openflow.utils.SfcSynchronizer;
import org.opendaylight.sfc.util.openflow.writer.SfcOfFlowWriterInterface;
import org.opendaylight.yang.gen.v1.urn.ericsson.params.xml.ns.yang.sfc.of.renderer.rev151123.SfcOfRendererConfig;
import org.opendaylight.yang.gen.v1.urn.ericsson.params.xml.ns.yang.sfc.of.renderer.rev151123.SfcOfRendererConfigBuilder;
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
-package org.opendaylight.sfc.ofrenderer.listeners;
+package org.opendaylight.sfc.renderers.openflow.listeners;
import static org.mockito.Matchers.same;
import static org.mockito.Mockito.verify;
import org.opendaylight.controller.md.sal.binding.api.DataBroker;
import org.opendaylight.controller.md.sal.binding.api.DataObjectModification;
import org.opendaylight.controller.md.sal.binding.api.DataTreeModification;
-import org.opendaylight.sfc.ofrenderer.processors.SfcOfRspProcessor;
+import org.opendaylight.sfc.renderers.openflow.processors.SfcOfRspProcessor;
import org.opendaylight.yang.gen.v1.urn.cisco.params.xml.ns.yang.sfc.common.rev151017.RspName;
import org.opendaylight.yang.gen.v1.urn.cisco.params.xml.ns.yang.sfc.rsp.rev140701.rendered.service.paths.RenderedServicePath;
import org.opendaylight.yang.gen.v1.urn.cisco.params.xml.ns.yang.sfc.rsp.rev140701.rendered.service.paths.RenderedServicePathBuilder;
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
-package org.opendaylight.sfc.ofrenderer.processors;
+package org.opendaylight.sfc.renderers.openflow.processors;
import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.CoreMatchers.notNullValue;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
import static org.mockito.MockitoAnnotations.initMocks;
-import static org.opendaylight.sfc.ofrenderer.openflow.SfcOfFlowProgrammerImpl.COOKIE_BIGINT_HEX_RADIX;
-import static org.opendaylight.sfc.ofrenderer.openflow.SfcOfFlowProgrammerImpl.TABLE_INDEX_CLASSIFIER;
-import static org.opendaylight.sfc.ofrenderer.openflow.SfcOfFlowProgrammerImpl.TRANSPORT_EGRESS_COOKIE_STR_BASE;
-import static org.opendaylight.sfc.ofrenderer.openflow.SfcOfFlowProgrammerImpl.TRANSPORT_EGRESS_NSH_ETH_LASTHOP_NSH_LOCAL_COOKIE;
-import static org.opendaylight.sfc.ofrenderer.openflow.SfcOfFlowProgrammerImpl.TRANSPORT_EGRESS_NSH_ETH_LASTHOP_NSH_REMOTE_COOKIE;
-import static org.opendaylight.sfc.ofrenderer.openflow.SfcOfFlowProgrammerImpl.TRANSPORT_EGRESS_NSH_ETH_LASTHOP_PIPELINE_COOKIE;
-import static org.opendaylight.sfc.ofrenderer.openflow.SfcOfFlowProgrammerImpl.TRANSPORT_EGRESS_NSH_ETH_LASTHOP_TUNNEL_LOCAL_COOKIE;
-import static org.opendaylight.sfc.ofrenderer.openflow.SfcOfFlowProgrammerImpl.TRANSPORT_EGRESS_NSH_ETH_LASTHOP_TUNNEL_REMOTE_COOKIE;
import static org.powermock.api.support.membermodification.MemberMatcher.method;
import static org.powermock.api.support.membermodification.MemberModifier.replace;
import static org.powermock.api.support.membermodification.MemberModifier.suppress;
import org.opendaylight.genius.mdsalutil.NwConstants;
import org.opendaylight.sfc.genius.util.SfcGeniusDataUtils;
import org.opendaylight.sfc.genius.util.SfcGeniusRpcClient;
-import org.opendaylight.sfc.ofrenderer.RspBuilder;
-import org.opendaylight.sfc.ofrenderer.openflow.SfcOfFlowProgrammerImpl;
-import org.opendaylight.sfc.ofrenderer.utils.SfcOfProviderUtilsTestMock;
-import org.opendaylight.sfc.ofrenderer.utils.SfcSynchronizer;
-import org.opendaylight.sfc.ofrenderer.utils.operdsupdate.OperDsUpdateHandlerLSFFImpl;
import org.opendaylight.sfc.ovs.provider.SfcOvsUtil;
+import org.opendaylight.sfc.renderers.openflow.RspBuilder;
+import org.opendaylight.sfc.renderers.openflow.openflow.SfcOfFlowProgrammerImpl;
+import org.opendaylight.sfc.renderers.openflow.utils.SfcOfProviderUtilsTestMock;
+import org.opendaylight.sfc.renderers.openflow.utils.SfcSynchronizer;
+import org.opendaylight.sfc.renderers.openflow.utils.operdsupdate.OperDsUpdateHandlerLSFFImpl;
import org.opendaylight.sfc.util.openflow.OpenflowConstants;
import org.opendaylight.sfc.util.openflow.SfcOpenflowUtils;
import org.opendaylight.sfc.util.openflow.writer.FlowDetails;
// genius,
// which uses that table for service binding)
Assert.assertEquals(0,
- addedFlows.stream().filter(flow -> flow.getTableKey().getId().equals(TABLE_INDEX_CLASSIFIER)).count());
+ addedFlows.stream().filter(flow -> flow.getTableKey().getId().equals(
+ SfcOfFlowProgrammerImpl.TABLE_INDEX_CLASSIFIER)).count());
// transport ingress: one (initialization in the only switch) + one per
// (hops -1, this is the
assertThat(theFlow.getCookie().getValue(), notNullValue());
BigInteger cookie = theFlow.getCookie().getValue();
- BigInteger egresspipelineCookie = new BigInteger(
- TRANSPORT_EGRESS_COOKIE_STR_BASE + TRANSPORT_EGRESS_NSH_ETH_LASTHOP_PIPELINE_COOKIE,
- COOKIE_BIGINT_HEX_RADIX);
+ BigInteger egresspipelineCookie = new BigInteger(SfcOfFlowProgrammerImpl.TRANSPORT_EGRESS_COOKIE_STR_BASE
+ + SfcOfFlowProgrammerImpl
+ .TRANSPORT_EGRESS_NSH_ETH_LASTHOP_PIPELINE_COOKIE,
+ SfcOfFlowProgrammerImpl.COOKIE_BIGINT_HEX_RADIX);
if (cookie.equals(egresspipelineCookie)) {
assertTransportEgressLastHopPipelineFlow(theFlow, theNsp, theNsi, theSfMacAddress);
return;
}
- BigInteger remoteTunnelCookie = new BigInteger(
- TRANSPORT_EGRESS_COOKIE_STR_BASE + TRANSPORT_EGRESS_NSH_ETH_LASTHOP_TUNNEL_REMOTE_COOKIE,
- COOKIE_BIGINT_HEX_RADIX);
+ BigInteger remoteTunnelCookie = new BigInteger(SfcOfFlowProgrammerImpl.TRANSPORT_EGRESS_COOKIE_STR_BASE
+ + SfcOfFlowProgrammerImpl
+ .TRANSPORT_EGRESS_NSH_ETH_LASTHOP_TUNNEL_REMOTE_COOKIE,
+ SfcOfFlowProgrammerImpl.COOKIE_BIGINT_HEX_RADIX);
if (cookie.equals(remoteTunnelCookie)) {
assertTransportEgressLastHopRemoteTunnel(theFlow, theNsp, theNsi, theOutputPort);
return;
}
- BigInteger localTunnelCookie = new BigInteger(
- TRANSPORT_EGRESS_COOKIE_STR_BASE + TRANSPORT_EGRESS_NSH_ETH_LASTHOP_TUNNEL_LOCAL_COOKIE,
- COOKIE_BIGINT_HEX_RADIX);
+ BigInteger localTunnelCookie = new BigInteger(SfcOfFlowProgrammerImpl.TRANSPORT_EGRESS_COOKIE_STR_BASE
+ + SfcOfFlowProgrammerImpl
+ .TRANSPORT_EGRESS_NSH_ETH_LASTHOP_TUNNEL_LOCAL_COOKIE,
+ SfcOfFlowProgrammerImpl.COOKIE_BIGINT_HEX_RADIX);
if (cookie.equals(localTunnelCookie)) {
assertTransportEgressLastHopLocalTunnel(theFlow, theNsp, theNsi, theSffIpAddress);
return;
}
- BigInteger remoteNshCookie = new BigInteger(
- TRANSPORT_EGRESS_COOKIE_STR_BASE + TRANSPORT_EGRESS_NSH_ETH_LASTHOP_NSH_REMOTE_COOKIE,
- COOKIE_BIGINT_HEX_RADIX);
+ BigInteger remoteNshCookie = new BigInteger(SfcOfFlowProgrammerImpl.TRANSPORT_EGRESS_COOKIE_STR_BASE
+ + SfcOfFlowProgrammerImpl
+ .TRANSPORT_EGRESS_NSH_ETH_LASTHOP_NSH_REMOTE_COOKIE,
+ SfcOfFlowProgrammerImpl.COOKIE_BIGINT_HEX_RADIX);
if (cookie.equals(remoteNshCookie)) {
assertTransportEgressLastHopRemoteNsh(theFlow, theNsp, theNsi, theOutputPort);
return;
}
- BigInteger localNshCookie = new BigInteger(
- TRANSPORT_EGRESS_COOKIE_STR_BASE + TRANSPORT_EGRESS_NSH_ETH_LASTHOP_NSH_LOCAL_COOKIE,
- COOKIE_BIGINT_HEX_RADIX);
+ BigInteger localNshCookie = new BigInteger(SfcOfFlowProgrammerImpl.TRANSPORT_EGRESS_COOKIE_STR_BASE
+ + SfcOfFlowProgrammerImpl
+ .TRANSPORT_EGRESS_NSH_ETH_LASTHOP_NSH_LOCAL_COOKIE,
+ SfcOfFlowProgrammerImpl.COOKIE_BIGINT_HEX_RADIX);
if (cookie.equals(localNshCookie)) {
assertTransportEgressLastHopLocalNsh(theFlow, theNsp, theNsi, theSffIpAddress);
return;
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
-package org.opendaylight.sfc.ofrenderer.processors;
+package org.opendaylight.sfc.renderers.openflow.processors;
import static org.mockito.Matchers.anyBoolean;
import static org.mockito.Matchers.anyInt;
import java.util.concurrent.ExecutionException;
import org.junit.Before;
import org.junit.Test;
-import org.opendaylight.sfc.ofrenderer.RspBuilder;
-import org.opendaylight.sfc.ofrenderer.openflow.SfcOfFlowProgrammerImpl;
-import org.opendaylight.sfc.ofrenderer.openflow.SfcOfFlowProgrammerInterface;
-import org.opendaylight.sfc.ofrenderer.utils.SfcOfProviderUtilsTestMock;
-import org.opendaylight.sfc.ofrenderer.utils.SfcSynchronizer;
-import org.opendaylight.sfc.ofrenderer.utils.operdsupdate.OperDsUpdateHandlerInterface;
+import org.opendaylight.sfc.renderers.openflow.RspBuilder;
+import org.opendaylight.sfc.renderers.openflow.openflow.SfcOfFlowProgrammerImpl;
+import org.opendaylight.sfc.renderers.openflow.openflow.SfcOfFlowProgrammerInterface;
+import org.opendaylight.sfc.renderers.openflow.utils.SfcOfProviderUtilsTestMock;
+import org.opendaylight.sfc.renderers.openflow.utils.SfcSynchronizer;
+import org.opendaylight.sfc.renderers.openflow.utils.operdsupdate.OperDsUpdateHandlerInterface;
import org.opendaylight.sfc.util.openflow.writer.SfcOfFlowWriterInterface;
import org.opendaylight.yang.gen.v1.urn.cisco.params.xml.ns.yang.sfc.common.rev151017.SfName;
import org.opendaylight.yang.gen.v1.urn.cisco.params.xml.ns.yang.sfc.common.rev151017.SffName;
this.flowProgrammerTestMoc.setFlowWriter(mock(SfcOfFlowWriterInterface.class));
this.sfcUtilsTestMock = new SfcOfProviderUtilsTestMock();
this.sfcOfRspProcessor = new SfcOfRspProcessor(this.flowProgrammerTestMoc, this.sfcUtilsTestMock,
- new SfcSynchronizer(), null, null);
+ new SfcSynchronizer(), null, null);
this.rspBuilder = new RspBuilder(this.sfcUtilsTestMock);
this.sfTypes = new ArrayList<>();
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
-package org.opendaylight.sfc.ofrenderer.utils;
+package org.opendaylight.sfc.renderers.openflow.utils;
import java.util.ArrayList;
import java.util.HashMap;