Fix checkstyle whitespace, layout, javadoc issues 26/60326/1
authorDonald Hunter <donaldh@cisco.com>
Thu, 13 Jul 2017 16:06:11 +0000 (17:06 +0100)
committerDonald Hunter <donaldh@cisco.com>
Fri, 14 Jul 2017 08:43:57 +0000 (09:43 +0100)
Change-Id: Ib36c91adf797cb44e13580dd0b1fb12e769c84ea
Signed-off-by: Donald Hunter <donaldh@cisco.com>
41 files changed:
impl/src/main/java/org/opendaylight/unimgr/impl/UnimgrMapper.java
impl/src/main/java/org/opendaylight/unimgr/mef/nrp/api/ActivationDriverBuilder.java
impl/src/main/java/org/opendaylight/unimgr/mef/nrp/api/EndPoint.java
impl/src/main/java/org/opendaylight/unimgr/mef/nrp/api/RequestDecomposer.java
impl/src/main/java/org/opendaylight/unimgr/mef/nrp/common/NrpDao.java
impl/src/main/java/org/opendaylight/unimgr/mef/nrp/common/ResourceActivator.java
impl/src/main/java/org/opendaylight/unimgr/mef/nrp/common/ResourceActivatorException.java
impl/src/main/java/org/opendaylight/unimgr/mef/nrp/common/ServiceNaming.java
impl/src/main/java/org/opendaylight/unimgr/mef/nrp/common/ServicePort.java
impl/src/main/java/org/opendaylight/unimgr/mef/nrp/impl/AbstractNodeHandler.java
impl/src/main/java/org/opendaylight/unimgr/mef/nrp/impl/ActivationTransaction.java
impl/src/main/java/org/opendaylight/unimgr/mef/nrp/impl/ConnectivityServiceIdResourcePool.java
impl/src/main/java/org/opendaylight/unimgr/mef/nrp/impl/connectivityservice/DeleteConnectivityAction.java
impl/src/main/java/org/opendaylight/unimgr/mef/nrp/impl/connectivityservice/GetConnectivityDetailsAction.java
impl/src/main/java/org/opendaylight/unimgr/mef/nrp/impl/connectivityservice/TapiConnectivityServiceImpl.java
impl/src/main/java/org/opendaylight/unimgr/mef/nrp/impl/decomposer/BasicDecomposer.java
impl/src/main/java/org/opendaylight/unimgr/mef/nrp/impl/decomposer/DecompositionAction.java
impl/src/main/java/org/opendaylight/unimgr/mef/nrp/impl/ext/UnimgrExtServiceImpl.java
impl/src/main/java/org/opendaylight/unimgr/utils/CapabilitiesService.java
impl/src/main/java/org/opendaylight/unimgr/utils/MdsalUtils.java
impl/src/main/java/org/opendaylight/unimgr/utils/NetconfConstants.java
impl/src/main/java/org/opendaylight/unimgr/utils/NullAwareDatastoreGetter.java
impl/src/main/java/org/opendaylight/unimgr/utils/OvsdbUtils.java
impl/src/main/java/org/opendaylight/unimgr/utils/SipHandler.java
impl/src/main/java/org/opendaylight/unimgr/utils/UniUtils.java
impl/src/test/java/org/opendaylight/unimgr/command/DataTreeModificationHelper.java
impl/src/test/java/org/opendaylight/unimgr/command/EvcAddCommandTest.java
impl/src/test/java/org/opendaylight/unimgr/command/EvcRemoveCommandTest.java
impl/src/test/java/org/opendaylight/unimgr/command/EvcUpdateCommandTest.java
impl/src/test/java/org/opendaylight/unimgr/command/UniUpdateCommandTest.java
impl/src/test/java/org/opendaylight/unimgr/mef/nrp/impl/AbstractNodeHandlerTest.java
impl/src/test/java/org/opendaylight/unimgr/mef/nrp/impl/AbstractTestWithTopo.java
impl/src/test/java/org/opendaylight/unimgr/mef/nrp/impl/ActivationDriverRepoServiceImplTest.java
impl/src/test/java/org/opendaylight/unimgr/mef/nrp/impl/connectivityservice/TapiConnectivityServiceImplTest.java
impl/src/test/java/org/opendaylight/unimgr/mef/nrp/impl/connectivityservice/TapiConnectivityServiceInplIntTest.java
impl/src/test/java/org/opendaylight/unimgr/mef/nrp/impl/ext/UnimgrExtServiceImplTest.java
impl/src/test/java/org/opendaylight/unimgr/utils/ActivationDriverMocks.java
impl/src/test/java/org/opendaylight/unimgr/utils/EvcUtilsTest.java
impl/src/test/java/org/opendaylight/unimgr/utils/MdsalUtilsTest.java
impl/src/test/java/org/opendaylight/unimgr/utils/OvsdbUtilsTest.java
impl/src/test/java/org/opendaylight/unimgr/utils/UniUtilsTest.java

