Phanendra Manda
Committed by Phaneendra Manda

Warnings in onos-build-docs corrected

Change-Id: Ib93062abd1977c801d3f38cff26d1ee6bfde58d4
Showing 67 changed files with 423 additions and 140 deletions
......@@ -29,7 +29,7 @@
<artifactId>onos-pcep-controller-api</artifactId>
<packaging>bundle</packaging>
<description>ONOS Pcep controller subsystem API</description>
<description>ONOS Pcep client controller subsystem API</description>
<dependencies>
<dependency>
......
......@@ -20,7 +20,7 @@ import java.util.Collection;
import org.onosproject.pcepio.protocol.PcepMessage;
/**
* Abstraction of an Pcep controller. Serves as a one stop
* Abstraction of an Pcep client controller. Serves as a one stop
* shop for obtaining Pcep devices and (un)register listeners
* on pcep events
*/
......
......@@ -17,7 +17,7 @@ package org.onosproject.pcep.controller;
import org.onosproject.pcepio.protocol.PcepMessage;
/**
* Notifies providers about pcep msg events.
* Notifies providers about PCEP message events.
*/
public interface PcepEventListener {
......
......@@ -15,6 +15,6 @@
*/
/**
* PCEP controller driver API.
* PCEP client controller driver API.
*/
package org.onosproject.pcep.controller.driver;
......
......@@ -15,6 +15,6 @@
*/
/**
* PCEP controller API.
* PCEP client controller API.
*/
package org.onosproject.pcep.controller;
......
......@@ -28,7 +28,7 @@
<artifactId>onos-pcep-controller-impl</artifactId>
<packaging>bundle</packaging>
<description>ONOS PCEP controller subsystem API</description>
<description>ONOS PCEP client controller subsystem API implementation</description>
<dependencies>
<dependency>
......
......@@ -15,23 +15,16 @@
*/
package org.onosproject.pcep.controller.impl;
import static org.onlab.util.Tools.groupedThreads;
import java.util.Collection;
import java.util.Collections;
import java.util.HashSet;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantLock;
import org.apache.felix.scr.annotations.Activate;
import org.apache.felix.scr.annotations.Component;
import org.apache.felix.scr.annotations.Deactivate;
import org.apache.felix.scr.annotations.Service;
import org.onosproject.net.driver.DriverService;
import org.onosproject.pcep.controller.PccId;
import org.onosproject.pcep.controller.PcepClient;
import org.onosproject.pcep.controller.PcepClientController;
......@@ -44,21 +37,15 @@ import org.slf4j.LoggerFactory;
import com.google.common.collect.Sets;
/**
* Implementation of PCEP client controller.
*/
@Component(immediate = true)
@Service
public class PcepClientControllerImpl implements PcepClientController {
private static final Logger log = LoggerFactory.getLogger(PcepClientControllerImpl.class);
//@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
protected DriverService driverService;
private final ExecutorService executorMsgs =
Executors.newFixedThreadPool(32, groupedThreads("onos/pcep", "event-stats-%d"));
private final ExecutorService executorBarrier =
Executors.newFixedThreadPool(4, groupedThreads("onos/pcep", "event-barrier-%d"));
protected ConcurrentHashMap<PccId, PcepClient> connectedClients =
new ConcurrentHashMap<PccId, PcepClient>();
......@@ -188,7 +175,6 @@ public class PcepClientControllerImpl implements PcepClientController {
public class PcepClientAgent implements PcepAgent {
private final Logger log = LoggerFactory.getLogger(PcepClientAgent.class);
private final Lock clientLock = new ReentrantLock();
@Override
public boolean addConnectedClient(PccId pccId, PcepClient pc) {
......
......@@ -15,13 +15,10 @@
*/
package org.onosproject.pcep.controller.impl;
import org.onosproject.pcep.controller.PcepPacketStats;
/**
* A representation of a packet context which allows any provider
* to view a packet in event, but may block the response to the
* event if blocked has been called. This packet context can be used
* to react to the packet in event with a packet out.
* The implementation for PCEP packet statistics.
*/
public class PcepPacketStatsImpl implements PcepPacketStats {
......@@ -30,6 +27,9 @@ public class PcepPacketStatsImpl implements PcepPacketStats {
private int wrongPacketCount;
private long time;
/**
* Default constructor.
*/
public PcepPacketStatsImpl() {
this.inPacketCount = 0;
this.outPacketCount = 0;
......@@ -82,6 +82,9 @@ public class PcepPacketStatsImpl implements PcepPacketStats {
this.wrongPacketCount++;
}
/**
* Resets wrong packet count.
*/
public void resetWrongPacket() {
this.wrongPacketCount = 0;
}
......
......@@ -15,6 +15,6 @@
*/
/**
* Implementation of the PCEP controller subsystem.
* Implementation of the PCEP client controller subsystem.
*/
package org.onosproject.pcep.controller.impl;
......
/*
* Copyright 2015 Open Networking Laboratory
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* PCEP custom exceptions.
*/
package org.onosproject.pcepio.exceptions;
......@@ -16,14 +16,14 @@
package org.onosproject.pcepio.protocol;
/**
* Abstraction of an entity which Provides List of PCEP Attributes.
*/
import java.util.LinkedList;
import org.jboss.netty.buffer.ChannelBuffer;
import org.onosproject.pcepio.exceptions.PcepParseException;
/**
* Abstraction of an entity which Provides List of PCEP Attributes.
*/
public interface PcepAttribute {
/**
......
......@@ -22,6 +22,9 @@ import org.onosproject.pcepio.protocol.ver1.PcepFactoryVer1;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* Abstraction to provide the version for PCEP.
*/
public final class PcepFactories {
protected static final Logger log = LoggerFactory.getLogger(PcepFactories.class);
......
/*
* Copyright 2015 Open Networking Laboratory
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* Abstraction of an entity providing PCEP messages.
*/
package org.onosproject.pcepio.protocol;
......@@ -16,9 +16,6 @@
package org.onosproject.pcepio.protocol.ver1;
/*
* Provides PCEP Attribute List.
*/
import java.util.LinkedList;
import java.util.ListIterator;
......@@ -36,18 +33,20 @@ import org.slf4j.LoggerFactory;
import com.google.common.base.MoreObjects;
import com.google.common.base.MoreObjects.ToStringHelper;
/* Reference : RFC5440
* where:
* <attribute-list> ::=[<LSPA>]
* [<BANDWIDTH>]
* [<metric-list>]
* [<IRO>]
*
* <metric-list> ::=<METRIC>[<metric-list>]
/**
* Provides PCEP Attribute List.
*/
public class PcepAttributeVer1 implements PcepAttribute {
/* Reference : RFC5440
* where:
* <attribute-list> ::=[<LSPA>]
* [<BANDWIDTH>]
* [<metric-list>]
* [<IRO>]
*
* <metric-list> ::=<METRIC>[<metric-list>]
*/
protected static final Logger log = LoggerFactory.getLogger(PcepAttributeVer1.class);
public static final int OBJECT_HEADER_LENGTH = 4;
......
......@@ -33,26 +33,30 @@ import org.slf4j.LoggerFactory;
import com.google.common.base.MoreObjects;
/*
* RFC : 5440 , section : 6.8
* <Close Message> ::= <Common Header> <CLOSE>
*
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Ver | Flags | Message-Type | Message-Length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Object-Class | OT |Res|P|I| Object Length (bytes) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Reserved | Flags | Reason |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |
// Optional TLVs //
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
/**
* Provides PCEP Close Message.
*/
class PcepCloseMsgVer1 implements PcepCloseMsg {
/*
* RFC : 5440 , section : 6.8
* <Close Message> ::= <Common Header> <CLOSE>
*
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Ver | Flags | Message-Type | Message-Length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Object-Class | OT |Res|P|I| Object Length (bytes) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Reserved | Flags | Reason |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |
// Optional TLVs //
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
*/
protected static final Logger log = LoggerFactory.getLogger(PcepCloseMsgVer1.class);
// Pcep version: 1
......@@ -74,6 +78,9 @@ class PcepCloseMsgVer1 implements PcepCloseMsg {
public static final PcepCloseMsgVer1.Reader READER = new Reader();
/**
* Reader class for reading close message for channel buffer.
*/
static class Reader implements PcepMessageReader<PcepCloseMsg> {
PcepObjectHeader closeObjHeader;
byte yReason;
......@@ -248,6 +255,9 @@ class PcepCloseMsgVer1 implements PcepCloseMsg {
static final Writer WRITER = new Writer();
/**
* Writer class for writing close message to channel buffer.
*/
static class Writer implements PcepMessageWriter<PcepCloseMsgVer1> {
@Override
......
......@@ -25,6 +25,9 @@ import org.slf4j.LoggerFactory;
import com.google.common.base.MoreObjects;
/**
* Provides PCEP Endpoints Object.
*/
public class PcepEndPointsObjectVer1 implements PcepEndPointsObject {
/*
......
......@@ -35,8 +35,12 @@ import org.slf4j.LoggerFactory;
import com.google.common.base.MoreObjects;
/*
* rfc3209
/**
* Provides PCEP Ero Object.
*/
public class PcepEroObjectVer1 implements PcepEroObject {
/*
* rfc3209
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
......@@ -130,8 +134,7 @@ import com.google.common.base.MoreObjects;
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
// NAI (variable) //
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
*/
public class PcepEroObjectVer1 implements PcepEroObject {
*/
protected static final Logger log = LoggerFactory.getLogger(PcepEroObjectVer1.class);
......
......@@ -20,6 +20,9 @@ import org.slf4j.LoggerFactory;
import com.google.common.base.MoreObjects;
import com.google.common.base.MoreObjects.ToStringHelper;
/**
* Provides PCEP Error Message.
*/
public class PcepErrorMsgVer1 implements PcepErrorMsg {
/*
......@@ -71,6 +74,9 @@ public class PcepErrorMsgVer1 implements PcepErrorMsg {
this.errInfo = errInfo;
}
/**
* Reader class for reading PCEP error Message from channel buffer.
*/
public static class Reader implements PcepMessageReader<PcepErrorMsg> {
ErrorObjListWithOpen errObjListWithOpen;
......@@ -187,7 +193,6 @@ public class PcepErrorMsgVer1 implements PcepErrorMsg {
break;
}
}
return tempObjHeader;
}
}
......@@ -246,6 +251,9 @@ public class PcepErrorMsgVer1 implements PcepErrorMsg {
public static final Writer WRITER = new Writer();
/**
* Writer class for writing PCEP error Message to channel buffer.
*/
static class Writer implements PcepMessageWriter<PcepErrorMsgVer1> {
@Override
public void write(ChannelBuffer cb, PcepErrorMsgVer1 message) throws PcepParseException {
......
......@@ -13,22 +13,24 @@ import org.slf4j.LoggerFactory;
import com.google.common.base.MoreObjects;
/*
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Object-Class | OT |Res|P|I| Object Length (bytes) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Reserved | Flags | Error-Type | Error-value |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |
// Optional TLVs //
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
/**
* Provides PCEP Error Object.
*/
public class PcepErrorObjectVer1 implements PcepErrorObject {
/*
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Object-Class | OT |Res|P|I| Object Length (bytes) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Reserved | Flags | Error-Type | Error-value |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |
// Optional TLVs //
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
*/
protected static final Logger log = LoggerFactory.getLogger(PcepErrorObjectVer1.class);
public static final byte ERROR_OBJ_TYPE = 1;
......
......@@ -52,6 +52,9 @@ import org.onosproject.pcepio.protocol.PcepUpdateMsg;
import org.onosproject.pcepio.protocol.PcepUpdateRequest;
import org.onosproject.pcepio.protocol.PcepVersion;
/**
* Provides PCEP Factory and returns builder classes for all objects and messages.
*/
public class PcepFactoryVer1 implements PcepFactory {
public static final PcepFactoryVer1 INSTANCE = new PcepFactoryVer1();
......
......@@ -26,6 +26,9 @@ import org.slf4j.LoggerFactory;
import com.google.common.base.MoreObjects;
/**
* Provides PCEP fec Object IPv4 Adjacency object.
*/
public class PcepFecObjectIPv4AdjacencyVer1 implements PcepFecObjectIPv4Adjacency {
/*
......
......@@ -26,6 +26,9 @@ import org.slf4j.LoggerFactory;
import com.google.common.base.MoreObjects;
/**
* Provides Pcep Fec Object IPv4 Unnumbered Adjacency object.
*/
public class PcepFecObjectIPv4UnnumberedAdjacencyVer1 implements PcepFecObjectIPv4UnnumberedAdjacency {
/*
......
......@@ -26,6 +26,9 @@ import org.slf4j.LoggerFactory;
import com.google.common.base.MoreObjects;
/**
* Provides Pcep Fec Object IPv4 object.
*/
public class PcepFecObjectIPv4Ver1 implements PcepFecObjectIPv4 {
/*
......
......@@ -26,6 +26,9 @@ import org.slf4j.LoggerFactory;
import com.google.common.base.MoreObjects;
/**
* Provides Pcep Fec Object IPv6 Adjacency object.
*/
public class PcepFecObjectIPv6AdjacencyVer1 implements PcepFecObjectIPv6Adjacency {
/*
......
......@@ -26,6 +26,9 @@ import org.slf4j.LoggerFactory;
import com.google.common.base.MoreObjects;
/**
* Provides Pcep Fec Object IPv6 object.
*/
public class PcepFecObjectIPv6Ver1 implements PcepFecObjectIPv6 {
/*
......
......@@ -37,6 +37,9 @@ import org.slf4j.LoggerFactory;
import com.google.common.base.MoreObjects;
/**
* Provides PCEP initiate message.
*/
class PcepInitiateMsgVer1 implements PcepInitiateMsg {
protected static final Logger log = LoggerFactory.getLogger(PcepInitiateMsgVer1.class);
......@@ -70,6 +73,9 @@ class PcepInitiateMsgVer1 implements PcepInitiateMsg {
private LinkedList<PcInitiatedLspRequest> llPcInitiatedLspRequestList;
public static final PcepInitiateMsgVer1.Reader READER = new Reader();
/**
* Reader class for reading of Pcep initiate message from channel buffer.
*/
static class Reader implements PcepMessageReader<PcepInitiateMsg> {
LinkedList<PcInitiatedLspRequest> llPcInitiatedLspRequestList;
......@@ -159,7 +165,6 @@ class PcepInitiateMsgVer1 implements PcepInitiateMsg {
}
llPcInitiatedLspRequestList.add(pceInitLspReq);
}
return true;
}
}
......@@ -219,6 +224,9 @@ class PcepInitiateMsgVer1 implements PcepInitiateMsg {
static final Writer WRITER = new Writer();
/**
* Writer class for writing pcep initiate message to channel buffer.
*/
static class Writer implements PcepMessageWriter<PcepInitiateMsgVer1> {
@Override
......
......@@ -24,15 +24,18 @@ import org.slf4j.LoggerFactory;
import com.google.common.base.MoreObjects;
/*
* 0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Reserved |N|I|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
/**
* Provides PCEP inter layer object.
*/
public class PcepInterLayerObjectVer1 implements PcepInterLayerObject {
/*
* 0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Reserved |N|I|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
*/
protected static final Logger log = LoggerFactory.getLogger(PcepInterLayerObjectVer1.class);
public static final byte INTER_LAYER_OBJ_TYPE = 1;
......
......@@ -30,7 +30,12 @@ import org.slf4j.LoggerFactory;
import com.google.common.base.MoreObjects;
/*
/**
* Provides PCEP iro object.
*/
public class PcepIroObjectVer1 implements PcepIroObject {
/*
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
......@@ -50,9 +55,7 @@ import com.google.common.base.MoreObjects;
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| IPv4 address (continued) | Prefix Length | Resvd |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
*/
public class PcepIroObjectVer1 implements PcepIroObject {
*/
protected static final Logger log = LoggerFactory.getLogger(PcepIroObjectVer1.class);
public static final byte IRO_OBJ_TYPE = 1;
......@@ -217,6 +220,9 @@ public class PcepIroObjectVer1 implements PcepIroObject {
return objLenIndex;
}
/**
* Builder class for PCEP iro object.
*/
public static class Builder implements PcepIroObject.Builder {
private boolean bIsHeaderSet = false;
......
......@@ -28,6 +28,9 @@ import org.slf4j.LoggerFactory;
import com.google.common.base.MoreObjects;
/**
* Provides PCEP keep alive message.
*/
class PcepKeepaliveMsgVer1 implements PcepKeepaliveMsg {
/*
......@@ -47,6 +50,9 @@ class PcepKeepaliveMsgVer1 implements PcepKeepaliveMsg {
public static final PcepKeepaliveMsgVer1.Reader READER = new Reader();
/**
* Reader class for reading PCEP keepalive message from channel buffer.
*/
static class Reader implements PcepMessageReader<PcepKeepaliveMsg> {
@Override
......@@ -81,6 +87,9 @@ class PcepKeepaliveMsgVer1 implements PcepKeepaliveMsg {
PcepKeepaliveMsgVer1() {
}
/**
* Builder class for PCEP keepalive message.
*/
static class Builder implements PcepKeepaliveMsg.Builder {
@Override
public PcepVersion getVersion() {
......@@ -105,6 +114,9 @@ class PcepKeepaliveMsgVer1 implements PcepKeepaliveMsg {
static final Writer WRITER = new Writer();
/**
* Writer class for writing the PCEP keepalive message to channel buffer.
*/
static class Writer implements PcepMessageWriter<PcepKeepaliveMsgVer1> {
@Override
......
......@@ -32,8 +32,13 @@ import org.slf4j.LoggerFactory;
import com.google.common.base.MoreObjects;
/*
* ref : draft-zhao-pce-pcep-extension-for-pce-controller-01 , section : 7.4.
/**
* Provides PCEP label object.
*/
public class PcepLabelObjectVer1 implements PcepLabelObject {
/*
* ref : draft-zhao-pce-pcep-extension-for-pce-controller-01 , section : 7.4.
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
......@@ -47,9 +52,7 @@ import com.google.common.base.MoreObjects;
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
The LABEL Object format
*/
public class PcepLabelObjectVer1 implements PcepLabelObject {
*/
protected static final Logger log = LoggerFactory.getLogger(PcepLspObjectVer1.class);
public static final byte LABEL_OBJ_TYPE = 1;
......
......@@ -30,6 +30,9 @@ import org.slf4j.LoggerFactory;
import com.google.common.base.MoreObjects;
/**
* Provides PCEP label range object.
*/
public class PcepLabelRangeObjectVer1 implements PcepLabelRangeObject {
/*
......
......@@ -29,6 +29,9 @@ import org.slf4j.LoggerFactory;
import com.google.common.base.MoreObjects;
/**
* Provides PCEP label range reserve message.
*/
class PcepLabelRangeResvMsgVer1 implements PcepLabelRangeResvMsg {
// Pcep version: 1
......@@ -57,7 +60,9 @@ class PcepLabelRangeResvMsgVer1 implements PcepLabelRangeResvMsg {
public static final PcepLabelRangeResvMsgVer1.Reader READER = new Reader();
//Reader reads LabelRangeResv Message from the channel.
/**
* Reader reads LabelRangeResv Message from the channel.
*/
static class Reader implements PcepMessageReader<PcepLabelRangeResvMsg> {
@Override
......@@ -138,7 +143,9 @@ class PcepLabelRangeResvMsgVer1 implements PcepLabelRangeResvMsg {
static final Writer WRITER = new Writer();
//Writer writes LabelRangeResv Message to the channel.
/**
* Writer writes LabelRangeResv Message to the channel.
*/
static class Writer implements PcepMessageWriter<PcepLabelRangeResvMsgVer1> {
@Override
......
......@@ -32,6 +32,9 @@ import org.slf4j.LoggerFactory;
import com.google.common.base.MoreObjects;
/**
* Provides PCEP lable update message.
*/
class PcepLabelUpdateMsgVer1 implements PcepLabelUpdateMsg {
// Pcep version: 1
......@@ -72,7 +75,9 @@ class PcepLabelUpdateMsgVer1 implements PcepLabelUpdateMsg {
static final PcepLabelUpdateMsgVer1.Reader READER = new Reader();
//Reader reads LabelUpdate Message from the channel.
/**
* Reader reads LabelUpdate Message from the channel.
*/
static class Reader implements PcepMessageReader<PcepLabelUpdateMsg> {
@Override
......@@ -131,6 +136,9 @@ class PcepLabelUpdateMsgVer1 implements PcepLabelUpdateMsg {
this.llPcLabelUpdateList = llPcLabelUpdateList;
}
/**
* Builder class for PCEP label update message.
*/
static class Builder implements PcepLabelUpdateMsg.Builder {
LinkedList<PcepLabelUpdate> llPcLabelUpdateList;
......@@ -169,7 +177,9 @@ class PcepLabelUpdateMsgVer1 implements PcepLabelUpdateMsg {
static final Writer WRITER = new Writer();
//Writer writes LabelUpdate Message to the channel.
/**
* Writer writes LabelUpdate Message to the channel.
*/
static class Writer implements PcepMessageWriter<PcepLabelUpdateMsgVer1> {
@Override
......
......@@ -34,7 +34,12 @@ import org.slf4j.LoggerFactory;
import com.google.common.base.MoreObjects;
/*
/**
* Provides PCEP lsp object.
*/
public class PcepLspObjectVer1 implements PcepLspObject {
/*
message format.
Reference : draft-ietf-pce-stateful-pce-11, section 7.3.
0 1 2 3
......@@ -49,10 +54,7 @@ import com.google.common.base.MoreObjects;
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
The LSP Object format
*/
public class PcepLspObjectVer1 implements PcepLspObject {
*/
protected static final Logger log = LoggerFactory.getLogger(PcepLspObjectVer1.class);
public static final byte LSP_OBJ_TYPE = 1;
......
......@@ -29,6 +29,9 @@ import org.slf4j.LoggerFactory;
import com.google.common.base.MoreObjects;
/**
* Provides PCEP label Object .
*/
public class PcepLspaObjectVer1 implements PcepLspaObject {
/* LSPA Object Body Format
......@@ -72,8 +75,6 @@ public class PcepLspaObjectVer1 implements PcepLspaObject {
private int iIncludeAll;
private byte cSetupPriority;
private byte cHoldPriority;
private byte flags;
private byte reserved;
private boolean bLFlag;
private LinkedList<PcepValueType> llOptionalTlv; //Optional TLV
......@@ -343,7 +344,7 @@ public class PcepLspaObjectVer1 implements PcepLspaObject {
}
/**
* builder class for PCEP lspa object.
* Builder class for PCEP lspa object.
*/
public static class Builder implements PcepLspaObject.Builder {
private boolean bIsHeaderSet = false;
......
......@@ -25,6 +25,9 @@ import org.onosproject.pcepio.types.PcepErrorDetailInfo;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* Provides PCEP messages.
*/
public abstract class PcepMessageVer1 {
protected static final Logger log = LoggerFactory.getLogger(PcepFactories.class);
......@@ -48,6 +51,9 @@ public abstract class PcepMessageVer1 {
public static final PcepMessageVer1.Reader READER = new Reader();
/**
* Reader class for reading PCEP messages from channel buffer.
*/
static class Reader implements PcepMessageReader<PcepMessage> {
@Override
public PcepMessage readFrom(ChannelBuffer cb) throws PcepParseException {
......
......@@ -25,7 +25,12 @@ import org.slf4j.LoggerFactory;
import com.google.common.base.MoreObjects;
/*
/**
* Provides PCEP metric object.
*/
public class PcepMetricObjectVer1 implements PcepMetricObject {
/*
METRIC Object Body Format.
0 1 2 3
......@@ -35,9 +40,7 @@ import com.google.common.base.MoreObjects;
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| metric-value |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
*/
public class PcepMetricObjectVer1 implements PcepMetricObject {
*/
protected static final Logger log = LoggerFactory.getLogger(PcepMetricObjectVer1.class);
......
......@@ -102,7 +102,7 @@ public class PcepMsgPathVer1 implements PcepMsgPath {
}
/**
* builder class for PCEP Message path.
* Builder class for PCEP Message path.
*/
public static class Builder implements PcepMsgPath.Builder {
......
......@@ -30,6 +30,9 @@ import org.slf4j.LoggerFactory;
import com.google.common.base.MoreObjects;
/**
* Provides PCEP open message.
*/
public class PcepOpenMsgVer1 implements PcepOpenMsg {
/*
......@@ -87,6 +90,9 @@ public class PcepOpenMsgVer1 implements PcepOpenMsg {
return MSG_TYPE;
}
/**
* Reader class for reading PCEP open message from channel buffer.
*/
public static class Reader implements PcepMessageReader<PcepOpenMsg> {
@Override
......@@ -162,6 +168,9 @@ public class PcepOpenMsgVer1 implements PcepOpenMsg {
public static final Writer WRITER = new Writer();
/**
* Writer class for writing PCEP opne message to channel buffer.
*/
public static class Writer implements PcepMessageWriter<PcepOpenMsgVer1> {
@Override
......
......@@ -37,7 +37,12 @@ import org.slf4j.LoggerFactory;
import com.google.common.base.MoreObjects;
/*
/**
* Provides PCEP open object.
*/
public class PcepOpenObjectVer1 implements PcepOpenObject {
/*
message format.
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
......@@ -52,10 +57,7 @@ import com.google.common.base.MoreObjects;
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
The OPEN Object format
*/
public class PcepOpenObjectVer1 implements PcepOpenObject {
*/
protected static final Logger log = LoggerFactory.getLogger(PcepOpenObjectVer1.class);
public static final PcepType MSG_TYPE = PcepType.OPEN;
......@@ -341,10 +343,12 @@ public class PcepOpenObjectVer1 implements PcepOpenObject {
}
}
}
return cb.writerIndex() - startIndex;
}
/**
* Builder class for PCPE open object.
*/
public static class Builder implements PcepOpenObject.Builder {
// Pcep open message fields
private boolean bIsHeaderSet = false;
......
......@@ -28,6 +28,9 @@ import org.slf4j.LoggerFactory;
import com.google.common.base.MoreObjects;
/**
* Provides PCEP RP object.
*/
public class PcepRPObjectVer1 implements PcepRPObject {
/*
......@@ -271,6 +274,9 @@ public class PcepRPObjectVer1 implements PcepRPObject {
return cb.writerIndex();
}
/**
* Builder class for PCEP rp object.
*/
public static class Builder implements PcepRPObject.Builder {
private boolean bIsHeaderSet = false;
......
......@@ -35,6 +35,9 @@ import org.slf4j.LoggerFactory;
import com.google.common.base.MoreObjects;
/**
* Provides PCEP report message.
*/
class PcepReportMsgVer1 implements PcepReportMsg {
// Pcep version: 1
......@@ -71,6 +74,9 @@ class PcepReportMsgVer1 implements PcepReportMsg {
public static final PcepReportMsgVer1.Reader READER = new Reader();
/**
* Reader class for reading PCEP report message from channel buffer.
*/
static class Reader implements PcepMessageReader<PcepReportMsg> {
LinkedList<PcepStateReport> llStateReportList;
......@@ -217,6 +223,9 @@ class PcepReportMsgVer1 implements PcepReportMsg {
static final Writer WRITER = new Writer();
/**
* Writer class for writing PCEP report message to channel buffer.
*/
static class Writer implements PcepMessageWriter<PcepReportMsgVer1> {
@Override
......
......@@ -32,8 +32,13 @@ import org.slf4j.LoggerFactory;
import com.google.common.base.MoreObjects;
/*
* rfc3209
/**
* Provides PCEP RRO object.
*/
public class PcepRroObjectVer1 implements PcepRroObject {
/*
* rfc3209
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
......@@ -88,9 +93,7 @@ import com.google.common.base.MoreObjects;
| Contents of Label Object |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
*/
public class PcepRroObjectVer1 implements PcepRroObject {
*/
protected static final Logger log = LoggerFactory.getLogger(PcepRroObjectVer1.class);
public static final byte RRO_OBJ_TYPE = 1;
......
......@@ -30,6 +30,9 @@ import org.slf4j.LoggerFactory;
import com.google.common.base.MoreObjects;
/**
* Provides PCEP SRP obejct.
*/
public class PcepSrpObjectVer1 implements PcepSrpObject {
/*
......@@ -276,7 +279,7 @@ public class PcepSrpObjectVer1 implements PcepSrpObject {
}
/**
* builder class for PCEP srp Object.
* Builder class for PCEP srp Object.
*/
public static class Builder implements PcepSrpObject.Builder {
private boolean bIsHeaderSet = false;
......
......@@ -89,9 +89,10 @@ public class PcepStateReportVer1 implements PcepStateReport {
* @param eroObj PCEP ERO Object
* @param attrList PCEP Attribute
* @param rroObj PCEP Rro Object
* @param bandwidth PCEP bandwidth object
*/
public PcepMsgPath(PcepEroObject eroObj, PcepAttribute attrList, PcepRroObject rroObj,
PcepBandwidthObject bandwidth) {
PcepBandwidthObject bandwidth) {
this.eroObj = eroObj;
this.attrList = attrList;
......
......@@ -35,6 +35,9 @@ import org.slf4j.LoggerFactory;
import com.google.common.base.MoreObjects;
/**
* Provides PCEP TE Object.
*/
public class PcepTEObjectVer1 implements PcepTEObject {
/*
*
......@@ -325,7 +328,6 @@ public class PcepTEObjectVer1 implements PcepTEObject {
throw new PcepParseException("Optional Tlv parsing error. Extra bytes received.");
}
return llOutOptionalTlv;
}
......@@ -358,10 +360,12 @@ public class PcepTEObjectVer1 implements PcepTEObject {
}
}
}
return cb.writerIndex();
}
/**
* Builder class for PCEP te object.
*/
public static class Builder implements PcepTEObject.Builder {
private boolean bIsHeaderSet = false;
private boolean bIsProtocolIdSet = false;
......
......@@ -32,7 +32,7 @@ import org.slf4j.LoggerFactory;
import com.google.common.base.MoreObjects;
/*
/**
* Provides PCEP TE Report Message.
*/
class PcepTEReportMsgVer1 implements PcepTEReportMsg {
......@@ -55,6 +55,9 @@ class PcepTEReportMsgVer1 implements PcepTEReportMsg {
public static final PcepTEReportMsgVer1.Reader READER = new Reader();
/**
* Reader class for reading PCPE te report message form channel buffer.
*/
static class Reader implements PcepMessageReader<PcepTEReportMsg> {
LinkedList<PcepTEObject> teReportList;
......@@ -118,6 +121,9 @@ class PcepTEReportMsgVer1 implements PcepTEReportMsg {
this.teReportList = teReportList;
}
/**
* Builder class for PCEP te report message.
*/
static class Builder implements PcepTEReportMsg.Builder {
// PCEP TE Report message fields
LinkedList<PcepTEObject> teReportList;
......@@ -156,6 +162,9 @@ class PcepTEReportMsgVer1 implements PcepTEReportMsg {
static final Writer WRITER = new Writer();
/**
* Writer class for writing PCEP te report message to channel buffer.
*/
static class Writer implements PcepMessageWriter<PcepTEReportMsgVer1> {
@Override
......
......@@ -36,9 +36,7 @@ import org.slf4j.LoggerFactory;
import com.google.common.base.MoreObjects;
/**
* PCEP Update Message: A Path Computation LSP Update Request message
* (also referred to as PCUpd message) is a PCEP message sent by a PCE
* to a PCC to update attributes of an LSP.
* Provides PCEP update message.
*/
class PcepUpdateMsgVer1 implements PcepUpdateMsg {
......@@ -88,7 +86,9 @@ class PcepUpdateMsgVer1 implements PcepUpdateMsg {
public static final PcepUpdateMsgVer1.Reader READER = new Reader();
//Reader reads UpdateMessage from the channel.
/**
* Reader reads UpdateMessage from the channel.
*/
static class Reader implements PcepMessageReader<PcepUpdateMsg> {
LinkedList<PcepUpdateRequest> llUpdateRequestList;
......@@ -184,7 +184,7 @@ class PcepUpdateMsgVer1 implements PcepUpdateMsg {
}
/**
* builder class for PCPE update message.
* Builder class for PCPE update message.
*/
static class Builder implements PcepUpdateMsg.Builder {
......@@ -226,7 +226,9 @@ class PcepUpdateMsgVer1 implements PcepUpdateMsg {
static final Writer WRITER = new Writer();
//Writer writes UpdateMessage to the channel buffer.
/**
* Writer writes UpdateMessage to the channel buffer.
*/
static class Writer implements PcepMessageWriter<PcepUpdateMsgVer1> {
@Override
......
......@@ -26,8 +26,8 @@ import org.slf4j.LoggerFactory;
import com.google.common.base.MoreObjects;
/*
* PCEP Update Request List.
/**
* Provides PCEP Update Request List.
*/
public class PcepUpdateRequestVer1 implements PcepUpdateRequest {
......
/*
* Copyright 2015 Open Networking Laboratory
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* Implementation of PCEP messages.
*/
package org.onosproject.pcepio.protocol.ver1;
......@@ -16,7 +16,7 @@
package org.onosproject.pcepio.types;
/*
/**
* Provide the PCEP Error Info Details.
*/
public final class PcepErrorDetailInfo {
......
......@@ -23,6 +23,9 @@ import org.onosproject.pcepio.protocol.PcepNai;
import com.google.common.base.MoreObjects;
/**
* Provides Pcep Nai Ipv4 Adjacency.
*/
public class PcepNaiIpv4Adjacency implements PcepNai {
public static final byte ST_TYPE = 0x03;
......
......@@ -23,6 +23,9 @@ import org.onosproject.pcepio.protocol.PcepNai;
import com.google.common.base.MoreObjects;
/**
* Provides Pcep Nai Ipv4 Node Id.
*/
public class PcepNaiIpv4NodeId implements PcepNai {
public static final byte ST_TYPE = 0x01;
......
......@@ -23,6 +23,9 @@ import org.onosproject.pcepio.protocol.PcepNai;
import com.google.common.base.MoreObjects;
/**
* Provides Pcep Nai Ipv6 Adjacency.
*/
public class PcepNaiIpv6Adjacency implements PcepNai {
public static final byte ST_TYPE = 0x04;
......
......@@ -23,6 +23,9 @@ import org.onosproject.pcepio.protocol.PcepNai;
import com.google.common.base.MoreObjects;
/**
* Provides Pcep Nai Ipv6 Node Id.
*/
public class PcepNaiIpv6NodeId implements PcepNai {
public static final byte ST_TYPE = 0x02;
......
......@@ -7,6 +7,9 @@ import org.onosproject.pcepio.protocol.PcepNai;
import com.google.common.base.MoreObjects;
/**
* Provides Pcep Nai Unnumbered Adjacency Ipv4.
*/
public class PcepNaiUnnumberedAdjacencyIpv4 implements PcepNai {
/**
* draft-ietf-pce-segment-routing-03 section 5.3.2.
......
......@@ -17,6 +17,9 @@ package org.onosproject.pcepio.types;
import org.jboss.netty.buffer.ChannelBuffer;
/**
* Abstraction of an entity which provides PCPE RSVP error spec.
*/
public interface PcepRsvpErrorSpec extends PcepValueType {
/**
......
......@@ -20,6 +20,9 @@ import org.onosproject.pcepio.protocol.PcepVersion;
import com.google.common.base.MoreObjects;
/**
* Provides Pcep Rsvp Ipv4 Error Spec.
*/
public class PcepRsvpIpv4ErrorSpec implements PcepRsvpErrorSpec {
/*
......
......@@ -5,6 +5,9 @@ import org.onosproject.pcepio.protocol.PcepVersion;
import com.google.common.base.MoreObjects;
/**
* Provides Pcep Rsvp Ipv6 Error Spec.
*/
public class PcepRsvpIpv6ErrorSpec implements PcepRsvpErrorSpec {
/*
......
......@@ -24,6 +24,9 @@ import org.onosproject.pcepio.protocol.PcepVersion;
import com.google.common.base.MoreObjects;
/**
* Provides Pcep Rsvp User Error Spec.
*/
public class PcepRsvpUserErrorSpec implements PcepRsvpErrorSpec {
/*
......
......@@ -26,7 +26,7 @@ import org.slf4j.LoggerFactory;
import com.google.common.base.MoreObjects;
/*
/**
* Provides SrEroSubObject.
*/
public class SrEroSubObject implements PcepValueType {
......
......@@ -150,6 +150,7 @@ public class StatefulRsvpErrorSpecTlv implements PcepValueType {
*
* @param cb of type channel buffer
* @return object of StatefulRsvpErrorSpecTlv
* @throws PcepParseException while parsing this tlv from channel buffer
*/
public static PcepValueType read(ChannelBuffer cb) throws PcepParseException {
......
......@@ -28,6 +28,9 @@ import org.slf4j.LoggerFactory;
import com.google.common.base.MoreObjects;
/**
* Provides TE Node Attributes Tlv.
*/
public class TENodeAttributesTlv implements PcepValueType {
/*
* Reference :PCEP Extension for Transporting TE Data draft-dhodylee-pce-pcep-te-data-extn-02
......
/*
* Copyright 2015 Open Networking Laboratory
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* Implementation of Tlvs and Pcep common objects.
*/
package org.onosproject.pcepio.types;
......@@ -4,6 +4,9 @@ import org.jboss.netty.buffer.ChannelBuffer;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* Provides Hex Dump for debugging.
*/
public final class HexDump {
protected static final Logger log = LoggerFactory.getLogger(HexDump.class);
......
/*
* Copyright 2015 Open Networking Laboratory
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* Provides utility functionality for PCEP messages.
*/
package org.onosproject.pcepio.util;
......@@ -185,8 +185,8 @@ public class PcepTunnelApiMapper {
/**
* Returns whether tunnel exist in tunnel db.
*
* @param tunnelId
* @return true/false
* @param tunnelId tunnel id
* @return true/false if the tunnel exists in the tunnel db
*/
public boolean checkFromTunnelDBQueue(TunnelId tunnelId) {
int value = tunnelIdMap.get(tunnelId);
......