index 5ba63ddaf8ca7eb800ea993685f042d15d001b35..970964f6372c7d7a3503c04997c11d6735483361 100755 (executable)
@@ -145,7 +145,7 @@ public class UnimgrMapper {
 
     /**
      * Generates an Instance Identifier for a specific OVSDB node by
-     * using the node Id
+     * using the node Id.
      * @param nodeId The node ID of a specific OVSDB node.
      * @return An Instance Identifier for a specific OVSDB node.
      */
@@ -295,7 +295,7 @@ public class UnimgrMapper {
 
     /**
      * Generates an Instance Identifier for a specific UNI node by
-     * using the node Id
+     * using the node Id.
      * @param nodeId The node ID of a specific UNI node.
      * @return An Instance Identifier for a specific UNI node.
      */
index 49f989a75307631dddd769babed09f756cd20585..0ac4240d57b91cddd12d3a0d9143d69e3264af27 100644 (file)
@@ -27,6 +27,7 @@ public interface ActivationDriverBuilder {
      * @return {@link Optional#empty()} in case it cannot be instantiated for a port, driver otherwise
      */
     Optional<ActivationDriver> driverFor(BuilderContext context);
+
     Uuid getNodeUuid();
 
     /**
index 9cf7a60004f90a2890532b5a1b95d1091ddece89..b3fd21e8b2d26e97fa0827598d595337216282aa 100644 (file)
@@ -18,8 +18,9 @@ import org.opendaylight.yang.gen.v1.urn.mef.yang.tapi.connectivity.rev170712.Con
  */
 public class EndPoint {
     private final ConnectivityServiceEndPoint endpoint;
+
     /**
-     * Optional attributes
+     * Optional attributes.
      * (likely to change to different implementation)
      */
     private final NrpConnectivityServiceEndPointAttrs attrs;
@@ -27,7 +28,7 @@ public class EndPoint {
     private Uuid systemNepUuid;
 
     /**
-     * Initialize endpoint
+     * Initialize endpoint.
      * @param endpoint endpoint data
      * @param attrs associated NRP attributes
      */
@@ -36,18 +37,10 @@ public class EndPoint {
         this.attrs = attrs;
     }
 
-    /**
-     *
-     * @return endpoints
-     */
     public ConnectivityServiceEndPoint getEndpoint() {
         return endpoint;
     }
 
-    /**
-     *
-     * @return attributes
-     */
     public NrpConnectivityServiceEndPointAttrs getAttrs() {
         return attrs;
     }
index 585fc1f1a571363d811bc26f42fb22648b7addd2..fb1a58d896b48b91bec7b3b735cd470740559c42 100644 (file)
@@ -11,13 +11,14 @@ package org.opendaylight.unimgr.mef.nrp.api;
 import java.util.List;
 
 /**
- * Request decomposer is responsible for decomposition of {@link org.opendaylight.yang.gen.v1.urn.mef.yang.tapi.connectivity.rev170712.connectivity.context.ConnectivityService}
+ * Request decomposer is responsible for decomposition of ConnectivityService
  * requests into one or many driver requests.
+ * @see org.opendaylight.yang.gen.v1.urn.mef.yang.tapi.connectivity.rev170712.connectivity.context.ConnectivityService
  * @author bartosz.michalik@amartus.com
  */
 public interface RequestDecomposer {
     /**
-     *
+     * Decompose the provided endpoint connectivity request into a list of sub-requests.
      * @param endpoints list of connectiviy request endpoints
      * @param constraint on decoposition
      * @return list of subrequests - one per driver
index a0be5d6799c64ecd9c9fac9b56f199f3916c96bc..264a93649d428561f38f63e7aeedb9a167a248dc 100644 (file)
@@ -75,11 +75,13 @@ public class NrpDao  {
     }
 
     private void verifyTx() {
-        if (tx == null) throw new IllegalStateException("Top perform write operation read write transaction is needed");
+        if (tx == null) {
+            throw new IllegalStateException("Top perform write operation read write transaction is needed");
+        }
     }
 
     /**
-     * Update nep or add if it does not exist
+     * Update nep or add if it does not exist.
      * @param nodeId node id
      * @param nep nep to update
      */
@@ -112,7 +114,7 @@ public class NrpDao  {
     public void addSip(ServiceInterfacePoint sip) {
         verifyTx();
         tx.put(LogicalDatastoreType.OPERATIONAL,
-        ctx().child(ServiceInterfacePoint.class, new ServiceInterfacePointKey(sip.getUuid())),
+            ctx().child(ServiceInterfacePoint.class, new ServiceInterfacePointKey(sip.getUuid())),
                 sip);
     }
 
@@ -165,7 +167,9 @@ public class NrpDao  {
 
     public void removeSips(Stream<Uuid>  uuids) {
         verifyTx();
-        if (uuids == null) return ;
+        if (uuids == null) {
+            return;
+        }
         uuids.forEach(sip -> {
             LOG.debug("removing ServiceInterfacePoint with id {}", sip);
             tx.delete(LogicalDatastoreType.OPERATIONAL, ctx().child(ServiceInterfacePoint.class, new ServiceInterfacePointKey(sip)));
@@ -178,8 +182,9 @@ public class NrpDao  {
             try {
                 Optional<Node> opt = tx.read(LogicalDatastoreType.OPERATIONAL, node(nodeId)).checkedGet();
                 if (opt.isPresent()) {
-                    removeSips(opt.get().getOwnedNodeEdgePoint().stream().flatMap(nep -> nep.getMappedServiceInterfacePoint() == null ?
-                            Stream.empty() : nep.getMappedServiceInterfacePoint().stream()
+                    removeSips(opt.get().getOwnedNodeEdgePoint().stream().flatMap(nep -> nep.getMappedServiceInterfacePoint() == null
+                                                                                  ? Stream.empty()
+                                                                                  : nep.getMappedServiceInterfacePoint().stream()
                     ));
                 }
             } catch (ReadFailedException e) {
index dfe21d22a2b18b4256f44eb9b63c9c6d64e7b550..2e8b3e26a4ce05a1542bd974c9a80edd81fb99ad 100644 (file)
@@ -20,12 +20,14 @@ import java.util.List;
 public interface ResourceActivator {
 
     /**
+     * Activate connectivity betwee the provided endpoints.
      * @param endPoints list of endpoint to connect
      * @param serviceName generated service id
      */
     void activate(List<EndPoint> endPoints, String serviceName) throws  ResourceActivatorException, TransactionCommitFailedException;
 
     /**
+     * Deactivate connectivity between the provided endpoints.
      * @param endPoints list of endpoint between which connection have to be deactivated
      * @param serviceName generated service id
      */
index 31d6d8cf36f7d7ba6699b5be3bb58a773b5510f7..32d8742ffff2f111d7b44341587904b6b84e551f 100644 (file)
@@ -7,21 +7,19 @@
  */
 package org.opendaylight.unimgr.mef.nrp.common;
 
-public class ResourceActivatorException extends Exception{
+public class ResourceActivatorException extends Exception {
 
-       private static final long serialVersionUID = 4242336212297338778L;
+    private static final long serialVersionUID = 4242336212297338778L;
 
-       public ResourceActivatorException() {
-               super();
-       }
-
-       public ResourceActivatorException(String message) {
-               super(message);
-       }
-
-       public ResourceActivatorException(String message, Throwable cause) {
-               super(message, cause);
-       }
+    public ResourceActivatorException() {
+        super();
+    }
 
+    public ResourceActivatorException(String message) {
+        super(message);
+    }
 
+    public ResourceActivatorException(String message, Throwable cause) {
+        super(message, cause);
+    }
 }
index de85c4f1d1491d65013fb656808a0f4dd08ba479..a6d1dc1d6390661bd96e3b6e0ab2c545606128ca 100644 (file)
@@ -19,7 +19,7 @@ public interface ServiceNaming {
      * @param id unique allocated id
      * @return String name
      */
-    public String getOuterName(String id);
+    String getOuterName(String id);
 
     /**
      * Return a resource name composed to include the provided id.
@@ -27,5 +27,5 @@ public interface ServiceNaming {
      * @param id unique allocated id
      * @return String name
      */
-    public String getInnerName(String id);
+    String getInnerName(String id);
 }
index 2dd34a7950789e1b4ffc9fab981b6d8074ab5ed0..0a99d7b68e1b4e8f91d1faa735712987eafd48b6 100644 (file)
@@ -19,7 +19,7 @@ import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.
 import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.TpId;
 
 /**
- * Class representing port (replacement for FcPort)
+ * Class representing port (replacement for FcPort).
  *
  * @author marek.ryznar@amartus.com
  */
@@ -35,7 +35,7 @@ public class ServicePort {
     //defines port
     private TpId tpId;
     //defines cTag VLAN ID
-    private Long vlanId=null;
+    private Long vlanId = null;
 
     public ServicePort(TopologyId topoId, NodeId nodeId, TpId tpId) {
         this.topoId = topoId;
@@ -88,12 +88,12 @@ public class ServicePort {
     }
 
     public static boolean hasVlan(EndPoint endPoint) {
-        if ( (endPoint.getAttrs() != null)
-                && (endPoint.getAttrs().getNrpCarrierEthConnectivityEndPointResource() != null) ) {
+        if ((endPoint.getAttrs() != null)
+                && (endPoint.getAttrs().getNrpCarrierEthConnectivityEndPointResource() != null)) {
             NrpCarrierEthConnectivityEndPointResource attr =
                     endPoint.getAttrs().getNrpCarrierEthConnectivityEndPointResource();
-            if ( (attr.getCeVlanIdListAndUntag() != null)
-                    && !(attr.getCeVlanIdListAndUntag().getVlanId().isEmpty()) ) {
+            if ((attr.getCeVlanIdListAndUntag() != null)
+                    && !(attr.getCeVlanIdListAndUntag().getVlanId().isEmpty())) {
                 return true;
             } else {
                 return false;
index 8a4070bc3026b77ff0243c669f22eeecb5d5c2b5..a8807f721eaea11a16e1dad731fda19d8c1f878e 100644 (file)
@@ -63,7 +63,7 @@ public class AbstractNodeHandler implements DataTreeChangeListener<Topology> {
     }
 
     public void close() {
-        if (registration!=null) {
+        if (registration != null) {
             registration.close();
         }
     }
@@ -117,9 +117,11 @@ public class AbstractNodeHandler implements DataTreeChangeListener<Topology> {
         OwnedNodeEdgePoint a = (OwnedNodeEdgePoint) dataObjectModificationNep.getDataAfter();
 
         if (b != null) {
-            if (a == null) return true;
+            if (a == null) {
+                return true;
+            }
             if (hasSip(b)) {
-              return ! hasSip(a);
+                return ! hasSip(a);
             }
         }
 
@@ -129,7 +131,9 @@ public class AbstractNodeHandler implements DataTreeChangeListener<Topology> {
     private boolean checkIfUpdated(DataObjectModification dataObjectModificationNep) {
         OwnedNodeEdgePoint before = (OwnedNodeEdgePoint) dataObjectModificationNep.getDataBefore();
         OwnedNodeEdgePoint after = (OwnedNodeEdgePoint) dataObjectModificationNep.getDataAfter();
-        if (after == null) return false;
+        if (after == null) {
+            return false;
+        }
         //added
         if (before == null) {
             return hasSip(after);
index 1ca10670178e5293a3469310ea675cb31c2e15ca..3f559d5534af0be5c75f54f882b8b835550bc292 100644 (file)
@@ -37,7 +37,9 @@ public class ActivationTransaction {
      * @return result
      */
     public Result activate() {
-        if (drivers.isEmpty()) throw new IllegalStateException("at least one driver required");
+        if (drivers.isEmpty()) {
+            throw new IllegalStateException("at least one driver required");
+        }
         sortDrivers();
         try {
             for (ActivationDriver d: drivers) {
@@ -61,7 +63,9 @@ public class ActivationTransaction {
      * @return result
      */
     public Result deactivate() {
-        if (drivers.isEmpty()) throw new IllegalStateException("at least one driver required");
+        if (drivers.isEmpty()) {
+            throw new IllegalStateException("at least one driver required");
+        }
         sortDrivers();
         try {
             for (ActivationDriver d: drivers) {
index d862a9c6c497ef520acf2189f4377d5e3c0f3f4a..b1209379c28c32ac5280098d12568a32cac09a6a 100644 (file)
@@ -12,7 +12,7 @@ import java.text.MessageFormat;
 import java.util.Random;
 
 /**
- * Dummy resource pool
+ * Dummy resource pool.
  * @author bartosz.michalik@amartus.com
  */
 public class ConnectivityServiceIdResourcePool {
index 8e86bcbfe344c0c2129e2c0786eaeca8f180945c..c4782662b01f3da12a9ace31aa1728006352273e 100644 (file)
@@ -78,7 +78,7 @@ public class DeleteConnectivityAction implements Callable<RpcResult<DeleteConnec
         Map<Uuid, LinkedList<EndPoint>> data = null;
         try {
             data = prepareData(cs, nrpDao);
-        } catch(Exception e) {
+        } catch (Exception e) {
             LOG.info("Service {} does not exists", input.getServiceIdOrName());
             return RpcResultBuilder
                     .<DeleteConnectivityServiceOutput>failed()
@@ -107,7 +107,7 @@ public class DeleteConnectivityAction implements Callable<RpcResult<DeleteConnec
                 }
             }
             throw new IllegalStateException("no transaction created for delete connectivity request");
-        } catch(Exception e) {
+        } catch (Exception e) {
             LOG.warn("Exception in create connectivity service", e);
             return RpcResultBuilder
                     .<DeleteConnectivityServiceOutput>failed()
index e58355677448b6be5635909c4b58caa305c26d64..ad56872733cda6dee8c89e63453f3adc07708b69 100644 (file)
@@ -22,7 +22,7 @@ import org.opendaylight.yangtools.yang.common.RpcError.ErrorType;
 import org.opendaylight.yangtools.yang.common.RpcResult;
 import org.opendaylight.yangtools.yang.common.RpcResultBuilder;
 
-public class GetConnectivityDetailsAction implements Callable<RpcResult<GetConnectivityServiceDetailsOutput>>{
+public class GetConnectivityDetailsAction implements Callable<RpcResult<GetConnectivityServiceDetailsOutput>> {
 
     private final TapiConnectivityServiceImpl service;
     private final GetConnectivityServiceDetailsInput input;
index 1c5b9bf35a4324a6369b540051b1f628feba543b..b8573ef3b52b42b5860a4d78e322af47b76a679d 100644 (file)
@@ -55,7 +55,7 @@ public class TapiConnectivityServiceImpl implements TapiConnectivityService, Aut
             30, TimeUnit.MINUTES,
             new LinkedBlockingQueue<>());
 
-    final static  InstanceIdentifier<Context1> connectivityCtx = NrpDao.ctx().augmentation(Context1.class);
+    final static InstanceIdentifier<Context1> connectivityCtx = NrpDao.ctx().augmentation(Context1.class);
 
 
     public void init() {
index e9cc07fa4aec81826282653f28bb5f448cf12a7a..77b778a4b50686641c4053ab97496cd9cafed4da 100644 (file)
@@ -20,7 +20,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 /**
- * Basic graph based request decomposer
+ * Basic graph based request decomposer.
  * @author bartosz.michalik@amartus.com
  *
  */
@@ -35,7 +35,7 @@ public class BasicDecomposer implements RequestDecomposer {
     }
 
     /**
-     * We currently support only one-to-one mapping between nep and sip
+     * We currently support only one-to-one mapping between nep and sip.
      * @param endpoints
      * @param constraint
      * @return
index b31fb1a736fb47a13cea0a1ae8a2c2415d6880d7..073f232a4c8773908ee9f5c722c847d68e29f5af 100644 (file)
@@ -47,7 +47,9 @@ public class DecompositionAction {
     public DecompositionAction(List<EndPoint> endpoints, DataBroker broker) {
         Objects.requireNonNull(endpoints);
         Objects.requireNonNull(broker);
-        if (endpoints.size() < 2) throw new IllegalArgumentException("there should be at least two endpoints defined");
+        if (endpoints.size() < 2) {
+            throw new IllegalArgumentException("there should be at least two endpoints defined");
+        }
         this.endpoints = endpoints;
         this.broker = broker;
     }
@@ -59,16 +61,20 @@ public class DecompositionAction {
 
         assert vertexes.size() > 1;
 
-        if (vertexes.size() > 2) throw new IllegalStateException("currently only point to point is supported");
+        if (vertexes.size() > 2) {
+            throw new IllegalStateException("currently only point to point is supported");
+        }
 
         GraphPath<Vertex, DefaultEdge> path = DijkstraShortestPath.findPathBetween(graph, vertexes.get(0), vertexes.get(1));
 
-        if (path == null) return null;
+        if (path == null) {
+            return null;
+        }
 
         return path.getVertexList().stream().collect(Collectors.groupingBy(v -> v.getNodeUuid()))
                 .entrySet().stream().map(e -> {
                     return new Subrequrest(e.getKey(), e.getValue().stream().map(v -> toEndPoint(v)).collect(Collectors.toList()));
-        }).collect(Collectors.toList());
+                }).collect(Collectors.toList());
     }
 
     private EndPoint toEndPoint(Vertex v) {
@@ -130,7 +136,9 @@ public class DecompositionAction {
             if (sips == null || sips.isEmpty()) {
                 return  new Vertex(nodeUuid, nep.getUuid(), null);
             }
-            if (sips.size() > 1) LOG.warn("NodeEdgePoint {} have multiple ServiceInterfacePoint mapped, selecting first one", nep.getUuid());
+            if (sips.size() > 1) {
+                LOG.warn("NodeEdgePoint {} have multiple ServiceInterfacePoint mapped, selecting first one", nep.getUuid());
+            }
             return new Vertex(nodeUuid, nep.getUuid(), sips.get(0));
 
         });
@@ -164,8 +172,12 @@ public class DecompositionAction {
 
         @Override
         public boolean equals(Object o) {
-            if (this == o) return true;
-            if (o == null || getClass() != o.getClass()) return false;
+            if (this == o) {
+                return true;
+            }
+            if (o == null || getClass() != o.getClass()) {
+                return false;
+            }
             Vertex vertex = (Vertex) o;
             return Objects.equals(uuid, vertex.uuid);
         }
@@ -177,7 +189,9 @@ public class DecompositionAction {
 
         @Override
         public int compareTo(Vertex o) {
-            if (o == null) return -1;
+            if (o == null) {
+                return -1;
+            }
             return uuid.getValue().compareTo(o.uuid.getValue());
         }
 
index c7cf643ef7c295ef40ba25988f4e310b8c7e1883..f53a92b905b26f438e31864c19dcae7b095701a4 100644 (file)
@@ -79,21 +79,23 @@ public class UnimgrExtServiceImpl implements UnimgrExtService {
                     .child(Node.class, new NodeKey(nodeId))
                     .child(OwnedNodeEdgePoint.class, new OwnedNodeEdgePointKey(nepId))
             ).checkedGet();
-            if (!nep.isPresent()) return withError("NEP with id {0} for node {1} not found", nepId, nodeId);
+            if (!nep.isPresent()) {
+                return withError("NEP with id {0} for node {1} not found", nepId, nodeId);
+            }
 
             Uuid sipId = new Uuid("sip:" + nepId.getValue());
 
             List<Uuid> sips = nep.get().getMappedServiceInterfacePoint();
-            if (sips != null && !sips.isEmpty()) return withError("sip for NEP with id {0} for node {1} already defined", nepId, nodeId);
+            if (sips != null && !sips.isEmpty()) {
+                return withError("sip for NEP with id {0} for node {1} already defined", nepId, nodeId);
+            }
 
             NrpDao nrpDao = new NrpDao(tx);
 
-
             ServiceInterfacePointBuilder sipBuilder = new ServiceInterfacePointBuilder()
                     .setUuid(sipId)
                     .setLayerProtocol(Collections.singletonList(getLayerProtocol(sipType)));
 
-
             nrpDao.addSip(
                 sipBuilder
                     .build());
@@ -120,18 +122,24 @@ public class UnimgrExtServiceImpl implements UnimgrExtService {
 
         if (sipType instanceof InniSpec) {
             org.opendaylight.yang.gen.v1.urn.odl.unimgr.yang.unimgr.ext.rev700101.add.sip.input.sip.type.inni.spec.InniSpec spec = ((InniSpec) sipType).getInniSpec();
-            if (spec != null) lp = new LayerProtocol1Builder()
+            if (spec != null) {
+                lp = new LayerProtocol1Builder()
                     .setNrpCarrierEthInniNResource(new NrpCarrierEthInniNResourceBuilder(spec).build()).build();
+            }
 
         } else if (sipType instanceof EnniSpec) {
             org.opendaylight.yang.gen.v1.urn.odl.unimgr.yang.unimgr.ext.rev700101.add.sip.input.sip.type.enni.spec.EnniSpec spec = ((EnniSpec) sipType).getEnniSpec();
-            if (spec != null) lp = new LayerProtocol1Builder()
+            if (spec != null) {
+                lp = new LayerProtocol1Builder()
                     .setNrpCarrierEthEnniNResource(new NrpCarrierEthEnniNResourceBuilder(spec).build()).build();
+            }
 
         } else if (sipType instanceof UniSpec) {
             org.opendaylight.yang.gen.v1.urn.odl.unimgr.yang.unimgr.ext.rev700101.add.sip.input.sip.type.uni.spec.UniSpec spec = ((UniSpec) sipType).getUniSpec();
-            if (spec != null) lp = new LayerProtocol1Builder()
+            if (spec != null) {
+                lp = new LayerProtocol1Builder()
                     .setNrpCarrierEthUniNResource(new NrpCarrierEthUniNResourceBuilder(spec).build()).build();
+            }
         }
 
         lpBuilder.addAugmentation(LayerProtocol1.class, lp);
@@ -146,7 +154,7 @@ public class UnimgrExtServiceImpl implements UnimgrExtService {
         RpcResultBuilder<Void> failed = RpcResultBuilder.<Void>failed();
         if (error != null) {
             if (params.length > 0) {
-               error = MessageFormat.format(error, params);
+                error = MessageFormat.format(error, params);
             }
             failed.withError(RpcError.ErrorType.APPLICATION, error);
         }
index 677c64c5d399eb26b4148fbe11ae627dc23be104..78ef6d684cb1d345a16e56cf4b10d9de4b4d4b4c 100644 (file)
@@ -68,9 +68,15 @@ public class CapabilitiesService {
 
             private static boolean checkForNetconfCapability(Node node, String netconf_capability) {
                 NetconfNode netconf = node.getAugmentation(NetconfNode.class);
-                if (netconf == null) return false;
-                if (netconf.getAvailableCapabilities() == null) return false;
-                if (netconf.getAvailableCapabilities().getAvailableCapability() == null) return false;
+                if (netconf == null) {
+                    return false;
+                }
+                if (netconf.getAvailableCapabilities() == null) {
+                    return false;
+                }
+                if (netconf.getAvailableCapabilities().getAvailableCapability() == null) {
+                    return false;
+                }
 
                 return netconf
                         .getAvailableCapabilities()
@@ -106,7 +112,7 @@ public class CapabilitiesService {
 
             for (Capability capability : capabilities) {
                 boolean isSupporting = isSupporting(capability);
-                result = (mode == Capability.Mode.AND ? result && isSupporting: result || isSupporting);
+                result = (mode == Capability.Mode.AND ? result && isSupporting : result || isSupporting);
 
                 if (result ^ (mode == Capability.Mode.AND)) {
                     break;
@@ -155,4 +161,4 @@ public class CapabilitiesService {
     private <T> boolean checkCondition(Capability<T> capability, T data) {
         return capability.getCondition().apply(dataBroker, data);
     }
-}
\ No newline at end of file
+}
index 43e28ab2188a7fdbe12931d4eb85458dd8433124..14c21a35180592b569ed5ff7c3ab93bfe3a99a34 100644 (file)
@@ -74,7 +74,7 @@ public class MdsalUtils {
     }
 
     /**
-     * Read a specific datastore type and return a optional of DataObject
+     * Read a specific datastore type and return a optional of DataObject.
      * @param dataBroker The dataBroker instance to create transactions
      * @param store The store type to query
      * @param path The generic path to query
@@ -142,7 +142,7 @@ public class MdsalUtils {
     }
 
     /**
-     * Generic function to delete a node on a specific dataStore
+     * Generic function to delete a node on a specific dataStore.
      * @param dataBroker The instance of the data broker to create transactions.
      * @param genericNode The instance identifier of a generic node
      * @param store The dataStore where to send and submit the delete call.
@@ -164,7 +164,7 @@ public class MdsalUtils {
     }
 
     /**
-     * Read a specific Link from a specific datastore
+     * Read a specific Link from a specific datastore.
      * @param dataBroker The dataBroker instance to create transactions
      * @param store The datastore type.
      * @param genericNode The Instance Identifier of the Link
@@ -185,7 +185,7 @@ public class MdsalUtils {
     }
 
     /**
-     * Read a specific Link from a specific datastore
+     * Read a specific Link from a specific datastore.
      * @param dataBroker The dataBroker instance to create transactions
      * @param store The datastore type.
      * @param topologyName The topology name.
@@ -211,7 +211,7 @@ public class MdsalUtils {
     }
 
     /**
-     * Read a TerminationPoint from datastore used in given FcPort
+     * Read a TerminationPoint from datastore used in given FcPort.
      * @param dataBroker The dataBroker instance to create transactions
      * @param store The datastore type.
      * @param port FcPort data
index 59013678ba82834fc04e4f67d657868eda765304..bea1403aa02e08bfd32ad6a3e4a37d6c03586f81 100644 (file)
@@ -9,7 +9,13 @@ package org.opendaylight.unimgr.utils;
 
 
 public interface NetconfConstants {
-    final String CAPABILITY_IOX_L2VPN = "(http://cisco.com/ns/yang/Cisco-IOS-XR-l2vpn-cfg?revision=2015-11-09)Cisco-IOS-XR-l2vpn-cfg";
-    final String CAPABILITY_IOX_IFMGR = "(http://cisco.com/ns/yang/Cisco-IOS-XR-ifmgr-cfg?revision=2015-07-30)Cisco-IOS-XR-ifmgr-cfg";
-    final String CAPABILITY_IOX_ASR9K_POLICYMGR = "(http://cisco.com/ns/yang/Cisco-IOS-XR-asr9k-policymgr-cfg?revision=2015-05-18)Cisco-IOS-XR-asr9k-policymgr-cfg";
+
+    String CAPABILITY_IOX_L2VPN =
+        "(http://cisco.com/ns/yang/Cisco-IOS-XR-l2vpn-cfg?revision=2015-11-09)Cisco-IOS-XR-l2vpn-cfg";
+
+    String CAPABILITY_IOX_IFMGR =
+        "(http://cisco.com/ns/yang/Cisco-IOS-XR-ifmgr-cfg?revision=2015-07-30)Cisco-IOS-XR-ifmgr-cfg";
+
+    String CAPABILITY_IOX_ASR9K_POLICYMGR =
+        "(http://cisco.com/ns/yang/Cisco-IOS-XR-asr9k-policymgr-cfg?revision=2015-05-18)Cisco-IOS-XR-asr9k-policymgr-cfg";
 }
index fa2d3ea2429383afb954d1f6b6c46536b475cc1b..e4ac709b136900f96d1cc9f3269e95df6a46dd01 100644 (file)
@@ -73,7 +73,7 @@ public class NullAwareDatastoreGetter<T> {
         return dataOptional;
     }
 
-    private void logDataOptionalStatus(Function <?, ?> function) {
+    private void logDataOptionalStatus(Function<?, ?> function) {
         if (dataOptional.isPresent()) {
             LOG.trace("Before collection of: " + function.toString() + ", currently collected data is non-null: " + dataOptional.get().toString());
         } else {
index 3e83d55563c8b381141a7117d9d6846d87a7a836..f35089852d7ca73e0bd6a395750808bb76238251 100644 (file)
@@ -250,7 +250,7 @@ public class OvsdbUtils {
     }
 
     /**
-     * Creates a Bridge Augmentation by using a UNI
+     * Creates a Bridge Augmentation by using a UNI.
      * @param uni Contains data used to create the augmentation
      * @return A Built OvsdbBridgeAugmentation with data.
      * @throws Exception if the Ovsdb Node Reference cannot be found.
index 4788f4f9215b89db90defd531a471150c4297919..8bab2f1d27dcf3a6421c92f79124daa275126229 100644 (file)
@@ -16,12 +16,12 @@ public class SipHandler {
 
     public static String getDeviceName(Uuid sip) {
         String[] sipTab = sip.getValue().split(":");
-        return sipTab[sipTab.length-2];
+        return sipTab[sipTab.length - 2];
     }
 
     public static String getPortName(Uuid sip) {
         String[] sipTab = sip.getValue().split(":");
-        return sipTab[sipTab.length-1];
+        return sipTab[sipTab.length - 1];
     }
 
     public static boolean isTheSameDevice(Uuid sip1, Uuid sip2) {
index e7e51d46c34cf432e65692c0a2830ac7369f6d7b..a33d2789ed1f07daf00faf0710cb742504d8ab54 100644 (file)
@@ -132,7 +132,7 @@ public class UniUtils {
     }
 
     /**
-     * Retrieve a list of Uni Nodes on a specific DataStore
+     * Retrieve a list of Uni Nodes on a specific DataStore.
      * @param dataBroker The dataBroker instance to create transactions
      * @param store The store to which to send the read request
      * @return A List of UNI Nodes.
@@ -156,7 +156,7 @@ public class UniUtils {
     }
 
     /**
-     * Retrieve a list of Unis on a specific DataStore
+     * Retrieve a list of Unis on a specific DataStore.
      * @param dataBroker instance to create transactions
      * @param store to which send the read request
      * @return A List of Unis.
@@ -180,7 +180,7 @@ public class UniUtils {
     }
 
     /**
-     * Retrieve a list of Unis on a specific DataStore
+     * Retrieve a list of Unis on a specific DataStore.
      * @param dataBroker instance to create transactions
      * @param store to which send the read request
      * @param ipAddress of the required Uni
index b0e97138bc5fa8c7b53ed6268efa94e3f88fb9e0..eaf88a4156de6e3cd2a98635b071b8e356a879b9 100644 (file)
@@ -33,12 +33,12 @@ import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier.PathArgument;
 
 /**
- * DataTreeModificationHelper help to get a dummy value of DataTreeModification object as DataTreeModification 
+ * DataTreeModificationHelper help to get a dummy value of DataTreeModification object as DataTreeModification
  * class is a final class.
  */
 public final class DataTreeModificationHelper {
 
-    public static final DataTreeModification<Node> getUniNode(final Node node) {
+    public static DataTreeModification<Node> getUniNode(final Node node) {
         final DataTreeIdentifier<Node> uniDataTreeIid = new DataTreeIdentifier<>(LogicalDatastoreType.CONFIGURATION, getUniIid("10.10.1.3"));
         final DataObjectModification<Node> uniDataTreeObj = new DataObjectModification<Node>() {
             @Override
@@ -46,52 +46,62 @@ public final class DataTreeModificationHelper {
                 // TODO Auto-generated method stub
                 return null;
             }
+
             @Override
             public <C extends Identifiable<K> & ChildOf<? super Node>, K extends Identifier<C>> DataObjectModification<C> getModifiedChildListItem(
                     Class<C> arg0, K arg1) {
                 // TODO Auto-generated method stub
                 return null;
             }
+
             @Override
             public <C extends ChildOf<? super Node>> DataObjectModification<C> getModifiedChildContainer(Class<C> arg0) {
                 // TODO Auto-generated method stub
                 return null;
             }
+
             @Override
             public DataObjectModification<? extends DataObject> getModifiedChild(PathArgument arg0) {
                 // TODO Auto-generated method stub
                 return null;
             }
+
             @Override
             public <C extends Augmentation<Node> & DataObject> DataObjectModification<C> getModifiedAugmentation(
                     Class<C> arg0) {
                 // TODO Auto-generated method stub
                 return null;
             }
+
             @Override
             public ModificationType getModificationType() {
                 // TODO Auto-generated method stub
                 return null;
             }
+
             @Override
             public PathArgument getIdentifier() {
                 // TODO Auto-generated method stub
                 return null;
             }
+
             @Override
             public Class<Node> getDataType() {
                 // TODO Auto-generated method stub
                 return null;
             }
+
             @Override
             public Node getDataBefore() {
                 return node;
             }
+
             @Override
             public Node getDataAfter() {
                 return node;
             }
         };
+
         DataTreeModification<Node> uniNode = new DataTreeModification<Node>() {
             @Override
             public DataTreeIdentifier<Node> getRootPath() {
@@ -105,7 +115,7 @@ public final class DataTreeModificationHelper {
         return uniNode;
     }
 
-    private static final InstanceIdentifier<Node> getUniIid(String nodeId) {
+    private static InstanceIdentifier<Node> getUniIid(String nodeId) {
         NodeId uniNodeId = new NodeId(new NodeId(nodeId));
         InstanceIdentifier<Node> uniNodeIid = InstanceIdentifier
                 .create(NetworkTopology.class)
@@ -114,60 +124,71 @@ public final class DataTreeModificationHelper {
         return uniNodeIid;
     }
 
-    public static final DataTreeModification<Link> getEvcLink(final Link link) {
+    public static DataTreeModification<Link> getEvcLink(final Link link) {
         final DataTreeIdentifier<Link> evcDataTreeIid = new DataTreeIdentifier<>(LogicalDatastoreType.CONFIGURATION, getEvcLinkIid("1"));
         final DataObjectModification<Link> evcDataTreeObj = new DataObjectModification<Link>() {
+
             @Override
             public Collection<DataObjectModification<? extends DataObject>> getModifiedChildren() {
                 // TODO Auto-generated method stub
                 return null;
             }
+
             @Override
             public <C extends Identifiable<K> & ChildOf<? super Link>, K extends Identifier<C>> DataObjectModification<C> getModifiedChildListItem(
                     Class<C> arg0, K arg1) {
                 // TODO Auto-generated method stub
                 return null;
             }
+
             @Override
             public <C extends ChildOf<? super Link>> DataObjectModification<C> getModifiedChildContainer(Class<C> arg0) {
                 // TODO Auto-generated method stub
                 return null;
             }
+
             @Override
             public DataObjectModification<? extends DataObject> getModifiedChild(PathArgument arg0) {
                 // TODO Auto-generated method stub
                 return null;
             }
+
             @Override
             public <C extends Augmentation<Link> & DataObject> DataObjectModification<C> getModifiedAugmentation(
                     Class<C> arg0) {
                 // TODO Auto-generated method stub
                 return null;
             }
+
             @Override
             public ModificationType getModificationType() {
                 // TODO Auto-generated method stub
                 return null;
             }
+
             @Override
             public PathArgument getIdentifier() {
                 // TODO Auto-generated method stub
                 return null;
             }
+
             @Override
             public Class<Link> getDataType() {
                 // TODO Auto-generated method stub
                 return null;
             }
+
             @Override
             public Link getDataBefore() {
                 return link;
             }
+
             @Override
             public Link getDataAfter() {
                 return link;
             }
         };
+
         DataTreeModification<Link> evcLink = new DataTreeModification<Link>() {
             @Override
             public DataTreeIdentifier<Link> getRootPath() {
index 3c444eeab19d89cadc091e2ef08ee232e6a76def..032b9a3d8cb7c3dae576f20b49dcf23e5e6e5420 100644 (file)
@@ -126,7 +126,7 @@ public class EvcAddCommandTest {
         PowerMockito.doNothing().when(OvsdbUtils.class, "createGreTunnel", dataBroker, uniAugmentation,
                 uniAugmentation, node, UnimgrConstants.DEFAULT_BRIDGE_NAME, UnimgrConstants.DEFAULT_GRE_TUNNEL_NAME);
         when(OvsdbUtils.createOvsdbNode(any(DataBroker.class), any(UniAugmentation.class)))
-        .thenReturn(node);
+            .thenReturn(node);
         when(UnimgrMapper.getOvsdbNodeIid(any(NodeId.class))).thenReturn(evcKey);
         when(UnimgrMapper.getUniIid(any(DataBroker.class), any(IpAddress.class),
                 any(LogicalDatastoreType.class))).thenReturn(evcKey);
index fac12422452514191f3c14e02cbf66d681528af8..52c09b804cd8ede65cd0f75033495de7a573bddb 100644 (file)
@@ -56,8 +56,9 @@ public class EvcRemoveCommandTest {
         evcLink = DataTreeModificationHelper.getEvcLink(link);
         evcRemoveCommand = new EvcRemoveCommand(dataBroker, evcLink);
     }
+
     /**
-     * Test method for {@link org.opendaylight.unimgr.command.EvcRemoveCommand#execute().
+     * Test method for {@link org.opendaylight.unimgr.command.EvcRemoveCommand#execute()}.
      * @throws Exception
      */
     @SuppressWarnings({ "unchecked", "rawtypes" })
@@ -95,4 +96,4 @@ public class EvcRemoveCommandTest {
                 any(LogicalDatastoreType.class));
     }
 
-}
\ No newline at end of file
+}
index 98db57a7f0bc689909a4e92666065095cff9501b..4ea5b56cf95cf2e1413bb937512d2e55182157d6 100644 (file)
@@ -72,6 +72,7 @@ public class EvcUpdateCommandTest {
         evcLink = DataTreeModificationHelper.getEvcLink(link);
         evcUpdateCommand = new EvcUpdateCommand(dataBroker, evcLink);
     }
+
     /**
      * Test method for {@link org.opendaylight.unimgr.command.EvcUpdateCommand#execute()}.
      * @throws Exception
@@ -155,7 +156,7 @@ public class EvcUpdateCommandTest {
         PowerMockito.doNothing().when(OvsdbUtils.class, "createGreTunnel", dataBroker, uniAugmentation,
                 uniAugmentation, node, UnimgrConstants.DEFAULT_BRIDGE_NAME, UnimgrConstants.DEFAULT_GRE_TUNNEL_NAME);
         when(OvsdbUtils.createOvsdbNode(any(DataBroker.class), any(UniAugmentation.class)))
-        .thenReturn(node);
+            .thenReturn(node);
         when(UnimgrMapper.getOvsdbBridgeNodeIid(any(Node.class))).thenReturn(evcKey);
         when(UnimgrMapper.getUniIid(any(DataBroker.class), any(IpAddress.class),
                 any(LogicalDatastoreType.class))).thenReturn(evcKey);
index 6a336ae3f3a24b8f4c2e87065b9766f56a267ed7..cc075ae8965ae3337f07f3787232c44283698ce3 100644 (file)
@@ -113,7 +113,7 @@ public class UniUpdateCommandTest {
         when(MdsalUtils.readNode(any(DataBroker.class), any(LogicalDatastoreType.class),
                 any(InstanceIdentifier.class))).thenReturn(optionalOvsdbNode);
         when(OvsdbUtils.createQoSForOvsdbNode(any(DataBroker.class), any(UniAugmentation.class)))
-        .thenReturn(null);
+            .thenReturn(null);
         when(UniUtils.updateUniNode(any(LogicalDatastoreType.class), any(InstanceIdentifier.class),
                 any(UniAugmentation.class), any(Node.class), any(DataBroker.class))).thenReturn(true);
         when(OvsdbUtils.findOvsdbNode(any(DataBroker.class), any(UniAugmentation.class)))
index afa01070d53745bc3c2043b6d808269b1809dff1..cbc50b947960cf0bc3f1b7f5891cb54579b0efc7 100644 (file)
@@ -107,7 +107,7 @@ public class AbstractNodeHandlerTest extends AbstractTestWithTopo {
         performNrpDaoAction(addNode,null);
 
         //when changing not sip related attribute
-        OwnedNodeEdgePoint toUpdateNep = createNep(testNepName+"1",TerminationDirection.UndefinedOrUnknown);
+        OwnedNodeEdgePoint toUpdateNep = createNep(testNepName + "1", TerminationDirection.UndefinedOrUnknown);
         performNrpDaoAction(update, toUpdateNep);
 
 
@@ -186,14 +186,14 @@ public class AbstractNodeHandlerTest extends AbstractTestWithTopo {
     public void testNepRemoval() {
         //given
         performNrpDaoAction(addNode,null);
-        String nepNameToRemove = testNepName+"0";
+        String nepNameToRemove = testNepName + "0";
 
         //when
         performNrpDaoAction(removeNep,nepNameToRemove);
 
         //then
         Node node = getAbstractNode();
-        assertEquals(init_neps_count-1,node.getOwnedNodeEdgePoint().size());
+        assertEquals(init_neps_count - 1, node.getOwnedNodeEdgePoint().size());
         assertFalse(node.getOwnedNodeEdgePoint().stream()
             .anyMatch(nep -> nep.getUuid().getValue().equals(nepNameToRemove)));
     }
@@ -211,9 +211,9 @@ public class AbstractNodeHandlerTest extends AbstractTestWithTopo {
     }
 
     private List<OwnedNodeEdgePoint> createTestOwnedNodeEdgePointList() {
-        return IntStream.range(0,init_neps_count).
-                mapToObj(i -> createNep(testNepName + i, TerminationDirection.Bidirectional))
-                .collect(Collectors.toList());
+        return IntStream.range(0,init_neps_count)
+            .mapToObj(i -> createNep(testNepName + i, TerminationDirection.Bidirectional))
+            .collect(Collectors.toList());
     }
 
     private OwnedNodeEdgePoint createNep(String nepName, TerminationDirection td) {
@@ -227,7 +227,9 @@ public class AbstractNodeHandlerTest extends AbstractTestWithTopo {
                 .setUuid(uuid);
                 // TODO donaldh .setTerminationDirection(td);
 
-        if (associateSip) builder.setMappedServiceInterfacePoint(Arrays.asList(new Uuid(sipPrefix + nepName)));
+        if (associateSip) {
+            builder.setMappedServiceInterfacePoint(Arrays.asList(new Uuid(sipPrefix + nepName)));
+        }
 
         return builder.build();
     }
@@ -247,4 +249,4 @@ public class AbstractNodeHandlerTest extends AbstractTestWithTopo {
         }
         return null;
     }
-}
\ No newline at end of file
+}
index 4af79eaa166a0acd3598157db73db8294d1b3222..9de848c07acb2858ff0074297d2f42291ec0d36c 100644 (file)
@@ -58,6 +58,7 @@ public abstract class AbstractTestWithTopo extends AbstractDataBrokerTest {
 
         return new EndPoint(ep, null);
     }
+
     protected void l(ReadWriteTransaction tx, String nA, String nepA, String nB, String nepB, OperationalState state) {
         Uuid uuid = new Uuid(nepA + "-" + nepB);
         Link link = new LinkBuilder()
@@ -83,17 +84,18 @@ public abstract class AbstractTestWithTopo extends AbstractDataBrokerTest {
 
     protected Node n(ReadWriteTransaction tx, boolean addSips, String node, String ... endpoints) {
         NrpDao nrpDao = new NrpDao(tx);
-        if (addSips) Arrays.stream(endpoints).map(e -> new ServiceInterfacePointBuilder()
+        if (addSips) {
+            Arrays.stream(endpoints).map(e -> new ServiceInterfacePointBuilder()
                 .setUuid(new Uuid("sip:" + e))
                 .build())
                 .forEach(nrpDao::addSip);
-
+        }
 
         return nrpDao.createSystemNode(node, Arrays.stream(endpoints)
                 .map(e-> {
                     OwnedNodeEdgePointBuilder builder = new OwnedNodeEdgePointBuilder().setUuid(new Uuid(e));
                     if (addSips) {
-                        builder.setMappedServiceInterfacePoint(Collections.singletonList(new Uuid("sip:"+e)));
+                        builder.setMappedServiceInterfacePoint(Collections.singletonList(new Uuid("sip:" + e)));
                     }
                     return builder.build();
                 }).collect(Collectors.toList()));
index 64d6522adb13a47d62f5d19c1931c081e7ed1774..7c62ba846858c63c3839f28ff105092b804cbd31 100644 (file)
@@ -52,7 +52,7 @@ public class ActivationDriverRepoServiceImplTest {
         final Optional<ActivationDriver> driver1 = driverRepo.getDriver(uuid);
         try {
             driverRepo.getDriver(new Uuid("otherDriver"));
-        } catch(ActivationDriverNotFoundException expected) {}
+        } catch (ActivationDriverNotFoundException expected) {}
 
         assertTrue(driver1.isPresent());
     }
index 1df093001d07815c26a81b5a6dcb70aebb8c47d2..b445b20636fe3b7d09b76a40c4261ce8b63a693c 100644 (file)
@@ -191,7 +191,7 @@ public class TapiConnectivityServiceImplTest {
 
     private void configureDecomposerAnswer(Function<List<org.opendaylight.unimgr.mef.nrp.api.EndPoint>, List<Subrequrest>> resp) {
         try {
-        when(decomposer.decompose(any(), any(Constraints.class)))
+            when(decomposer.decompose(any(), any(Constraints.class)))
                 .thenAnswer(a -> {
                     List<org.opendaylight.unimgr.mef.nrp.api.EndPoint> eps = a.getArgumentAt(0, List.class);
                     return resp.apply(eps);
@@ -217,4 +217,4 @@ public class TapiConnectivityServiceImplTest {
         .build();
     }
 
-}
\ No newline at end of file
+}
index 6c1b695c1575a66670f946071b3e376945df5b39..cadd10c9749b66ad36ec8bbe91d0422224152eee 100644 (file)
@@ -140,7 +140,7 @@ public class TapiConnectivityServiceInplIntTest extends AbstractTestWithTopo {
 
         assertEquals(1, connCtx.getConnectivityService().size());
         assertFalse(connCtx.getConnectivityService().get(0).getEndPoint().isEmpty());
-        assertEquals("cs:"+servId, connCtx.getConnectivityService().get(0).getUuid().getValue());
+        assertEquals("cs:" + servId, connCtx.getConnectivityService().get(0).getUuid().getValue());
 
     }
 
index 505f1c2730c204bd0ce11fdc00143ecc64d5cd93..278e01d61a6a06263badcdb6fcce70aec3715e8b 100644 (file)
@@ -96,8 +96,9 @@ public class UnimgrExtServiceImplTest extends AbstractTestWithTopo {
         boolean hasSip = nep.getMappedServiceInterfacePoint().get(0).getValue().equals("sip:" + nepId);
         ServiceInterfacePoint sip = nrpDao.getSip("sip:" + nepId);
         assertTrue(hasSip && sip != null);
-        if (verifySip != null) verifySip.accept(sip);
-
+        if (verifySip != null) {
+            verifySip.accept(sip);
+        }
     }
 
 
@@ -109,7 +110,7 @@ public class UnimgrExtServiceImplTest extends AbstractTestWithTopo {
         return input(nepId, null);
     }
 
-    enum SipType {enni, inni, uni}
+    enum SipType { enni, inni, uni }
 
     private AddSipInput input(String nepId, SipType type) {
 
@@ -117,15 +118,19 @@ public class UnimgrExtServiceImplTest extends AbstractTestWithTopo {
                 .setNepId(new Uuid(nepId))
                 .setNodeId(new Uuid(nodeId));
 
-        if (type == null) return sipBuilder.build();
+        if (type == null) {
+            return sipBuilder.build();
+        }
 
         switch (type) {
-            case uni: sipBuilder.setSipType(
+            case uni:
+                sipBuilder.setSipType(
                     new UniSpecBuilder()
-                        .setUniSpec(new org.opendaylight.yang.gen.v1.urn.odl.unimgr.yang.unimgr.ext.rev700101.add.sip.input.sip.type.uni.spec.UniSpecBuilder().build())
+                    .setUniSpec(new org.opendaylight.yang.gen.v1.urn.odl.unimgr.yang.unimgr.ext.rev700101.add.sip.input.sip.type.uni.spec.UniSpecBuilder().build())
                     .build());
             break;
-            case enni: sipBuilder.setSipType(
+            case enni:
+                sipBuilder.setSipType(
                     new EnniSpecBuilder()
                         .setEnniSpec(
                                 new org.opendaylight.yang.gen.v1.urn.odl.unimgr.yang.unimgr.ext.rev700101.add.sip.input.sip.type.enni.spec.EnniSpecBuilder()
@@ -134,7 +139,8 @@ public class UnimgrExtServiceImplTest extends AbstractTestWithTopo {
                     .build());
             break;
             case inni:
-            default: sipBuilder.setSipType(
+            default:
+                sipBuilder.setSipType(
                     new InniSpecBuilder()
                     .setInniSpec(new org.opendaylight.yang.gen.v1.urn.odl.unimgr.yang.unimgr.ext.rev700101.add.sip.input.sip.type.inni.spec.InniSpecBuilder().build())
                     .build());
@@ -143,4 +149,4 @@ public class UnimgrExtServiceImplTest extends AbstractTestWithTopo {
         return sipBuilder.build();
     }
 
-}
\ No newline at end of file
+}
index 19559a6d9c1ae5b7f71adc8c03e547fb1c1b750f..fc01e2b7288a7edf887357adc4b7de0cb6563bac 100644 (file)
@@ -41,7 +41,9 @@ public class ActivationDriverMocks {
     }
 
 
-    public static Builder builder() { return new Builder();}
+    public static Builder builder() {
+        return new Builder();
+    }
 
     public static class Builder {
         HashMap<Uuid, ActivationDriver> drivers = new HashMap<>();
index f8ed2d09b7f9da0c1901a968f45dfcb672008933..9ab50303a0b296ab51f9f1fa8918a0161980e97d 100644 (file)
@@ -166,7 +166,7 @@ public class EvcUtilsTest {
                 .setUniSource(uniSourceList)
                 .build();
         Optional<Link> optionalEvcLink = mock(Optional.class);
-        Link lnk = mock (Link.class);
+        Link lnk = mock(Link.class);
         when(optionalEvcLink.isPresent()).thenReturn(true);
         when(optionalEvcLink.get()).thenReturn(lnk);
         MemberModifier.suppress(MemberMatcher.method(MdsalUtils.class, "readLink", DataBroker.class, LogicalDatastoreType.class, InstanceIdentifier.class));
index 19f5a36e83110149c23c2d8bac6f2b525e661504..e7549b53a6e651c660b9e025425aab20f36d4415 100644 (file)
@@ -103,9 +103,9 @@ public class MdsalUtilsTest {
         verify(mockAppender).doAppend(argThat(new ArgumentMatcher() {
             @Override
             public boolean matches(final Object argument) {
-              return ((LoggingEvent)argument).getFormattedMessage().contains("Received a request to delete node");
+                return ((LoggingEvent)argument).getFormattedMessage().contains("Received a request to delete node");
             }
-          }));
+            }));
     }
 
     @SuppressWarnings("unchecked")
index e24fe2f4d22b65bfadbfb2da0a53f12708e39510..23ddd06c48cd07d365a2d4526b208958ed240530 100644 (file)
@@ -193,7 +193,7 @@ public class OvsdbUtilsTest {
         verify(mockAppender, times(2)).doAppend(argThat(new ArgumentMatcher() {
             @Override
             public boolean matches(final Object argument) {
-              return ((LoggingEvent)argument).getFormattedMessage().contains("Creating a bridge on node");
+                return ((LoggingEvent)argument).getFormattedMessage().contains("Creating a bridge on node");
             }
           }));
     }
@@ -295,7 +295,7 @@ public class OvsdbUtilsTest {
         verify(mockAppender).doAppend(argThat(new ArgumentMatcher() {
             @Override
             public boolean matches(final Object argument) {
-              return ((LoggingEvent)argument).getFormattedMessage().contains("Created and submitted a new OVSDB node");
+                return ((LoggingEvent)argument).getFormattedMessage().contains("Created and submitted a new OVSDB node");
             }
           }));
         doNothing().when(transaction).put(any(LogicalDatastoreType.class),
@@ -313,7 +313,7 @@ public class OvsdbUtilsTest {
         verify(mockAppender).doAppend(argThat(new ArgumentMatcher() {
             @Override
             public boolean matches(final Object argument) {
-              return ((LoggingEvent)argument).getFormattedMessage().contains("Created and submitted a new OVSDB node");
+                return ((LoggingEvent)argument).getFormattedMessage().contains("Created and submitted a new OVSDB node");
             }
           }));
         // createOvsdbNode with Uni
index 513dbed203d7b93558cc89cd1eccc9035dd67609..98e1a7e390a683db3ba4960b0d9f84139abd43a4 100644 (file)
@@ -111,7 +111,7 @@ public class UniUtilsTest {
         verify(mockAppender).doAppend(argThat(new ArgumentMatcher() {
             @Override
             public boolean matches(final Object argument) {
-              return ((LoggingEvent)argument).getFormattedMessage().contains("Exception while creating Uni Node");
+                return ((LoggingEvent)argument).getFormattedMessage().contains("Exception while creating Uni Node");
             }
           }));
         MemberModifier.suppress(MemberMatcher.method(UnimgrMapper.class, "getUniNodeIid", NodeId.class));
@@ -126,7 +126,7 @@ public class UniUtilsTest {
         verify(mockAppender).doAppend(argThat(new ArgumentMatcher() {
             @Override
             public boolean matches(final Object argument) {
-              return ((LoggingEvent)argument).getFormattedMessage().contains("Created and submitted a new Uni");
+                return ((LoggingEvent)argument).getFormattedMessage().contains("Created and submitted a new Uni");
             }
           }));
     }
@@ -163,7 +163,7 @@ public class UniUtilsTest {
         Node node = mock(Node.class);
         List<Node> ndList = new ArrayList<Node>();
         ndList.add(node);
-        Topology topology = mock (Topology.class);
+        Topology topology = mock(Topology.class);
         DataBroker dataBroker = mock(DataBroker.class);
         UniAugmentation uniAugmentation = mock(UniAugmentation.class);
         InstanceIdentifier<Topology> topologyInstanceIdentifier = mock(InstanceIdentifier.class);
@@ -184,7 +184,7 @@ public class UniUtilsTest {
         Node node = mock(Node.class);
         List<Node> ndList = new ArrayList<Node>();
         ndList.add(node);
-        Topology topology = mock (Topology.class);
+        Topology topology = mock(Topology.class);
         DataBroker dataBroker = mock(DataBroker.class);
         UniAugmentation uniAugmentation = mock(UniAugmentation.class);
         InstanceIdentifier<Topology> topologyInstanceIdentifier = mock(InstanceIdentifier.class);
@@ -205,7 +205,7 @@ public class UniUtilsTest {
         Node node = mock(Node.class);
         List<Node> ndList = new ArrayList<Node>();
         ndList.add(node);
-        Topology topology = mock (Topology.class);
+        Topology topology = mock(Topology.class);
         DataBroker dataBroker = mock(DataBroker.class);
         UniAugmentation uniAugmentation = mock(UniAugmentation.class);
         InstanceIdentifier<Topology> topologyInstanceIdentifier = mock(InstanceIdentifier.class);
@@ -226,7 +226,7 @@ public class UniUtilsTest {
         Node node = mock(Node.class);
         List<Node> ndList = new ArrayList<Node>();
         ndList.add(node);
-        Topology topology = mock (Topology.class);
+        Topology topology = mock(Topology.class);
         DataBroker dataBroker = mock(DataBroker.class);
         UniAugmentation uniAugmentation = mock(UniAugmentation.class);
         IpAddress ipAddreDest = new IpAddress("10.10.0.2".toCharArray());