Jonathan Hart
Committed by Gerrit Code Review

Enforce naming convention regarding abbreviations

Change-Id: Ic81038d3869268a55624ccbbf66048545158b0da
Showing 121 changed files with 585 additions and 609 deletions
...@@ -60,7 +60,7 @@ public class DefaultIpDeviceDescription extends AbstractDescription ...@@ -60,7 +60,7 @@ public class DefaultIpDeviceDescription extends AbstractDescription
60 * @param annotations Annotations to use. 60 * @param annotations Annotations to use.
61 */ 61 */
62 public DefaultIpDeviceDescription(IpDeviceDescription base, SparseAnnotations... annotations) { 62 public DefaultIpDeviceDescription(IpDeviceDescription base, SparseAnnotations... annotations) {
63 - this(base.deviceURI(), base.type(), base.deviceIdentifier(), 63 + this(base.deviceUri(), base.type(), base.deviceIdentifier(),
64 base.deviceTed(), annotations); 64 base.deviceTed(), annotations);
65 } 65 }
66 66
...@@ -71,12 +71,12 @@ public class DefaultIpDeviceDescription extends AbstractDescription ...@@ -71,12 +71,12 @@ public class DefaultIpDeviceDescription extends AbstractDescription
71 * @param annotations Annotations to use. 71 * @param annotations Annotations to use.
72 */ 72 */
73 public DefaultIpDeviceDescription(IpDeviceDescription base, Type type, SparseAnnotations... annotations) { 73 public DefaultIpDeviceDescription(IpDeviceDescription base, Type type, SparseAnnotations... annotations) {
74 - this(base.deviceURI(), type, base.deviceIdentifier(), 74 + this(base.deviceUri(), type, base.deviceIdentifier(),
75 base.deviceTed(), annotations); 75 base.deviceTed(), annotations);
76 } 76 }
77 77
78 @Override 78 @Override
79 - public URI deviceURI() { 79 + public URI deviceUri() {
80 return uri; 80 return uri;
81 } 81 }
82 82
......
...@@ -35,7 +35,7 @@ public interface IpDeviceDescription extends Description { ...@@ -35,7 +35,7 @@ public interface IpDeviceDescription extends Description {
35 * 35 *
36 * @return provider specific URI for the ip device 36 * @return provider specific URI for the ip device
37 */ 37 */
38 - URI deviceURI(); 38 + URI deviceUri();
39 39
40 /** 40 /**
41 * Returns the type of the ip device. For ex: Psuedo or actual 41 * Returns the type of the ip device. For ex: Psuedo or actual
......
...@@ -25,13 +25,13 @@ import java.util.HashMap; ...@@ -25,13 +25,13 @@ import java.util.HashMap;
25 public final class OpenstackExternalGateway { 25 public final class OpenstackExternalGateway {
26 26
27 private String networkId; 27 private String networkId;
28 - private boolean enablePNAT; 28 + private boolean enablePnat;
29 private HashMap<String, Ip4Address> externalFixedIps; 29 private HashMap<String, Ip4Address> externalFixedIps;
30 30
31 - private OpenstackExternalGateway(String networkId, boolean enablePNAT, 31 + private OpenstackExternalGateway(String networkId, boolean enablePnat,
32 HashMap externalFixedIps) { 32 HashMap externalFixedIps) {
33 this.networkId = networkId; 33 this.networkId = networkId;
34 - this.enablePNAT = enablePNAT; 34 + this.enablePnat = enablePnat;
35 this.externalFixedIps = externalFixedIps; 35 this.externalFixedIps = externalFixedIps;
36 } 36 }
37 37
...@@ -49,8 +49,8 @@ public final class OpenstackExternalGateway { ...@@ -49,8 +49,8 @@ public final class OpenstackExternalGateway {
49 * 49 *
50 * @return PNAT status 50 * @return PNAT status
51 */ 51 */
52 - public boolean isEnablePNAT() { 52 + public boolean isEnablePnat() {
53 - return enablePNAT; 53 + return enablePnat;
54 } 54 }
55 55
56 /** 56 /**
...@@ -58,11 +58,11 @@ public final class OpenstackExternalGateway { ...@@ -58,11 +58,11 @@ public final class OpenstackExternalGateway {
58 */ 58 */
59 public static final class Builder { 59 public static final class Builder {
60 private String networkId; 60 private String networkId;
61 - private boolean enablePNAT; 61 + private boolean enablePnat;
62 - private HashMap<String, Ip4Address> externalFixedIPs; 62 + private HashMap<String, Ip4Address> externalFixedIps;
63 63
64 Builder() { 64 Builder() {
65 - externalFixedIPs = new HashMap<>(); 65 + externalFixedIps = new HashMap<>();
66 } 66 }
67 67
68 /** 68 /**
...@@ -79,11 +79,11 @@ public final class OpenstackExternalGateway { ...@@ -79,11 +79,11 @@ public final class OpenstackExternalGateway {
79 /** 79 /**
80 * Sets whether PNAT status is enabled or not. 80 * Sets whether PNAT status is enabled or not.
81 * 81 *
82 - * @param enablePNAT true if PNAT status is enabled, false otherwise 82 + * @param enablePnat true if PNAT status is enabled, false otherwise
83 * @return Builder object 83 * @return Builder object
84 */ 84 */
85 - public Builder enablePNAT(boolean enablePNAT) { 85 + public Builder enablePnat(boolean enablePnat) {
86 - this.enablePNAT = enablePNAT; 86 + this.enablePnat = enablePnat;
87 return this; 87 return this;
88 } 88 }
89 89
...@@ -93,8 +93,8 @@ public final class OpenstackExternalGateway { ...@@ -93,8 +93,8 @@ public final class OpenstackExternalGateway {
93 * @param externalFixedIPs External fixed IP information 93 * @param externalFixedIPs External fixed IP information
94 * @return Builder object 94 * @return Builder object
95 */ 95 */
96 - public Builder externalFixedIPs(HashMap<String, Ip4Address> externalFixedIPs) { 96 + public Builder externalFixedIps(HashMap<String, Ip4Address> externalFixedIPs) {
97 - this.externalFixedIPs.putAll(externalFixedIPs); 97 + this.externalFixedIps.putAll(externalFixedIPs);
98 return this; 98 return this;
99 } 99 }
100 100
...@@ -104,7 +104,7 @@ public final class OpenstackExternalGateway { ...@@ -104,7 +104,7 @@ public final class OpenstackExternalGateway {
104 * @return OpenstackExternalGateway object 104 * @return OpenstackExternalGateway object
105 */ 105 */
106 public OpenstackExternalGateway build() { 106 public OpenstackExternalGateway build() {
107 - return new OpenstackExternalGateway(networkId, enablePNAT, externalFixedIPs); 107 + return new OpenstackExternalGateway(networkId, enablePnat, externalFixedIps);
108 } 108 }
109 } 109 }
110 110
......
...@@ -20,10 +20,10 @@ import org.onosproject.net.packet.PacketContext; ...@@ -20,10 +20,10 @@ import org.onosproject.net.packet.PacketContext;
20 /** 20 /**
21 * Handle ICMP packet processing for Managing Flow Rules In Openstack Nodes. 21 * Handle ICMP packet processing for Managing Flow Rules In Openstack Nodes.
22 */ 22 */
23 -public class OpenstackICMPHandler implements Runnable { 23 +public class OpenstackIcmpHandler implements Runnable {
24 24
25 volatile PacketContext context; 25 volatile PacketContext context;
26 - OpenstackICMPHandler(PacketContext context) { 26 + OpenstackIcmpHandler(PacketContext context) {
27 this.context = context; 27 this.context = context;
28 } 28 }
29 29
......
...@@ -20,10 +20,10 @@ import org.onosproject.net.packet.PacketContext; ...@@ -20,10 +20,10 @@ import org.onosproject.net.packet.PacketContext;
20 /** 20 /**
21 * Handle NAT packet processing for Managing Flow Rules In Openstack Nodes. 21 * Handle NAT packet processing for Managing Flow Rules In Openstack Nodes.
22 */ 22 */
23 -public class OpenstackPNATHandler implements Runnable { 23 +public class OpenstackPnatHandler implements Runnable {
24 24
25 volatile PacketContext context; 25 volatile PacketContext context;
26 - OpenstackPNATHandler(PacketContext context) { 26 + OpenstackPnatHandler(PacketContext context) {
27 this.context = context; 27 this.context = context;
28 } 28 }
29 29
......
...@@ -57,8 +57,8 @@ public class OpenstackRoutingManager implements OpenstackRoutingService { ...@@ -57,8 +57,8 @@ public class OpenstackRoutingManager implements OpenstackRoutingService {
57 protected DriverService driverService; 57 protected DriverService driverService;
58 58
59 private ApplicationId appId; 59 private ApplicationId appId;
60 - private OpenstackICMPHandler icmpHandler; 60 + private OpenstackIcmpHandler icmpHandler;
61 - private OpenstackPNATHandler natHandler; 61 + private OpenstackPnatHandler natHandler;
62 private OpenstackFloatingIPHandler floatingIPHandler; 62 private OpenstackFloatingIPHandler floatingIPHandler;
63 private OpenstackRoutingRulePopulator openstackRoutingRulePopulator; 63 private OpenstackRoutingRulePopulator openstackRoutingRulePopulator;
64 64
...@@ -144,10 +144,10 @@ public class OpenstackRoutingManager implements OpenstackRoutingService { ...@@ -144,10 +144,10 @@ public class OpenstackRoutingManager implements OpenstackRoutingService {
144 IPv4 iPacket = (IPv4) ethernet.getPayload(); 144 IPv4 iPacket = (IPv4) ethernet.getPayload();
145 switch (iPacket.getProtocol()) { 145 switch (iPacket.getProtocol()) {
146 case IPv4.PROTOCOL_ICMP: 146 case IPv4.PROTOCOL_ICMP:
147 - icmpEventExcutorService.execute(new OpenstackICMPHandler(context)); 147 + icmpEventExcutorService.execute(new OpenstackIcmpHandler(context));
148 break; 148 break;
149 default: 149 default:
150 - l3EventExcutorService.execute(new OpenstackPNATHandler(context)); 150 + l3EventExcutorService.execute(new OpenstackPnatHandler(context));
151 break; 151 break;
152 } 152 }
153 153
......
...@@ -67,7 +67,7 @@ public final class OpenstackPortInfo { ...@@ -67,7 +67,7 @@ public final class OpenstackPortInfo {
67 return this; 67 return this;
68 } 68 }
69 69
70 - public Builder setVNI(long vni) { 70 + public Builder setVni(long vni) {
71 this.vni = checkNotNull(vni, "vni cannot be null"); 71 this.vni = checkNotNull(vni, "vni cannot be null");
72 return this; 72 return this;
73 } 73 }
......
...@@ -327,7 +327,7 @@ public class OpenstackSwitchingManager implements OpenstackSwitchingService { ...@@ -327,7 +327,7 @@ public class OpenstackSwitchingManager implements OpenstackSwitchingService {
327 OpenstackPortInfo.Builder portBuilder = OpenstackPortInfo.builder() 327 OpenstackPortInfo.Builder portBuilder = OpenstackPortInfo.builder()
328 .setDeviceId(deviceId) 328 .setDeviceId(deviceId)
329 .setHostIp((Ip4Address) openstackPort.fixedIps().values().stream().findFirst().orElse(null)) 329 .setHostIp((Ip4Address) openstackPort.fixedIps().values().stream().findFirst().orElse(null))
330 - .setVNI(vni); 330 + .setVni(vni);
331 331
332 openstackPortInfoMap.putIfAbsent(port.annotations().value(PORTNAME), 332 openstackPortInfoMap.putIfAbsent(port.annotations().value(PORTNAME),
333 portBuilder.build()); 333 portBuilder.build());
...@@ -496,4 +496,4 @@ public class OpenstackSwitchingManager implements OpenstackSwitchingService { ...@@ -496,4 +496,4 @@ public class OpenstackSwitchingManager implements OpenstackSwitchingService {
496 } 496 }
497 } 497 }
498 } 498 }
499 -}
...\ No newline at end of file ...\ No newline at end of file
499 +}
......
...@@ -26,5 +26,5 @@ public interface PcepLinkListener { ...@@ -26,5 +26,5 @@ public interface PcepLinkListener {
26 * 26 *
27 * @param link pcep link 27 * @param link pcep link
28 */ 28 */
29 - void handlePCEPlink(PcepLink link); 29 + void handlePceplink(PcepLink link);
30 } 30 }
......
...@@ -69,7 +69,7 @@ public interface PcepTunnel extends PcepOperator { ...@@ -69,7 +69,7 @@ public interface PcepTunnel extends PcepOperator {
69 DIAMOND 69 DIAMOND
70 } 70 }
71 71
72 - enum PATHTYPE { 72 + enum PathType {
73 73
74 /** 74 /**
75 * Indicates path is the preferred path. 75 * Indicates path is the preferred path.
...@@ -179,7 +179,7 @@ public interface PcepTunnel extends PcepOperator { ...@@ -179,7 +179,7 @@ public interface PcepTunnel extends PcepOperator {
179 * 179 *
180 * @return the type of a path, the preferred or alternate. 180 * @return the type of a path, the preferred or alternate.
181 */ 181 */
182 - PATHTYPE getPathType(); 182 + PathType getPathType();
183 183
184 /** 184 /**
185 * Get the under lay tunnel id of VLAN tunnel. 185 * Get the under lay tunnel id of VLAN tunnel.
......
...@@ -26,7 +26,7 @@ public interface PcepTunnelListener { ...@@ -26,7 +26,7 @@ public interface PcepTunnelListener {
26 * 26 *
27 * @param tunnel a pceptunnel. 27 * @param tunnel a pceptunnel.
28 */ 28 */
29 - void handlePCEPTunnel(PcepTunnel tunnel); 29 + void handlePcepTunnel(PcepTunnel tunnel);
30 30
31 /** 31 /**
32 * Notify that get a tunnel statistic data from the network. 32 * Notify that get a tunnel statistic data from the network.
......
...@@ -28,24 +28,24 @@ public interface ServiceFunctionForwarderService { ...@@ -28,24 +28,24 @@ public interface ServiceFunctionForwarderService {
28 * Install Forwarding rule. 28 * Install Forwarding rule.
29 * 29 *
30 * @param portChain port-chain 30 * @param portChain port-chain
31 - * @param nshSPI nsh spi 31 + * @param nshSpi nsh spi
32 */ 32 */
33 - void installForwardingRule(PortChain portChain, NshServicePathId nshSPI); 33 + void installForwardingRule(PortChain portChain, NshServicePathId nshSpi);
34 34
35 /** 35 /**
36 * Uninstall Forwarding rule. 36 * Uninstall Forwarding rule.
37 * 37 *
38 * @param portChain port-chain 38 * @param portChain port-chain
39 - * @param nshSPI nsh spi 39 + * @param nshSpi nsh spi
40 */ 40 */
41 - void unInstallForwardingRule(PortChain portChain, NshServicePathId nshSPI); 41 + void unInstallForwardingRule(PortChain portChain, NshServicePathId nshSpi);
42 42
43 /** 43 /**
44 * Prepare forwarding object for Service Function. 44 * Prepare forwarding object for Service Function.
45 * 45 *
46 * @param portChain port-chain 46 * @param portChain port-chain
47 - * @param nshSPI nsh spi 47 + * @param nshSpi nsh spi
48 * @param type forwarding objective operation type 48 * @param type forwarding objective operation type
49 */ 49 */
50 - void prepareServiceFunctionForwarder(PortChain portChain, NshServicePathId nshSPI, Objective.Operation type); 50 + void prepareServiceFunctionForwarder(PortChain portChain, NshServicePathId nshSpi, Objective.Operation type);
51 } 51 }
......
...@@ -15,58 +15,56 @@ ...@@ -15,58 +15,56 @@
15 */ 15 */
16 package org.onosproject.sfc.forwarder.impl; 16 package org.onosproject.sfc.forwarder.impl;
17 17
18 -import static org.slf4j.LoggerFactory.getLogger;
19 -import static org.onosproject.net.flow.criteria.ExtensionSelectorType.ExtensionSelectorTypes.NICIRA_MATCH_NSH_SPI;
20 -import static com.google.common.base.Preconditions.checkNotNull;
21 -
22 -import java.util.List;
23 -import java.util.ListIterator;
24 -
25 import org.apache.felix.scr.annotations.Component; 18 import org.apache.felix.scr.annotations.Component;
26 import org.apache.felix.scr.annotations.Reference; 19 import org.apache.felix.scr.annotations.Reference;
27 import org.apache.felix.scr.annotations.ReferenceCardinality; 20 import org.apache.felix.scr.annotations.ReferenceCardinality;
28 import org.apache.felix.scr.annotations.Service; 21 import org.apache.felix.scr.annotations.Service;
29 -
30 import org.onlab.osgi.DefaultServiceDirectory; 22 import org.onlab.osgi.DefaultServiceDirectory;
31 import org.onlab.osgi.ServiceDirectory; 23 import org.onlab.osgi.ServiceDirectory;
32 import org.onlab.packet.MacAddress; 24 import org.onlab.packet.MacAddress;
33 import org.onlab.packet.VlanId; 25 import org.onlab.packet.VlanId;
34 import org.onosproject.core.ApplicationId; 26 import org.onosproject.core.ApplicationId;
35 -import org.onosproject.net.behaviour.ExtensionSelectorResolver;
36 import org.onosproject.net.DeviceId; 27 import org.onosproject.net.DeviceId;
37 import org.onosproject.net.Host; 28 import org.onosproject.net.Host;
38 import org.onosproject.net.HostId; 29 import org.onosproject.net.HostId;
39 import org.onosproject.net.NshServicePathId; 30 import org.onosproject.net.NshServicePathId;
40 import org.onosproject.net.PortNumber; 31 import org.onosproject.net.PortNumber;
32 +import org.onosproject.net.behaviour.ExtensionSelectorResolver;
41 import org.onosproject.net.driver.DriverHandler; 33 import org.onosproject.net.driver.DriverHandler;
42 import org.onosproject.net.driver.DriverService; 34 import org.onosproject.net.driver.DriverService;
43 import org.onosproject.net.flow.DefaultTrafficSelector; 35 import org.onosproject.net.flow.DefaultTrafficSelector;
44 import org.onosproject.net.flow.DefaultTrafficTreatment; 36 import org.onosproject.net.flow.DefaultTrafficTreatment;
45 -import org.onosproject.net.flow.criteria.ExtensionSelector;
46 import org.onosproject.net.flow.TrafficSelector; 37 import org.onosproject.net.flow.TrafficSelector;
47 import org.onosproject.net.flow.TrafficTreatment; 38 import org.onosproject.net.flow.TrafficTreatment;
39 +import org.onosproject.net.flow.criteria.ExtensionSelector;
48 import org.onosproject.net.flowobjective.DefaultForwardingObjective; 40 import org.onosproject.net.flowobjective.DefaultForwardingObjective;
49 import org.onosproject.net.flowobjective.FlowObjectiveService; 41 import org.onosproject.net.flowobjective.FlowObjectiveService;
50 import org.onosproject.net.flowobjective.ForwardingObjective; 42 import org.onosproject.net.flowobjective.ForwardingObjective;
43 +import org.onosproject.net.flowobjective.ForwardingObjective.Flag;
51 import org.onosproject.net.flowobjective.Objective; 44 import org.onosproject.net.flowobjective.Objective;
52 import org.onosproject.net.host.HostService; 45 import org.onosproject.net.host.HostService;
53 -import org.onosproject.net.flowobjective.ForwardingObjective.Flag; 46 +import org.onosproject.sfc.forwarder.ServiceFunctionForwarderService;
54 -import org.onosproject.vtnrsc.VirtualPortId;
55 -import org.onosproject.vtnrsc.service.VtnRscService;
56 import org.onosproject.vtnrsc.PortChain; 47 import org.onosproject.vtnrsc.PortChain;
57 import org.onosproject.vtnrsc.PortPair; 48 import org.onosproject.vtnrsc.PortPair;
58 import org.onosproject.vtnrsc.PortPairGroup; 49 import org.onosproject.vtnrsc.PortPairGroup;
59 import org.onosproject.vtnrsc.PortPairGroupId; 50 import org.onosproject.vtnrsc.PortPairGroupId;
60 import org.onosproject.vtnrsc.PortPairId; 51 import org.onosproject.vtnrsc.PortPairId;
61 -import org.onosproject.vtnrsc.virtualport.VirtualPortService; 52 +import org.onosproject.vtnrsc.VirtualPortId;
62 -import org.onosproject.vtnrsc.portpair.PortPairService;
63 -import org.onosproject.vtnrsc.portpairgroup.PortPairGroupService;
64 import org.onosproject.vtnrsc.flowclassifier.FlowClassifierService; 53 import org.onosproject.vtnrsc.flowclassifier.FlowClassifierService;
65 import org.onosproject.vtnrsc.portchain.PortChainService; 54 import org.onosproject.vtnrsc.portchain.PortChainService;
66 -import org.onosproject.sfc.forwarder.ServiceFunctionForwarderService; 55 +import org.onosproject.vtnrsc.portpair.PortPairService;
67 - 56 +import org.onosproject.vtnrsc.portpairgroup.PortPairGroupService;
57 +import org.onosproject.vtnrsc.service.VtnRscService;
58 +import org.onosproject.vtnrsc.virtualport.VirtualPortService;
68 import org.slf4j.Logger; 59 import org.slf4j.Logger;
69 60
61 +import java.util.List;
62 +import java.util.ListIterator;
63 +
64 +import static com.google.common.base.Preconditions.checkNotNull;
65 +import static org.onosproject.net.flow.criteria.ExtensionSelectorType.ExtensionSelectorTypes.NICIRA_MATCH_NSH_SPI;
66 +import static org.slf4j.LoggerFactory.getLogger;
67 +
70 /** 68 /**
71 * Provides Service Function Forwarder implementation. 69 * Provides Service Function Forwarder implementation.
72 */ 70 */
...@@ -119,19 +117,19 @@ public class ServiceFunctionForwarderImpl implements ServiceFunctionForwarderSer ...@@ -119,19 +117,19 @@ public class ServiceFunctionForwarderImpl implements ServiceFunctionForwarderSer
119 } 117 }
120 118
121 @Override 119 @Override
122 - public void installForwardingRule(PortChain portChain, NshServicePathId nshSPI) { 120 + public void installForwardingRule(PortChain portChain, NshServicePathId nshSpi) {
123 checkNotNull(portChain, PORT_CHAIN_NOT_NULL); 121 checkNotNull(portChain, PORT_CHAIN_NOT_NULL);
124 - prepareServiceFunctionForwarder(portChain, nshSPI, Objective.Operation.ADD); 122 + prepareServiceFunctionForwarder(portChain, nshSpi, Objective.Operation.ADD);
125 } 123 }
126 124
127 @Override 125 @Override
128 - public void unInstallForwardingRule(PortChain portChain, NshServicePathId nshSPI) { 126 + public void unInstallForwardingRule(PortChain portChain, NshServicePathId nshSpi) {
129 checkNotNull(portChain, PORT_CHAIN_NOT_NULL); 127 checkNotNull(portChain, PORT_CHAIN_NOT_NULL);
130 - prepareServiceFunctionForwarder(portChain, nshSPI, Objective.Operation.REMOVE); 128 + prepareServiceFunctionForwarder(portChain, nshSpi, Objective.Operation.REMOVE);
131 } 129 }
132 130
133 @Override 131 @Override
134 - public void prepareServiceFunctionForwarder(PortChain portChain, NshServicePathId nshSPI, 132 + public void prepareServiceFunctionForwarder(PortChain portChain, NshServicePathId nshSpi,
135 Objective.Operation type) { 133 Objective.Operation type) {
136 134
137 // Go through the port pair group list 135 // Go through the port pair group list
...@@ -153,7 +151,7 @@ public class ServiceFunctionForwarderImpl implements ServiceFunctionForwarderSer ...@@ -153,7 +151,7 @@ public class ServiceFunctionForwarderImpl implements ServiceFunctionForwarderSer
153 PortPairGroup nextPortPairGroup = portPairGroupService.getPortPairGroup(portPairGrpId); 151 PortPairGroup nextPortPairGroup = portPairGroupService.getPortPairGroup(portPairGrpId);
154 152
155 // push SFF to OVS 153 // push SFF to OVS
156 - pushServiceFunctionForwarder(currentPortPairGroup, nextPortPairGroup, listGrpIterator, nshSPI, type); 154 + pushServiceFunctionForwarder(currentPortPairGroup, nextPortPairGroup, listGrpIterator, nshSpi, type);
157 } 155 }
158 156
159 /** 157 /**
...@@ -162,11 +160,11 @@ public class ServiceFunctionForwarderImpl implements ServiceFunctionForwarderSer ...@@ -162,11 +160,11 @@ public class ServiceFunctionForwarderImpl implements ServiceFunctionForwarderSer
162 * @param currentPortPairGroup current port-pair-group 160 * @param currentPortPairGroup current port-pair-group
163 * @param nextPortPairGroup next port-pair-group 161 * @param nextPortPairGroup next port-pair-group
164 * @param listGrpIterator pointer to port-pair-group list 162 * @param listGrpIterator pointer to port-pair-group list
165 - * @param nshSPI nsh service path id 163 + * @param nshSpi nsh service path id
166 * @param type objective type 164 * @param type objective type
167 */ 165 */
168 public void pushServiceFunctionForwarder(PortPairGroup currentPortPairGroup, PortPairGroup nextPortPairGroup, 166 public void pushServiceFunctionForwarder(PortPairGroup currentPortPairGroup, PortPairGroup nextPortPairGroup,
169 - ListIterator<PortPairGroupId> listGrpIterator, NshServicePathId nshSPI, Objective.Operation type) { 167 + ListIterator<PortPairGroupId> listGrpIterator, NshServicePathId nshSpi, Objective.Operation type) {
170 DeviceId deviceId = null; 168 DeviceId deviceId = null;
171 DeviceId currentDeviceId = null; 169 DeviceId currentDeviceId = null;
172 DeviceId nextDeviceId = null; 170 DeviceId nextDeviceId = null;
...@@ -185,13 +183,13 @@ public class ServiceFunctionForwarderImpl implements ServiceFunctionForwarderSer ...@@ -185,13 +183,13 @@ public class ServiceFunctionForwarderImpl implements ServiceFunctionForwarderSer
185 PortPairId portPairId = portPLIterator.next(); 183 PortPairId portPairId = portPLIterator.next();
186 PortPair portPair = portPairService.getPortPair(portPairId); 184 PortPair portPair = portPairService.getPortPair(portPairId);
187 185
188 - currentDeviceId = vtnRscService.getSFToSFFMaping(VirtualPortId.portId(portPair.ingress())); 186 + currentDeviceId = vtnRscService.getSfToSffMaping(VirtualPortId.portId(portPair.ingress()));
189 if (deviceId == null) { 187 if (deviceId == null) {
190 deviceId = currentDeviceId; 188 deviceId = currentDeviceId;
191 } 189 }
192 190
193 // pack traffic selector 191 // pack traffic selector
194 - TrafficSelector.Builder selector = packTrafficSelector(deviceId, portPair, nshSPI); 192 + TrafficSelector.Builder selector = packTrafficSelector(deviceId, portPair, nshSpi);
195 193
196 // Get the required information on port pairs from destination port 194 // Get the required information on port pairs from destination port
197 // pair group 195 // pair group
...@@ -204,7 +202,7 @@ public class ServiceFunctionForwarderImpl implements ServiceFunctionForwarderSer ...@@ -204,7 +202,7 @@ public class ServiceFunctionForwarderImpl implements ServiceFunctionForwarderSer
204 portPairId = portPLIterator.next(); 202 portPairId = portPLIterator.next();
205 portPair = portPairService.getPortPair(portPairId); 203 portPair = portPairService.getPortPair(portPairId);
206 204
207 - nextDeviceId = vtnRscService.getSFToSFFMaping(VirtualPortId.portId(portPair.ingress())); 205 + nextDeviceId = vtnRscService.getSfToSffMaping(VirtualPortId.portId(portPair.ingress()));
208 206
209 // pack traffic treatment 207 // pack traffic treatment
210 TrafficTreatment.Builder treatment = packTrafficTreatment(currentDeviceId, nextDeviceId, portPair); 208 TrafficTreatment.Builder treatment = packTrafficTreatment(currentDeviceId, nextDeviceId, portPair);
...@@ -228,10 +226,10 @@ public class ServiceFunctionForwarderImpl implements ServiceFunctionForwarderSer ...@@ -228,10 +226,10 @@ public class ServiceFunctionForwarderImpl implements ServiceFunctionForwarderSer
228 * 226 *
229 * @param deviceId device id 227 * @param deviceId device id
230 * @param portPair port-pair 228 * @param portPair port-pair
231 - * @param nshSPI nsh spi 229 + * @param nshSpi nsh spi
232 * @return traffic treatment 230 * @return traffic treatment
233 */ 231 */
234 - public TrafficSelector.Builder packTrafficSelector(DeviceId deviceId, PortPair portPair, NshServicePathId nshSPI) { 232 + public TrafficSelector.Builder packTrafficSelector(DeviceId deviceId, PortPair portPair, NshServicePathId nshSpi) {
235 TrafficSelector.Builder selector = DefaultTrafficSelector.builder(); 233 TrafficSelector.Builder selector = DefaultTrafficSelector.builder();
236 MacAddress dstMacAddress = virtualPortService.getPort(VirtualPortId.portId(portPair.egress())).macAddress(); 234 MacAddress dstMacAddress = virtualPortService.getPort(VirtualPortId.portId(portPair.egress())).macAddress();
237 Host host = hostService.getHost(HostId.hostId(dstMacAddress)); 235 Host host = hostService.getHost(HostId.hostId(dstMacAddress));
...@@ -243,7 +241,7 @@ public class ServiceFunctionForwarderImpl implements ServiceFunctionForwarderSer ...@@ -243,7 +241,7 @@ public class ServiceFunctionForwarderImpl implements ServiceFunctionForwarderSer
243 ExtensionSelector nspSpiSelector = resolver.getExtensionSelector(NICIRA_MATCH_NSH_SPI.type()); 241 ExtensionSelector nspSpiSelector = resolver.getExtensionSelector(NICIRA_MATCH_NSH_SPI.type());
244 242
245 try { 243 try {
246 - nspSpiSelector.setPropertyValue("nshSpi", nshSPI); 244 + nspSpiSelector.setPropertyValue("nshSpi", nshSpi);
247 } catch (Exception e) { 245 } catch (Exception e) {
248 log.error("Failed to get extension instruction to set Nsh Spi Id {}", deviceId); 246 log.error("Failed to get extension instruction to set Nsh Spi Id {}", deviceId);
249 } 247 }
......
...@@ -15,20 +15,10 @@ ...@@ -15,20 +15,10 @@
15 */ 15 */
16 package org.onosproject.sfc.installer.impl; 16 package org.onosproject.sfc.installer.impl;
17 17
18 -import static com.google.common.base.Preconditions.checkNotNull; 18 +import org.apache.felix.scr.annotations.Component;
19 -import static org.onosproject.net.flow.instructions.ExtensionTreatmentType.ExtensionTreatmentTypes.NICIRA_SET_NSH_SI;
20 -import static org.onosproject.net.flow.instructions.ExtensionTreatmentType.ExtensionTreatmentTypes.NICIRA_SET_NSH_SPI;
21 -import static org.slf4j.LoggerFactory.getLogger;
22 -
23 import org.apache.felix.scr.annotations.Reference; 19 import org.apache.felix.scr.annotations.Reference;
24 import org.apache.felix.scr.annotations.ReferenceCardinality; 20 import org.apache.felix.scr.annotations.ReferenceCardinality;
25 import org.apache.felix.scr.annotations.Service; 21 import org.apache.felix.scr.annotations.Service;
26 -
27 -import java.util.LinkedList;
28 -import java.util.List;
29 -import java.util.ListIterator;
30 -
31 -import org.apache.felix.scr.annotations.Component;
32 import org.onlab.osgi.DefaultServiceDirectory; 22 import org.onlab.osgi.DefaultServiceDirectory;
33 import org.onlab.osgi.ServiceDirectory; 23 import org.onlab.osgi.ServiceDirectory;
34 import org.onlab.packet.Ethernet; 24 import org.onlab.packet.Ethernet;
...@@ -41,8 +31,8 @@ import org.onosproject.net.Host; ...@@ -41,8 +31,8 @@ import org.onosproject.net.Host;
41 import org.onosproject.net.HostId; 31 import org.onosproject.net.HostId;
42 import org.onosproject.net.NshServicePathId; 32 import org.onosproject.net.NshServicePathId;
43 import org.onosproject.net.PortNumber; 33 import org.onosproject.net.PortNumber;
44 -import org.onosproject.net.device.DeviceService;
45 import org.onosproject.net.behaviour.ExtensionTreatmentResolver; 34 import org.onosproject.net.behaviour.ExtensionTreatmentResolver;
35 +import org.onosproject.net.device.DeviceService;
46 import org.onosproject.net.driver.DriverHandler; 36 import org.onosproject.net.driver.DriverHandler;
47 import org.onosproject.net.driver.DriverService; 37 import org.onosproject.net.driver.DriverService;
48 import org.onosproject.net.flow.DefaultTrafficSelector; 38 import org.onosproject.net.flow.DefaultTrafficSelector;
...@@ -72,9 +62,17 @@ import org.onosproject.vtnrsc.portpair.PortPairService; ...@@ -72,9 +62,17 @@ import org.onosproject.vtnrsc.portpair.PortPairService;
72 import org.onosproject.vtnrsc.portpairgroup.PortPairGroupService; 62 import org.onosproject.vtnrsc.portpairgroup.PortPairGroupService;
73 import org.onosproject.vtnrsc.service.VtnRscService; 63 import org.onosproject.vtnrsc.service.VtnRscService;
74 import org.onosproject.vtnrsc.virtualport.VirtualPortService; 64 import org.onosproject.vtnrsc.virtualport.VirtualPortService;
75 -
76 import org.slf4j.Logger; 65 import org.slf4j.Logger;
77 66
67 +import java.util.LinkedList;
68 +import java.util.List;
69 +import java.util.ListIterator;
70 +
71 +import static com.google.common.base.Preconditions.checkNotNull;
72 +import static org.onosproject.net.flow.instructions.ExtensionTreatmentType.ExtensionTreatmentTypes.NICIRA_SET_NSH_SI;
73 +import static org.onosproject.net.flow.instructions.ExtensionTreatmentType.ExtensionTreatmentTypes.NICIRA_SET_NSH_SPI;
74 +import static org.slf4j.LoggerFactory.getLogger;
75 +
78 /** 76 /**
79 * Provides flow classifier installer implementation. 77 * Provides flow classifier installer implementation.
80 */ 78 */
...@@ -175,7 +173,7 @@ public class FlowClassifierInstallerImpl implements FlowClassifierInstallerServi ...@@ -175,7 +173,7 @@ public class FlowClassifierInstallerImpl implements FlowClassifierInstallerServi
175 } 173 }
176 174
177 @Override 175 @Override
178 - public void prepareFlowClassification(FlowClassifier flowClassifier, PortPair portPair, NshServicePathId nshSPI, 176 + public void prepareFlowClassification(FlowClassifier flowClassifier, PortPair portPair, NshServicePathId nshSpi,
179 Operation type) { 177 Operation type) {
180 DeviceId deviceId = null; 178 DeviceId deviceId = null;
181 // device id if virtual ports are set in flow classifier. 179 // device id if virtual ports are set in flow classifier.
...@@ -187,10 +185,10 @@ public class FlowClassifierInstallerImpl implements FlowClassifierInstallerServi ...@@ -187,10 +185,10 @@ public class FlowClassifierInstallerImpl implements FlowClassifierInstallerServi
187 TpPort nshDstPort = TpPort.tpPort(6633); 185 TpPort nshDstPort = TpPort.tpPort(6633);
188 186
189 if ((flowClassifier.srcPort() != null) && (!flowClassifier.srcPort().portId().isEmpty())) { 187 if ((flowClassifier.srcPort() != null) && (!flowClassifier.srcPort().portId().isEmpty())) {
190 - deviceIdfromFc = vtnRscService.getSFToSFFMaping(flowClassifier.srcPort()); 188 + deviceIdfromFc = vtnRscService.getSfToSffMaping(flowClassifier.srcPort());
191 deviceId = deviceIdfromFc; 189 deviceId = deviceIdfromFc;
192 } else { 190 } else {
193 - deviceIdfromPp = vtnRscService.getSFToSFFMaping(VirtualPortId.portId(portPair.ingress())); 191 + deviceIdfromPp = vtnRscService.getSfToSffMaping(VirtualPortId.portId(portPair.ingress()));
194 srcMacAddress = virtualPortService.getPort(VirtualPortId.portId(portPair.egress())).macAddress(); 192 srcMacAddress = virtualPortService.getPort(VirtualPortId.portId(portPair.egress())).macAddress();
195 deviceId = deviceIdfromPp; 193 deviceId = deviceIdfromPp;
196 } 194 }
...@@ -200,7 +198,7 @@ public class FlowClassifierInstallerImpl implements FlowClassifierInstallerServi ...@@ -200,7 +198,7 @@ public class FlowClassifierInstallerImpl implements FlowClassifierInstallerServi
200 198
201 // Build traffic treatment. 199 // Build traffic treatment.
202 TrafficTreatment.Builder treatment = packTrafficTreatment(deviceId, srcMacAddress, nshDstPort, deviceIdfromFc, 200 TrafficTreatment.Builder treatment = packTrafficTreatment(deviceId, srcMacAddress, nshDstPort, deviceIdfromFc,
203 - deviceIdfromPp, nshSPI, flowClassifier); 201 + deviceIdfromPp, nshSpi, flowClassifier);
204 202
205 // Build forwarding objective and send to OVS. 203 // Build forwarding objective and send to OVS.
206 sendServiceFunctionForwarder(selector, treatment, deviceId, type); 204 sendServiceFunctionForwarder(selector, treatment, deviceId, type);
...@@ -266,13 +264,13 @@ public class FlowClassifierInstallerImpl implements FlowClassifierInstallerServi ...@@ -266,13 +264,13 @@ public class FlowClassifierInstallerImpl implements FlowClassifierInstallerServi
266 * @param nshDstPort vxlan tunnel port for nsh header 264 * @param nshDstPort vxlan tunnel port for nsh header
267 * @param deviceIdfromFc device id if virtual ports are set in flow classifier. 265 * @param deviceIdfromFc device id if virtual ports are set in flow classifier.
268 * @param deviceIdfromPp device id if port pair is used to fetch device id. 266 * @param deviceIdfromPp device id if port pair is used to fetch device id.
269 - * @param nshSPI nsh spi 267 + * @param nshSpi nsh spi
270 * @param flowClassifier flow-classifier 268 * @param flowClassifier flow-classifier
271 * @return traffic treatment 269 * @return traffic treatment
272 */ 270 */
273 public TrafficTreatment.Builder packTrafficTreatment(DeviceId deviceId, MacAddress srcMacAddress, 271 public TrafficTreatment.Builder packTrafficTreatment(DeviceId deviceId, MacAddress srcMacAddress,
274 TpPort nshDstPort, DeviceId deviceIdfromFc, DeviceId deviceIdfromPp, 272 TpPort nshDstPort, DeviceId deviceIdfromFc, DeviceId deviceIdfromPp,
275 - NshServicePathId nshSPI, FlowClassifier flowClassifier) { 273 + NshServicePathId nshSpi, FlowClassifier flowClassifier) {
276 TrafficTreatment.Builder treatmentBuilder = DefaultTrafficTreatment.builder(); 274 TrafficTreatment.Builder treatmentBuilder = DefaultTrafficTreatment.builder();
277 275
278 Host host = hostService.getHost(HostId.hostId(srcMacAddress)); 276 Host host = hostService.getHost(HostId.hostId(srcMacAddress));
...@@ -295,7 +293,7 @@ public class FlowClassifierInstallerImpl implements FlowClassifierInstallerServi ...@@ -295,7 +293,7 @@ public class FlowClassifierInstallerImpl implements FlowClassifierInstallerServi
295 treatmentBuilder.setUdpDst(nshDstPort); 293 treatmentBuilder.setUdpDst(nshDstPort);
296 294
297 try { 295 try {
298 - nspIdTreatment.setPropertyValue("nshSpi", nshSPI); 296 + nspIdTreatment.setPropertyValue("nshSpi", nshSpi);
299 } catch (Exception e) { 297 } catch (Exception e) {
300 log.error("Failed to get extension instruction to set Nsh Spi Id {}", deviceId); 298 log.error("Failed to get extension instruction to set Nsh Spi Id {}", deviceId);
301 } 299 }
......
...@@ -15,20 +15,14 @@ ...@@ -15,20 +15,14 @@
15 */ 15 */
16 package org.onosproject.sfc.manager.impl; 16 package org.onosproject.sfc.manager.impl;
17 17
18 -import static org.slf4j.LoggerFactory.getLogger;
19 -
20 import org.apache.felix.scr.annotations.Activate; 18 import org.apache.felix.scr.annotations.Activate;
21 import org.apache.felix.scr.annotations.Component; 19 import org.apache.felix.scr.annotations.Component;
22 import org.apache.felix.scr.annotations.Deactivate; 20 import org.apache.felix.scr.annotations.Deactivate;
23 import org.apache.felix.scr.annotations.Reference; 21 import org.apache.felix.scr.annotations.Reference;
24 import org.apache.felix.scr.annotations.ReferenceCardinality; 22 import org.apache.felix.scr.annotations.ReferenceCardinality;
25 import org.apache.felix.scr.annotations.Service; 23 import org.apache.felix.scr.annotations.Service;
26 -
27 -import java.util.concurrent.ConcurrentMap;
28 -import java.util.concurrent.ConcurrentHashMap;
29 -
30 -import org.onlab.util.KryoNamespace;
31 import org.onlab.util.ItemNotFoundException; 24 import org.onlab.util.ItemNotFoundException;
25 +import org.onlab.util.KryoNamespace;
32 import org.onosproject.core.ApplicationId; 26 import org.onosproject.core.ApplicationId;
33 import org.onosproject.core.CoreService; 27 import org.onosproject.core.CoreService;
34 import org.onosproject.net.NshServicePathId; 28 import org.onosproject.net.NshServicePathId;
...@@ -38,22 +32,26 @@ import org.onosproject.sfc.installer.FlowClassifierInstallerService; ...@@ -38,22 +32,26 @@ import org.onosproject.sfc.installer.FlowClassifierInstallerService;
38 import org.onosproject.sfc.installer.impl.FlowClassifierInstallerImpl; 32 import org.onosproject.sfc.installer.impl.FlowClassifierInstallerImpl;
39 import org.onosproject.sfc.manager.NshSpiIdGenerators; 33 import org.onosproject.sfc.manager.NshSpiIdGenerators;
40 import org.onosproject.sfc.manager.SfcService; 34 import org.onosproject.sfc.manager.SfcService;
41 -import org.onosproject.vtnrsc.PortPair;
42 -import org.onosproject.vtnrsc.PortPairId;
43 -import org.onosproject.vtnrsc.PortPairGroup;
44 -import org.onosproject.vtnrsc.PortPairGroupId;
45 import org.onosproject.vtnrsc.FlowClassifier; 35 import org.onosproject.vtnrsc.FlowClassifier;
46 import org.onosproject.vtnrsc.FlowClassifierId; 36 import org.onosproject.vtnrsc.FlowClassifierId;
47 import org.onosproject.vtnrsc.PortChain; 37 import org.onosproject.vtnrsc.PortChain;
48 import org.onosproject.vtnrsc.PortChainId; 38 import org.onosproject.vtnrsc.PortChainId;
39 +import org.onosproject.vtnrsc.PortPair;
40 +import org.onosproject.vtnrsc.PortPairGroup;
41 +import org.onosproject.vtnrsc.PortPairGroupId;
42 +import org.onosproject.vtnrsc.PortPairId;
49 import org.onosproject.vtnrsc.TenantId; 43 import org.onosproject.vtnrsc.TenantId;
50 import org.onosproject.vtnrsc.event.VtnRscEvent; 44 import org.onosproject.vtnrsc.event.VtnRscEvent;
51 import org.onosproject.vtnrsc.event.VtnRscEventFeedback; 45 import org.onosproject.vtnrsc.event.VtnRscEventFeedback;
52 import org.onosproject.vtnrsc.event.VtnRscListener; 46 import org.onosproject.vtnrsc.event.VtnRscListener;
53 import org.onosproject.vtnrsc.service.VtnRscService; 47 import org.onosproject.vtnrsc.service.VtnRscService;
54 -
55 import org.slf4j.Logger; 48 import org.slf4j.Logger;
56 49
50 +import java.util.concurrent.ConcurrentHashMap;
51 +import java.util.concurrent.ConcurrentMap;
52 +
53 +import static org.slf4j.LoggerFactory.getLogger;
54 +
57 /** 55 /**
58 * Provides implementation of SFC Service. 56 * Provides implementation of SFC Service.
59 */ 57 */
...@@ -192,18 +190,18 @@ public class SfcManager implements SfcService { ...@@ -192,18 +190,18 @@ public class SfcManager implements SfcService {
192 190
193 @Override 191 @Override
194 public void onPortChainCreated(PortChain portChain) { 192 public void onPortChainCreated(PortChain portChain) {
195 - NshServicePathId nshSPI; 193 + NshServicePathId nshSpi;
196 log.info("onPortChainCreated"); 194 log.info("onPortChainCreated");
197 if (nshSpiPortChainMap.containsKey(portChain.portChainId())) { 195 if (nshSpiPortChainMap.containsKey(portChain.portChainId())) {
198 - nshSPI = nshSpiPortChainMap.get(portChain.portChainId()); 196 + nshSpi = nshSpiPortChainMap.get(portChain.portChainId());
199 } else { 197 } else {
200 - nshSPI = NshServicePathId.of(NshSpiIdGenerators.create()); 198 + nshSpi = NshServicePathId.of(NshSpiIdGenerators.create());
201 - nshSpiPortChainMap.put(portChain.portChainId(), nshSPI); 199 + nshSpiPortChainMap.put(portChain.portChainId(), nshSpi);
202 } 200 }
203 201
204 // install in OVS. 202 // install in OVS.
205 - flowClassifierInstallerService.installFlowClassifier(portChain, nshSPI); 203 + flowClassifierInstallerService.installFlowClassifier(portChain, nshSpi);
206 - serviceFunctionForwarderService.installForwardingRule(portChain, nshSPI); 204 + serviceFunctionForwarderService.installForwardingRule(portChain, nshSpi);
207 } 205 }
208 206
209 @Override 207 @Override
...@@ -213,12 +211,12 @@ public class SfcManager implements SfcService { ...@@ -213,12 +211,12 @@ public class SfcManager implements SfcService {
213 throw new ItemNotFoundException("Unable to find NSH SPI"); 211 throw new ItemNotFoundException("Unable to find NSH SPI");
214 } 212 }
215 213
216 - NshServicePathId nshSPI = nshSpiPortChainMap.get(portChain.portChainId()); 214 + NshServicePathId nshSpi = nshSpiPortChainMap.get(portChain.portChainId());
217 // uninstall from OVS. 215 // uninstall from OVS.
218 - flowClassifierInstallerService.unInstallFlowClassifier(portChain, nshSPI); 216 + flowClassifierInstallerService.unInstallFlowClassifier(portChain, nshSpi);
219 - serviceFunctionForwarderService.unInstallForwardingRule(portChain, nshSPI); 217 + serviceFunctionForwarderService.unInstallForwardingRule(portChain, nshSpi);
220 218
221 // remove SPI. No longer it will be used. 219 // remove SPI. No longer it will be used.
222 - nshSpiPortChainMap.remove(nshSPI); 220 + nshSpiPortChainMap.remove(nshSpi);
223 } 221 }
224 } 222 }
......
...@@ -51,7 +51,7 @@ public class VtnRscManagerTestImpl implements VtnRscService { ...@@ -51,7 +51,7 @@ public class VtnRscManagerTestImpl implements VtnRscService {
51 } 51 }
52 52
53 @Override 53 @Override
54 - public Iterator<Device> getSFFOfTenant(TenantId tenantId) { 54 + public Iterator<Device> getSffOfTenant(TenantId tenantId) {
55 return null; 55 return null;
56 } 56 }
57 57
...@@ -67,7 +67,7 @@ public class VtnRscManagerTestImpl implements VtnRscService { ...@@ -67,7 +67,7 @@ public class VtnRscManagerTestImpl implements VtnRscService {
67 } 67 }
68 68
69 @Override 69 @Override
70 - public DeviceId getSFToSFFMaping(VirtualPortId portId) { 70 + public DeviceId getSfToSffMaping(VirtualPortId portId) {
71 return DeviceId.deviceId("www.google.com"); 71 return DeviceId.deviceId("www.google.com");
72 } 72 }
73 73
......
...@@ -18,7 +18,7 @@ package org.onosproject.vtn.cli; ...@@ -18,7 +18,7 @@ package org.onosproject.vtn.cli;
18 import org.apache.karaf.shell.commands.Command; 18 import org.apache.karaf.shell.commands.Command;
19 import org.apache.karaf.shell.commands.Option; 19 import org.apache.karaf.shell.commands.Option;
20 import org.onosproject.cli.AbstractShellCommand; 20 import org.onosproject.cli.AbstractShellCommand;
21 -import org.onosproject.vtn.manager.impl.VTNManager; 21 +import org.onosproject.vtn.manager.impl.VtnManager;
22 22
23 /** 23 /**
24 * Supports for updating the external gateway virtualPort. 24 * Supports for updating the external gateway virtualPort.
...@@ -33,6 +33,6 @@ public class VtnCommand extends AbstractShellCommand { ...@@ -33,6 +33,6 @@ public class VtnCommand extends AbstractShellCommand {
33 33
34 @Override 34 @Override
35 protected void execute() { 35 protected void execute() {
36 - VTNManager.setExPortName(exPortName); 36 + VtnManager.setExPortName(exPortName);
37 } 37 }
38 } 38 }
......
...@@ -22,7 +22,7 @@ import org.onosproject.vtnrsc.event.VtnRscEventFeedback; ...@@ -22,7 +22,7 @@ import org.onosproject.vtnrsc.event.VtnRscEventFeedback;
22 /** 22 /**
23 * VTN application that applies configuration and flows to the device. 23 * VTN application that applies configuration and flows to the device.
24 */ 24 */
25 -public interface VTNService { 25 +public interface VtnService {
26 26
27 /** 27 /**
28 * Creates a vxlan tunnel and creates the ovs when a ovs controller node is 28 * Creates a vxlan tunnel and creates the ovs when a ovs controller node is
......
...@@ -82,7 +82,7 @@ import org.onosproject.store.service.LogicalClockService; ...@@ -82,7 +82,7 @@ import org.onosproject.store.service.LogicalClockService;
82 import org.onosproject.store.service.Serializer; 82 import org.onosproject.store.service.Serializer;
83 import org.onosproject.store.service.StorageService; 83 import org.onosproject.store.service.StorageService;
84 import org.onosproject.store.service.Versioned; 84 import org.onosproject.store.service.Versioned;
85 -import org.onosproject.vtn.manager.VTNService; 85 +import org.onosproject.vtn.manager.VtnService;
86 import org.onosproject.vtn.table.ArpService; 86 import org.onosproject.vtn.table.ArpService;
87 import org.onosproject.vtn.table.ClassifierService; 87 import org.onosproject.vtn.table.ClassifierService;
88 import org.onosproject.vtn.table.DnatService; 88 import org.onosproject.vtn.table.DnatService;
...@@ -131,7 +131,7 @@ import com.google.common.collect.Sets; ...@@ -131,7 +131,7 @@ import com.google.common.collect.Sets;
131 */ 131 */
132 @Component(immediate = true) 132 @Component(immediate = true)
133 @Service 133 @Service
134 -public class VTNManager implements VTNService { 134 +public class VtnManager implements VtnService {
135 private final Logger log = getLogger(getClass()); 135 private final Logger log = getLogger(getClass());
136 private static final String APP_ID = "org.onosproject.app.vtn"; 136 private static final String APP_ID = "org.onosproject.app.vtn";
137 137
......
...@@ -15,8 +15,6 @@ ...@@ -15,8 +15,6 @@
15 */ 15 */
16 package org.onosproject.vtnrsc.service; 16 package org.onosproject.vtnrsc.service;
17 17
18 -import java.util.Iterator;
19 -
20 import org.onlab.packet.MacAddress; 18 import org.onlab.packet.MacAddress;
21 import org.onosproject.event.ListenerService; 19 import org.onosproject.event.ListenerService;
22 import org.onosproject.net.Device; 20 import org.onosproject.net.Device;
...@@ -29,6 +27,8 @@ import org.onosproject.vtnrsc.VirtualPortId; ...@@ -29,6 +27,8 @@ import org.onosproject.vtnrsc.VirtualPortId;
29 import org.onosproject.vtnrsc.event.VtnRscEvent; 27 import org.onosproject.vtnrsc.event.VtnRscEvent;
30 import org.onosproject.vtnrsc.event.VtnRscListener; 28 import org.onosproject.vtnrsc.event.VtnRscListener;
31 29
30 +import java.util.Iterator;
31 +
32 /** 32 /**
33 * Service for interacting with the inventory of Vtn resource. 33 * Service for interacting with the inventory of Vtn resource.
34 */ 34 */
...@@ -55,7 +55,7 @@ public interface VtnRscService extends ListenerService<VtnRscEvent, VtnRscListen ...@@ -55,7 +55,7 @@ public interface VtnRscService extends ListenerService<VtnRscEvent, VtnRscListen
55 * @param tenantId tenant identifier 55 * @param tenantId tenant identifier
56 * @return iterable collection of Device 56 * @return iterable collection of Device
57 */ 57 */
58 - Iterator<Device> getSFFOfTenant(TenantId tenantId); 58 + Iterator<Device> getSffOfTenant(TenantId tenantId);
59 59
60 /** 60 /**
61 * Returns gateway mac address of the specific host. 61 * Returns gateway mac address of the specific host.
...@@ -79,7 +79,7 @@ public interface VtnRscService extends ListenerService<VtnRscEvent, VtnRscListen ...@@ -79,7 +79,7 @@ public interface VtnRscService extends ListenerService<VtnRscEvent, VtnRscListen
79 * @param portId port identifier 79 * @param portId port identifier
80 * @return device identifier 80 * @return device identifier
81 */ 81 */
82 - DeviceId getSFToSFFMaping(VirtualPortId portId); 82 + DeviceId getSfToSffMaping(VirtualPortId portId);
83 83
84 /** 84 /**
85 * Adds specify Device identifier to Service Function Forward OvsMap 85 * Adds specify Device identifier to Service Function Forward OvsMap
......
...@@ -389,7 +389,7 @@ public class VtnRscManager extends AbstractListenerManager<VtnRscEvent, VtnRscLi ...@@ -389,7 +389,7 @@ public class VtnRscManager extends AbstractListenerManager<VtnRscEvent, VtnRscLi
389 } 389 }
390 390
391 @Override 391 @Override
392 - public Iterator<Device> getSFFOfTenant(TenantId tenantId) { 392 + public Iterator<Device> getSffOfTenant(TenantId tenantId) {
393 checkNotNull(tenantId, TENANTID_NOT_NULL); 393 checkNotNull(tenantId, TENANTID_NOT_NULL);
394 Set<DeviceId> deviceIdSet = sffOvsMap.get(tenantId); 394 Set<DeviceId> deviceIdSet = sffOvsMap.get(tenantId);
395 Set<Device> deviceSet = new HashSet<>(); 395 Set<Device> deviceSet = new HashSet<>();
...@@ -430,7 +430,7 @@ public class VtnRscManager extends AbstractListenerManager<VtnRscEvent, VtnRscLi ...@@ -430,7 +430,7 @@ public class VtnRscManager extends AbstractListenerManager<VtnRscEvent, VtnRscLi
430 } 430 }
431 431
432 @Override 432 @Override
433 - public DeviceId getSFToSFFMaping(VirtualPortId portId) { 433 + public DeviceId getSfToSffMaping(VirtualPortId portId) {
434 checkNotNull(portId, "portId cannot be null"); 434 checkNotNull(portId, "portId cannot be null");
435 VirtualPort vmPort = virtualPortService.getPort(portId); 435 VirtualPort vmPort = virtualPortService.getPort(portId);
436 Set<Host> hostSet = hostService.getHostsByMac(vmPort.macAddress()); 436 Set<Host> hostSet = hostService.getHostsByMac(vmPort.macAddress());
......
...@@ -44,7 +44,7 @@ public abstract class AbstractDriverLoader { ...@@ -44,7 +44,7 @@ public abstract class AbstractDriverLoader {
44 protected void activate() { 44 protected void activate() {
45 try { 45 try {
46 provider = new XmlDriverLoader(getClassLoaderInstance()) 46 provider = new XmlDriverLoader(getClassLoaderInstance())
47 - .loadDrivers(loadXMLDriversStream(), driverAdminService); 47 + .loadDrivers(loadXmlDriversStream(), driverAdminService);
48 driverAdminService.registerProvider(provider); 48 driverAdminService.registerProvider(provider);
49 } catch (Exception e) { 49 } catch (Exception e) {
50 log.error("Unable to load default drivers", e); 50 log.error("Unable to load default drivers", e);
...@@ -58,7 +58,7 @@ public abstract class AbstractDriverLoader { ...@@ -58,7 +58,7 @@ public abstract class AbstractDriverLoader {
58 log.info("Stopped"); 58 log.info("Stopped");
59 } 59 }
60 60
61 - protected abstract InputStream loadXMLDriversStream(); 61 + protected abstract InputStream loadXmlDriversStream();
62 62
63 protected abstract ClassLoader getClassLoaderInstance(); 63 protected abstract ClassLoader getClassLoaderInstance();
64 64
......
...@@ -247,7 +247,7 @@ public interface Criterion { ...@@ -247,7 +247,7 @@ public interface Criterion {
247 } 247 }
248 } 248 }
249 249
250 - enum TCPFlags { 250 + enum TcpFlags {
251 251
252 /** ECN-nonce concealment protection. */ 252 /** ECN-nonce concealment protection. */
253 NS((short) (1 << 0)), 253 NS((short) (1 << 0)),
...@@ -270,7 +270,7 @@ public interface Criterion { ...@@ -270,7 +270,7 @@ public interface Criterion {
270 270
271 private short value; 271 private short value;
272 272
273 - TCPFlags(short value) { 273 + TcpFlags(short value) {
274 this.value = value; 274 this.value = value;
275 } 275 }
276 276
......
...@@ -138,17 +138,17 @@ public class CriteriaTest { ...@@ -138,17 +138,17 @@ public class CriteriaTest {
138 138
139 139
140 int tcpFlags1 = 140 int tcpFlags1 =
141 - Criterion.TCPFlags.NS.getValue() | 141 + Criterion.TcpFlags.NS.getValue() |
142 - Criterion.TCPFlags.CWR.getValue() | 142 + Criterion.TcpFlags.CWR.getValue() |
143 - Criterion.TCPFlags.ECE.getValue() | 143 + Criterion.TcpFlags.ECE.getValue() |
144 - Criterion.TCPFlags.URG.getValue() | 144 + Criterion.TcpFlags.URG.getValue() |
145 - Criterion.TCPFlags.ACK.getValue() | 145 + Criterion.TcpFlags.ACK.getValue() |
146 - Criterion.TCPFlags.PSH.getValue() | 146 + Criterion.TcpFlags.PSH.getValue() |
147 - Criterion.TCPFlags.RST.getValue() | 147 + Criterion.TcpFlags.RST.getValue() |
148 - Criterion.TCPFlags.SYN.getValue(); 148 + Criterion.TcpFlags.SYN.getValue();
149 149
150 int tcpFlags2 = tcpFlags1 | 150 int tcpFlags2 = tcpFlags1 |
151 - Criterion.TCPFlags.FIN.getValue(); 151 + Criterion.TcpFlags.FIN.getValue();
152 152
153 Criterion matchTcpFlags1 = Criteria.matchTcpFlags(tcpFlags1); 153 Criterion matchTcpFlags1 = Criteria.matchTcpFlags(tcpFlags1);
154 Criterion sameAsmatchTcpFlags1 = Criteria.matchTcpFlags(tcpFlags1); 154 Criterion sameAsmatchTcpFlags1 = Criteria.matchTcpFlags(tcpFlags1);
......
...@@ -30,7 +30,7 @@ public class CienaDriversLoader extends AbstractDriverLoader { ...@@ -30,7 +30,7 @@ public class CienaDriversLoader extends AbstractDriverLoader {
30 private static final String DRIVERS_XML = "/ciena-drivers.xml"; 30 private static final String DRIVERS_XML = "/ciena-drivers.xml";
31 31
32 @Override 32 @Override
33 - protected InputStream loadXMLDriversStream() { 33 + protected InputStream loadXmlDriversStream() {
34 return getClassLoaderInstance().getResourceAsStream(DRIVERS_XML); 34 return getClassLoaderInstance().getResourceAsStream(DRIVERS_XML);
35 } 35 }
36 36
......
...@@ -84,7 +84,7 @@ public class PortDiscoveryCienaWaveserverImpl extends AbstractHandlerBehaviour ...@@ -84,7 +84,7 @@ public class PortDiscoveryCienaWaveserverImpl extends AbstractHandlerBehaviour
84 if (LINESIDE.contains(name)) { 84 if (LINESIDE.contains(name)) {
85 String wsportInfoRequest = SPECIFIC_PORT_PATH + sub.getLong(PORT_ID) + 85 String wsportInfoRequest = SPECIFIC_PORT_PATH + sub.getLong(PORT_ID) +
86 SPECIFIC_PORT_CONFIG; 86 SPECIFIC_PORT_CONFIG;
87 - ports.add(XmlConfigParser.parseWaveServerCienaOCHPorts( 87 + ports.add(XmlConfigParser.parseWaveServerCienaOchPorts(
88 sub.getLong(PORT_ID), 88 sub.getLong(PORT_ID),
89 toGbps(Long.parseLong(sub.getString(SPEED).replace(GBPS, EMPTY_STRING))), 89 toGbps(Long.parseLong(sub.getString(SPEED).replace(GBPS, EMPTY_STRING))),
90 XmlConfigParser.loadXml(controller.get(deviceId, wsportInfoRequest, XML)), 90 XmlConfigParser.loadXml(controller.get(deviceId, wsportInfoRequest, XML)),
......
...@@ -33,7 +33,7 @@ public class DefaultDriversLoader extends AbstractDriverLoader implements Defaul ...@@ -33,7 +33,7 @@ public class DefaultDriversLoader extends AbstractDriverLoader implements Defaul
33 private static final String DRIVERS_XML = "/onos-drivers.xml"; 33 private static final String DRIVERS_XML = "/onos-drivers.xml";
34 34
35 @Override 35 @Override
36 - protected InputStream loadXMLDriversStream() { 36 + protected InputStream loadXmlDriversStream() {
37 return getClassLoaderInstance().getResourceAsStream(DRIVERS_XML); 37 return getClassLoaderInstance().getResourceAsStream(DRIVERS_XML);
38 } 38 }
39 39
......
...@@ -149,7 +149,7 @@ public class OltPipeline extends AbstractHandlerBehaviour implements Pipeliner { ...@@ -149,7 +149,7 @@ public class OltPipeline extends AbstractHandlerBehaviour implements Pipeliner {
149 IPProtocolCriterion ipProto = (IPProtocolCriterion) 149 IPProtocolCriterion ipProto = (IPProtocolCriterion)
150 filterForCriterion(filter.conditions(), Criterion.Type.IP_PROTO); 150 filterForCriterion(filter.conditions(), Criterion.Type.IP_PROTO);
151 if (ipProto.protocol() == IPv4.PROTOCOL_IGMP) { 151 if (ipProto.protocol() == IPv4.PROTOCOL_IGMP) {
152 - provisionIGMP(filter, ethType, ipProto, output); 152 + provisionIgmp(filter, ethType, ipProto, output);
153 } else { 153 } else {
154 log.error("OLT can only filter igmp"); 154 log.error("OLT can only filter igmp");
155 fail(filter, ObjectiveError.UNSUPPORTED); 155 fail(filter, ObjectiveError.UNSUPPORTED);
...@@ -377,7 +377,7 @@ public class OltPipeline extends AbstractHandlerBehaviour implements Pipeliner { ...@@ -377,7 +377,7 @@ public class OltPipeline extends AbstractHandlerBehaviour implements Pipeliner {
377 377
378 } 378 }
379 379
380 - private void provisionIGMP(FilteringObjective filter, EthTypeCriterion ethType, 380 + private void provisionIgmp(FilteringObjective filter, EthTypeCriterion ethType,
381 IPProtocolCriterion ipProto, 381 IPProtocolCriterion ipProto,
382 Instructions.OutputInstruction output) { 382 Instructions.OutputInstruction output) {
383 TrafficSelector selector = buildSelector(filter.key(), ethType, ipProto); 383 TrafficSelector selector = buildSelector(filter.key(), ethType, ipProto);
......
...@@ -134,11 +134,11 @@ public class OpenstackPipeline extends DefaultSingleTablePipeline ...@@ -134,11 +134,11 @@ public class OpenstackPipeline extends DefaultSingleTablePipeline
134 } 134 }
135 135
136 private void initializePipeline() { 136 private void initializePipeline() {
137 - processVNITable(true); 137 + processVniTable(true);
138 processForwardingTable(true); 138 processForwardingTable(true);
139 } 139 }
140 140
141 - private void processVNITable(boolean install) { 141 + private void processVniTable(boolean install) {
142 TrafficSelector.Builder selector = DefaultTrafficSelector.builder(); 142 TrafficSelector.Builder selector = DefaultTrafficSelector.builder();
143 TrafficTreatment.Builder treatment = DefaultTrafficTreatment.builder(); 143 TrafficTreatment.Builder treatment = DefaultTrafficTreatment.builder();
144 144
......
...@@ -30,7 +30,7 @@ public class FujitsuDriversLoader extends AbstractDriverLoader { ...@@ -30,7 +30,7 @@ public class FujitsuDriversLoader extends AbstractDriverLoader {
30 private static final String DRIVERS_XML = "/fujitsu-drivers.xml"; 30 private static final String DRIVERS_XML = "/fujitsu-drivers.xml";
31 31
32 @Override 32 @Override
33 - protected InputStream loadXMLDriversStream() { 33 + protected InputStream loadXmlDriversStream() {
34 return getClassLoaderInstance().getResourceAsStream(DRIVERS_XML); 34 return getClassLoaderInstance().getResourceAsStream(DRIVERS_XML);
35 } 35 }
36 36
......
...@@ -30,7 +30,7 @@ public class NetconfDriversLoader extends AbstractDriverLoader { ...@@ -30,7 +30,7 @@ public class NetconfDriversLoader extends AbstractDriverLoader {
30 private static final String DRIVERS_XML = "/netconf-drivers.xml"; 30 private static final String DRIVERS_XML = "/netconf-drivers.xml";
31 31
32 @Override 32 @Override
33 - protected InputStream loadXMLDriversStream() { 33 + protected InputStream loadXmlDriversStream() {
34 return getClassLoaderInstance().getResourceAsStream(DRIVERS_XML); 34 return getClassLoaderInstance().getResourceAsStream(DRIVERS_XML);
35 } 35 }
36 36
......
...@@ -30,7 +30,7 @@ public class OvsdbDriversLoader extends AbstractDriverLoader { ...@@ -30,7 +30,7 @@ public class OvsdbDriversLoader extends AbstractDriverLoader {
30 private static final String DRIVERS_XML = "/ovsdb-drivers.xml"; 30 private static final String DRIVERS_XML = "/ovsdb-drivers.xml";
31 31
32 @Override 32 @Override
33 - protected InputStream loadXMLDriversStream() { 33 + protected InputStream loadXmlDriversStream() {
34 return getClassLoaderInstance().getResourceAsStream(DRIVERS_XML); 34 return getClassLoaderInstance().getResourceAsStream(DRIVERS_XML);
35 } 35 }
36 36
......
...@@ -135,7 +135,7 @@ public final class XmlConfigParser { ...@@ -135,7 +135,7 @@ public final class XmlConfigParser {
135 return cfg.configurationsAt("ws-ports.port-interface"); 135 return cfg.configurationsAt("ws-ports.port-interface");
136 } 136 }
137 137
138 - public static PortDescription parseWaveServerCienaOCHPorts(long portNumber, long oduPortSpeed, 138 + public static PortDescription parseWaveServerCienaOchPorts(long portNumber, long oduPortSpeed,
139 HierarchicalConfiguration config, 139 HierarchicalConfiguration config,
140 SparseAnnotations annotations) { 140 SparseAnnotations annotations) {
141 final List<String> tunableType = Lists.newArrayList("Performance-Optimized", "Accelerated"); 141 final List<String> tunableType = Lists.newArrayList("Performance-Optimized", "Accelerated");
......
...@@ -65,9 +65,9 @@ public class XmlConfigParserTest { ...@@ -65,9 +65,9 @@ public class XmlConfigParserTest {
65 @Test 65 @Test
66 public void controllersConfig() { 66 public void controllersConfig() {
67 InputStream streamOrig = getClass().getResourceAsStream("/testConfig.xml"); 67 InputStream streamOrig = getClass().getResourceAsStream("/testConfig.xml");
68 - InputStream streamCFG = XmlConfigParser.class.getResourceAsStream("/controllers.xml"); 68 + InputStream streamCfg = XmlConfigParser.class.getResourceAsStream("/controllers.xml");
69 String config = XmlConfigParser 69 String config = XmlConfigParser
70 - .createControllersConfig(XmlConfigParser.loadXml(streamCFG), 70 + .createControllersConfig(XmlConfigParser.loadXml(streamCfg),
71 XmlConfigParser.loadXml(streamOrig), 71 XmlConfigParser.loadXml(streamOrig),
72 "running", "merge", "create", 72 "running", "merge", "create",
73 new ArrayList<>( 73 new ArrayList<>(
...@@ -81,4 +81,4 @@ public class XmlConfigParserTest { ...@@ -81,4 +81,4 @@ public class XmlConfigParserTest {
81 assertTrue(config.contains("5000")); 81 assertTrue(config.contains("5000"));
82 82
83 } 83 }
84 -}
...\ No newline at end of file ...\ No newline at end of file
84 +}
......
...@@ -45,14 +45,14 @@ public class DistributedMcastStore extends AbstractStore<McastEvent, McastStoreD ...@@ -45,14 +45,14 @@ public class DistributedMcastStore extends AbstractStore<McastEvent, McastStoreD
45 @Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY) 45 @Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
46 private StorageService storageService; 46 private StorageService storageService;
47 47
48 - protected ConsistentMap<McastRoute, MulticastData> mcastRIB; 48 + protected ConsistentMap<McastRoute, MulticastData> mcastRib;
49 protected Map<McastRoute, MulticastData> mcastRoutes; 49 protected Map<McastRoute, MulticastData> mcastRoutes;
50 50
51 51
52 @Activate 52 @Activate
53 public void activate() { 53 public void activate() {
54 54
55 - mcastRIB = storageService.<McastRoute, MulticastData>consistentMapBuilder() 55 + mcastRib = storageService.<McastRoute, MulticastData>consistentMapBuilder()
56 .withName(MCASTRIB) 56 .withName(MCASTRIB)
57 .withSerializer(Serializer.using(KryoNamespace.newBuilder().register( 57 .withSerializer(Serializer.using(KryoNamespace.newBuilder().register(
58 MulticastData.class, 58 MulticastData.class,
...@@ -65,7 +65,7 @@ public class DistributedMcastStore extends AbstractStore<McastEvent, McastStoreD ...@@ -65,7 +65,7 @@ public class DistributedMcastStore extends AbstractStore<McastEvent, McastStoreD
65 .withRelaxedReadConsistency() 65 .withRelaxedReadConsistency()
66 .build(); 66 .build();
67 67
68 - mcastRoutes = mcastRIB.asJavaMap(); 68 + mcastRoutes = mcastRib.asJavaMap();
69 69
70 70
71 log.info("Started"); 71 log.info("Started");
......
...@@ -52,6 +52,7 @@ ...@@ -52,6 +52,7 @@
52 <module>incubator</module> 52 <module>incubator</module>
53 <module>features</module> 53 <module>features</module>
54 54
55 + <module>tools/build/conf</module>
55 <module>tools/package/archetypes</module> 56 <module>tools/package/archetypes</module>
56 <module>tools/package/branding</module> 57 <module>tools/package/branding</module>
57 <module>tools/package/maven-plugin</module> 58 <module>tools/package/maven-plugin</module>
...@@ -75,7 +76,7 @@ ...@@ -75,7 +76,7 @@
75 76
76 <properties> 77 <properties>
77 <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> 78 <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
78 - <onos-build-conf.version>1.1</onos-build-conf.version> 79 + <onos-build-conf.version>1.2-SNAPSHOT</onos-build-conf.version>
79 <netty4.version>4.0.33.Final</netty4.version> 80 <netty4.version>4.0.33.Final</netty4.version>
80 <!-- TODO: replace with final release version when it is out --> 81 <!-- TODO: replace with final release version when it is out -->
81 <atomix.version>0.1.0-beta5</atomix.version> 82 <atomix.version>0.1.0-beta5</atomix.version>
......
...@@ -16,12 +16,12 @@ ...@@ -16,12 +16,12 @@
16 16
17 package org.onosproject.bgp.controller; 17 package org.onosproject.bgp.controller;
18 18
19 -import java.util.Map;
20 -import java.util.Set;
21 -
22 import org.onosproject.bgpio.exceptions.BgpParseException; 19 import org.onosproject.bgpio.exceptions.BgpParseException;
23 import org.onosproject.bgpio.protocol.BgpMessage; 20 import org.onosproject.bgpio.protocol.BgpMessage;
24 21
22 +import java.util.Map;
23 +import java.util.Set;
24 +
25 /** 25 /**
26 * Abstraction of an BGP controller. Serves as a one stop shop for obtaining BGP devices and (un)register listeners on 26 * Abstraction of an BGP controller. Serves as a one stop shop for obtaining BGP devices and (un)register listeners on
27 * bgp events 27 * bgp events
...@@ -72,7 +72,7 @@ public interface BgpController { ...@@ -72,7 +72,7 @@ public interface BgpController {
72 * @param msg the message to process. 72 * @param msg the message to process.
73 * @throws BgpParseException on data processing error 73 * @throws BgpParseException on data processing error
74 */ 74 */
75 - void processBGPPacket(BgpId bgpId, BgpMessage msg) throws BgpParseException; 75 + void processBgpPacket(BgpId bgpId, BgpMessage msg) throws BgpParseException;
76 76
77 /** 77 /**
78 * Close all connected BGP peers. 78 * Close all connected BGP peers.
......
...@@ -19,5 +19,5 @@ package org.onosproject.bgpio.protocol; ...@@ -19,5 +19,5 @@ package org.onosproject.bgpio.protocol;
19 /** 19 /**
20 * Provides Abstraction of IGP RouterID TLV. 20 * Provides Abstraction of IGP RouterID TLV.
21 */ 21 */
22 -public interface IGPRouterID {
23 -}
...\ No newline at end of file ...\ No newline at end of file
22 +public interface IgpRouterId {
23 +}
......
...@@ -27,7 +27,7 @@ import org.onosproject.bgpio.exceptions.BgpParseException; ...@@ -27,7 +27,7 @@ import org.onosproject.bgpio.exceptions.BgpParseException;
27 import org.onosproject.bgpio.types.BgpErrorType; 27 import org.onosproject.bgpio.types.BgpErrorType;
28 import org.onosproject.bgpio.types.BgpValueType; 28 import org.onosproject.bgpio.types.BgpValueType;
29 import org.onosproject.bgpio.types.IPReachabilityInformationTlv; 29 import org.onosproject.bgpio.types.IPReachabilityInformationTlv;
30 -import org.onosproject.bgpio.types.OSPFRouteTypeTlv; 30 +import org.onosproject.bgpio.types.OspfRouteTypeTlv;
31 import org.onosproject.bgpio.types.attr.BgpAttrNodeMultiTopologyId; 31 import org.onosproject.bgpio.types.attr.BgpAttrNodeMultiTopologyId;
32 import org.onosproject.bgpio.util.UnSupportedAttribute; 32 import org.onosproject.bgpio.util.UnSupportedAttribute;
33 import org.slf4j.Logger; 33 import org.slf4j.Logger;
...@@ -139,8 +139,8 @@ public class BgpPrefixLSIdentifier implements Comparable<Object> { ...@@ -139,8 +139,8 @@ public class BgpPrefixLSIdentifier implements Comparable<Object> {
139 } 139 }
140 tempCb = cb.readBytes(length); 140 tempCb = cb.readBytes(length);
141 switch (type) { 141 switch (type) {
142 - case OSPFRouteTypeTlv.TYPE: 142 + case OspfRouteTypeTlv.TYPE:
143 - tlv = OSPFRouteTypeTlv.read(tempCb); 143 + tlv = OspfRouteTypeTlv.read(tempCb);
144 break; 144 break;
145 case IPReachabilityInformationTlv.TYPE: 145 case IPReachabilityInformationTlv.TYPE:
146 tlv = IPReachabilityInformationTlv.read(tempCb, length); 146 tlv = IPReachabilityInformationTlv.read(tempCb, length);
......
...@@ -31,8 +31,8 @@ import org.onosproject.bgpio.types.BgpLSIdentifierTlv; ...@@ -31,8 +31,8 @@ import org.onosproject.bgpio.types.BgpLSIdentifierTlv;
31 import org.onosproject.bgpio.types.BgpValueType; 31 import org.onosproject.bgpio.types.BgpValueType;
32 import org.onosproject.bgpio.types.IsIsNonPseudonode; 32 import org.onosproject.bgpio.types.IsIsNonPseudonode;
33 import org.onosproject.bgpio.types.IsIsPseudonode; 33 import org.onosproject.bgpio.types.IsIsPseudonode;
34 -import org.onosproject.bgpio.types.OSPFNonPseudonode; 34 +import org.onosproject.bgpio.types.OspfNonPseudonode;
35 -import org.onosproject.bgpio.types.OSPFPseudonode; 35 +import org.onosproject.bgpio.types.OspfPseudonode;
36 import org.onosproject.bgpio.util.UnSupportedAttribute; 36 import org.onosproject.bgpio.util.UnSupportedAttribute;
37 import org.slf4j.Logger; 37 import org.slf4j.Logger;
38 import org.slf4j.LoggerFactory; 38 import org.slf4j.LoggerFactory;
...@@ -193,9 +193,9 @@ public class NodeDescriptors { ...@@ -193,9 +193,9 @@ public class NodeDescriptors {
193 } 193 }
194 } else if (protocolId == OSPF_V2_PROTOCOL_ID || protocolId == OSPF_V3_PROTOCOL_ID) { 194 } else if (protocolId == OSPF_V2_PROTOCOL_ID || protocolId == OSPF_V3_PROTOCOL_ID) {
195 if (length == OSPFNONPSEUDONODE_LEN) { 195 if (length == OSPFNONPSEUDONODE_LEN) {
196 - tlv = OSPFNonPseudonode.read(tempCb); 196 + tlv = OspfNonPseudonode.read(tempCb);
197 } else if (length == OSPFPSEUDONODE_LEN) { 197 } else if (length == OSPFPSEUDONODE_LEN) {
198 - tlv = OSPFPseudonode.read(tempCb); 198 + tlv = OspfPseudonode.read(tempCb);
199 } 199 }
200 } 200 }
201 break; 201 break;
......
...@@ -122,11 +122,11 @@ class BgpNotificationMsgVer4 implements BgpNotificationMsg { ...@@ -122,11 +122,11 @@ class BgpNotificationMsgVer4 implements BgpNotificationMsg {
122 private BgpHeader bgpHeader; 122 private BgpHeader bgpHeader;
123 private boolean isErrorCodeSet = false; 123 private boolean isErrorCodeSet = false;
124 private boolean isErrorSubCodeSet = false; 124 private boolean isErrorSubCodeSet = false;
125 - private boolean isBGPHeaderSet = false; 125 + private boolean isBgpHeaderSet = false;
126 126
127 @Override 127 @Override
128 public BgpNotificationMsg build() throws BgpParseException { 128 public BgpNotificationMsg build() throws BgpParseException {
129 - BgpHeader bgpHeader = this.isBGPHeaderSet ? this.bgpHeader : DEFAULT_MESSAGE_HEADER; 129 + BgpHeader bgpHeader = this.isBgpHeaderSet ? this.bgpHeader : DEFAULT_MESSAGE_HEADER;
130 if (!this.isErrorCodeSet) { 130 if (!this.isErrorCodeSet) {
131 throw new BgpParseException("Error code must be present"); 131 throw new BgpParseException("Error code must be present");
132 } 132 }
...@@ -262,4 +262,4 @@ class BgpNotificationMsgVer4 implements BgpNotificationMsg { ...@@ -262,4 +262,4 @@ class BgpNotificationMsgVer4 implements BgpNotificationMsg {
262 .add("errorSubCode", errorSubCode) 262 .add("errorSubCode", errorSubCode)
263 .toString(); 263 .toString();
264 } 264 }
265 -}
...\ No newline at end of file ...\ No newline at end of file
265 +}
......
...@@ -15,10 +15,7 @@ ...@@ -15,10 +15,7 @@
15 */ 15 */
16 package org.onosproject.bgpio.types; 16 package org.onosproject.bgpio.types;
17 17
18 -import java.util.ArrayList; 18 +import com.google.common.base.MoreObjects;
19 -import java.util.List;
20 -import java.util.Objects;
21 -
22 import org.jboss.netty.buffer.ChannelBuffer; 19 import org.jboss.netty.buffer.ChannelBuffer;
23 import org.onosproject.bgpio.exceptions.BgpParseException; 20 import org.onosproject.bgpio.exceptions.BgpParseException;
24 import org.onosproject.bgpio.util.Constants; 21 import org.onosproject.bgpio.util.Constants;
...@@ -26,7 +23,9 @@ import org.onosproject.bgpio.util.Validation; ...@@ -26,7 +23,9 @@ import org.onosproject.bgpio.util.Validation;
26 import org.slf4j.Logger; 23 import org.slf4j.Logger;
27 import org.slf4j.LoggerFactory; 24 import org.slf4j.LoggerFactory;
28 25
29 -import com.google.common.base.MoreObjects; 26 +import java.util.ArrayList;
27 +import java.util.List;
28 +import java.util.Objects;
30 29
31 /** 30 /**
32 * Provides Implementation of As4Path BGP Path Attribute. 31 * Provides Implementation of As4Path BGP Path Attribute.
...@@ -122,7 +121,7 @@ public class As4Path implements BgpValueType { ...@@ -122,7 +121,7 @@ public class As4Path implements BgpValueType {
122 * 121 *
123 * @return list of ASNum in AS4path Sequence 122 * @return list of ASNum in AS4path Sequence
124 */ 123 */
125 - public List<Integer> as4PathSEQ() { 124 + public List<Integer> as4PathSeq() {
126 return this.as4pathSeq; 125 return this.as4pathSeq;
127 } 126 }
128 127
...@@ -131,7 +130,7 @@ public class As4Path implements BgpValueType { ...@@ -131,7 +130,7 @@ public class As4Path implements BgpValueType {
131 * 130 *
132 * @return list of ASNum in AS4path Set 131 * @return list of ASNum in AS4path Set
133 */ 132 */
134 - public List<Integer> as4PathSET() { 133 + public List<Integer> as4PathSet() {
135 return this.as4pathSet; 134 return this.as4pathSet;
136 } 135 }
137 136
...@@ -172,4 +171,4 @@ public class As4Path implements BgpValueType { ...@@ -172,4 +171,4 @@ public class As4Path implements BgpValueType {
172 // TODO Auto-generated method stub 171 // TODO Auto-generated method stub
173 return 0; 172 return 0;
174 } 173 }
175 -}
...\ No newline at end of file ...\ No newline at end of file
174 +}
......
...@@ -16,10 +16,7 @@ ...@@ -16,10 +16,7 @@
16 16
17 package org.onosproject.bgpio.types; 17 package org.onosproject.bgpio.types;
18 18
19 -import java.util.ArrayList; 19 +import com.google.common.base.MoreObjects;
20 -import java.util.List;
21 -import java.util.Objects;
22 -
23 import org.jboss.netty.buffer.ChannelBuffer; 20 import org.jboss.netty.buffer.ChannelBuffer;
24 import org.onosproject.bgpio.exceptions.BgpParseException; 21 import org.onosproject.bgpio.exceptions.BgpParseException;
25 import org.onosproject.bgpio.util.Constants; 22 import org.onosproject.bgpio.util.Constants;
...@@ -27,7 +24,9 @@ import org.onosproject.bgpio.util.Validation; ...@@ -27,7 +24,9 @@ import org.onosproject.bgpio.util.Validation;
27 import org.slf4j.Logger; 24 import org.slf4j.Logger;
28 import org.slf4j.LoggerFactory; 25 import org.slf4j.LoggerFactory;
29 26
30 -import com.google.common.base.MoreObjects; 27 +import java.util.ArrayList;
28 +import java.util.List;
29 +import java.util.Objects;
31 30
32 /** 31 /**
33 * Provides Implementation of AsPath mandatory BGP Path Attribute. 32 * Provides Implementation of AsPath mandatory BGP Path Attribute.
...@@ -36,7 +35,7 @@ public class AsPath implements BgpValueType { ...@@ -36,7 +35,7 @@ public class AsPath implements BgpValueType {
36 /** 35 /**
37 * Enum to provide AS types. 36 * Enum to provide AS types.
38 */ 37 */
39 - public enum ASTYPE { 38 + public enum AsType {
40 AS_SET(1), AS_SEQUENCE(2), AS_CONFED_SEQUENCE(3), AS_CONFED_SET(4); 39 AS_SET(1), AS_SEQUENCE(2), AS_CONFED_SEQUENCE(3), AS_CONFED_SET(4);
41 int value; 40 int value;
42 41
...@@ -45,7 +44,7 @@ public class AsPath implements BgpValueType { ...@@ -45,7 +44,7 @@ public class AsPath implements BgpValueType {
45 * 44 *
46 * @param val AS type 45 * @param val AS type
47 */ 46 */
48 - ASTYPE(int val) { 47 + AsType(int val) {
49 value = val; 48 value = val;
50 } 49 }
51 50
...@@ -211,4 +210,4 @@ public class AsPath implements BgpValueType { ...@@ -211,4 +210,4 @@ public class AsPath implements BgpValueType {
211 // TODO Auto-generated method stub 210 // TODO Auto-generated method stub
212 return 0; 211 return 0;
213 } 212 }
214 -}
...\ No newline at end of file ...\ No newline at end of file
213 +}
......
...@@ -15,18 +15,17 @@ ...@@ -15,18 +15,17 @@
15 */ 15 */
16 package org.onosproject.bgpio.types; 16 package org.onosproject.bgpio.types;
17 17
18 -import java.nio.ByteBuffer; 18 +import com.google.common.base.MoreObjects;
19 -import java.util.Arrays;
20 -
21 import org.jboss.netty.buffer.ChannelBuffer; 19 import org.jboss.netty.buffer.ChannelBuffer;
22 -import org.onosproject.bgpio.protocol.IGPRouterID; 20 +import org.onosproject.bgpio.protocol.IgpRouterId;
23 21
24 -import com.google.common.base.MoreObjects; 22 +import java.nio.ByteBuffer;
23 +import java.util.Arrays;
25 24
26 /** 25 /**
27 * Provides Implementation of IsIsNonPseudonode Tlv. 26 * Provides Implementation of IsIsNonPseudonode Tlv.
28 */ 27 */
29 -public class IsIsNonPseudonode implements IGPRouterID, BgpValueType { 28 +public class IsIsNonPseudonode implements IgpRouterId, BgpValueType {
30 public static final short TYPE = 515; 29 public static final short TYPE = 515;
31 public static final short LENGTH = 6; 30 public static final short LENGTH = 6;
32 31
...@@ -56,7 +55,7 @@ public class IsIsNonPseudonode implements IGPRouterID, BgpValueType { ...@@ -56,7 +55,7 @@ public class IsIsNonPseudonode implements IGPRouterID, BgpValueType {
56 * 55 *
57 * @return ISO NodeID 56 * @return ISO NodeID
58 */ 57 */
59 - public byte[] getISONodeID() { 58 + public byte[] getIsoNodeId() {
60 return isoNodeID; 59 return isoNodeID;
61 } 60 }
62 61
...@@ -121,4 +120,4 @@ public class IsIsNonPseudonode implements IGPRouterID, BgpValueType { ...@@ -121,4 +120,4 @@ public class IsIsNonPseudonode implements IGPRouterID, BgpValueType {
121 .add("ISONodeID", isoNodeID) 120 .add("ISONodeID", isoNodeID)
122 .toString(); 121 .toString();
123 } 122 }
124 -}
...\ No newline at end of file ...\ No newline at end of file
123 +}
......
...@@ -15,19 +15,18 @@ ...@@ -15,19 +15,18 @@
15 */ 15 */
16 package org.onosproject.bgpio.types; 16 package org.onosproject.bgpio.types;
17 17
18 +import com.google.common.base.MoreObjects;
19 +import org.jboss.netty.buffer.ChannelBuffer;
20 +import org.onosproject.bgpio.protocol.IgpRouterId;
21 +
18 import java.nio.ByteBuffer; 22 import java.nio.ByteBuffer;
19 import java.util.Arrays; 23 import java.util.Arrays;
20 import java.util.Objects; 24 import java.util.Objects;
21 25
22 -import org.jboss.netty.buffer.ChannelBuffer;
23 -import org.onosproject.bgpio.protocol.IGPRouterID;
24 -
25 -import com.google.common.base.MoreObjects;
26 -
27 /** 26 /**
28 * Provides implementation of IsIsPseudonode Tlv. 27 * Provides implementation of IsIsPseudonode Tlv.
29 */ 28 */
30 -public class IsIsPseudonode implements IGPRouterID, BgpValueType { 29 +public class IsIsPseudonode implements IgpRouterId, BgpValueType {
31 public static final short TYPE = 515; 30 public static final short TYPE = 515;
32 public static final short LENGTH = 7; 31 public static final short LENGTH = 7;
33 32
...@@ -62,7 +61,7 @@ public class IsIsPseudonode implements IGPRouterID, BgpValueType { ...@@ -62,7 +61,7 @@ public class IsIsPseudonode implements IGPRouterID, BgpValueType {
62 * 61 *
63 * @return ISO NodeID 62 * @return ISO NodeID
64 */ 63 */
65 - public byte[] getISONodeID() { 64 + public byte[] getIsoNodeId() {
66 return isoNodeID; 65 return isoNodeID;
67 } 66 }
68 67
...@@ -71,7 +70,7 @@ public class IsIsPseudonode implements IGPRouterID, BgpValueType { ...@@ -71,7 +70,7 @@ public class IsIsPseudonode implements IGPRouterID, BgpValueType {
71 * 70 *
72 * @return PSN Identifier 71 * @return PSN Identifier
73 */ 72 */
74 - public byte getPSNIdentifier() { 73 + public byte getPsnIdentifier() {
75 return this.psnIdentifier; 74 return this.psnIdentifier;
76 } 75 }
77 76
...@@ -143,4 +142,4 @@ public class IsIsPseudonode implements IGPRouterID, BgpValueType { ...@@ -143,4 +142,4 @@ public class IsIsPseudonode implements IGPRouterID, BgpValueType {
143 .add("psnIdentifier", psnIdentifier) 142 .add("psnIdentifier", psnIdentifier)
144 .toString(); 143 .toString();
145 } 144 }
146 -}
...\ No newline at end of file ...\ No newline at end of file
145 +}
......
...@@ -15,12 +15,12 @@ ...@@ -15,12 +15,12 @@
15 */ 15 */
16 package org.onosproject.bgpio.types; 16 package org.onosproject.bgpio.types;
17 17
18 -import java.util.Objects; 18 +import com.google.common.base.MoreObjects;
19 import org.jboss.netty.buffer.ChannelBuffer; 19 import org.jboss.netty.buffer.ChannelBuffer;
20 import org.slf4j.Logger; 20 import org.slf4j.Logger;
21 import org.slf4j.LoggerFactory; 21 import org.slf4j.LoggerFactory;
22 22
23 -import com.google.common.base.MoreObjects; 23 +import java.util.Objects;
24 24
25 /** 25 /**
26 * Provides MultiProtocolExtnCapabilityTlv. 26 * Provides MultiProtocolExtnCapabilityTlv.
...@@ -74,7 +74,7 @@ public class MultiProtocolExtnCapabilityTlv implements BgpValueType { ...@@ -74,7 +74,7 @@ public class MultiProtocolExtnCapabilityTlv implements BgpValueType {
74 * Returns afi Address Family Identifiers value. 74 * Returns afi Address Family Identifiers value.
75 * @return afi Address Family Identifiers value 75 * @return afi Address Family Identifiers value
76 */ 76 */
77 - public short getAFI() { 77 + public short getAfi() {
78 return afi; 78 return afi;
79 } 79 }
80 80
...@@ -90,7 +90,7 @@ public class MultiProtocolExtnCapabilityTlv implements BgpValueType { ...@@ -90,7 +90,7 @@ public class MultiProtocolExtnCapabilityTlv implements BgpValueType {
90 * Returns safi Subsequent Address Family Identifier value. 90 * Returns safi Subsequent Address Family Identifier value.
91 * @return safi Subsequent Address Family Identifier value 91 * @return safi Subsequent Address Family Identifier value
92 */ 92 */
93 - public byte getSAFI() { 93 + public byte getSafi() {
94 return safi; 94 return safi;
95 } 95 }
96 96
......
...@@ -15,14 +15,13 @@ ...@@ -15,14 +15,13 @@
15 */ 15 */
16 package org.onosproject.bgpio.types; 16 package org.onosproject.bgpio.types;
17 17
18 -import java.util.Objects; 18 +import com.google.common.base.MoreObjects;
19 -
20 import org.jboss.netty.buffer.ChannelBuffer; 19 import org.jboss.netty.buffer.ChannelBuffer;
21 import org.onosproject.bgpio.exceptions.BgpParseException; 20 import org.onosproject.bgpio.exceptions.BgpParseException;
22 import org.onosproject.bgpio.util.Constants; 21 import org.onosproject.bgpio.util.Constants;
23 import org.onosproject.bgpio.util.Validation; 22 import org.onosproject.bgpio.util.Validation;
24 23
25 -import com.google.common.base.MoreObjects; 24 +import java.util.Objects;
26 25
27 /** 26 /**
28 * Provides Implementation of mandatory BGP Origin path attribute. 27 * Provides Implementation of mandatory BGP Origin path attribute.
...@@ -32,7 +31,7 @@ public class Origin implements BgpValueType { ...@@ -32,7 +31,7 @@ public class Origin implements BgpValueType {
32 /** 31 /**
33 * Enum to provide ORIGIN types. 32 * Enum to provide ORIGIN types.
34 */ 33 */
35 - public enum ORIGINTYPE { 34 + public enum OriginType {
36 IGP(0), EGP(1), INCOMPLETE(2); 35 IGP(0), EGP(1), INCOMPLETE(2);
37 int value; 36 int value;
38 /** 37 /**
...@@ -40,7 +39,7 @@ public class Origin implements BgpValueType { ...@@ -40,7 +39,7 @@ public class Origin implements BgpValueType {
40 * 39 *
41 * @param val ORIGIN type 40 * @param val ORIGIN type
42 */ 41 */
43 - ORIGINTYPE(int val) { 42 + OriginType(int val) {
44 value = val; 43 value = val;
45 } 44 }
46 45
...@@ -84,13 +83,13 @@ public class Origin implements BgpValueType { ...@@ -84,13 +83,13 @@ public class Origin implements BgpValueType {
84 * 83 *
85 * @return type of Origin in Enum values 84 * @return type of Origin in Enum values
86 */ 85 */
87 - public ORIGINTYPE origin() { 86 + public OriginType origin() {
88 if (this.origin == 0) { 87 if (this.origin == 0) {
89 - return ORIGINTYPE.IGP; 88 + return OriginType.IGP;
90 } else if (this.origin == 1) { 89 } else if (this.origin == 1) {
91 - return ORIGINTYPE.EGP; 90 + return OriginType.EGP;
92 } else { 91 } else {
93 - return ORIGINTYPE.INCOMPLETE; 92 + return OriginType.INCOMPLETE;
94 } 93 }
95 } 94 }
96 95
...@@ -118,8 +117,8 @@ public class Origin implements BgpValueType { ...@@ -118,8 +117,8 @@ public class Origin implements BgpValueType {
118 117
119 byte originValue; 118 byte originValue;
120 originValue = cb.readByte(); 119 originValue = cb.readByte();
121 - if ((originValue != ORIGINTYPE.INCOMPLETE.value) && (originValue != ORIGINTYPE.IGP.value) && 120 + if ((originValue != OriginType.INCOMPLETE.value) && (originValue != OriginType.IGP.value) &&
122 - (originValue != ORIGINTYPE.EGP.value)) { 121 + (originValue != OriginType.EGP.value)) {
123 throw new BgpParseException(BgpErrorType.UPDATE_MESSAGE_ERROR, BgpErrorType.INVALID_ORIGIN_ATTRIBUTE, data); 122 throw new BgpParseException(BgpErrorType.UPDATE_MESSAGE_ERROR, BgpErrorType.INVALID_ORIGIN_ATTRIBUTE, data);
124 } 123 }
125 return new Origin(originValue); 124 return new Origin(originValue);
...@@ -165,4 +164,4 @@ public class Origin implements BgpValueType { ...@@ -165,4 +164,4 @@ public class Origin implements BgpValueType {
165 // TODO Auto-generated method stub 164 // TODO Auto-generated method stub
166 return 0; 165 return 0;
167 } 166 }
168 -}
...\ No newline at end of file ...\ No newline at end of file
167 +}
......
...@@ -16,17 +16,16 @@ ...@@ -16,17 +16,16 @@
16 16
17 package org.onosproject.bgpio.types; 17 package org.onosproject.bgpio.types;
18 18
19 -import java.util.Objects; 19 +import com.google.common.base.MoreObjects;
20 -
21 import org.jboss.netty.buffer.ChannelBuffer; 20 import org.jboss.netty.buffer.ChannelBuffer;
22 -import org.onosproject.bgpio.protocol.IGPRouterID; 21 +import org.onosproject.bgpio.protocol.IgpRouterId;
23 22
24 -import com.google.common.base.MoreObjects; 23 +import java.util.Objects;
25 24
26 /** 25 /**
27 * Provides implementation of OSPFNonPseudonode Tlv. 26 * Provides implementation of OSPFNonPseudonode Tlv.
28 */ 27 */
29 -public class OSPFNonPseudonode implements IGPRouterID, BgpValueType { 28 +public class OspfNonPseudonode implements IgpRouterId, BgpValueType {
30 public static final short TYPE = 515; 29 public static final short TYPE = 515;
31 public static final short LENGTH = 4; 30 public static final short LENGTH = 4;
32 31
...@@ -37,7 +36,7 @@ public class OSPFNonPseudonode implements IGPRouterID, BgpValueType { ...@@ -37,7 +36,7 @@ public class OSPFNonPseudonode implements IGPRouterID, BgpValueType {
37 * 36 *
38 * @param routerID routerID 37 * @param routerID routerID
39 */ 38 */
40 - public OSPFNonPseudonode(int routerID) { 39 + public OspfNonPseudonode(int routerID) {
41 this.routerID = routerID; 40 this.routerID = routerID;
42 } 41 }
43 42
...@@ -47,8 +46,8 @@ public class OSPFNonPseudonode implements IGPRouterID, BgpValueType { ...@@ -47,8 +46,8 @@ public class OSPFNonPseudonode implements IGPRouterID, BgpValueType {
47 * @param routerID routerID 46 * @param routerID routerID
48 * @return object of OSPFNonPseudonode 47 * @return object of OSPFNonPseudonode
49 */ 48 */
50 - public static OSPFNonPseudonode of(final int routerID) { 49 + public static OspfNonPseudonode of(final int routerID) {
51 - return new OSPFNonPseudonode(routerID); 50 + return new OspfNonPseudonode(routerID);
52 } 51 }
53 52
54 /** 53 /**
...@@ -71,8 +70,8 @@ public class OSPFNonPseudonode implements IGPRouterID, BgpValueType { ...@@ -71,8 +70,8 @@ public class OSPFNonPseudonode implements IGPRouterID, BgpValueType {
71 return true; 70 return true;
72 } 71 }
73 72
74 - if (obj instanceof OSPFNonPseudonode) { 73 + if (obj instanceof OspfNonPseudonode) {
75 - OSPFNonPseudonode other = (OSPFNonPseudonode) obj; 74 + OspfNonPseudonode other = (OspfNonPseudonode) obj;
76 return Objects.equals(routerID, other.routerID); 75 return Objects.equals(routerID, other.routerID);
77 } 76 }
78 return false; 77 return false;
...@@ -93,8 +92,8 @@ public class OSPFNonPseudonode implements IGPRouterID, BgpValueType { ...@@ -93,8 +92,8 @@ public class OSPFNonPseudonode implements IGPRouterID, BgpValueType {
93 * @param cb ChannelBuffer 92 * @param cb ChannelBuffer
94 * @return object of OSPFNonPseudonode 93 * @return object of OSPFNonPseudonode
95 */ 94 */
96 - public static OSPFNonPseudonode read(ChannelBuffer cb) { 95 + public static OspfNonPseudonode read(ChannelBuffer cb) {
97 - return OSPFNonPseudonode.of(cb.readInt()); 96 + return OspfNonPseudonode.of(cb.readInt());
98 } 97 }
99 98
100 @Override 99 @Override
...@@ -107,7 +106,7 @@ public class OSPFNonPseudonode implements IGPRouterID, BgpValueType { ...@@ -107,7 +106,7 @@ public class OSPFNonPseudonode implements IGPRouterID, BgpValueType {
107 if (this.equals(o)) { 106 if (this.equals(o)) {
108 return 0; 107 return 0;
109 } 108 }
110 - return ((Integer) (this.routerID)).compareTo((Integer) (((OSPFNonPseudonode) o).routerID)); 109 + return ((Integer) (this.routerID)).compareTo((Integer) (((OspfNonPseudonode) o).routerID));
111 } 110 }
112 111
113 @Override 112 @Override
...@@ -118,4 +117,4 @@ public class OSPFNonPseudonode implements IGPRouterID, BgpValueType { ...@@ -118,4 +117,4 @@ public class OSPFNonPseudonode implements IGPRouterID, BgpValueType {
118 .add("RouterID", routerID) 117 .add("RouterID", routerID)
119 .toString(); 118 .toString();
120 } 119 }
121 -}
...\ No newline at end of file ...\ No newline at end of file
120 +}
......
...@@ -15,18 +15,17 @@ ...@@ -15,18 +15,17 @@
15 */ 15 */
16 package org.onosproject.bgpio.types; 16 package org.onosproject.bgpio.types;
17 17
18 -import java.util.Objects; 18 +import com.google.common.base.MoreObjects;
19 -
20 import org.jboss.netty.buffer.ChannelBuffer; 19 import org.jboss.netty.buffer.ChannelBuffer;
21 import org.onlab.packet.Ip4Address; 20 import org.onlab.packet.Ip4Address;
22 -import org.onosproject.bgpio.protocol.IGPRouterID; 21 +import org.onosproject.bgpio.protocol.IgpRouterId;
23 22
24 -import com.google.common.base.MoreObjects; 23 +import java.util.Objects;
25 24
26 /** 25 /**
27 * Provides implementation of OSPFPseudonode Tlv. 26 * Provides implementation of OSPFPseudonode Tlv.
28 */ 27 */
29 -public class OSPFPseudonode implements IGPRouterID, BgpValueType { 28 +public class OspfPseudonode implements IgpRouterId, BgpValueType {
30 public static final short TYPE = 515; 29 public static final short TYPE = 515;
31 public static final short LENGTH = 8; 30 public static final short LENGTH = 8;
32 31
...@@ -39,7 +38,7 @@ public class OSPFPseudonode implements IGPRouterID, BgpValueType { ...@@ -39,7 +38,7 @@ public class OSPFPseudonode implements IGPRouterID, BgpValueType {
39 * @param routerID routerID 38 * @param routerID routerID
40 * @param drInterface IPv4 address of the DR's interface 39 * @param drInterface IPv4 address of the DR's interface
41 */ 40 */
42 - public OSPFPseudonode(int routerID, Ip4Address drInterface) { 41 + public OspfPseudonode(int routerID, Ip4Address drInterface) {
43 this.routerID = routerID; 42 this.routerID = routerID;
44 this.drInterface = drInterface; 43 this.drInterface = drInterface;
45 } 44 }
...@@ -51,8 +50,8 @@ public class OSPFPseudonode implements IGPRouterID, BgpValueType { ...@@ -51,8 +50,8 @@ public class OSPFPseudonode implements IGPRouterID, BgpValueType {
51 * @param drInterface IPv4 address of the DR's interface 50 * @param drInterface IPv4 address of the DR's interface
52 * @return object of OSPFPseudonode 51 * @return object of OSPFPseudonode
53 */ 52 */
54 - public static OSPFPseudonode of(final int routerID, final Ip4Address drInterface) { 53 + public static OspfPseudonode of(final int routerID, final Ip4Address drInterface) {
55 - return new OSPFPseudonode(routerID, drInterface); 54 + return new OspfPseudonode(routerID, drInterface);
56 } 55 }
57 56
58 /** 57 /**
...@@ -74,8 +73,8 @@ public class OSPFPseudonode implements IGPRouterID, BgpValueType { ...@@ -74,8 +73,8 @@ public class OSPFPseudonode implements IGPRouterID, BgpValueType {
74 if (this == obj) { 73 if (this == obj) {
75 return true; 74 return true;
76 } 75 }
77 - if (obj instanceof OSPFPseudonode) { 76 + if (obj instanceof OspfPseudonode) {
78 - OSPFPseudonode other = (OSPFPseudonode) obj; 77 + OspfPseudonode other = (OspfPseudonode) obj;
79 return Objects.equals(routerID, other.routerID) && Objects.equals(drInterface, other.drInterface); 78 return Objects.equals(routerID, other.routerID) && Objects.equals(drInterface, other.drInterface);
80 } 79 }
81 return false; 80 return false;
...@@ -97,10 +96,10 @@ public class OSPFPseudonode implements IGPRouterID, BgpValueType { ...@@ -97,10 +96,10 @@ public class OSPFPseudonode implements IGPRouterID, BgpValueType {
97 * @param cb ChannelBuffer 96 * @param cb ChannelBuffer
98 * @return object of OSPFPseudonode 97 * @return object of OSPFPseudonode
99 */ 98 */
100 - public static OSPFPseudonode read(ChannelBuffer cb) { 99 + public static OspfPseudonode read(ChannelBuffer cb) {
101 int routerID = cb.readInt(); 100 int routerID = cb.readInt();
102 Ip4Address drInterface = Ip4Address.valueOf(cb.readInt()); 101 Ip4Address drInterface = Ip4Address.valueOf(cb.readInt());
103 - return OSPFPseudonode.of(routerID, drInterface); 102 + return OspfPseudonode.of(routerID, drInterface);
104 } 103 }
105 104
106 @Override 105 @Override
...@@ -113,9 +112,9 @@ public class OSPFPseudonode implements IGPRouterID, BgpValueType { ...@@ -113,9 +112,9 @@ public class OSPFPseudonode implements IGPRouterID, BgpValueType {
113 if (this.equals(o)) { 112 if (this.equals(o)) {
114 return 0; 113 return 0;
115 } 114 }
116 - int result = ((Integer) (this.routerID)).compareTo((Integer) (((OSPFPseudonode) o).routerID)); 115 + int result = ((Integer) (this.routerID)).compareTo((Integer) (((OspfPseudonode) o).routerID));
117 if (result != 0) { 116 if (result != 0) {
118 - return this.drInterface.compareTo(((OSPFPseudonode) o).drInterface); 117 + return this.drInterface.compareTo(((OspfPseudonode) o).drInterface);
119 } 118 }
120 return result; 119 return result;
121 } 120 }
...@@ -129,4 +128,4 @@ public class OSPFPseudonode implements IGPRouterID, BgpValueType { ...@@ -129,4 +128,4 @@ public class OSPFPseudonode implements IGPRouterID, BgpValueType {
129 .add("DRInterface", drInterface) 128 .add("DRInterface", drInterface)
130 .toString(); 129 .toString();
131 } 130 }
132 -}
...\ No newline at end of file ...\ No newline at end of file
131 +}
......
...@@ -25,7 +25,7 @@ import com.google.common.base.MoreObjects; ...@@ -25,7 +25,7 @@ import com.google.common.base.MoreObjects;
25 /** 25 /**
26 * Provides OSPF Route Type Tlv which contains route type. 26 * Provides OSPF Route Type Tlv which contains route type.
27 */ 27 */
28 -public class OSPFRouteTypeTlv implements BgpValueType { 28 +public class OspfRouteTypeTlv implements BgpValueType {
29 29
30 /* Reference :draft-ietf-idr-ls-distribution-11 30 /* Reference :draft-ietf-idr-ls-distribution-11
31 0 1 2 3 31 0 1 2 3
...@@ -69,7 +69,7 @@ public class OSPFRouteTypeTlv implements BgpValueType { ...@@ -69,7 +69,7 @@ public class OSPFRouteTypeTlv implements BgpValueType {
69 * 69 *
70 * @param routeType Route type 70 * @param routeType Route type
71 */ 71 */
72 - public OSPFRouteTypeTlv(byte routeType) { 72 + public OspfRouteTypeTlv(byte routeType) {
73 this.routeType = routeType; 73 this.routeType = routeType;
74 } 74 }
75 75
...@@ -79,8 +79,8 @@ public class OSPFRouteTypeTlv implements BgpValueType { ...@@ -79,8 +79,8 @@ public class OSPFRouteTypeTlv implements BgpValueType {
79 * @param routeType Route type 79 * @param routeType Route type
80 * @return object of OSPFRouteTypeTlv 80 * @return object of OSPFRouteTypeTlv
81 */ 81 */
82 - public static OSPFRouteTypeTlv of(final byte routeType) { 82 + public static OspfRouteTypeTlv of(final byte routeType) {
83 - return new OSPFRouteTypeTlv(routeType); 83 + return new OspfRouteTypeTlv(routeType);
84 } 84 }
85 85
86 /** 86 /**
...@@ -118,8 +118,8 @@ public class OSPFRouteTypeTlv implements BgpValueType { ...@@ -118,8 +118,8 @@ public class OSPFRouteTypeTlv implements BgpValueType {
118 if (this == obj) { 118 if (this == obj) {
119 return true; 119 return true;
120 } 120 }
121 - if (obj instanceof OSPFRouteTypeTlv) { 121 + if (obj instanceof OspfRouteTypeTlv) {
122 - OSPFRouteTypeTlv other = (OSPFRouteTypeTlv) obj; 122 + OspfRouteTypeTlv other = (OspfRouteTypeTlv) obj;
123 return Objects.equals(routeType, other.routeType); 123 return Objects.equals(routeType, other.routeType);
124 } 124 }
125 return false; 125 return false;
...@@ -140,8 +140,8 @@ public class OSPFRouteTypeTlv implements BgpValueType { ...@@ -140,8 +140,8 @@ public class OSPFRouteTypeTlv implements BgpValueType {
140 * @param cb channelBuffer 140 * @param cb channelBuffer
141 * @return object of OSPFRouteTypeTlv 141 * @return object of OSPFRouteTypeTlv
142 */ 142 */
143 - public static OSPFRouteTypeTlv read(ChannelBuffer cb) { 143 + public static OspfRouteTypeTlv read(ChannelBuffer cb) {
144 - return OSPFRouteTypeTlv.of(cb.readByte()); 144 + return OspfRouteTypeTlv.of(cb.readByte());
145 } 145 }
146 146
147 @Override 147 @Override
...@@ -154,7 +154,7 @@ public class OSPFRouteTypeTlv implements BgpValueType { ...@@ -154,7 +154,7 @@ public class OSPFRouteTypeTlv implements BgpValueType {
154 if (this.equals(o)) { 154 if (this.equals(o)) {
155 return 0; 155 return 0;
156 } 156 }
157 - return ((Byte) (this.routeType)).compareTo((Byte) (((OSPFRouteTypeTlv) o).routeType)); 157 + return ((Byte) (this.routeType)).compareTo((Byte) (((OspfRouteTypeTlv) o).routeType));
158 } 158 }
159 159
160 @Override 160 @Override
...@@ -165,4 +165,4 @@ public class OSPFRouteTypeTlv implements BgpValueType { ...@@ -165,4 +165,4 @@ public class OSPFRouteTypeTlv implements BgpValueType {
165 .add("Value", routeType) 165 .add("Value", routeType)
166 .toString(); 166 .toString();
167 } 167 }
168 -}
...\ No newline at end of file ...\ No newline at end of file
168 +}
......
...@@ -15,8 +15,7 @@ ...@@ -15,8 +15,7 @@
15 */ 15 */
16 package org.onosproject.bgpio.types.attr; 16 package org.onosproject.bgpio.types.attr;
17 17
18 -import java.util.Objects; 18 +import com.google.common.base.MoreObjects;
19 -
20 import org.jboss.netty.buffer.ChannelBuffer; 19 import org.jboss.netty.buffer.ChannelBuffer;
21 import org.onosproject.bgpio.exceptions.BgpParseException; 20 import org.onosproject.bgpio.exceptions.BgpParseException;
22 import org.onosproject.bgpio.types.BgpErrorType; 21 import org.onosproject.bgpio.types.BgpErrorType;
...@@ -25,7 +24,7 @@ import org.onosproject.bgpio.util.Validation; ...@@ -25,7 +24,7 @@ import org.onosproject.bgpio.util.Validation;
25 import org.slf4j.Logger; 24 import org.slf4j.Logger;
26 import org.slf4j.LoggerFactory; 25 import org.slf4j.LoggerFactory;
27 26
28 -import com.google.common.base.MoreObjects; 27 +import java.util.Objects;
29 28
30 /** 29 /**
31 * Implements BGP prefix IGP Flag attribute. 30 * Implements BGP prefix IGP Flag attribute.
...@@ -55,15 +54,15 @@ public final class BgpPrefixAttrIgpFlags implements BgpValueType { ...@@ -55,15 +54,15 @@ public final class BgpPrefixAttrIgpFlags implements BgpValueType {
55 * @param bisisUpDownBit IS-IS Up/Down Bit 54 * @param bisisUpDownBit IS-IS Up/Down Bit
56 * @param bOspfNoUnicastBit OSPF no unicast Bit 55 * @param bOspfNoUnicastBit OSPF no unicast Bit
57 * @param bOspfLclAddrBit OSPF local address Bit 56 * @param bOspfLclAddrBit OSPF local address Bit
58 - * @param bOspfNSSABit OSPF propagate NSSA Bit 57 + * @param bOspfNssaBit OSPF propagate NSSA Bit
59 */ 58 */
60 public BgpPrefixAttrIgpFlags(boolean bisisUpDownBit, 59 public BgpPrefixAttrIgpFlags(boolean bisisUpDownBit,
61 boolean bOspfNoUnicastBit, 60 boolean bOspfNoUnicastBit,
62 - boolean bOspfLclAddrBit, boolean bOspfNSSABit) { 61 + boolean bOspfLclAddrBit, boolean bOspfNssaBit) {
63 this.bisisUpDownBit = bisisUpDownBit; 62 this.bisisUpDownBit = bisisUpDownBit;
64 this.bOspfNoUnicastBit = bOspfNoUnicastBit; 63 this.bOspfNoUnicastBit = bOspfNoUnicastBit;
65 this.bOspfLclAddrBit = bOspfLclAddrBit; 64 this.bOspfLclAddrBit = bOspfLclAddrBit;
66 - this.bOspfNSSABit = bOspfNSSABit; 65 + this.bOspfNSSABit = bOspfNssaBit;
67 } 66 }
68 67
69 /** 68 /**
...@@ -72,15 +71,15 @@ public final class BgpPrefixAttrIgpFlags implements BgpValueType { ...@@ -72,15 +71,15 @@ public final class BgpPrefixAttrIgpFlags implements BgpValueType {
72 * @param bisisUpDownBit IS-IS Up/Down Bit 71 * @param bisisUpDownBit IS-IS Up/Down Bit
73 * @param bOspfNoUnicastBit OSPF no unicast Bit 72 * @param bOspfNoUnicastBit OSPF no unicast Bit
74 * @param bOspfLclAddrBit OSPF local address Bit 73 * @param bOspfLclAddrBit OSPF local address Bit
75 - * @param bOspfNSSABit OSPF propagate NSSA Bit 74 + * @param bOspfNssaBit OSPF propagate NSSA Bit
76 * @return object of BgpPrefixAttrIGPFlags 75 * @return object of BgpPrefixAttrIGPFlags
77 */ 76 */
78 public static BgpPrefixAttrIgpFlags of(final boolean bisisUpDownBit, 77 public static BgpPrefixAttrIgpFlags of(final boolean bisisUpDownBit,
79 final boolean bOspfNoUnicastBit, 78 final boolean bOspfNoUnicastBit,
80 final boolean bOspfLclAddrBit, 79 final boolean bOspfLclAddrBit,
81 - final boolean bOspfNSSABit) { 80 + final boolean bOspfNssaBit) {
82 return new BgpPrefixAttrIgpFlags(bisisUpDownBit, bOspfNoUnicastBit, 81 return new BgpPrefixAttrIgpFlags(bisisUpDownBit, bOspfNoUnicastBit,
83 - bOspfLclAddrBit, bOspfNSSABit); 82 + bOspfLclAddrBit, bOspfNssaBit);
84 } 83 }
85 84
86 /** 85 /**
...@@ -95,7 +94,7 @@ public final class BgpPrefixAttrIgpFlags implements BgpValueType { ...@@ -95,7 +94,7 @@ public final class BgpPrefixAttrIgpFlags implements BgpValueType {
95 boolean bisisUpDownBit = false; 94 boolean bisisUpDownBit = false;
96 boolean bOspfNoUnicastBit = false; 95 boolean bOspfNoUnicastBit = false;
97 boolean bOspfLclAddrBit = false; 96 boolean bOspfLclAddrBit = false;
98 - boolean bOspfNSSABit = false; 97 + boolean bOspfNssaBit = false;
99 98
100 short lsAttrLength = cb.readShort(); 99 short lsAttrLength = cb.readShort();
101 100
...@@ -111,10 +110,10 @@ public final class BgpPrefixAttrIgpFlags implements BgpValueType { ...@@ -111,10 +110,10 @@ public final class BgpPrefixAttrIgpFlags implements BgpValueType {
111 bisisUpDownBit = ((nodeFlagBits & FIRST_BIT) == FIRST_BIT); 110 bisisUpDownBit = ((nodeFlagBits & FIRST_BIT) == FIRST_BIT);
112 bOspfNoUnicastBit = ((nodeFlagBits & SECOND_BIT) == SECOND_BIT); 111 bOspfNoUnicastBit = ((nodeFlagBits & SECOND_BIT) == SECOND_BIT);
113 bOspfLclAddrBit = ((nodeFlagBits & THIRD_BIT) == THIRD_BIT); 112 bOspfLclAddrBit = ((nodeFlagBits & THIRD_BIT) == THIRD_BIT);
114 - bOspfNSSABit = ((nodeFlagBits & FOURTH_BIT) == FOURTH_BIT); 113 + bOspfNssaBit = ((nodeFlagBits & FOURTH_BIT) == FOURTH_BIT);
115 114
116 return BgpPrefixAttrIgpFlags.of(bisisUpDownBit, bOspfNoUnicastBit, 115 return BgpPrefixAttrIgpFlags.of(bisisUpDownBit, bOspfNoUnicastBit,
117 - bOspfLclAddrBit, bOspfNSSABit); 116 + bOspfLclAddrBit, bOspfNssaBit);
118 } 117 }
119 118
120 /** 119 /**
...@@ -149,7 +148,7 @@ public final class BgpPrefixAttrIgpFlags implements BgpValueType { ...@@ -149,7 +148,7 @@ public final class BgpPrefixAttrIgpFlags implements BgpValueType {
149 * 148 *
150 * @return OSPF propagate NSSA Bit set or not 149 * @return OSPF propagate NSSA Bit set or not
151 */ 150 */
152 - public boolean ospfNSSABit() { 151 + public boolean ospfNssaBit() {
153 return bOspfNSSABit; 152 return bOspfNSSABit;
154 } 153 }
155 154
......
...@@ -35,7 +35,7 @@ import org.onosproject.bgpio.types.LinkStateAttributes; ...@@ -35,7 +35,7 @@ import org.onosproject.bgpio.types.LinkStateAttributes;
35 import org.onosproject.bgpio.types.Med; 35 import org.onosproject.bgpio.types.Med;
36 import org.onosproject.bgpio.types.MpReachNlri; 36 import org.onosproject.bgpio.types.MpReachNlri;
37 import org.onosproject.bgpio.types.Origin; 37 import org.onosproject.bgpio.types.Origin;
38 -import org.onosproject.bgpio.types.Origin.ORIGINTYPE; 38 +import org.onosproject.bgpio.types.Origin.OriginType;
39 import org.onosproject.bgpio.types.attr.BgpAttrNodeFlagBitTlv; 39 import org.onosproject.bgpio.types.attr.BgpAttrNodeFlagBitTlv;
40 import org.onosproject.bgpio.types.attr.BgpAttrNodeIsIsAreaId; 40 import org.onosproject.bgpio.types.attr.BgpAttrNodeIsIsAreaId;
41 import org.onosproject.bgpio.types.attr.BgpAttrNodeMultiTopologyId; 41 import org.onosproject.bgpio.types.attr.BgpAttrNodeMultiTopologyId;
...@@ -132,7 +132,7 @@ public class BgpUpdateLinkStateAttrTest { ...@@ -132,7 +132,7 @@ public class BgpUpdateLinkStateAttrTest {
132 BgpPathAttributes pathAttribute = other.bgpPathAttributes(); 132 BgpPathAttributes pathAttribute = other.bgpPathAttributes();
133 pathAttributeList = pathAttribute.pathAttributes(); 133 pathAttributeList = pathAttribute.pathAttributes();
134 ListIterator<BgpValueType> listIterator = pathAttributeList.listIterator(); 134 ListIterator<BgpValueType> listIterator = pathAttributeList.listIterator();
135 - ORIGINTYPE originValue = org.onosproject.bgpio.types.Origin.ORIGINTYPE.IGP; 135 + OriginType originValue = OriginType.IGP;
136 136
137 //compare Origin 137 //compare Origin
138 testPathAttribute = listIterator.next(); 138 testPathAttribute = listIterator.next();
...@@ -250,7 +250,7 @@ public class BgpUpdateLinkStateAttrTest { ...@@ -250,7 +250,7 @@ public class BgpUpdateLinkStateAttrTest {
250 BgpPathAttributes pathAttribute = other.bgpPathAttributes(); 250 BgpPathAttributes pathAttribute = other.bgpPathAttributes();
251 pathAttributeList = pathAttribute.pathAttributes(); 251 pathAttributeList = pathAttribute.pathAttributes();
252 ListIterator<BgpValueType> listIterator = pathAttributeList.listIterator(); 252 ListIterator<BgpValueType> listIterator = pathAttributeList.listIterator();
253 - ORIGINTYPE originValue = org.onosproject.bgpio.types.Origin.ORIGINTYPE.IGP; 253 + OriginType originValue = OriginType.IGP;
254 254
255 testPathAttribute = listIterator.next(); 255 testPathAttribute = listIterator.next();
256 origin = (Origin) testPathAttribute; 256 origin = (Origin) testPathAttribute;
...@@ -363,7 +363,7 @@ public class BgpUpdateLinkStateAttrTest { ...@@ -363,7 +363,7 @@ public class BgpUpdateLinkStateAttrTest {
363 BgpPathAttributes pathAttribute = other.bgpPathAttributes(); 363 BgpPathAttributes pathAttribute = other.bgpPathAttributes();
364 pathAttributeList = pathAttribute.pathAttributes(); 364 pathAttributeList = pathAttribute.pathAttributes();
365 ListIterator<BgpValueType> listIterator = pathAttributeList.listIterator(); 365 ListIterator<BgpValueType> listIterator = pathAttributeList.listIterator();
366 - ORIGINTYPE originValue = org.onosproject.bgpio.types.Origin.ORIGINTYPE.IGP; 366 + OriginType originValue = OriginType.IGP;
367 367
368 testPathAttribute = listIterator.next(); 368 testPathAttribute = listIterator.next();
369 origin = (Origin) testPathAttribute; 369 origin = (Origin) testPathAttribute;
...@@ -477,7 +477,7 @@ public class BgpUpdateLinkStateAttrTest { ...@@ -477,7 +477,7 @@ public class BgpUpdateLinkStateAttrTest {
477 BgpPathAttributes pathAttribute = other.bgpPathAttributes(); 477 BgpPathAttributes pathAttribute = other.bgpPathAttributes();
478 pathAttributeList = pathAttribute.pathAttributes(); 478 pathAttributeList = pathAttribute.pathAttributes();
479 ListIterator<BgpValueType> listIterator = pathAttributeList.listIterator(); 479 ListIterator<BgpValueType> listIterator = pathAttributeList.listIterator();
480 - ORIGINTYPE originValue = org.onosproject.bgpio.types.Origin.ORIGINTYPE.IGP; 480 + OriginType originValue = OriginType.IGP;
481 481
482 testPathAttribute = listIterator.next(); 482 testPathAttribute = listIterator.next();
483 origin = (Origin) testPathAttribute; 483 origin = (Origin) testPathAttribute;
...@@ -594,7 +594,7 @@ public class BgpUpdateLinkStateAttrTest { ...@@ -594,7 +594,7 @@ public class BgpUpdateLinkStateAttrTest {
594 BgpPathAttributes pathAttribute = other.bgpPathAttributes(); 594 BgpPathAttributes pathAttribute = other.bgpPathAttributes();
595 pathAttributeList = pathAttribute.pathAttributes(); 595 pathAttributeList = pathAttribute.pathAttributes();
596 ListIterator<BgpValueType> listIterator = pathAttributeList.listIterator(); 596 ListIterator<BgpValueType> listIterator = pathAttributeList.listIterator();
597 - ORIGINTYPE originValue = org.onosproject.bgpio.types.Origin.ORIGINTYPE.IGP; 597 + OriginType originValue = OriginType.IGP;
598 598
599 testPathAttribute = listIterator.next(); 599 testPathAttribute = listIterator.next();
600 origin = (Origin) testPathAttribute; 600 origin = (Origin) testPathAttribute;
...@@ -713,7 +713,7 @@ public class BgpUpdateLinkStateAttrTest { ...@@ -713,7 +713,7 @@ public class BgpUpdateLinkStateAttrTest {
713 pathAttributeList = pathAttribute.pathAttributes(); 713 pathAttributeList = pathAttribute.pathAttributes();
714 ListIterator<BgpValueType> listIterator = pathAttributeList.listIterator(); 714 ListIterator<BgpValueType> listIterator = pathAttributeList.listIterator();
715 715
716 - ORIGINTYPE originValue = org.onosproject.bgpio.types.Origin.ORIGINTYPE.IGP; 716 + OriginType originValue = OriginType.IGP;
717 717
718 testPathAttribute = listIterator.next(); 718 testPathAttribute = listIterator.next();
719 origin = (Origin) testPathAttribute; 719 origin = (Origin) testPathAttribute;
...@@ -827,7 +827,7 @@ public class BgpUpdateLinkStateAttrTest { ...@@ -827,7 +827,7 @@ public class BgpUpdateLinkStateAttrTest {
827 BgpPathAttributes pathAttribute = other.bgpPathAttributes(); 827 BgpPathAttributes pathAttribute = other.bgpPathAttributes();
828 pathAttributeList = pathAttribute.pathAttributes(); 828 pathAttributeList = pathAttribute.pathAttributes();
829 ListIterator<BgpValueType> listIterator = pathAttributeList.listIterator(); 829 ListIterator<BgpValueType> listIterator = pathAttributeList.listIterator();
830 - ORIGINTYPE originValue = org.onosproject.bgpio.types.Origin.ORIGINTYPE.IGP; 830 + OriginType originValue = OriginType.IGP;
831 831
832 testPathAttribute = listIterator.next(); 832 testPathAttribute = listIterator.next();
833 origin = (Origin) testPathAttribute; 833 origin = (Origin) testPathAttribute;
...@@ -945,7 +945,7 @@ public class BgpUpdateLinkStateAttrTest { ...@@ -945,7 +945,7 @@ public class BgpUpdateLinkStateAttrTest {
945 BgpPathAttributes pathAttribute = other.bgpPathAttributes(); 945 BgpPathAttributes pathAttribute = other.bgpPathAttributes();
946 pathAttributeList = pathAttribute.pathAttributes(); 946 pathAttributeList = pathAttribute.pathAttributes();
947 ListIterator<BgpValueType> listIterator = pathAttributeList.listIterator(); 947 ListIterator<BgpValueType> listIterator = pathAttributeList.listIterator();
948 - ORIGINTYPE originValue = org.onosproject.bgpio.types.Origin.ORIGINTYPE.IGP; 948 + OriginType originValue = OriginType.IGP;
949 949
950 testPathAttribute = listIterator.next(); 950 testPathAttribute = listIterator.next();
951 origin = (Origin) testPathAttribute; 951 origin = (Origin) testPathAttribute;
...@@ -1063,7 +1063,7 @@ public class BgpUpdateLinkStateAttrTest { ...@@ -1063,7 +1063,7 @@ public class BgpUpdateLinkStateAttrTest {
1063 BgpPathAttributes pathAttribute = other.bgpPathAttributes(); 1063 BgpPathAttributes pathAttribute = other.bgpPathAttributes();
1064 pathAttributeList = pathAttribute.pathAttributes(); 1064 pathAttributeList = pathAttribute.pathAttributes();
1065 ListIterator<BgpValueType> listIterator = pathAttributeList.listIterator(); 1065 ListIterator<BgpValueType> listIterator = pathAttributeList.listIterator();
1066 - ORIGINTYPE originValue = org.onosproject.bgpio.types.Origin.ORIGINTYPE.IGP; 1066 + OriginType originValue = OriginType.IGP;
1067 1067
1068 testPathAttribute = listIterator.next(); 1068 testPathAttribute = listIterator.next();
1069 origin = (Origin) testPathAttribute; 1069 origin = (Origin) testPathAttribute;
...@@ -1175,7 +1175,7 @@ public class BgpUpdateLinkStateAttrTest { ...@@ -1175,7 +1175,7 @@ public class BgpUpdateLinkStateAttrTest {
1175 BgpPathAttributes pathAttribute = other.bgpPathAttributes(); 1175 BgpPathAttributes pathAttribute = other.bgpPathAttributes();
1176 pathAttributeList = pathAttribute.pathAttributes(); 1176 pathAttributeList = pathAttribute.pathAttributes();
1177 ListIterator<BgpValueType> listIterator = pathAttributeList.listIterator(); 1177 ListIterator<BgpValueType> listIterator = pathAttributeList.listIterator();
1178 - ORIGINTYPE originValue = org.onosproject.bgpio.types.Origin.ORIGINTYPE.IGP; 1178 + OriginType originValue = OriginType.IGP;
1179 1179
1180 testPathAttribute = listIterator.next(); 1180 testPathAttribute = listIterator.next();
1181 origin = (Origin) testPathAttribute; 1181 origin = (Origin) testPathAttribute;
...@@ -1288,7 +1288,7 @@ public class BgpUpdateLinkStateAttrTest { ...@@ -1288,7 +1288,7 @@ public class BgpUpdateLinkStateAttrTest {
1288 BgpPathAttributes pathAttribute = other.bgpPathAttributes(); 1288 BgpPathAttributes pathAttribute = other.bgpPathAttributes();
1289 pathAttributeList = pathAttribute.pathAttributes(); 1289 pathAttributeList = pathAttribute.pathAttributes();
1290 ListIterator<BgpValueType> listIterator = pathAttributeList.listIterator(); 1290 ListIterator<BgpValueType> listIterator = pathAttributeList.listIterator();
1291 - ORIGINTYPE originValue = org.onosproject.bgpio.types.Origin.ORIGINTYPE.IGP; 1291 + OriginType originValue = OriginType.IGP;
1292 1292
1293 testPathAttribute = listIterator.next(); 1293 testPathAttribute = listIterator.next();
1294 origin = (Origin) testPathAttribute; 1294 origin = (Origin) testPathAttribute;
...@@ -1400,7 +1400,7 @@ public class BgpUpdateLinkStateAttrTest { ...@@ -1400,7 +1400,7 @@ public class BgpUpdateLinkStateAttrTest {
1400 BgpPathAttributes pathAttribute = other.bgpPathAttributes(); 1400 BgpPathAttributes pathAttribute = other.bgpPathAttributes();
1401 pathAttributeList = pathAttribute.pathAttributes(); 1401 pathAttributeList = pathAttribute.pathAttributes();
1402 ListIterator<BgpValueType> listIterator = pathAttributeList.listIterator(); 1402 ListIterator<BgpValueType> listIterator = pathAttributeList.listIterator();
1403 - ORIGINTYPE originValue = org.onosproject.bgpio.types.Origin.ORIGINTYPE.IGP; 1403 + OriginType originValue = OriginType.IGP;
1404 1404
1405 testPathAttribute = listIterator.next(); 1405 testPathAttribute = listIterator.next();
1406 origin = (Origin) testPathAttribute; 1406 origin = (Origin) testPathAttribute;
...@@ -1513,7 +1513,7 @@ public class BgpUpdateLinkStateAttrTest { ...@@ -1513,7 +1513,7 @@ public class BgpUpdateLinkStateAttrTest {
1513 BgpPathAttributes pathAttribute = other.bgpPathAttributes(); 1513 BgpPathAttributes pathAttribute = other.bgpPathAttributes();
1514 pathAttributeList = pathAttribute.pathAttributes(); 1514 pathAttributeList = pathAttribute.pathAttributes();
1515 ListIterator<BgpValueType> listIterator = pathAttributeList.listIterator(); 1515 ListIterator<BgpValueType> listIterator = pathAttributeList.listIterator();
1516 - ORIGINTYPE originValue = org.onosproject.bgpio.types.Origin.ORIGINTYPE.IGP; 1516 + OriginType originValue = OriginType.IGP;
1517 1517
1518 testPathAttribute = listIterator.next(); 1518 testPathAttribute = listIterator.next();
1519 origin = (Origin) testPathAttribute; 1519 origin = (Origin) testPathAttribute;
...@@ -1626,7 +1626,7 @@ public class BgpUpdateLinkStateAttrTest { ...@@ -1626,7 +1626,7 @@ public class BgpUpdateLinkStateAttrTest {
1626 BgpPathAttributes pathAttribute = other.bgpPathAttributes(); 1626 BgpPathAttributes pathAttribute = other.bgpPathAttributes();
1627 pathAttributeList = pathAttribute.pathAttributes(); 1627 pathAttributeList = pathAttribute.pathAttributes();
1628 ListIterator<BgpValueType> listIterator = pathAttributeList.listIterator(); 1628 ListIterator<BgpValueType> listIterator = pathAttributeList.listIterator();
1629 - ORIGINTYPE originValue = org.onosproject.bgpio.types.Origin.ORIGINTYPE.IGP; 1629 + OriginType originValue = OriginType.IGP;
1630 1630
1631 testPathAttribute = listIterator.next(); 1631 testPathAttribute = listIterator.next();
1632 origin = (Origin) testPathAttribute; 1632 origin = (Origin) testPathAttribute;
...@@ -1739,7 +1739,7 @@ public class BgpUpdateLinkStateAttrTest { ...@@ -1739,7 +1739,7 @@ public class BgpUpdateLinkStateAttrTest {
1739 BgpPathAttributes pathAttribute = other.bgpPathAttributes(); 1739 BgpPathAttributes pathAttribute = other.bgpPathAttributes();
1740 pathAttributeList = pathAttribute.pathAttributes(); 1740 pathAttributeList = pathAttribute.pathAttributes();
1741 ListIterator<BgpValueType> listIterator = pathAttributeList.listIterator(); 1741 ListIterator<BgpValueType> listIterator = pathAttributeList.listIterator();
1742 - ORIGINTYPE originValue = org.onosproject.bgpio.types.Origin.ORIGINTYPE.IGP; 1742 + OriginType originValue = OriginType.IGP;
1743 1743
1744 testPathAttribute = listIterator.next(); 1744 testPathAttribute = listIterator.next();
1745 origin = (Origin) testPathAttribute; 1745 origin = (Origin) testPathAttribute;
...@@ -1840,7 +1840,7 @@ public class BgpUpdateLinkStateAttrTest { ...@@ -1840,7 +1840,7 @@ public class BgpUpdateLinkStateAttrTest {
1840 BgpPathAttributes pathAttribute = other.bgpPathAttributes(); 1840 BgpPathAttributes pathAttribute = other.bgpPathAttributes();
1841 pathAttributeList = pathAttribute.pathAttributes(); 1841 pathAttributeList = pathAttribute.pathAttributes();
1842 ListIterator<BgpValueType> listIterator = pathAttributeList.listIterator(); 1842 ListIterator<BgpValueType> listIterator = pathAttributeList.listIterator();
1843 - ORIGINTYPE originValue = org.onosproject.bgpio.types.Origin.ORIGINTYPE.IGP; 1843 + OriginType originValue = OriginType.IGP;
1844 1844
1845 testPathAttribute = listIterator.next(); 1845 testPathAttribute = listIterator.next();
1846 origin = (Origin) testPathAttribute; 1846 origin = (Origin) testPathAttribute;
...@@ -1935,7 +1935,7 @@ public class BgpUpdateLinkStateAttrTest { ...@@ -1935,7 +1935,7 @@ public class BgpUpdateLinkStateAttrTest {
1935 BgpPathAttributes pathAttribute = other.bgpPathAttributes(); 1935 BgpPathAttributes pathAttribute = other.bgpPathAttributes();
1936 pathAttributeList = pathAttribute.pathAttributes(); 1936 pathAttributeList = pathAttribute.pathAttributes();
1937 ListIterator<BgpValueType> listIterator = pathAttributeList.listIterator(); 1937 ListIterator<BgpValueType> listIterator = pathAttributeList.listIterator();
1938 - ORIGINTYPE originValue = org.onosproject.bgpio.types.Origin.ORIGINTYPE.IGP; 1938 + OriginType originValue = OriginType.IGP;
1939 1939
1940 testPathAttribute = listIterator.next(); 1940 testPathAttribute = listIterator.next();
1941 origin = (Origin) testPathAttribute; 1941 origin = (Origin) testPathAttribute;
......
...@@ -28,9 +28,9 @@ public class OspfPseudonodeTest { ...@@ -28,9 +28,9 @@ public class OspfPseudonodeTest {
28 private final int value2 = 0xc3223406; 28 private final int value2 = 0xc3223406;
29 private final Ip4Address drInterface1 = Ip4Address.valueOf(0xaf91e01); 29 private final Ip4Address drInterface1 = Ip4Address.valueOf(0xaf91e01);
30 private final Ip4Address drInterface2 = Ip4Address.valueOf(0xaf91e02); 30 private final Ip4Address drInterface2 = Ip4Address.valueOf(0xaf91e02);
31 - private final OSPFPseudonode tlv1 = OSPFPseudonode.of(value1, drInterface1); 31 + private final OspfPseudonode tlv1 = OspfPseudonode.of(value1, drInterface1);
32 - private final OSPFPseudonode sameAsTlv1 = OSPFPseudonode.of(value1, drInterface1); 32 + private final OspfPseudonode sameAsTlv1 = OspfPseudonode.of(value1, drInterface1);
33 - private final OSPFPseudonode tlv2 = OSPFPseudonode.of(value2, drInterface2); 33 + private final OspfPseudonode tlv2 = OspfPseudonode.of(value2, drInterface2);
34 34
35 @Test 35 @Test
36 public void testEquality() { 36 public void testEquality() {
......
...@@ -25,9 +25,9 @@ import com.google.common.testing.EqualsTester; ...@@ -25,9 +25,9 @@ import com.google.common.testing.EqualsTester;
25 public class OspfRouteTypeTest { 25 public class OspfRouteTypeTest {
26 private final byte value1 = 5; 26 private final byte value1 = 5;
27 private final byte value2 = 4; 27 private final byte value2 = 4;
28 - private final OSPFRouteTypeTlv tlv1 = OSPFRouteTypeTlv.of(value1); 28 + private final OspfRouteTypeTlv tlv1 = OspfRouteTypeTlv.of(value1);
29 - private final OSPFRouteTypeTlv sameAsTlv1 = OSPFRouteTypeTlv.of(value1); 29 + private final OspfRouteTypeTlv sameAsTlv1 = OspfRouteTypeTlv.of(value1);
30 - private final OSPFRouteTypeTlv tlv2 = OSPFRouteTypeTlv.of(value2); 30 + private final OspfRouteTypeTlv tlv2 = OspfRouteTypeTlv.of(value2);
31 31
32 @Test 32 @Test
33 public void testEquality() { 33 public void testEquality() {
......
...@@ -16,18 +16,6 @@ ...@@ -16,18 +16,6 @@
16 16
17 package org.onosproject.bgp.controller.impl; 17 package org.onosproject.bgp.controller.impl;
18 18
19 -import java.io.IOException;
20 -import java.net.InetAddress;
21 -import java.net.InetSocketAddress;
22 -import java.net.SocketAddress;
23 -import java.net.UnknownHostException;
24 -import java.nio.channels.ClosedChannelException;
25 -import java.util.Collections;
26 -import java.util.LinkedList;
27 -import java.util.List;
28 -import java.util.ListIterator;
29 -import java.util.concurrent.RejectedExecutionException;
30 -
31 import org.jboss.netty.buffer.ChannelBuffer; 19 import org.jboss.netty.buffer.ChannelBuffer;
32 import org.jboss.netty.buffer.ChannelBuffers; 20 import org.jboss.netty.buffer.ChannelBuffers;
33 import org.jboss.netty.channel.Channel; 21 import org.jboss.netty.channel.Channel;
...@@ -59,6 +47,18 @@ import org.onosproject.bgpio.types.MultiProtocolExtnCapabilityTlv; ...@@ -59,6 +47,18 @@ import org.onosproject.bgpio.types.MultiProtocolExtnCapabilityTlv;
59 import org.slf4j.Logger; 47 import org.slf4j.Logger;
60 import org.slf4j.LoggerFactory; 48 import org.slf4j.LoggerFactory;
61 49
50 +import java.io.IOException;
51 +import java.net.InetAddress;
52 +import java.net.InetSocketAddress;
53 +import java.net.SocketAddress;
54 +import java.net.UnknownHostException;
55 +import java.nio.channels.ClosedChannelException;
56 +import java.util.Collections;
57 +import java.util.LinkedList;
58 +import java.util.List;
59 +import java.util.ListIterator;
60 +import java.util.concurrent.RejectedExecutionException;
61 +
62 /** 62 /**
63 * Channel handler deals with the bgp peer connection and dispatches messages from peer to the appropriate locations. 63 * Channel handler deals with the bgp peer connection and dispatches messages from peer to the appropriate locations.
64 */ 64 */
...@@ -95,7 +95,7 @@ class BgpChannelHandler extends IdleStateAwareChannelHandler { ...@@ -95,7 +95,7 @@ class BgpChannelHandler extends IdleStateAwareChannelHandler {
95 // proceeds to cleaup peer state - we need to ensure that it does not 95 // proceeds to cleaup peer state - we need to ensure that it does not
96 // cleanup 96 // cleanup
97 // peer state for the older (still connected) peer 97 // peer state for the older (still connected) peer
98 - private volatile Boolean duplicateBGPIdFound; 98 + private volatile Boolean duplicateBgpIdFound;
99 // Indicates the bgp version used by this bgp peer 99 // Indicates the bgp version used by this bgp peer
100 protected BgpVersion bgpVersion; 100 protected BgpVersion bgpVersion;
101 private BgpController bgpController; 101 private BgpController bgpController;
...@@ -119,7 +119,7 @@ class BgpChannelHandler extends IdleStateAwareChannelHandler { ...@@ -119,7 +119,7 @@ class BgpChannelHandler extends IdleStateAwareChannelHandler {
119 this.peerManager = (BgpPeerManagerImpl) bgpController.peerManager(); 119 this.peerManager = (BgpPeerManagerImpl) bgpController.peerManager();
120 this.state = ChannelState.IDLE; 120 this.state = ChannelState.IDLE;
121 this.factory4 = Controller.getBgpMessageFactory4(); 121 this.factory4 = Controller.getBgpMessageFactory4();
122 - this.duplicateBGPIdFound = Boolean.FALSE; 122 + this.duplicateBgpIdFound = Boolean.FALSE;
123 this.bgpPacketStats = new BgpPacketStatsImpl(); 123 this.bgpPacketStats = new BgpPacketStatsImpl();
124 this.bgpconfig = bgpController.getConfig(); 124 this.bgpconfig = bgpController.getConfig();
125 } 125 }
...@@ -344,7 +344,7 @@ class BgpChannelHandler extends IdleStateAwareChannelHandler { ...@@ -344,7 +344,7 @@ class BgpChannelHandler extends IdleStateAwareChannelHandler {
344 protected void disconnectDuplicate(BgpChannelHandler h) { 344 protected void disconnectDuplicate(BgpChannelHandler h) {
345 log.error("Duplicated BGP IP or incompleted cleanup - " + "" + "disconnecting channel {}", 345 log.error("Duplicated BGP IP or incompleted cleanup - " + "" + "disconnecting channel {}",
346 h.getPeerInfoString()); 346 h.getPeerInfoString());
347 - h.duplicateBGPIdFound = Boolean.TRUE; 347 + h.duplicateBgpIdFound = Boolean.TRUE;
348 h.channel.disconnect(); 348 h.channel.disconnect();
349 } 349 }
350 350
...@@ -438,7 +438,7 @@ class BgpChannelHandler extends IdleStateAwareChannelHandler { ...@@ -438,7 +438,7 @@ class BgpChannelHandler extends IdleStateAwareChannelHandler {
438 peerAddr = IpAddress.valueOf(inetAddress.getAddress()).toString(); 438 peerAddr = IpAddress.valueOf(inetAddress.getAddress()).toString();
439 439
440 if (thisbgpId != null) { 440 if (thisbgpId != null) {
441 - if (!duplicateBGPIdFound) { 441 + if (!duplicateBgpIdFound) {
442 // if the disconnected peer (on this ChannelHandler) 442 // if the disconnected peer (on this ChannelHandler)
443 // was not one with a duplicate, it is safe to remove all 443 // was not one with a duplicate, it is safe to remove all
444 // state for it at the controller. Notice that if the disconnected 444 // state for it at the controller. Notice that if the disconnected
...@@ -449,7 +449,7 @@ class BgpChannelHandler extends IdleStateAwareChannelHandler { ...@@ -449,7 +449,7 @@ class BgpChannelHandler extends IdleStateAwareChannelHandler {
449 if (bgpPeer != null) { 449 if (bgpPeer != null) {
450 BgpPeerImpl peer = (BgpPeerImpl) bgpPeer; 450 BgpPeerImpl peer = (BgpPeerImpl) bgpPeer;
451 peerManager.removeConnectedPeer(thisbgpId); 451 peerManager.removeConnectedPeer(thisbgpId);
452 - peer.updateLocalRIBOnPeerDisconnect(); 452 + peer.updateLocalRibOnPeerDisconnect();
453 } 453 }
454 454
455 // Retry connection if connection is lost to bgp speaker/peer 455 // Retry connection if connection is lost to bgp speaker/peer
...@@ -475,7 +475,7 @@ class BgpChannelHandler extends IdleStateAwareChannelHandler { ...@@ -475,7 +475,7 @@ class BgpChannelHandler extends IdleStateAwareChannelHandler {
475 // this is the same peer reconnecting, but the original state was 475 // this is the same peer reconnecting, but the original state was
476 // not cleaned up - XXX check liveness of original ChannelHandler 476 // not cleaned up - XXX check liveness of original ChannelHandler
477 log.debug("{}:duplicate found", getPeerInfoString()); 477 log.debug("{}:duplicate found", getPeerInfoString());
478 - duplicateBGPIdFound = Boolean.FALSE; 478 + duplicateBgpIdFound = Boolean.FALSE;
479 } 479 }
480 480
481 stopKeepAliveTimer(); 481 stopKeepAliveTimer();
...@@ -610,7 +610,7 @@ class BgpChannelHandler extends IdleStateAwareChannelHandler { ...@@ -610,7 +610,7 @@ class BgpChannelHandler extends IdleStateAwareChannelHandler {
610 */ 610 */
611 private void dispatchMessage(BgpMessage m) throws BgpParseException { 611 private void dispatchMessage(BgpMessage m) throws BgpParseException {
612 bgpPacketStats.addInPacket(); 612 bgpPacketStats.addInPacket();
613 - bgpController.processBGPPacket(thisbgpId, m); 613 + bgpController.processBgpPacket(thisbgpId, m);
614 } 614 }
615 615
616 /** 616 /**
......
...@@ -16,14 +16,6 @@ ...@@ -16,14 +16,6 @@
16 16
17 package org.onosproject.bgp.controller.impl; 17 package org.onosproject.bgp.controller.impl;
18 18
19 -import java.util.Iterator;
20 -import java.util.List;
21 -import java.util.Set;
22 -import java.util.concurrent.ConcurrentHashMap;
23 -import java.util.concurrent.CopyOnWriteArraySet;
24 -import java.util.concurrent.locks.Lock;
25 -import java.util.concurrent.locks.ReentrantLock;
26 -
27 import org.apache.felix.scr.annotations.Activate; 19 import org.apache.felix.scr.annotations.Activate;
28 import org.apache.felix.scr.annotations.Component; 20 import org.apache.felix.scr.annotations.Component;
29 import org.apache.felix.scr.annotations.Deactivate; 21 import org.apache.felix.scr.annotations.Deactivate;
...@@ -32,8 +24,8 @@ import org.onosproject.bgp.controller.BgpCfg; ...@@ -32,8 +24,8 @@ import org.onosproject.bgp.controller.BgpCfg;
32 import org.onosproject.bgp.controller.BgpController; 24 import org.onosproject.bgp.controller.BgpController;
33 import org.onosproject.bgp.controller.BgpId; 25 import org.onosproject.bgp.controller.BgpId;
34 import org.onosproject.bgp.controller.BgpLocalRib; 26 import org.onosproject.bgp.controller.BgpLocalRib;
35 -import org.onosproject.bgp.controller.BgpPeer;
36 import org.onosproject.bgp.controller.BgpNodeListener; 27 import org.onosproject.bgp.controller.BgpNodeListener;
28 +import org.onosproject.bgp.controller.BgpPeer;
37 import org.onosproject.bgp.controller.BgpPeerManager; 29 import org.onosproject.bgp.controller.BgpPeerManager;
38 import org.onosproject.bgpio.exceptions.BgpParseException; 30 import org.onosproject.bgpio.exceptions.BgpParseException;
39 import org.onosproject.bgpio.protocol.BgpMessage; 31 import org.onosproject.bgpio.protocol.BgpMessage;
...@@ -44,6 +36,14 @@ import org.onosproject.bgpio.types.MpUnReachNlri; ...@@ -44,6 +36,14 @@ import org.onosproject.bgpio.types.MpUnReachNlri;
44 import org.slf4j.Logger; 36 import org.slf4j.Logger;
45 import org.slf4j.LoggerFactory; 37 import org.slf4j.LoggerFactory;
46 38
39 +import java.util.Iterator;
40 +import java.util.List;
41 +import java.util.Set;
42 +import java.util.concurrent.ConcurrentHashMap;
43 +import java.util.concurrent.CopyOnWriteArraySet;
44 +import java.util.concurrent.locks.Lock;
45 +import java.util.concurrent.locks.ReentrantLock;
46 +
47 @Component(immediate = true) 47 @Component(immediate = true)
48 @Service 48 @Service
49 public class BgpControllerImpl implements BgpController { 49 public class BgpControllerImpl implements BgpController {
...@@ -54,8 +54,8 @@ public class BgpControllerImpl implements BgpController { ...@@ -54,8 +54,8 @@ public class BgpControllerImpl implements BgpController {
54 54
55 protected BgpPeerManagerImpl peerManager = new BgpPeerManagerImpl(); 55 protected BgpPeerManagerImpl peerManager = new BgpPeerManagerImpl();
56 56
57 - private BgpLocalRib bgplocalRIB = new BgpLocalRibImpl(this); 57 + private BgpLocalRib bgplocalRib = new BgpLocalRibImpl(this);
58 - private BgpLocalRib bgplocalRIBVpn = new BgpLocalRibImpl(this); 58 + private BgpLocalRib bgplocalRibVpn = new BgpLocalRibImpl(this);
59 59
60 protected Set<BgpNodeListener> bgpNodeListener = new CopyOnWriteArraySet<>(); 60 protected Set<BgpNodeListener> bgpNodeListener = new CopyOnWriteArraySet<>();
61 61
...@@ -108,7 +108,7 @@ public class BgpControllerImpl implements BgpController { ...@@ -108,7 +108,7 @@ public class BgpControllerImpl implements BgpController {
108 } 108 }
109 109
110 @Override 110 @Override
111 - public void processBGPPacket(BgpId bgpId, BgpMessage msg) throws BgpParseException { 111 + public void processBgpPacket(BgpId bgpId, BgpMessage msg) throws BgpParseException {
112 112
113 BgpPeer peer = getPeer(bgpId); 113 BgpPeer peer = getPeer(bgpId);
114 114
...@@ -251,7 +251,7 @@ public class BgpControllerImpl implements BgpController { ...@@ -251,7 +251,7 @@ public class BgpControllerImpl implements BgpController {
251 */ 251 */
252 @Override 252 @Override
253 public BgpLocalRib bgpLocalRib() { 253 public BgpLocalRib bgpLocalRib() {
254 - return bgplocalRIB; 254 + return bgplocalRib;
255 } 255 }
256 256
257 /** 257 /**
...@@ -261,6 +261,6 @@ public class BgpControllerImpl implements BgpController { ...@@ -261,6 +261,6 @@ public class BgpControllerImpl implements BgpController {
261 */ 261 */
262 @Override 262 @Override
263 public BgpLocalRib bgpLocalRibVpn() { 263 public BgpLocalRib bgpLocalRibVpn() {
264 - return bgplocalRIBVpn; 264 + return bgplocalRibVpn;
265 } 265 }
266 } 266 }
......
...@@ -13,10 +13,7 @@ ...@@ -13,10 +13,7 @@
13 13
14 package org.onosproject.bgp.controller.impl; 14 package org.onosproject.bgp.controller.impl;
15 15
16 -import java.util.Map; 16 +import com.google.common.base.MoreObjects;
17 -import java.util.Set;
18 -import java.util.TreeMap;
19 -
20 import org.onosproject.bgp.controller.BgpController; 17 import org.onosproject.bgp.controller.BgpController;
21 import org.onosproject.bgp.controller.BgpId; 18 import org.onosproject.bgp.controller.BgpId;
22 import org.onosproject.bgp.controller.BgpLocalRib; 19 import org.onosproject.bgp.controller.BgpLocalRib;
...@@ -35,8 +32,11 @@ import org.onosproject.bgpio.types.RouteDistinguisher; ...@@ -35,8 +32,11 @@ import org.onosproject.bgpio.types.RouteDistinguisher;
35 import org.slf4j.Logger; 32 import org.slf4j.Logger;
36 import org.slf4j.LoggerFactory; 33 import org.slf4j.LoggerFactory;
37 34
35 +import java.util.Map;
36 +import java.util.Set;
37 +import java.util.TreeMap;
38 +
38 import static com.google.common.base.Preconditions.checkNotNull; 39 import static com.google.common.base.Preconditions.checkNotNull;
39 -import com.google.common.base.MoreObjects;
40 40
41 /** 41 /**
42 * Implementation of local RIB. 42 * Implementation of local RIB.
...@@ -447,7 +447,7 @@ public class BgpLocalRibImpl implements BgpLocalRib { ...@@ -447,7 +447,7 @@ public class BgpLocalRibImpl implements BgpLocalRib {
447 * 447 *
448 * @param o adjacency-in/VPN adjacency-in 448 * @param o adjacency-in/VPN adjacency-in
449 */ 449 */
450 - public void localRIBUpdateNode(Object o) { 450 + public void localRibUpdateNode(Object o) {
451 451
452 if (o instanceof AdjRibIn) { 452 if (o instanceof AdjRibIn) {
453 AdjRibIn adjRib = (AdjRibIn) o; 453 AdjRibIn adjRib = (AdjRibIn) o;
...@@ -488,7 +488,7 @@ public class BgpLocalRibImpl implements BgpLocalRib { ...@@ -488,7 +488,7 @@ public class BgpLocalRibImpl implements BgpLocalRib {
488 * 488 *
489 * @param o adjacency-in/VPN adjacency-in 489 * @param o adjacency-in/VPN adjacency-in
490 */ 490 */
491 - public void localRIBUpdateLink(Object o) { 491 + public void localRibUpdateLink(Object o) {
492 492
493 if (o instanceof AdjRibIn) { 493 if (o instanceof AdjRibIn) {
494 AdjRibIn adjRib = (AdjRibIn) o; 494 AdjRibIn adjRib = (AdjRibIn) o;
...@@ -529,7 +529,7 @@ public class BgpLocalRibImpl implements BgpLocalRib { ...@@ -529,7 +529,7 @@ public class BgpLocalRibImpl implements BgpLocalRib {
529 * 529 *
530 * @param o instance of adjacency-in/VPN adjacency-in 530 * @param o instance of adjacency-in/VPN adjacency-in
531 */ 531 */
532 - public void localRIBUpdatePrefix(Object o) { 532 + public void localRibUpdatePrefix(Object o) {
533 533
534 if (o instanceof AdjRibIn) { 534 if (o instanceof AdjRibIn) {
535 AdjRibIn adjRib = (AdjRibIn) o; 535 AdjRibIn adjRib = (AdjRibIn) o;
...@@ -573,12 +573,12 @@ public class BgpLocalRibImpl implements BgpLocalRib { ...@@ -573,12 +573,12 @@ public class BgpLocalRibImpl implements BgpLocalRib {
573 * 573 *
574 * @param adjRibIn adjacency RIB-in 574 * @param adjRibIn adjacency RIB-in
575 */ 575 */
576 - public void localRIBUpdate(AdjRibIn adjRibIn) { 576 + public void localRibUpdate(AdjRibIn adjRibIn) {
577 log.debug("Update local RIB."); 577 log.debug("Update local RIB.");
578 578
579 - localRIBUpdateNode(adjRibIn); 579 + localRibUpdateNode(adjRibIn);
580 - localRIBUpdateLink(adjRibIn); 580 + localRibUpdateLink(adjRibIn);
581 - localRIBUpdatePrefix(adjRibIn); 581 + localRibUpdatePrefix(adjRibIn);
582 } 582 }
583 583
584 /** 584 /**
...@@ -586,12 +586,12 @@ public class BgpLocalRibImpl implements BgpLocalRib { ...@@ -586,12 +586,12 @@ public class BgpLocalRibImpl implements BgpLocalRib {
586 * 586 *
587 * @param vpnAdjRibIn VPN adjacency RIB-in 587 * @param vpnAdjRibIn VPN adjacency RIB-in
588 */ 588 */
589 - public void localRIBUpdate(VpnAdjRibIn vpnAdjRibIn) { 589 + public void localRibUpdate(VpnAdjRibIn vpnAdjRibIn) {
590 log.debug("Update VPN local RIB."); 590 log.debug("Update VPN local RIB.");
591 591
592 - localRIBUpdateNode(vpnAdjRibIn); 592 + localRibUpdateNode(vpnAdjRibIn);
593 - localRIBUpdateLink(vpnAdjRibIn); 593 + localRibUpdateLink(vpnAdjRibIn);
594 - localRIBUpdatePrefix(vpnAdjRibIn); 594 + localRibUpdatePrefix(vpnAdjRibIn);
595 } 595 }
596 596
597 @Override 597 @Override
......
...@@ -16,27 +16,21 @@ ...@@ -16,27 +16,21 @@
16 16
17 package org.onosproject.bgp.controller.impl; 17 package org.onosproject.bgp.controller.impl;
18 18
19 -import java.net.InetSocketAddress; 19 +import com.google.common.base.MoreObjects;
20 -import java.net.SocketAddress;
21 -import java.util.Collections;
22 -import java.util.List;
23 -import java.util.ListIterator;
24 -import java.util.concurrent.RejectedExecutionException;
25 -
26 import org.jboss.netty.channel.Channel; 20 import org.jboss.netty.channel.Channel;
27 import org.onlab.packet.IpAddress; 21 import org.onlab.packet.IpAddress;
28 import org.onosproject.bgp.controller.BgpController; 22 import org.onosproject.bgp.controller.BgpController;
23 +import org.onosproject.bgp.controller.BgpLocalRib;
29 import org.onosproject.bgp.controller.BgpPeer; 24 import org.onosproject.bgp.controller.BgpPeer;
30 import org.onosproject.bgp.controller.BgpSessionInfo; 25 import org.onosproject.bgp.controller.BgpSessionInfo;
31 -import org.onosproject.bgp.controller.BgpLocalRib;
32 import org.onosproject.bgpio.exceptions.BgpParseException; 26 import org.onosproject.bgpio.exceptions.BgpParseException;
33 import org.onosproject.bgpio.protocol.BgpFactories; 27 import org.onosproject.bgpio.protocol.BgpFactories;
34 import org.onosproject.bgpio.protocol.BgpFactory; 28 import org.onosproject.bgpio.protocol.BgpFactory;
35 import org.onosproject.bgpio.protocol.BgpLSNlri; 29 import org.onosproject.bgpio.protocol.BgpLSNlri;
36 import org.onosproject.bgpio.protocol.BgpMessage; 30 import org.onosproject.bgpio.protocol.BgpMessage;
31 +import org.onosproject.bgpio.protocol.linkstate.BgpLinkLsNlriVer4;
37 import org.onosproject.bgpio.protocol.linkstate.BgpNodeLSNlriVer4; 32 import org.onosproject.bgpio.protocol.linkstate.BgpNodeLSNlriVer4;
38 import org.onosproject.bgpio.protocol.linkstate.BgpPrefixIPv4LSNlriVer4; 33 import org.onosproject.bgpio.protocol.linkstate.BgpPrefixIPv4LSNlriVer4;
39 -import org.onosproject.bgpio.protocol.linkstate.BgpLinkLsNlriVer4;
40 import org.onosproject.bgpio.protocol.linkstate.PathAttrNlriDetails; 34 import org.onosproject.bgpio.protocol.linkstate.PathAttrNlriDetails;
41 import org.onosproject.bgpio.types.BgpValueType; 35 import org.onosproject.bgpio.types.BgpValueType;
42 import org.onosproject.bgpio.types.MpReachNlri; 36 import org.onosproject.bgpio.types.MpReachNlri;
...@@ -44,7 +38,12 @@ import org.onosproject.bgpio.types.MpUnReachNlri; ...@@ -44,7 +38,12 @@ import org.onosproject.bgpio.types.MpUnReachNlri;
44 import org.slf4j.Logger; 38 import org.slf4j.Logger;
45 import org.slf4j.LoggerFactory; 39 import org.slf4j.LoggerFactory;
46 40
47 -import com.google.common.base.MoreObjects; 41 +import java.net.InetSocketAddress;
42 +import java.net.SocketAddress;
43 +import java.util.Collections;
44 +import java.util.List;
45 +import java.util.ListIterator;
46 +import java.util.concurrent.RejectedExecutionException;
48 47
49 /** 48 /**
50 * BGPPeerImpl implements BGPPeer, maintains peer information and store updates in RIB . 49 * BGPPeerImpl implements BGPPeer, maintains peer information and store updates in RIB .
...@@ -62,8 +61,8 @@ public class BgpPeerImpl implements BgpPeer { ...@@ -62,8 +61,8 @@ public class BgpPeerImpl implements BgpPeer {
62 protected boolean isHandShakeComplete = false; 61 protected boolean isHandShakeComplete = false;
63 private BgpSessionInfo sessionInfo; 62 private BgpSessionInfo sessionInfo;
64 private BgpPacketStatsImpl pktStats; 63 private BgpPacketStatsImpl pktStats;
65 - private BgpLocalRib bgplocalRIB; 64 + private BgpLocalRib bgplocalRib;
66 - private BgpLocalRib bgplocalRIBVpn; 65 + private BgpLocalRib bgplocalRibVpn;
67 private AdjRibIn adjRib; 66 private AdjRibIn adjRib;
68 private VpnAdjRibIn vpnAdjRib; 67 private VpnAdjRibIn vpnAdjRib;
69 68
...@@ -101,8 +100,8 @@ public class BgpPeerImpl implements BgpPeer { ...@@ -101,8 +100,8 @@ public class BgpPeerImpl implements BgpPeer {
101 this.bgpController = bgpController; 100 this.bgpController = bgpController;
102 this.sessionInfo = sessionInfo; 101 this.sessionInfo = sessionInfo;
103 this.pktStats = pktStats; 102 this.pktStats = pktStats;
104 - this.bgplocalRIB = bgpController.bgpLocalRib(); 103 + this.bgplocalRib = bgpController.bgpLocalRib();
105 - this.bgplocalRIBVpn = bgpController.bgpLocalRibVpn(); 104 + this.bgplocalRibVpn = bgpController.bgpLocalRibVpn();
106 this.adjRib = new AdjRibIn(); 105 this.adjRib = new AdjRibIn();
107 this.vpnAdjRib = new VpnAdjRibIn(); 106 this.vpnAdjRib = new VpnAdjRibIn();
108 } 107 }
...@@ -141,30 +140,30 @@ public class BgpPeerImpl implements BgpPeer { ...@@ -141,30 +140,30 @@ public class BgpPeerImpl implements BgpPeer {
141 PathAttrNlriDetails details = setPathAttrDetails(nlriInfo, pathAttr); 140 PathAttrNlriDetails details = setPathAttrDetails(nlriInfo, pathAttr);
142 if (!((BgpNodeLSNlriVer4) nlriInfo).isVpnPresent()) { 141 if (!((BgpNodeLSNlriVer4) nlriInfo).isVpnPresent()) {
143 adjRib.add(nlriInfo, details); 142 adjRib.add(nlriInfo, details);
144 - bgplocalRIB.add(sessionInfo(), nlriInfo, details); 143 + bgplocalRib.add(sessionInfo(), nlriInfo, details);
145 } else { 144 } else {
146 vpnAdjRib.addVpn(nlriInfo, details, ((BgpNodeLSNlriVer4) nlriInfo).getRouteDistinguisher()); 145 vpnAdjRib.addVpn(nlriInfo, details, ((BgpNodeLSNlriVer4) nlriInfo).getRouteDistinguisher());
147 - bgplocalRIBVpn.add(sessionInfo(), nlriInfo, details, 146 + bgplocalRibVpn.add(sessionInfo(), nlriInfo, details,
148 ((BgpNodeLSNlriVer4) nlriInfo).getRouteDistinguisher()); 147 ((BgpNodeLSNlriVer4) nlriInfo).getRouteDistinguisher());
149 } 148 }
150 } else if (nlriInfo instanceof BgpLinkLsNlriVer4) { 149 } else if (nlriInfo instanceof BgpLinkLsNlriVer4) {
151 PathAttrNlriDetails details = setPathAttrDetails(nlriInfo, pathAttr); 150 PathAttrNlriDetails details = setPathAttrDetails(nlriInfo, pathAttr);
152 if (!((BgpLinkLsNlriVer4) nlriInfo).isVpnPresent()) { 151 if (!((BgpLinkLsNlriVer4) nlriInfo).isVpnPresent()) {
153 adjRib.add(nlriInfo, details); 152 adjRib.add(nlriInfo, details);
154 - bgplocalRIB.add(sessionInfo(), nlriInfo, details); 153 + bgplocalRib.add(sessionInfo(), nlriInfo, details);
155 } else { 154 } else {
156 vpnAdjRib.addVpn(nlriInfo, details, ((BgpLinkLsNlriVer4) nlriInfo).getRouteDistinguisher()); 155 vpnAdjRib.addVpn(nlriInfo, details, ((BgpLinkLsNlriVer4) nlriInfo).getRouteDistinguisher());
157 - bgplocalRIBVpn.add(sessionInfo(), nlriInfo, details, 156 + bgplocalRibVpn.add(sessionInfo(), nlriInfo, details,
158 ((BgpLinkLsNlriVer4) nlriInfo).getRouteDistinguisher()); 157 ((BgpLinkLsNlriVer4) nlriInfo).getRouteDistinguisher());
159 } 158 }
160 } else if (nlriInfo instanceof BgpPrefixIPv4LSNlriVer4) { 159 } else if (nlriInfo instanceof BgpPrefixIPv4LSNlriVer4) {
161 PathAttrNlriDetails details = setPathAttrDetails(nlriInfo, pathAttr); 160 PathAttrNlriDetails details = setPathAttrDetails(nlriInfo, pathAttr);
162 if (!((BgpPrefixIPv4LSNlriVer4) nlriInfo).isVpnPresent()) { 161 if (!((BgpPrefixIPv4LSNlriVer4) nlriInfo).isVpnPresent()) {
163 adjRib.add(nlriInfo, details); 162 adjRib.add(nlriInfo, details);
164 - bgplocalRIB.add(sessionInfo(), nlriInfo, details); 163 + bgplocalRib.add(sessionInfo(), nlriInfo, details);
165 } else { 164 } else {
166 vpnAdjRib.addVpn(nlriInfo, details, ((BgpPrefixIPv4LSNlriVer4) nlriInfo).getRouteDistinguisher()); 165 vpnAdjRib.addVpn(nlriInfo, details, ((BgpPrefixIPv4LSNlriVer4) nlriInfo).getRouteDistinguisher());
167 - bgplocalRIBVpn.add(sessionInfo(), nlriInfo, details, 166 + bgplocalRibVpn.add(sessionInfo(), nlriInfo, details,
168 ((BgpPrefixIPv4LSNlriVer4) nlriInfo).getRouteDistinguisher()); 167 ((BgpPrefixIPv4LSNlriVer4) nlriInfo).getRouteDistinguisher());
169 } 168 }
170 } 169 }
...@@ -201,26 +200,26 @@ public class BgpPeerImpl implements BgpPeer { ...@@ -201,26 +200,26 @@ public class BgpPeerImpl implements BgpPeer {
201 if (nlriInfo instanceof BgpNodeLSNlriVer4) { 200 if (nlriInfo instanceof BgpNodeLSNlriVer4) {
202 if (!((BgpNodeLSNlriVer4) nlriInfo).isVpnPresent()) { 201 if (!((BgpNodeLSNlriVer4) nlriInfo).isVpnPresent()) {
203 adjRib.remove(nlriInfo); 202 adjRib.remove(nlriInfo);
204 - bgplocalRIB.delete(nlriInfo); 203 + bgplocalRib.delete(nlriInfo);
205 } else { 204 } else {
206 vpnAdjRib.removeVpn(nlriInfo, ((BgpNodeLSNlriVer4) nlriInfo).getRouteDistinguisher()); 205 vpnAdjRib.removeVpn(nlriInfo, ((BgpNodeLSNlriVer4) nlriInfo).getRouteDistinguisher());
207 - bgplocalRIBVpn.delete(nlriInfo, ((BgpNodeLSNlriVer4) nlriInfo).getRouteDistinguisher()); 206 + bgplocalRibVpn.delete(nlriInfo, ((BgpNodeLSNlriVer4) nlriInfo).getRouteDistinguisher());
208 } 207 }
209 } else if (nlriInfo instanceof BgpLinkLsNlriVer4) { 208 } else if (nlriInfo instanceof BgpLinkLsNlriVer4) {
210 if (!((BgpLinkLsNlriVer4) nlriInfo).isVpnPresent()) { 209 if (!((BgpLinkLsNlriVer4) nlriInfo).isVpnPresent()) {
211 adjRib.remove(nlriInfo); 210 adjRib.remove(nlriInfo);
212 - bgplocalRIB.delete(nlriInfo); 211 + bgplocalRib.delete(nlriInfo);
213 } else { 212 } else {
214 vpnAdjRib.removeVpn(nlriInfo, ((BgpLinkLsNlriVer4) nlriInfo).getRouteDistinguisher()); 213 vpnAdjRib.removeVpn(nlriInfo, ((BgpLinkLsNlriVer4) nlriInfo).getRouteDistinguisher());
215 - bgplocalRIBVpn.delete(nlriInfo, ((BgpLinkLsNlriVer4) nlriInfo).getRouteDistinguisher()); 214 + bgplocalRibVpn.delete(nlriInfo, ((BgpLinkLsNlriVer4) nlriInfo).getRouteDistinguisher());
216 } 215 }
217 } else if (nlriInfo instanceof BgpPrefixIPv4LSNlriVer4) { 216 } else if (nlriInfo instanceof BgpPrefixIPv4LSNlriVer4) {
218 if (!((BgpPrefixIPv4LSNlriVer4) nlriInfo).isVpnPresent()) { 217 if (!((BgpPrefixIPv4LSNlriVer4) nlriInfo).isVpnPresent()) {
219 adjRib.remove(nlriInfo); 218 adjRib.remove(nlriInfo);
220 - bgplocalRIB.delete(nlriInfo); 219 + bgplocalRib.delete(nlriInfo);
221 } else { 220 } else {
222 vpnAdjRib.removeVpn(nlriInfo, ((BgpPrefixIPv4LSNlriVer4) nlriInfo).getRouteDistinguisher()); 221 vpnAdjRib.removeVpn(nlriInfo, ((BgpPrefixIPv4LSNlriVer4) nlriInfo).getRouteDistinguisher());
223 - bgplocalRIBVpn.delete(nlriInfo, ((BgpPrefixIPv4LSNlriVer4) nlriInfo).getRouteDistinguisher()); 222 + bgplocalRibVpn.delete(nlriInfo, ((BgpPrefixIPv4LSNlriVer4) nlriInfo).getRouteDistinguisher());
224 } 223 }
225 } 224 }
226 } 225 }
...@@ -248,12 +247,12 @@ public class BgpPeerImpl implements BgpPeer { ...@@ -248,12 +247,12 @@ public class BgpPeerImpl implements BgpPeer {
248 * Update localRIB on peer disconnect. 247 * Update localRIB on peer disconnect.
249 * 248 *
250 */ 249 */
251 - public void updateLocalRIBOnPeerDisconnect() { 250 + public void updateLocalRibOnPeerDisconnect() {
252 - BgpLocalRibImpl localRib = (BgpLocalRibImpl) bgplocalRIB; 251 + BgpLocalRibImpl localRib = (BgpLocalRibImpl) bgplocalRib;
253 - BgpLocalRibImpl localRibVpn = (BgpLocalRibImpl) bgplocalRIBVpn; 252 + BgpLocalRibImpl localRibVpn = (BgpLocalRibImpl) bgplocalRibVpn;
254 253
255 - localRib.localRIBUpdate(adjacencyRib()); 254 + localRib.localRibUpdate(adjacencyRib());
256 - localRibVpn.localRIBUpdate(vpnAdjacencyRib()); 255 + localRibVpn.localRibUpdate(vpnAdjacencyRib());
257 } 256 }
258 257
259 // ************************ 258 // ************************
......
...@@ -15,20 +15,20 @@ ...@@ -15,20 +15,20 @@
15 */ 15 */
16 package org.onosproject.bgp.controller.impl; 16 package org.onosproject.bgp.controller.impl;
17 17
18 -import java.util.Comparator;
19 -import java.util.List;
20 -import java.util.ListIterator;
21 -
22 import org.onosproject.bgpio.protocol.linkstate.PathAttrNlriDetailsLocalRib; 18 import org.onosproject.bgpio.protocol.linkstate.PathAttrNlriDetailsLocalRib;
23 import org.onosproject.bgpio.types.AsPath; 19 import org.onosproject.bgpio.types.AsPath;
24 import org.onosproject.bgpio.types.BgpValueType; 20 import org.onosproject.bgpio.types.BgpValueType;
25 import org.onosproject.bgpio.types.LocalPref; 21 import org.onosproject.bgpio.types.LocalPref;
26 import org.onosproject.bgpio.types.Med; 22 import org.onosproject.bgpio.types.Med;
27 import org.onosproject.bgpio.types.Origin; 23 import org.onosproject.bgpio.types.Origin;
28 -import org.onosproject.bgpio.types.Origin.ORIGINTYPE; 24 +import org.onosproject.bgpio.types.Origin.OriginType;
29 import org.slf4j.Logger; 25 import org.slf4j.Logger;
30 import org.slf4j.LoggerFactory; 26 import org.slf4j.LoggerFactory;
31 27
28 +import java.util.Comparator;
29 +import java.util.List;
30 +import java.util.ListIterator;
31 +
32 /** 32 /**
33 * Implementation of BGP best path Selection process. 33 * Implementation of BGP best path Selection process.
34 */ 34 */
...@@ -122,13 +122,13 @@ public final class BgpSelectionAlgo implements Comparator<PathAttrNlriDetailsLoc ...@@ -122,13 +122,13 @@ public final class BgpSelectionAlgo implements Comparator<PathAttrNlriDetailsLoc
122 * @return object with lowest origin value 122 * @return object with lowest origin value
123 */ 123 */
124 int compareOrigin(Origin obj1Origin, Origin obj2Origin) { 124 int compareOrigin(Origin obj1Origin, Origin obj2Origin) {
125 - if (obj1Origin.origin() == ORIGINTYPE.IGP) { 125 + if (obj1Origin.origin() == OriginType.IGP) {
126 return 1; 126 return 1;
127 } 127 }
128 - if (obj2Origin.origin() == ORIGINTYPE.IGP) { 128 + if (obj2Origin.origin() == OriginType.IGP) {
129 return -1; 129 return -1;
130 } 130 }
131 - if (obj1Origin.origin() == ORIGINTYPE.EGP) { 131 + if (obj1Origin.origin() == OriginType.EGP) {
132 return 1; 132 return 1;
133 } else { 133 } else {
134 return -1; 134 return -1;
...@@ -239,4 +239,4 @@ public final class BgpSelectionAlgo implements Comparator<PathAttrNlriDetailsLoc ...@@ -239,4 +239,4 @@ public final class BgpSelectionAlgo implements Comparator<PathAttrNlriDetailsLoc
239 } 239 }
240 } 240 }
241 } 241 }
242 -}
...\ No newline at end of file ...\ No newline at end of file
242 +}
......
...@@ -20,11 +20,11 @@ import com.google.common.util.concurrent.ListenableFuture; ...@@ -20,11 +20,11 @@ import com.google.common.util.concurrent.ListenableFuture;
20 import org.onlab.packet.IpAddress; 20 import org.onlab.packet.IpAddress;
21 import org.onosproject.net.DeviceId; 21 import org.onosproject.net.DeviceId;
22 import org.onosproject.net.behaviour.ControllerInfo; 22 import org.onosproject.net.behaviour.ControllerInfo;
23 -import org.onosproject.ovsdb.rfc.jsonrpc.OvsdbRPC; 23 +import org.onosproject.ovsdb.rfc.jsonrpc.OvsdbRpc;
24 import org.onosproject.ovsdb.rfc.message.OperationResult; 24 import org.onosproject.ovsdb.rfc.message.OperationResult;
25 import org.onosproject.ovsdb.rfc.message.TableUpdates; 25 import org.onosproject.ovsdb.rfc.message.TableUpdates;
26 import org.onosproject.ovsdb.rfc.notation.Row; 26 import org.onosproject.ovsdb.rfc.notation.Row;
27 -import org.onosproject.ovsdb.rfc.notation.UUID; 27 +import org.onosproject.ovsdb.rfc.notation.Uuid;
28 import org.onosproject.ovsdb.rfc.operations.Operation; 28 import org.onosproject.ovsdb.rfc.operations.Operation;
29 import org.onosproject.ovsdb.rfc.schema.DatabaseSchema; 29 import org.onosproject.ovsdb.rfc.schema.DatabaseSchema;
30 30
...@@ -35,7 +35,7 @@ import java.util.Set; ...@@ -35,7 +35,7 @@ import java.util.Set;
35 /** 35 /**
36 * Represents to provider facing side of a node. 36 * Represents to provider facing side of a node.
37 */ 37 */
38 -public interface OvsdbClientService extends OvsdbRPC { 38 +public interface OvsdbClientService extends OvsdbRpc {
39 /** 39 /**
40 * Gets the node identifier. 40 * Gets the node identifier.
41 * 41 *
...@@ -136,7 +136,7 @@ public interface OvsdbClientService extends OvsdbRPC { ...@@ -136,7 +136,7 @@ public interface OvsdbClientService extends OvsdbRPC {
136 * @param bridgeUuid bridge uuid 136 * @param bridgeUuid bridge uuid
137 * @param controllers list of controllers 137 * @param controllers list of controllers
138 */ 138 */
139 - void setControllersWithUUID(UUID bridgeUuid, List<ControllerInfo> controllers); 139 + void setControllersWithUuid(Uuid bridgeUuid, List<ControllerInfo> controllers);
140 140
141 /** 141 /**
142 * Sets the Controllers for the specified device. 142 * Sets the Controllers for the specified device.
......
...@@ -30,7 +30,7 @@ import org.onosproject.ovsdb.controller.OvsdbTunnel; ...@@ -30,7 +30,7 @@ import org.onosproject.ovsdb.controller.OvsdbTunnel;
30 import org.onosproject.ovsdb.rfc.message.OperationResult; 30 import org.onosproject.ovsdb.rfc.message.OperationResult;
31 import org.onosproject.ovsdb.rfc.message.TableUpdates; 31 import org.onosproject.ovsdb.rfc.message.TableUpdates;
32 import org.onosproject.ovsdb.rfc.notation.Row; 32 import org.onosproject.ovsdb.rfc.notation.Row;
33 -import org.onosproject.ovsdb.rfc.notation.UUID; 33 +import org.onosproject.ovsdb.rfc.notation.Uuid;
34 import org.onosproject.ovsdb.rfc.operations.Operation; 34 import org.onosproject.ovsdb.rfc.operations.Operation;
35 import org.onosproject.ovsdb.rfc.schema.DatabaseSchema; 35 import org.onosproject.ovsdb.rfc.schema.DatabaseSchema;
36 36
...@@ -94,7 +94,7 @@ public class OvsdbClientServiceAdapter implements OvsdbClientService { ...@@ -94,7 +94,7 @@ public class OvsdbClientServiceAdapter implements OvsdbClientService {
94 } 94 }
95 95
96 @Override 96 @Override
97 - public void setControllersWithUUID(UUID bridgeUuid, List<ControllerInfo> controllers) { 97 + public void setControllersWithUuid(Uuid bridgeUuid, List<ControllerInfo> controllers) {
98 98
99 } 99 }
100 100
......
...@@ -47,7 +47,7 @@ import org.onosproject.ovsdb.rfc.message.UpdateNotification; ...@@ -47,7 +47,7 @@ import org.onosproject.ovsdb.rfc.message.UpdateNotification;
47 import org.onosproject.ovsdb.rfc.notation.OvsdbMap; 47 import org.onosproject.ovsdb.rfc.notation.OvsdbMap;
48 import org.onosproject.ovsdb.rfc.notation.OvsdbSet; 48 import org.onosproject.ovsdb.rfc.notation.OvsdbSet;
49 import org.onosproject.ovsdb.rfc.notation.Row; 49 import org.onosproject.ovsdb.rfc.notation.Row;
50 -import org.onosproject.ovsdb.rfc.notation.UUID; 50 +import org.onosproject.ovsdb.rfc.notation.Uuid;
51 import org.onosproject.ovsdb.rfc.schema.DatabaseSchema; 51 import org.onosproject.ovsdb.rfc.schema.DatabaseSchema;
52 import org.onosproject.ovsdb.rfc.table.Bridge; 52 import org.onosproject.ovsdb.rfc.table.Bridge;
53 import org.onosproject.ovsdb.rfc.table.Interface; 53 import org.onosproject.ovsdb.rfc.table.Interface;
...@@ -221,7 +221,7 @@ public class OvsdbControllerImpl implements OvsdbController { ...@@ -221,7 +221,7 @@ public class OvsdbControllerImpl implements OvsdbController {
221 221
222 for (String tableName : updates.result().keySet()) { 222 for (String tableName : updates.result().keySet()) {
223 TableUpdate update = updates.result().get(tableName); 223 TableUpdate update = updates.result().get(tableName);
224 - for (UUID uuid : (Set<UUID>) update.rows().keySet()) { 224 + for (Uuid uuid : (Set<Uuid>) update.rows().keySet()) {
225 log.debug("Begin to process table updates uuid: {}, databaseName: {}, tableName: {}", 225 log.debug("Begin to process table updates uuid: {}, databaseName: {}, tableName: {}",
226 uuid.value(), dbName, tableName); 226 uuid.value(), dbName, tableName);
227 227
......
...@@ -15,18 +15,17 @@ ...@@ -15,18 +15,17 @@
15 */ 15 */
16 package org.onosproject.ovsdb.rfc.jsonrpc; 16 package org.onosproject.ovsdb.rfc.jsonrpc;
17 17
18 -import java.util.List; 18 +import com.fasterxml.jackson.databind.JsonNode;
19 - 19 +import com.google.common.util.concurrent.ListenableFuture;
20 import org.onosproject.ovsdb.rfc.operations.Operation; 20 import org.onosproject.ovsdb.rfc.operations.Operation;
21 import org.onosproject.ovsdb.rfc.schema.DatabaseSchema; 21 import org.onosproject.ovsdb.rfc.schema.DatabaseSchema;
22 22
23 -import com.fasterxml.jackson.databind.JsonNode; 23 +import java.util.List;
24 -import com.google.common.util.concurrent.ListenableFuture;
25 24
26 /** 25 /**
27 * The following interface describe the RPC7047's methods that are supported. 26 * The following interface describe the RPC7047's methods that are supported.
28 */ 27 */
29 -public interface OvsdbRPC { 28 +public interface OvsdbRpc {
30 29
31 /** 30 /**
32 * This operation retrieves a database-schema that describes hosted database 31 * This operation retrieves a database-schema that describes hosted database
......
...@@ -20,7 +20,7 @@ import static com.google.common.base.Preconditions.checkNotNull; ...@@ -20,7 +20,7 @@ import static com.google.common.base.Preconditions.checkNotNull;
20 import java.util.List; 20 import java.util.List;
21 21
22 import org.onosproject.ovsdb.rfc.notation.Row; 22 import org.onosproject.ovsdb.rfc.notation.Row;
23 -import org.onosproject.ovsdb.rfc.notation.UUID; 23 +import org.onosproject.ovsdb.rfc.notation.Uuid;
24 24
25 import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 25 import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
26 26
...@@ -30,7 +30,7 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; ...@@ -30,7 +30,7 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
30 @JsonIgnoreProperties(ignoreUnknown = true) 30 @JsonIgnoreProperties(ignoreUnknown = true)
31 public final class OperationResult { 31 public final class OperationResult {
32 private int count; 32 private int count;
33 - private UUID uuid; 33 + private Uuid uuid;
34 private List<Row> rows; 34 private List<Row> rows;
35 private String error; 35 private String error;
36 private String details; 36 private String details;
...@@ -59,7 +59,7 @@ public final class OperationResult { ...@@ -59,7 +59,7 @@ public final class OperationResult {
59 * @param error error message 59 * @param error error message
60 * @param details details of error message 60 * @param details details of error message
61 */ 61 */
62 - public OperationResult(int count, UUID uuid, List<Row> rows, String error, 62 + public OperationResult(int count, Uuid uuid, List<Row> rows, String error,
63 String details) { 63 String details) {
64 checkNotNull(uuid, "uuid cannot be null"); 64 checkNotNull(uuid, "uuid cannot be null");
65 checkNotNull(rows, "rows cannot be null"); 65 checkNotNull(rows, "rows cannot be null");
...@@ -92,7 +92,7 @@ public final class OperationResult { ...@@ -92,7 +92,7 @@ public final class OperationResult {
92 * Return uuid. 92 * Return uuid.
93 * @return uuid 93 * @return uuid
94 */ 94 */
95 - public UUID getUuid() { 95 + public Uuid getUuid() {
96 return uuid; 96 return uuid;
97 } 97 }
98 98
...@@ -100,7 +100,7 @@ public final class OperationResult { ...@@ -100,7 +100,7 @@ public final class OperationResult {
100 * Set uuid value. 100 * Set uuid value.
101 * @param uuid the Operation message of uuid 101 * @param uuid the Operation message of uuid
102 */ 102 */
103 - public void setUuid(UUID uuid) { 103 + public void setUuid(Uuid uuid) {
104 checkNotNull(uuid, "uuid cannot be null"); 104 checkNotNull(uuid, "uuid cannot be null");
105 this.uuid = uuid; 105 this.uuid = uuid;
106 } 106 }
......
...@@ -21,7 +21,7 @@ import static com.google.common.base.Preconditions.checkNotNull; ...@@ -21,7 +21,7 @@ import static com.google.common.base.Preconditions.checkNotNull;
21 import java.util.Objects; 21 import java.util.Objects;
22 22
23 import org.onosproject.ovsdb.rfc.notation.Row; 23 import org.onosproject.ovsdb.rfc.notation.Row;
24 -import org.onosproject.ovsdb.rfc.notation.UUID; 24 +import org.onosproject.ovsdb.rfc.notation.Uuid;
25 25
26 /** 26 /**
27 * A TableUpdate is an object that maps from the row's UUID to a RowUpdate object. 27 * A TableUpdate is an object that maps from the row's UUID to a RowUpdate object.
...@@ -29,7 +29,7 @@ import org.onosproject.ovsdb.rfc.notation.UUID; ...@@ -29,7 +29,7 @@ import org.onosproject.ovsdb.rfc.notation.UUID;
29 * Refer to RFC 7047 Section 4.1.6. 29 * Refer to RFC 7047 Section 4.1.6.
30 */ 30 */
31 public final class RowUpdate { 31 public final class RowUpdate {
32 - private final UUID uuid; 32 + private final Uuid uuid;
33 private final Row oldRow; 33 private final Row oldRow;
34 private final Row newRow; 34 private final Row newRow;
35 35
...@@ -39,7 +39,7 @@ public final class RowUpdate { ...@@ -39,7 +39,7 @@ public final class RowUpdate {
39 * @param oldRow present for "delete" and "modify" updates 39 * @param oldRow present for "delete" and "modify" updates
40 * @param newRow present for "initial", "insert", and "modify" updates 40 * @param newRow present for "initial", "insert", and "modify" updates
41 */ 41 */
42 - public RowUpdate(UUID uuid, Row oldRow, Row newRow) { 42 + public RowUpdate(Uuid uuid, Row oldRow, Row newRow) {
43 checkNotNull(uuid, "uuid cannot be null"); 43 checkNotNull(uuid, "uuid cannot be null");
44 this.uuid = uuid; 44 this.uuid = uuid;
45 this.oldRow = oldRow; 45 this.oldRow = oldRow;
...@@ -50,7 +50,7 @@ public final class RowUpdate { ...@@ -50,7 +50,7 @@ public final class RowUpdate {
50 * Return uuid. 50 * Return uuid.
51 * @return uuid 51 * @return uuid
52 */ 52 */
53 - public UUID uuid() { 53 + public Uuid uuid() {
54 return this.uuid; 54 return this.uuid;
55 } 55 }
56 56
......
...@@ -22,20 +22,20 @@ import java.util.Map; ...@@ -22,20 +22,20 @@ import java.util.Map;
22 import java.util.Objects; 22 import java.util.Objects;
23 23
24 import org.onosproject.ovsdb.rfc.notation.Row; 24 import org.onosproject.ovsdb.rfc.notation.Row;
25 -import org.onosproject.ovsdb.rfc.notation.UUID; 25 +import org.onosproject.ovsdb.rfc.notation.Uuid;
26 26
27 /** 27 /**
28 * TableUpdate is an object that maps from the row's UUID to a RowUpdate object. 28 * TableUpdate is an object that maps from the row's UUID to a RowUpdate object.
29 */ 29 */
30 public final class TableUpdate { 30 public final class TableUpdate {
31 31
32 - private final Map<UUID, RowUpdate> rows; 32 + private final Map<Uuid, RowUpdate> rows;
33 33
34 /** 34 /**
35 * Constructs a TableUpdate object. 35 * Constructs a TableUpdate object.
36 * @param rows the parameter of TableUpdate entity 36 * @param rows the parameter of TableUpdate entity
37 */ 37 */
38 - private TableUpdate(Map<UUID, RowUpdate> rows) { 38 + private TableUpdate(Map<Uuid, RowUpdate> rows) {
39 this.rows = rows; 39 this.rows = rows;
40 } 40 }
41 41
...@@ -44,7 +44,7 @@ public final class TableUpdate { ...@@ -44,7 +44,7 @@ public final class TableUpdate {
44 * @param rows the parameter of TableUpdate entity 44 * @param rows the parameter of TableUpdate entity
45 * @return TableUpdate entity 45 * @return TableUpdate entity
46 */ 46 */
47 - public static TableUpdate tableUpdate(Map<UUID, RowUpdate> rows) { 47 + public static TableUpdate tableUpdate(Map<Uuid, RowUpdate> rows) {
48 checkNotNull(rows, "rows cannot be null"); 48 checkNotNull(rows, "rows cannot be null");
49 return new TableUpdate(rows); 49 return new TableUpdate(rows);
50 } 50 }
...@@ -54,7 +54,7 @@ public final class TableUpdate { ...@@ -54,7 +54,7 @@ public final class TableUpdate {
54 * @param uuid the key of rows 54 * @param uuid the key of rows
55 * @return Row old row 55 * @return Row old row
56 */ 56 */
57 - public Row getOld(UUID uuid) { 57 + public Row getOld(Uuid uuid) {
58 RowUpdate rowUpdate = rows.get(uuid); 58 RowUpdate rowUpdate = rows.get(uuid);
59 if (rowUpdate == null) { 59 if (rowUpdate == null) {
60 return null; 60 return null;
...@@ -67,7 +67,7 @@ public final class TableUpdate { ...@@ -67,7 +67,7 @@ public final class TableUpdate {
67 * @param uuid the key of rows 67 * @param uuid the key of rows
68 * @return Row new row 68 * @return Row new row
69 */ 69 */
70 - public Row getNew(UUID uuid) { 70 + public Row getNew(Uuid uuid) {
71 RowUpdate rowUpdate = rows.get(uuid); 71 RowUpdate rowUpdate = rows.get(uuid);
72 if (rowUpdate == null) { 72 if (rowUpdate == null) {
73 return null; 73 return null;
...@@ -79,7 +79,7 @@ public final class TableUpdate { ...@@ -79,7 +79,7 @@ public final class TableUpdate {
79 * Return rows. 79 * Return rows.
80 * @return rows 80 * @return rows
81 */ 81 */
82 - public Map<UUID, RowUpdate> rows() { 82 + public Map<Uuid, RowUpdate> rows() {
83 return rows; 83 return rows;
84 } 84 }
85 85
......
...@@ -29,7 +29,7 @@ import static com.google.common.base.Preconditions.checkNotNull; ...@@ -29,7 +29,7 @@ import static com.google.common.base.Preconditions.checkNotNull;
29 */ 29 */
30 public final class Row { 30 public final class Row {
31 private String tableName; 31 private String tableName;
32 - private UUID uuid; 32 + private Uuid uuid;
33 private Map<String, Column> columns; 33 private Map<String, Column> columns;
34 34
35 /** 35 /**
...@@ -59,7 +59,7 @@ public final class Row { ...@@ -59,7 +59,7 @@ public final class Row {
59 * @param columns Map of Column entity 59 * @param columns Map of Column entity
60 * @param uuid UUID of the row 60 * @param uuid UUID of the row
61 */ 61 */
62 - public Row(String tableName, UUID uuid, Map<String, Column> columns) { 62 + public Row(String tableName, Uuid uuid, Map<String, Column> columns) {
63 checkNotNull(tableName, "table name cannot be null"); 63 checkNotNull(tableName, "table name cannot be null");
64 checkNotNull(uuid, "uuid cannot be null"); 64 checkNotNull(uuid, "uuid cannot be null");
65 checkNotNull(columns, "columns cannot be null"); 65 checkNotNull(columns, "columns cannot be null");
...@@ -91,7 +91,7 @@ public final class Row { ...@@ -91,7 +91,7 @@ public final class Row {
91 * 91 *
92 * @return uuid 92 * @return uuid
93 */ 93 */
94 - public UUID uuid() { 94 + public Uuid uuid() {
95 return uuid; 95 return uuid;
96 } 96 }
97 97
...@@ -100,7 +100,7 @@ public final class Row { ...@@ -100,7 +100,7 @@ public final class Row {
100 * 100 *
101 * @param uuid new uuid 101 * @param uuid new uuid
102 */ 102 */
103 - public void setUuid(UUID uuid) { 103 + public void setUuid(Uuid uuid) {
104 this.uuid = uuid; 104 this.uuid = uuid;
105 } 105 }
106 106
......
...@@ -20,8 +20,8 @@ import static com.google.common.base.Preconditions.checkNotNull; ...@@ -20,8 +20,8 @@ import static com.google.common.base.Preconditions.checkNotNull;
20 20
21 import java.util.Objects; 21 import java.util.Objects;
22 22
23 -import org.onosproject.ovsdb.rfc.notation.json.UUIDConverter; 23 +import org.onosproject.ovsdb.rfc.notation.json.UuidConverter;
24 -import org.onosproject.ovsdb.rfc.notation.json.UUIDSerializer; 24 +import org.onosproject.ovsdb.rfc.notation.json.UuidSerializer;
25 25
26 import com.fasterxml.jackson.databind.annotation.JsonDeserialize; 26 import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
27 import com.fasterxml.jackson.databind.annotation.JsonSerialize; 27 import com.fasterxml.jackson.databind.annotation.JsonSerialize;
...@@ -29,16 +29,16 @@ import com.fasterxml.jackson.databind.annotation.JsonSerialize; ...@@ -29,16 +29,16 @@ import com.fasterxml.jackson.databind.annotation.JsonSerialize;
29 /** 29 /**
30 * Handles both uuid and named-uuid. 30 * Handles both uuid and named-uuid.
31 */ 31 */
32 -@JsonSerialize(using = UUIDSerializer.class) 32 +@JsonSerialize(using = UuidSerializer.class)
33 -@JsonDeserialize(converter = UUIDConverter.class) 33 +@JsonDeserialize(converter = UuidConverter.class)
34 -public final class UUID { 34 +public final class Uuid {
35 private final String value; 35 private final String value;
36 36
37 /** 37 /**
38 * UUID constructor. 38 * UUID constructor.
39 * @param value UUID value 39 * @param value UUID value
40 */ 40 */
41 - private UUID(String value) { 41 + private Uuid(String value) {
42 checkNotNull(value, "value cannot be null"); 42 checkNotNull(value, "value cannot be null");
43 this.value = value; 43 this.value = value;
44 } 44 }
...@@ -48,8 +48,8 @@ public final class UUID { ...@@ -48,8 +48,8 @@ public final class UUID {
48 * @param value UUID value 48 * @param value UUID value
49 * @return UUID 49 * @return UUID
50 */ 50 */
51 - public static UUID uuid(String value) { 51 + public static Uuid uuid(String value) {
52 - return new UUID(value); 52 + return new Uuid(value);
53 } 53 }
54 54
55 /** 55 /**
...@@ -70,8 +70,8 @@ public final class UUID { ...@@ -70,8 +70,8 @@ public final class UUID {
70 if (this == obj) { 70 if (this == obj) {
71 return true; 71 return true;
72 } 72 }
73 - if (obj instanceof UUID) { 73 + if (obj instanceof Uuid) {
74 - final UUID other = (UUID) obj; 74 + final Uuid other = (Uuid) obj;
75 return Objects.equals(this.value, other.value); 75 return Objects.equals(this.value, other.value);
76 } 76 }
77 return false; 77 return false;
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
15 */ 15 */
16 package org.onosproject.ovsdb.rfc.notation.json; 16 package org.onosproject.ovsdb.rfc.notation.json;
17 17
18 -import org.onosproject.ovsdb.rfc.notation.UUID; 18 +import org.onosproject.ovsdb.rfc.notation.Uuid;
19 19
20 import com.fasterxml.jackson.databind.JsonNode; 20 import com.fasterxml.jackson.databind.JsonNode;
21 import com.fasterxml.jackson.databind.util.StdConverter; 21 import com.fasterxml.jackson.databind.util.StdConverter;
...@@ -23,10 +23,10 @@ import com.fasterxml.jackson.databind.util.StdConverter; ...@@ -23,10 +23,10 @@ import com.fasterxml.jackson.databind.util.StdConverter;
23 /** 23 /**
24 * UUIDConverter Converter. 24 * UUIDConverter Converter.
25 */ 25 */
26 -public class UUIDConverter extends StdConverter<JsonNode, UUID> { 26 +public class UuidConverter extends StdConverter<JsonNode, Uuid> {
27 27
28 @Override 28 @Override
29 - public UUID convert(JsonNode json) { 29 + public Uuid convert(JsonNode json) {
30 - return UUID.uuid(json.get(1).asText()); 30 + return Uuid.uuid(json.get(1).asText());
31 } 31 }
32 } 32 }
......
...@@ -15,20 +15,19 @@ ...@@ -15,20 +15,19 @@
15 */ 15 */
16 package org.onosproject.ovsdb.rfc.notation.json; 16 package org.onosproject.ovsdb.rfc.notation.json;
17 17
18 -import java.io.IOException;
19 -
20 -import org.onosproject.ovsdb.rfc.notation.UUID;
21 -
22 import com.fasterxml.jackson.core.JsonGenerator; 18 import com.fasterxml.jackson.core.JsonGenerator;
23 import com.fasterxml.jackson.databind.JsonSerializer; 19 import com.fasterxml.jackson.databind.JsonSerializer;
24 import com.fasterxml.jackson.databind.SerializerProvider; 20 import com.fasterxml.jackson.databind.SerializerProvider;
21 +import org.onosproject.ovsdb.rfc.notation.Uuid;
22 +
23 +import java.io.IOException;
25 24
26 /** 25 /**
27 * UUID Serializer. 26 * UUID Serializer.
28 */ 27 */
29 -public class UUIDSerializer extends JsonSerializer<UUID> { 28 +public class UuidSerializer extends JsonSerializer<Uuid> {
30 @Override 29 @Override
31 - public void serialize(UUID value, JsonGenerator generator, 30 + public void serialize(Uuid value, JsonGenerator generator,
32 SerializerProvider provider) throws IOException { 31 SerializerProvider provider) throws IOException {
33 generator.writeStartArray(); 32 generator.writeStartArray();
34 String reg = "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"; 33 String reg = "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$";
......
...@@ -18,7 +18,7 @@ package org.onosproject.ovsdb.rfc.table; ...@@ -18,7 +18,7 @@ package org.onosproject.ovsdb.rfc.table;
18 import org.onosproject.ovsdb.rfc.notation.Column; 18 import org.onosproject.ovsdb.rfc.notation.Column;
19 import org.onosproject.ovsdb.rfc.notation.OvsdbSet; 19 import org.onosproject.ovsdb.rfc.notation.OvsdbSet;
20 import org.onosproject.ovsdb.rfc.notation.Row; 20 import org.onosproject.ovsdb.rfc.notation.Row;
21 -import org.onosproject.ovsdb.rfc.notation.UUID; 21 +import org.onosproject.ovsdb.rfc.notation.Uuid;
22 import org.onosproject.ovsdb.rfc.schema.DatabaseSchema; 22 import org.onosproject.ovsdb.rfc.schema.DatabaseSchema;
23 import org.onosproject.ovsdb.rfc.tableservice.AbstractOvsdbTableService; 23 import org.onosproject.ovsdb.rfc.tableservice.AbstractOvsdbTableService;
24 import org.onosproject.ovsdb.rfc.tableservice.ColumnDescription; 24 import org.onosproject.ovsdb.rfc.tableservice.ColumnDescription;
...@@ -212,7 +212,7 @@ public class Bridge extends AbstractOvsdbTableService { ...@@ -212,7 +212,7 @@ public class Bridge extends AbstractOvsdbTableService {
212 * attributes. 212 * attributes.
213 * @param ports the column data which column name is "ports" 213 * @param ports the column data which column name is "ports"
214 */ 214 */
215 - public void setPorts(Set<UUID> ports) { 215 + public void setPorts(Set<Uuid> ports) {
216 ColumnDescription columndesc = new ColumnDescription( 216 ColumnDescription columndesc = new ColumnDescription(
217 BridgeColumn.PORTS 217 BridgeColumn.PORTS
218 .columnName(), 218 .columnName(),
...@@ -240,7 +240,7 @@ public class Bridge extends AbstractOvsdbTableService { ...@@ -240,7 +240,7 @@ public class Bridge extends AbstractOvsdbTableService {
240 * attributes. 240 * attributes.
241 * @param mirrors the column data which column name is "mirrors" 241 * @param mirrors the column data which column name is "mirrors"
242 */ 242 */
243 - public void setMirrors(Set<UUID> mirrors) { 243 + public void setMirrors(Set<Uuid> mirrors) {
244 ColumnDescription columndesc = new ColumnDescription( 244 ColumnDescription columndesc = new ColumnDescription(
245 BridgeColumn.MIRRORS 245 BridgeColumn.MIRRORS
246 .columnName(), 246 .columnName(),
...@@ -268,7 +268,7 @@ public class Bridge extends AbstractOvsdbTableService { ...@@ -268,7 +268,7 @@ public class Bridge extends AbstractOvsdbTableService {
268 * attributes. 268 * attributes.
269 * @param netflow the column data which column name is "netflow" 269 * @param netflow the column data which column name is "netflow"
270 */ 270 */
271 - public void setNetflow(Set<UUID> netflow) { 271 + public void setNetflow(Set<Uuid> netflow) {
272 ColumnDescription columndesc = new ColumnDescription( 272 ColumnDescription columndesc = new ColumnDescription(
273 BridgeColumn.NETFLOW 273 BridgeColumn.NETFLOW
274 .columnName(), 274 .columnName(),
...@@ -296,7 +296,7 @@ public class Bridge extends AbstractOvsdbTableService { ...@@ -296,7 +296,7 @@ public class Bridge extends AbstractOvsdbTableService {
296 * attributes. 296 * attributes.
297 * @param sflow the column data which column name is "sflow" 297 * @param sflow the column data which column name is "sflow"
298 */ 298 */
299 - public void setSflow(Set<UUID> sflow) { 299 + public void setSflow(Set<Uuid> sflow) {
300 ColumnDescription columndesc = new ColumnDescription( 300 ColumnDescription columndesc = new ColumnDescription(
301 BridgeColumn.SFLOW 301 BridgeColumn.SFLOW
302 .columnName(), 302 .columnName(),
...@@ -324,7 +324,7 @@ public class Bridge extends AbstractOvsdbTableService { ...@@ -324,7 +324,7 @@ public class Bridge extends AbstractOvsdbTableService {
324 * attributes. 324 * attributes.
325 * @param ipfix the column data which column name is "ipfix" 325 * @param ipfix the column data which column name is "ipfix"
326 */ 326 */
327 - public void setIpfix(Set<UUID> ipfix) { 327 + public void setIpfix(Set<Uuid> ipfix) {
328 ColumnDescription columndesc = new ColumnDescription( 328 ColumnDescription columndesc = new ColumnDescription(
329 BridgeColumn.IPFIX 329 BridgeColumn.IPFIX
330 .columnName(), 330 .columnName(),
...@@ -548,7 +548,7 @@ public class Bridge extends AbstractOvsdbTableService { ...@@ -548,7 +548,7 @@ public class Bridge extends AbstractOvsdbTableService {
548 * of attributes. 548 * of attributes.
549 * @param flowTables the column data which column name is "flow_tables" 549 * @param flowTables the column data which column name is "flow_tables"
550 */ 550 */
551 - public void setFlowTables(Map<Long, UUID> flowTables) { 551 + public void setFlowTables(Map<Long, Uuid> flowTables) {
552 ColumnDescription columndesc = new ColumnDescription( 552 ColumnDescription columndesc = new ColumnDescription(
553 BridgeColumn.FLOWTABLES 553 BridgeColumn.FLOWTABLES
554 .columnName(), 554 .columnName(),
......
...@@ -19,7 +19,7 @@ import java.util.Map; ...@@ -19,7 +19,7 @@ import java.util.Map;
19 19
20 import org.onosproject.ovsdb.rfc.notation.Column; 20 import org.onosproject.ovsdb.rfc.notation.Column;
21 import org.onosproject.ovsdb.rfc.notation.Row; 21 import org.onosproject.ovsdb.rfc.notation.Row;
22 -import org.onosproject.ovsdb.rfc.notation.UUID; 22 +import org.onosproject.ovsdb.rfc.notation.Uuid;
23 import org.onosproject.ovsdb.rfc.schema.DatabaseSchema; 23 import org.onosproject.ovsdb.rfc.schema.DatabaseSchema;
24 import org.onosproject.ovsdb.rfc.tableservice.AbstractOvsdbTableService; 24 import org.onosproject.ovsdb.rfc.tableservice.AbstractOvsdbTableService;
25 import org.onosproject.ovsdb.rfc.tableservice.ColumnDescription; 25 import org.onosproject.ovsdb.rfc.tableservice.ColumnDescription;
...@@ -97,7 +97,7 @@ public class FlowSampleCollectorSet extends AbstractOvsdbTableService { ...@@ -97,7 +97,7 @@ public class FlowSampleCollectorSet extends AbstractOvsdbTableService {
97 * attributes. 97 * attributes.
98 * @param bridge the column data which column name is "bridge" 98 * @param bridge the column data which column name is "bridge"
99 */ 99 */
100 - public void setBridge(UUID bridge) { 100 + public void setBridge(Uuid bridge) {
101 ColumnDescription columndesc = new ColumnDescription(FlowSampleCollectorSetColumn.BRIDGE.columnName(), 101 ColumnDescription columndesc = new ColumnDescription(FlowSampleCollectorSetColumn.BRIDGE.columnName(),
102 "setBridge", VersionNum.VERSION710); 102 "setBridge", VersionNum.VERSION710);
103 super.setDataHandler(columndesc, bridge); 103 super.setDataHandler(columndesc, bridge);
...@@ -119,7 +119,7 @@ public class FlowSampleCollectorSet extends AbstractOvsdbTableService { ...@@ -119,7 +119,7 @@ public class FlowSampleCollectorSet extends AbstractOvsdbTableService {
119 * attributes. 119 * attributes.
120 * @param ipfix the column data which column name is "ipfix" 120 * @param ipfix the column data which column name is "ipfix"
121 */ 121 */
122 - public void setIpfix(UUID ipfix) { 122 + public void setIpfix(Uuid ipfix) {
123 ColumnDescription columndesc = new ColumnDescription(FlowSampleCollectorSetColumn.IPFIX.columnName(), 123 ColumnDescription columndesc = new ColumnDescription(FlowSampleCollectorSetColumn.IPFIX.columnName(),
124 "setIpfix", VersionNum.VERSION710); 124 "setIpfix", VersionNum.VERSION710);
125 super.setDataHandler(columndesc, ipfix); 125 super.setDataHandler(columndesc, ipfix);
......
...@@ -20,7 +20,7 @@ import java.util.Set; ...@@ -20,7 +20,7 @@ import java.util.Set;
20 20
21 import org.onosproject.ovsdb.rfc.notation.Column; 21 import org.onosproject.ovsdb.rfc.notation.Column;
22 import org.onosproject.ovsdb.rfc.notation.Row; 22 import org.onosproject.ovsdb.rfc.notation.Row;
23 -import org.onosproject.ovsdb.rfc.notation.UUID; 23 +import org.onosproject.ovsdb.rfc.notation.Uuid;
24 import org.onosproject.ovsdb.rfc.schema.DatabaseSchema; 24 import org.onosproject.ovsdb.rfc.schema.DatabaseSchema;
25 import org.onosproject.ovsdb.rfc.tableservice.AbstractOvsdbTableService; 25 import org.onosproject.ovsdb.rfc.tableservice.AbstractOvsdbTableService;
26 import org.onosproject.ovsdb.rfc.tableservice.ColumnDescription; 26 import org.onosproject.ovsdb.rfc.tableservice.ColumnDescription;
...@@ -114,7 +114,7 @@ public class Mirror extends AbstractOvsdbTableService { ...@@ -114,7 +114,7 @@ public class Mirror extends AbstractOvsdbTableService {
114 * @param selectSrcPort the column data which column name is 114 * @param selectSrcPort the column data which column name is
115 * "select_src_port" 115 * "select_src_port"
116 */ 116 */
117 - public void setSelectSrcPort(Set<UUID> selectSrcPort) { 117 + public void setSelectSrcPort(Set<Uuid> selectSrcPort) {
118 ColumnDescription columndesc = new ColumnDescription(MirrorColumn.SELECTSRCPORT.columnName(), 118 ColumnDescription columndesc = new ColumnDescription(MirrorColumn.SELECTSRCPORT.columnName(),
119 "setSelectSrcPort", VersionNum.VERSION100); 119 "setSelectSrcPort", VersionNum.VERSION100);
120 super.setDataHandler(columndesc, selectSrcPort); 120 super.setDataHandler(columndesc, selectSrcPort);
...@@ -137,7 +137,7 @@ public class Mirror extends AbstractOvsdbTableService { ...@@ -137,7 +137,7 @@ public class Mirror extends AbstractOvsdbTableService {
137 * @param selectDstPrt the column data which column name is 137 * @param selectDstPrt the column data which column name is
138 * "select_dst_port" 138 * "select_dst_port"
139 */ 139 */
140 - public void setSelectDstPort(Set<UUID> selectDstPrt) { 140 + public void setSelectDstPort(Set<Uuid> selectDstPrt) {
141 ColumnDescription columndesc = new ColumnDescription(MirrorColumn.SELECTDSTPORT.columnName(), 141 ColumnDescription columndesc = new ColumnDescription(MirrorColumn.SELECTDSTPORT.columnName(),
142 "setSelectDstPort", VersionNum.VERSION100); 142 "setSelectDstPort", VersionNum.VERSION100);
143 super.setDataHandler(columndesc, selectDstPrt); 143 super.setDataHandler(columndesc, selectDstPrt);
...@@ -181,7 +181,7 @@ public class Mirror extends AbstractOvsdbTableService { ...@@ -181,7 +181,7 @@ public class Mirror extends AbstractOvsdbTableService {
181 * of attributes. 181 * of attributes.
182 * @param outputPort the column data which column name is "output_port" 182 * @param outputPort the column data which column name is "output_port"
183 */ 183 */
184 - public void setOutputPort(Set<UUID> outputPort) { 184 + public void setOutputPort(Set<Uuid> outputPort) {
185 ColumnDescription columndesc = new ColumnDescription(MirrorColumn.OUTPUTPORT.columnName(), 185 ColumnDescription columndesc = new ColumnDescription(MirrorColumn.OUTPUTPORT.columnName(),
186 "setOutputPort", VersionNum.VERSION100); 186 "setOutputPort", VersionNum.VERSION100);
187 super.setDataHandler(columndesc, outputPort); 187 super.setDataHandler(columndesc, outputPort);
......
...@@ -20,7 +20,7 @@ import java.util.Set; ...@@ -20,7 +20,7 @@ import java.util.Set;
20 20
21 import org.onosproject.ovsdb.rfc.notation.Column; 21 import org.onosproject.ovsdb.rfc.notation.Column;
22 import org.onosproject.ovsdb.rfc.notation.Row; 22 import org.onosproject.ovsdb.rfc.notation.Row;
23 -import org.onosproject.ovsdb.rfc.notation.UUID; 23 +import org.onosproject.ovsdb.rfc.notation.Uuid;
24 import org.onosproject.ovsdb.rfc.schema.DatabaseSchema; 24 import org.onosproject.ovsdb.rfc.schema.DatabaseSchema;
25 import org.onosproject.ovsdb.rfc.tableservice.AbstractOvsdbTableService; 25 import org.onosproject.ovsdb.rfc.tableservice.AbstractOvsdbTableService;
26 import org.onosproject.ovsdb.rfc.tableservice.ColumnDescription; 26 import org.onosproject.ovsdb.rfc.tableservice.ColumnDescription;
...@@ -85,7 +85,7 @@ public class OpenVSwitch extends AbstractOvsdbTableService { ...@@ -85,7 +85,7 @@ public class OpenVSwitch extends AbstractOvsdbTableService {
85 * attributes. 85 * attributes.
86 * @param bridges the column data which column name is "bridges" 86 * @param bridges the column data which column name is "bridges"
87 */ 87 */
88 - public void setBridges(Set<UUID> bridges) { 88 + public void setBridges(Set<Uuid> bridges) {
89 ColumnDescription columndesc = new ColumnDescription( 89 ColumnDescription columndesc = new ColumnDescription(
90 OpenVSwitchColumn.BRIDGES 90 OpenVSwitchColumn.BRIDGES
91 .columnName(), 91 .columnName(),
...@@ -114,7 +114,7 @@ public class OpenVSwitch extends AbstractOvsdbTableService { ...@@ -114,7 +114,7 @@ public class OpenVSwitch extends AbstractOvsdbTableService {
114 * attributes. 114 * attributes.
115 * @param managers the column data which column name is "managers" 115 * @param managers the column data which column name is "managers"
116 */ 116 */
117 - public void setManagers(Set<UUID> managers) { 117 + public void setManagers(Set<Uuid> managers) {
118 ColumnDescription columndesc = new ColumnDescription( 118 ColumnDescription columndesc = new ColumnDescription(
119 OpenVSwitchColumn.MANAGERS 119 OpenVSwitchColumn.MANAGERS
120 .columnName(), 120 .columnName(),
...@@ -144,7 +144,7 @@ public class OpenVSwitch extends AbstractOvsdbTableService { ...@@ -144,7 +144,7 @@ public class OpenVSwitch extends AbstractOvsdbTableService {
144 * @param managerOptions the column data which column name is 144 * @param managerOptions the column data which column name is
145 * "manager_options" 145 * "manager_options"
146 */ 146 */
147 - public void setManagerOptions(Set<UUID> managerOptions) { 147 + public void setManagerOptions(Set<Uuid> managerOptions) {
148 ColumnDescription columndesc = new ColumnDescription( 148 ColumnDescription columndesc = new ColumnDescription(
149 OpenVSwitchColumn.MANAGEROPTIONS 149 OpenVSwitchColumn.MANAGEROPTIONS
150 .columnName(), 150 .columnName(),
...@@ -172,7 +172,7 @@ public class OpenVSwitch extends AbstractOvsdbTableService { ...@@ -172,7 +172,7 @@ public class OpenVSwitch extends AbstractOvsdbTableService {
172 * attributes. 172 * attributes.
173 * @param ssl the column data which column name is "ssl" 173 * @param ssl the column data which column name is "ssl"
174 */ 174 */
175 - public void setSsl(Set<UUID> ssl) { 175 + public void setSsl(Set<Uuid> ssl) {
176 ColumnDescription columndesc = new ColumnDescription( 176 ColumnDescription columndesc = new ColumnDescription(
177 OpenVSwitchColumn.SSL 177 OpenVSwitchColumn.SSL
178 .columnName(), 178 .columnName(),
...@@ -313,7 +313,7 @@ public class OpenVSwitch extends AbstractOvsdbTableService { ...@@ -313,7 +313,7 @@ public class OpenVSwitch extends AbstractOvsdbTableService {
313 * of attributes. 313 * of attributes.
314 * @param capabilities the column data which column name is "capabilities" 314 * @param capabilities the column data which column name is "capabilities"
315 */ 315 */
316 - public void setCapabilities(Map<String, UUID> capabilities) { 316 + public void setCapabilities(Map<String, Uuid> capabilities) {
317 ColumnDescription columndesc = new ColumnDescription( 317 ColumnDescription columndesc = new ColumnDescription(
318 OpenVSwitchColumn.CAPABILITIES 318 OpenVSwitchColumn.CAPABILITIES
319 .columnName(), 319 .columnName(),
......
...@@ -20,7 +20,7 @@ import java.util.Set; ...@@ -20,7 +20,7 @@ import java.util.Set;
20 20
21 import org.onosproject.ovsdb.rfc.notation.Column; 21 import org.onosproject.ovsdb.rfc.notation.Column;
22 import org.onosproject.ovsdb.rfc.notation.Row; 22 import org.onosproject.ovsdb.rfc.notation.Row;
23 -import org.onosproject.ovsdb.rfc.notation.UUID; 23 +import org.onosproject.ovsdb.rfc.notation.Uuid;
24 import org.onosproject.ovsdb.rfc.schema.DatabaseSchema; 24 import org.onosproject.ovsdb.rfc.schema.DatabaseSchema;
25 import org.onosproject.ovsdb.rfc.tableservice.AbstractOvsdbTableService; 25 import org.onosproject.ovsdb.rfc.tableservice.AbstractOvsdbTableService;
26 import org.onosproject.ovsdb.rfc.tableservice.ColumnDescription; 26 import org.onosproject.ovsdb.rfc.tableservice.ColumnDescription;
...@@ -126,7 +126,7 @@ public class Port extends AbstractOvsdbTableService { ...@@ -126,7 +126,7 @@ public class Port extends AbstractOvsdbTableService {
126 * of attributes. 126 * of attributes.
127 * @param interfaces the column data which column name is "interfaces" 127 * @param interfaces the column data which column name is "interfaces"
128 */ 128 */
129 - public void setInterfaces(Set<UUID> interfaces) { 129 + public void setInterfaces(Set<Uuid> interfaces) {
130 ColumnDescription columndesc = new ColumnDescription( 130 ColumnDescription columndesc = new ColumnDescription(
131 PortColumn.INTERFACES 131 PortColumn.INTERFACES
132 .columnName(), 132 .columnName(),
...@@ -238,7 +238,7 @@ public class Port extends AbstractOvsdbTableService { ...@@ -238,7 +238,7 @@ public class Port extends AbstractOvsdbTableService {
238 * attributes. 238 * attributes.
239 * @param qos the column data which column name is "qos" 239 * @param qos the column data which column name is "qos"
240 */ 240 */
241 - public void setQos(Set<UUID> qos) { 241 + public void setQos(Set<Uuid> qos) {
242 ColumnDescription columndesc = new ColumnDescription( 242 ColumnDescription columndesc = new ColumnDescription(
243 PortColumn.QOS 243 PortColumn.QOS
244 .columnName(), 244 .columnName(),
......
...@@ -20,7 +20,7 @@ import java.util.Set; ...@@ -20,7 +20,7 @@ import java.util.Set;
20 20
21 import org.onosproject.ovsdb.rfc.notation.Column; 21 import org.onosproject.ovsdb.rfc.notation.Column;
22 import org.onosproject.ovsdb.rfc.notation.Row; 22 import org.onosproject.ovsdb.rfc.notation.Row;
23 -import org.onosproject.ovsdb.rfc.notation.UUID; 23 +import org.onosproject.ovsdb.rfc.notation.Uuid;
24 import org.onosproject.ovsdb.rfc.schema.DatabaseSchema; 24 import org.onosproject.ovsdb.rfc.schema.DatabaseSchema;
25 import org.onosproject.ovsdb.rfc.tableservice.AbstractOvsdbTableService; 25 import org.onosproject.ovsdb.rfc.tableservice.AbstractOvsdbTableService;
26 import org.onosproject.ovsdb.rfc.tableservice.ColumnDescription; 26 import org.onosproject.ovsdb.rfc.tableservice.ColumnDescription;
...@@ -75,7 +75,7 @@ public class Qos extends AbstractOvsdbTableService { ...@@ -75,7 +75,7 @@ public class Qos extends AbstractOvsdbTableService {
75 * attributes. 75 * attributes.
76 * @param queues the column data which column name is "queues" 76 * @param queues the column data which column name is "queues"
77 */ 77 */
78 - public void setQueues(Map<Long, UUID> queues) { 78 + public void setQueues(Map<Long, Uuid> queues) {
79 ColumnDescription columndesc = new ColumnDescription(QosColumn.QUEUES.columnName(), "setQueues", 79 ColumnDescription columndesc = new ColumnDescription(QosColumn.QUEUES.columnName(), "setQueues",
80 VersionNum.VERSION100); 80 VersionNum.VERSION100);
81 super.setDataHandler(columndesc, queues); 81 super.setDataHandler(columndesc, queues);
......
...@@ -25,7 +25,7 @@ import org.onosproject.ovsdb.rfc.exception.TableSchemaNotFoundException; ...@@ -25,7 +25,7 @@ import org.onosproject.ovsdb.rfc.exception.TableSchemaNotFoundException;
25 import org.onosproject.ovsdb.rfc.exception.VersionMismatchException; 25 import org.onosproject.ovsdb.rfc.exception.VersionMismatchException;
26 import org.onosproject.ovsdb.rfc.notation.Column; 26 import org.onosproject.ovsdb.rfc.notation.Column;
27 import org.onosproject.ovsdb.rfc.notation.Row; 27 import org.onosproject.ovsdb.rfc.notation.Row;
28 -import org.onosproject.ovsdb.rfc.notation.UUID; 28 +import org.onosproject.ovsdb.rfc.notation.Uuid;
29 import org.onosproject.ovsdb.rfc.schema.ColumnSchema; 29 import org.onosproject.ovsdb.rfc.schema.ColumnSchema;
30 import org.onosproject.ovsdb.rfc.schema.DatabaseSchema; 30 import org.onosproject.ovsdb.rfc.schema.DatabaseSchema;
31 import org.onosproject.ovsdb.rfc.schema.TableSchema; 31 import org.onosproject.ovsdb.rfc.schema.TableSchema;
...@@ -196,12 +196,12 @@ public abstract class AbstractOvsdbTableService implements OvsdbTableService { ...@@ -196,12 +196,12 @@ public abstract class AbstractOvsdbTableService implements OvsdbTableService {
196 } 196 }
197 197
198 @Override 198 @Override
199 - public UUID getTableUuid() { 199 + public Uuid getTableUuid() {
200 if (!isValid()) { 200 if (!isValid()) {
201 return null; 201 return null;
202 } 202 }
203 ColumnDescription columnDesc = new ColumnDescription("_uuid", "getTableUuid"); 203 ColumnDescription columnDesc = new ColumnDescription("_uuid", "getTableUuid");
204 - return (UUID) getDataHandler(columnDesc); 204 + return (Uuid) getDataHandler(columnDesc);
205 } 205 }
206 206
207 @Override 207 @Override
...@@ -214,12 +214,12 @@ public abstract class AbstractOvsdbTableService implements OvsdbTableService { ...@@ -214,12 +214,12 @@ public abstract class AbstractOvsdbTableService implements OvsdbTableService {
214 } 214 }
215 215
216 @Override 216 @Override
217 - public UUID getTableVersion() { 217 + public Uuid getTableVersion() {
218 if (!isValid()) { 218 if (!isValid()) {
219 return null; 219 return null;
220 } 220 }
221 ColumnDescription columnDesc = new ColumnDescription("_version", "getTableVersion"); 221 ColumnDescription columnDesc = new ColumnDescription("_version", "getTableVersion");
222 - return (UUID) getDataHandler(columnDesc); 222 + return (Uuid) getDataHandler(columnDesc);
223 } 223 }
224 224
225 @Override 225 @Override
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
16 package org.onosproject.ovsdb.rfc.tableservice; 16 package org.onosproject.ovsdb.rfc.tableservice;
17 17
18 import org.onosproject.ovsdb.rfc.notation.Column; 18 import org.onosproject.ovsdb.rfc.notation.Column;
19 -import org.onosproject.ovsdb.rfc.notation.UUID; 19 +import org.onosproject.ovsdb.rfc.notation.Uuid;
20 20
21 /** 21 /**
22 * Representation of conversion between Ovsdb table and Row. 22 * Representation of conversion between Ovsdb table and Row.
...@@ -48,7 +48,7 @@ public interface OvsdbTableService { ...@@ -48,7 +48,7 @@ public interface OvsdbTableService {
48 * Returns UUID which column name is _uuid. 48 * Returns UUID which column name is _uuid.
49 * @return UUID 49 * @return UUID
50 */ 50 */
51 - public UUID getTableUuid(); 51 + public Uuid getTableUuid();
52 52
53 /** 53 /**
54 * Returns UUID Column which column name is _uuid. 54 * Returns UUID Column which column name is _uuid.
...@@ -60,7 +60,7 @@ public interface OvsdbTableService { ...@@ -60,7 +60,7 @@ public interface OvsdbTableService {
60 * Returns UUID which column name is _version. 60 * Returns UUID which column name is _version.
61 * @return UUID 61 * @return UUID
62 */ 62 */
63 - public UUID getTableVersion(); 63 + public Uuid getTableVersion();
64 64
65 /** 65 /**
66 * Returns UUID Column which column name is _version. 66 * Returns UUID Column which column name is _version.
......
...@@ -31,7 +31,7 @@ import org.onosproject.ovsdb.rfc.message.TableUpdates; ...@@ -31,7 +31,7 @@ import org.onosproject.ovsdb.rfc.message.TableUpdates;
31 import org.onosproject.ovsdb.rfc.message.UpdateNotification; 31 import org.onosproject.ovsdb.rfc.message.UpdateNotification;
32 import org.onosproject.ovsdb.rfc.notation.Column; 32 import org.onosproject.ovsdb.rfc.notation.Column;
33 import org.onosproject.ovsdb.rfc.notation.Row; 33 import org.onosproject.ovsdb.rfc.notation.Row;
34 -import org.onosproject.ovsdb.rfc.notation.UUID; 34 +import org.onosproject.ovsdb.rfc.notation.Uuid;
35 import org.onosproject.ovsdb.rfc.operations.Operation; 35 import org.onosproject.ovsdb.rfc.operations.Operation;
36 import org.onosproject.ovsdb.rfc.schema.ColumnSchema; 36 import org.onosproject.ovsdb.rfc.schema.ColumnSchema;
37 import org.onosproject.ovsdb.rfc.schema.DatabaseSchema; 37 import org.onosproject.ovsdb.rfc.schema.DatabaseSchema;
...@@ -276,12 +276,12 @@ public final class FromJsonUtil { ...@@ -276,12 +276,12 @@ public final class FromJsonUtil {
276 * @return TableUpdate 276 * @return TableUpdate
277 */ 277 */
278 public static TableUpdate jsonNodeToTableUpdate(TableSchema tableSchema, JsonNode updateJson) { 278 public static TableUpdate jsonNodeToTableUpdate(TableSchema tableSchema, JsonNode updateJson) {
279 - Map<UUID, RowUpdate> rows = Maps.newHashMap(); 279 + Map<Uuid, RowUpdate> rows = Maps.newHashMap();
280 Iterator<Map.Entry<String, JsonNode>> tableUpdateItr = updateJson.fields(); 280 Iterator<Map.Entry<String, JsonNode>> tableUpdateItr = updateJson.fields();
281 while (tableUpdateItr.hasNext()) { 281 while (tableUpdateItr.hasNext()) {
282 Map.Entry<String, JsonNode> oldNewRow = tableUpdateItr.next(); 282 Map.Entry<String, JsonNode> oldNewRow = tableUpdateItr.next();
283 String uuidStr = oldNewRow.getKey(); 283 String uuidStr = oldNewRow.getKey();
284 - UUID uuid = UUID.uuid(uuidStr); 284 + Uuid uuid = Uuid.uuid(uuidStr);
285 JsonNode newR = oldNewRow.getValue().get("new"); 285 JsonNode newR = oldNewRow.getValue().get("new");
286 JsonNode oldR = oldNewRow.getValue().get("old"); 286 JsonNode oldR = oldNewRow.getValue().get("old");
287 Row newRow = newR != null ? createRow(tableSchema, uuid, newR) : null; 287 Row newRow = newR != null ? createRow(tableSchema, uuid, newR) : null;
...@@ -298,7 +298,7 @@ public final class FromJsonUtil { ...@@ -298,7 +298,7 @@ public final class FromJsonUtil {
298 * @param rowNode JsonNode 298 * @param rowNode JsonNode
299 * @return Row 299 * @return Row
300 */ 300 */
301 - private static Row createRow(TableSchema tableSchema, UUID uuid, JsonNode rowNode) { 301 + private static Row createRow(TableSchema tableSchema, Uuid uuid, JsonNode rowNode) {
302 if (tableSchema == null) { 302 if (tableSchema == null) {
303 return null; 303 return null;
304 } 304 }
......
...@@ -21,7 +21,7 @@ import java.util.Set; ...@@ -21,7 +21,7 @@ import java.util.Set;
21 import org.onosproject.ovsdb.rfc.notation.OvsdbMap; 21 import org.onosproject.ovsdb.rfc.notation.OvsdbMap;
22 import org.onosproject.ovsdb.rfc.notation.OvsdbSet; 22 import org.onosproject.ovsdb.rfc.notation.OvsdbSet;
23 import org.onosproject.ovsdb.rfc.notation.RefTableRow; 23 import org.onosproject.ovsdb.rfc.notation.RefTableRow;
24 -import org.onosproject.ovsdb.rfc.notation.UUID; 24 +import org.onosproject.ovsdb.rfc.notation.Uuid;
25 import org.onosproject.ovsdb.rfc.schema.type.AtomicColumnType; 25 import org.onosproject.ovsdb.rfc.schema.type.AtomicColumnType;
26 import org.onosproject.ovsdb.rfc.schema.type.BaseType; 26 import org.onosproject.ovsdb.rfc.schema.type.BaseType;
27 import org.onosproject.ovsdb.rfc.schema.type.BooleanBaseType; 27 import org.onosproject.ovsdb.rfc.schema.type.BooleanBaseType;
...@@ -160,7 +160,7 @@ public final class TransValueUtil { ...@@ -160,7 +160,7 @@ public final class TransValueUtil {
160 if (valueNode.get(0).isTextual() 160 if (valueNode.get(0).isTextual()
161 && ("uuid".equals(valueNode.get(0).asText()) || "named-uuid" 161 && ("uuid".equals(valueNode.get(0).asText()) || "named-uuid"
162 .equals(valueNode.get(0).asText()))) { 162 .equals(valueNode.get(0).asText()))) {
163 - return UUID.uuid(valueNode.get(1).asText()); 163 + return Uuid.uuid(valueNode.get(1).asText());
164 } 164 }
165 } 165 }
166 } else { 166 } else {
......
...@@ -145,10 +145,10 @@ public class PcInitiatedLspRequestVer1 implements PcInitiatedLspRequest { ...@@ -145,10 +145,10 @@ public class PcInitiatedLspRequestVer1 implements PcInitiatedLspRequest {
145 */ 145 */
146 public static class Builder implements PcInitiatedLspRequest.Builder { 146 public static class Builder implements PcInitiatedLspRequest.Builder {
147 147
148 - private boolean bIsSRPObjectSet = false; 148 + private boolean bIsSrpObjectSet = false;
149 - private boolean bIsLSPObjectSet = false; 149 + private boolean bIsLspObjectSet = false;
150 private boolean bIsEndPointsObjectSet = false; 150 private boolean bIsEndPointsObjectSet = false;
151 - private boolean bIsEROObjectSet = false; 151 + private boolean bIsEroObjectSet = false;
152 private boolean bIsPcepAttributeSet = false; 152 private boolean bIsPcepAttributeSet = false;
153 private boolean bIsbRFlagSet = false; 153 private boolean bIsbRFlagSet = false;
154 154
...@@ -178,7 +178,7 @@ public class PcInitiatedLspRequestVer1 implements PcInitiatedLspRequest { ...@@ -178,7 +178,7 @@ public class PcInitiatedLspRequestVer1 implements PcInitiatedLspRequest {
178 PcepAttribute pcepAttribute = null; 178 PcepAttribute pcepAttribute = null;
179 boolean bRFlag = false; 179 boolean bRFlag = false;
180 180
181 - if (!this.bIsSRPObjectSet) { 181 + if (!this.bIsSrpObjectSet) {
182 throw new PcepParseException("Srp object NOT Set while building PcInitiatedLspRequest"); 182 throw new PcepParseException("Srp object NOT Set while building PcInitiatedLspRequest");
183 } else { 183 } else {
184 srpObject = this.srpObject; 184 srpObject = this.srpObject;
...@@ -191,7 +191,7 @@ public class PcInitiatedLspRequestVer1 implements PcInitiatedLspRequest { ...@@ -191,7 +191,7 @@ public class PcInitiatedLspRequestVer1 implements PcInitiatedLspRequest {
191 this.bIsbRFlagSet = false; 191 this.bIsbRFlagSet = false;
192 } 192 }
193 193
194 - if (!this.bIsLSPObjectSet) { 194 + if (!this.bIsLspObjectSet) {
195 throw new PcepParseException("LSP Object NOT Set while building PcInitiatedLspRequest"); 195 throw new PcepParseException("LSP Object NOT Set while building PcInitiatedLspRequest");
196 } else { 196 } else {
197 lspObject = this.lspObject; 197 lspObject = this.lspObject;
...@@ -203,7 +203,7 @@ public class PcInitiatedLspRequestVer1 implements PcInitiatedLspRequest { ...@@ -203,7 +203,7 @@ public class PcInitiatedLspRequestVer1 implements PcInitiatedLspRequest {
203 } else { 203 } else {
204 endPointsObject = this.endPointsObject; 204 endPointsObject = this.endPointsObject;
205 } 205 }
206 - if (!this.bIsEROObjectSet) { 206 + if (!this.bIsEroObjectSet) {
207 throw new PcepParseException("ERO Object NOT Set while building PcInitiatedLspRequest"); 207 throw new PcepParseException("ERO Object NOT Set while building PcInitiatedLspRequest");
208 } else { 208 } else {
209 eroObject = this.eroObject; 209 eroObject = this.eroObject;
...@@ -243,7 +243,7 @@ public class PcInitiatedLspRequestVer1 implements PcInitiatedLspRequest { ...@@ -243,7 +243,7 @@ public class PcInitiatedLspRequestVer1 implements PcInitiatedLspRequest {
243 @Override 243 @Override
244 public Builder setSrpObject(PcepSrpObject srpobj) { 244 public Builder setSrpObject(PcepSrpObject srpobj) {
245 this.srpObject = srpobj; 245 this.srpObject = srpobj;
246 - this.bIsSRPObjectSet = true; 246 + this.bIsSrpObjectSet = true;
247 return this; 247 return this;
248 248
249 } 249 }
...@@ -251,7 +251,7 @@ public class PcInitiatedLspRequestVer1 implements PcInitiatedLspRequest { ...@@ -251,7 +251,7 @@ public class PcInitiatedLspRequestVer1 implements PcInitiatedLspRequest {
251 @Override 251 @Override
252 public Builder setLspObject(PcepLspObject lspObject) { 252 public Builder setLspObject(PcepLspObject lspObject) {
253 this.lspObject = lspObject; 253 this.lspObject = lspObject;
254 - this.bIsLSPObjectSet = true; 254 + this.bIsLspObjectSet = true;
255 return this; 255 return this;
256 } 256 }
257 257
...@@ -265,7 +265,7 @@ public class PcInitiatedLspRequestVer1 implements PcInitiatedLspRequest { ...@@ -265,7 +265,7 @@ public class PcInitiatedLspRequestVer1 implements PcInitiatedLspRequest {
265 @Override 265 @Override
266 public Builder setEroObject(PcepEroObject eroObject) { 266 public Builder setEroObject(PcepEroObject eroObject) {
267 this.eroObject = eroObject; 267 this.eroObject = eroObject;
268 - this.bIsEROObjectSet = true; 268 + this.bIsEroObjectSet = true;
269 return this; 269 return this;
270 } 270 }
271 271
......
...@@ -236,7 +236,7 @@ public class PcepLabelUpdateVer1 implements PcepLabelUpdate { ...@@ -236,7 +236,7 @@ public class PcepLabelUpdateVer1 implements PcepLabelUpdate {
236 default: 236 default:
237 throw new PcepParseException("Unkown FEC object type " + tempObjHeader.getObjType()); 237 throw new PcepParseException("Unkown FEC object type " + tempObjHeader.getObjType());
238 } 238 }
239 - labelMap.setFECObject(fecObject); 239 + labelMap.setFecObject(fecObject);
240 pceLabelUpdate.setLabelMap(labelMap); 240 pceLabelUpdate.setLabelMap(labelMap);
241 } else { 241 } else {
242 throw new PcepParseException( 242 throw new PcepParseException(
...@@ -308,7 +308,7 @@ public class PcepLabelUpdateVer1 implements PcepLabelUpdate { ...@@ -308,7 +308,7 @@ public class PcepLabelUpdateVer1 implements PcepLabelUpdate {
308 } else { 308 } else {
309 labelObject.write(cb); 309 labelObject.write(cb);
310 } 310 }
311 - fecObject = labelMap.getFECObject(); 311 + fecObject = labelMap.getFecObject();
312 if (fecObject == null) { 312 if (fecObject == null) {
313 throw new PcepParseException("fec Object is mandatory object for Label map."); 313 throw new PcepParseException("fec Object is mandatory object for Label map.");
314 } else { 314 } else {
......
...@@ -121,7 +121,7 @@ public class PcepMsgPathVer1 implements PcepMsgPath { ...@@ -121,7 +121,7 @@ public class PcepMsgPathVer1 implements PcepMsgPath {
121 */ 121 */
122 public static class Builder implements PcepMsgPath.Builder { 122 public static class Builder implements PcepMsgPath.Builder {
123 123
124 - private boolean bIsEROObjectSet = false; 124 + private boolean bIsEroObjectSet = false;
125 private boolean bIsPcepAttributeSet = false; 125 private boolean bIsPcepAttributeSet = false;
126 126
127 //PCEP ERO Object 127 //PCEP ERO Object
...@@ -137,7 +137,7 @@ public class PcepMsgPathVer1 implements PcepMsgPath { ...@@ -137,7 +137,7 @@ public class PcepMsgPathVer1 implements PcepMsgPath {
137 //PCEP Attribute list 137 //PCEP Attribute list
138 PcepAttribute pcepAttribute = null; 138 PcepAttribute pcepAttribute = null;
139 139
140 - if (!this.bIsEROObjectSet) { 140 + if (!this.bIsEroObjectSet) {
141 throw new PcepParseException("ERO Object NOT Set while building PcepMsgPath."); 141 throw new PcepParseException("ERO Object NOT Set while building PcepMsgPath.");
142 } else { 142 } else {
143 eroObject = this.eroObject; 143 eroObject = this.eroObject;
...@@ -164,7 +164,7 @@ public class PcepMsgPathVer1 implements PcepMsgPath { ...@@ -164,7 +164,7 @@ public class PcepMsgPathVer1 implements PcepMsgPath {
164 @Override 164 @Override
165 public Builder setEroObject(PcepEroObject eroObject) { 165 public Builder setEroObject(PcepEroObject eroObject) {
166 this.eroObject = eroObject; 166 this.eroObject = eroObject;
167 - this.bIsEROObjectSet = true; 167 + this.bIsEroObjectSet = true;
168 return this; 168 return this;
169 } 169 }
170 170
......
...@@ -333,8 +333,8 @@ public class PcepStateReportVer1 implements PcepStateReport { ...@@ -333,8 +333,8 @@ public class PcepStateReportVer1 implements PcepStateReport {
333 */ 333 */
334 public static class Builder implements PcepStateReport.Builder { 334 public static class Builder implements PcepStateReport.Builder {
335 335
336 - private boolean bIsSRPObjectSet = false; 336 + private boolean bIsSrpObjectSet = false;
337 - private boolean bIsLSPObjectSet = false; 337 + private boolean bIsLspObjectSet = false;
338 private boolean bIsPcepMsgPathSet = false; 338 private boolean bIsPcepMsgPathSet = false;
339 339
340 //PCEP SRP Object 340 //PCEP SRP Object
...@@ -354,11 +354,11 @@ public class PcepStateReportVer1 implements PcepStateReport { ...@@ -354,11 +354,11 @@ public class PcepStateReportVer1 implements PcepStateReport {
354 //PCEP Attribute list 354 //PCEP Attribute list
355 PcepStateReport.PcepMsgPath msgPath = null; 355 PcepStateReport.PcepMsgPath msgPath = null;
356 356
357 - if (this.bIsSRPObjectSet) { 357 + if (this.bIsSrpObjectSet) {
358 srpObject = this.srpObject; 358 srpObject = this.srpObject;
359 } 359 }
360 360
361 - if (!this.bIsLSPObjectSet) { 361 + if (!this.bIsLspObjectSet) {
362 throw new PcepParseException(" LSP Object NOT Set while building PcepStateReport."); 362 throw new PcepParseException(" LSP Object NOT Set while building PcepStateReport.");
363 } else { 363 } else {
364 lspObject = this.lspObject; 364 lspObject = this.lspObject;
...@@ -390,14 +390,14 @@ public class PcepStateReportVer1 implements PcepStateReport { ...@@ -390,14 +390,14 @@ public class PcepStateReportVer1 implements PcepStateReport {
390 @Override 390 @Override
391 public Builder setSrpObject(PcepSrpObject srpobj) { 391 public Builder setSrpObject(PcepSrpObject srpobj) {
392 this.srpObject = srpobj; 392 this.srpObject = srpobj;
393 - this.bIsSRPObjectSet = true; 393 + this.bIsSrpObjectSet = true;
394 return this; 394 return this;
395 } 395 }
396 396
397 @Override 397 @Override
398 public Builder setLspObject(PcepLspObject lspObject) { 398 public Builder setLspObject(PcepLspObject lspObject) {
399 this.lspObject = lspObject; 399 this.lspObject = lspObject;
400 - this.bIsLSPObjectSet = true; 400 + this.bIsLspObjectSet = true;
401 return this; 401 return this;
402 } 402 }
403 403
......
...@@ -110,8 +110,8 @@ public class PcepUpdateRequestVer1 implements PcepUpdateRequest { ...@@ -110,8 +110,8 @@ public class PcepUpdateRequestVer1 implements PcepUpdateRequest {
110 */ 110 */
111 public static class Builder implements PcepUpdateRequest.Builder { 111 public static class Builder implements PcepUpdateRequest.Builder {
112 112
113 - private boolean bIsSRPObjectSet = false; 113 + private boolean bIsSrpObjectSet = false;
114 - private boolean bIsLSPObjectSet = false; 114 + private boolean bIsLspObjectSet = false;
115 private boolean bIsPcepMsgPathSet = false; 115 private boolean bIsPcepMsgPathSet = false;
116 116
117 //PCEP SRP Object 117 //PCEP SRP Object
...@@ -131,12 +131,12 @@ public class PcepUpdateRequestVer1 implements PcepUpdateRequest { ...@@ -131,12 +131,12 @@ public class PcepUpdateRequestVer1 implements PcepUpdateRequest {
131 //PCEP Attribute list 131 //PCEP Attribute list
132 PcepMsgPath msgPath = null; 132 PcepMsgPath msgPath = null;
133 133
134 - if (!this.bIsSRPObjectSet) { 134 + if (!this.bIsSrpObjectSet) {
135 throw new PcepParseException(" SRP Object NOT Set while building PcepUpdateRequest."); 135 throw new PcepParseException(" SRP Object NOT Set while building PcepUpdateRequest.");
136 } else { 136 } else {
137 srpObject = this.srpObject; 137 srpObject = this.srpObject;
138 } 138 }
139 - if (!this.bIsLSPObjectSet) { 139 + if (!this.bIsLspObjectSet) {
140 throw new PcepParseException(" LSP Object NOT Set while building PcepUpdateRequest."); 140 throw new PcepParseException(" LSP Object NOT Set while building PcepUpdateRequest.");
141 } else { 141 } else {
142 lspObject = this.lspObject; 142 lspObject = this.lspObject;
...@@ -168,7 +168,7 @@ public class PcepUpdateRequestVer1 implements PcepUpdateRequest { ...@@ -168,7 +168,7 @@ public class PcepUpdateRequestVer1 implements PcepUpdateRequest {
168 @Override 168 @Override
169 public Builder setSrpObject(PcepSrpObject srpobj) { 169 public Builder setSrpObject(PcepSrpObject srpobj) {
170 this.srpObject = srpobj; 170 this.srpObject = srpobj;
171 - this.bIsSRPObjectSet = true; 171 + this.bIsSrpObjectSet = true;
172 return this; 172 return this;
173 173
174 } 174 }
...@@ -176,7 +176,7 @@ public class PcepUpdateRequestVer1 implements PcepUpdateRequest { ...@@ -176,7 +176,7 @@ public class PcepUpdateRequestVer1 implements PcepUpdateRequest {
176 @Override 176 @Override
177 public Builder setLspObject(PcepLspObject lspObject) { 177 public Builder setLspObject(PcepLspObject lspObject) {
178 this.lspObject = lspObject; 178 this.lspObject = lspObject;
179 - this.bIsLSPObjectSet = true; 179 + this.bIsLspObjectSet = true;
180 return this; 180 return this;
181 } 181 }
182 182
......
...@@ -27,7 +27,7 @@ import com.google.common.base.MoreObjects; ...@@ -27,7 +27,7 @@ import com.google.common.base.MoreObjects;
27 /** 27 /**
28 * Provides BGP LS identifier which contains opaque value (32 Bit ID). 28 * Provides BGP LS identifier which contains opaque value (32 Bit ID).
29 */ 29 */
30 -public class BGPLSidentifierTlv implements PcepValueType { 30 +public class BgpLsIdentifierTlv implements PcepValueType {
31 31
32 /* Reference :draft-ietf-idr-ls-distribution-10 32 /* Reference :draft-ietf-idr-ls-distribution-10
33 * 0 1 2 3 33 * 0 1 2 3
...@@ -39,7 +39,7 @@ public class BGPLSidentifierTlv implements PcepValueType { ...@@ -39,7 +39,7 @@ public class BGPLSidentifierTlv implements PcepValueType {
39 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 39 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
40 */ 40 */
41 41
42 - protected static final Logger log = LoggerFactory.getLogger(BGPLSidentifierTlv.class); 42 + protected static final Logger log = LoggerFactory.getLogger(BgpLsIdentifierTlv.class);
43 43
44 public static final short TYPE = 17; //TODD:change this TBD11 44 public static final short TYPE = 17; //TODD:change this TBD11
45 public static final short LENGTH = 4; 45 public static final short LENGTH = 4;
...@@ -51,7 +51,7 @@ public class BGPLSidentifierTlv implements PcepValueType { ...@@ -51,7 +51,7 @@ public class BGPLSidentifierTlv implements PcepValueType {
51 * 51 *
52 * @param rawValue BGP LS identifier Tlv 52 * @param rawValue BGP LS identifier Tlv
53 */ 53 */
54 - public BGPLSidentifierTlv(int rawValue) { 54 + public BgpLsIdentifierTlv(int rawValue) {
55 this.rawValue = rawValue; 55 this.rawValue = rawValue;
56 } 56 }
57 57
...@@ -61,8 +61,8 @@ public class BGPLSidentifierTlv implements PcepValueType { ...@@ -61,8 +61,8 @@ public class BGPLSidentifierTlv implements PcepValueType {
61 * @param raw value 61 * @param raw value
62 * @return object of BGPLSidentifierTlv 62 * @return object of BGPLSidentifierTlv
63 */ 63 */
64 - public static BGPLSidentifierTlv of(final int raw) { 64 + public static BgpLsIdentifierTlv of(final int raw) {
65 - return new BGPLSidentifierTlv(raw); 65 + return new BgpLsIdentifierTlv(raw);
66 } 66 }
67 67
68 /** 68 /**
...@@ -99,8 +99,8 @@ public class BGPLSidentifierTlv implements PcepValueType { ...@@ -99,8 +99,8 @@ public class BGPLSidentifierTlv implements PcepValueType {
99 if (this == obj) { 99 if (this == obj) {
100 return true; 100 return true;
101 } 101 }
102 - if (obj instanceof BGPLSidentifierTlv) { 102 + if (obj instanceof BgpLsIdentifierTlv) {
103 - BGPLSidentifierTlv other = (BGPLSidentifierTlv) obj; 103 + BgpLsIdentifierTlv other = (BgpLsIdentifierTlv) obj;
104 return Objects.equals(rawValue, other.rawValue); 104 return Objects.equals(rawValue, other.rawValue);
105 } 105 }
106 return false; 106 return false;
...@@ -121,8 +121,8 @@ public class BGPLSidentifierTlv implements PcepValueType { ...@@ -121,8 +121,8 @@ public class BGPLSidentifierTlv implements PcepValueType {
121 * @param c input channel buffer 121 * @param c input channel buffer
122 * @return object of BGP LS identifier Tlv 122 * @return object of BGP LS identifier Tlv
123 */ 123 */
124 - public static BGPLSidentifierTlv read(ChannelBuffer c) { 124 + public static BgpLsIdentifierTlv read(ChannelBuffer c) {
125 - return BGPLSidentifierTlv.of(c.readInt()); 125 + return BgpLsIdentifierTlv.of(c.readInt());
126 } 126 }
127 127
128 @Override 128 @Override
......
...@@ -15,15 +15,14 @@ ...@@ -15,15 +15,14 @@
15 */ 15 */
16 package org.onosproject.pcepio.types; 16 package org.onosproject.pcepio.types;
17 17
18 -import java.util.Arrays; 18 +import com.google.common.base.MoreObjects;
19 - 19 +import com.google.common.base.MoreObjects.ToStringHelper;
20 import org.jboss.netty.buffer.ChannelBuffer; 20 import org.jboss.netty.buffer.ChannelBuffer;
21 import org.onosproject.pcepio.protocol.PcepVersion; 21 import org.onosproject.pcepio.protocol.PcepVersion;
22 import org.slf4j.Logger; 22 import org.slf4j.Logger;
23 import org.slf4j.LoggerFactory; 23 import org.slf4j.LoggerFactory;
24 24
25 -import com.google.common.base.MoreObjects; 25 +import java.util.Arrays;
26 -import com.google.common.base.MoreObjects.ToStringHelper;
27 26
28 /** 27 /**
29 * Provides IPv6 Interface Address. REFERENCE :[RFC6119]/4.2. 28 * Provides IPv6 Interface Address. REFERENCE :[RFC6119]/4.2.
...@@ -65,15 +64,15 @@ public class IPv6InterfaceAddressTlv implements PcepValueType { ...@@ -65,15 +64,15 @@ public class IPv6InterfaceAddressTlv implements PcepValueType {
65 */ 64 */
66 public static IPv6InterfaceAddressTlv of(final byte[] raw) { 65 public static IPv6InterfaceAddressTlv of(final byte[] raw) {
67 //check NONE_VAL 66 //check NONE_VAL
68 - boolean bFoundNONE = true; 67 + boolean bFoundNone = true;
69 //value starts from 3rd byte. 68 //value starts from 3rd byte.
70 for (int i = 2; i < 20; ++i) { 69 for (int i = 2; i < 20; ++i) {
71 if (NONE_VAL[i] != raw[i]) { 70 if (NONE_VAL[i] != raw[i]) {
72 - bFoundNONE = false; 71 + bFoundNone = false;
73 } 72 }
74 } 73 }
75 74
76 - if (bFoundNONE) { 75 + if (bFoundNone) {
77 return NONE; 76 return NONE;
78 } 77 }
79 78
......
...@@ -15,15 +15,14 @@ ...@@ -15,15 +15,14 @@
15 */ 15 */
16 package org.onosproject.pcepio.types; 16 package org.onosproject.pcepio.types;
17 17
18 -import java.util.Arrays; 18 +import com.google.common.base.MoreObjects;
19 - 19 +import com.google.common.base.MoreObjects.ToStringHelper;
20 import org.jboss.netty.buffer.ChannelBuffer; 20 import org.jboss.netty.buffer.ChannelBuffer;
21 import org.onosproject.pcepio.protocol.PcepVersion; 21 import org.onosproject.pcepio.protocol.PcepVersion;
22 import org.slf4j.Logger; 22 import org.slf4j.Logger;
23 import org.slf4j.LoggerFactory; 23 import org.slf4j.LoggerFactory;
24 24
25 -import com.google.common.base.MoreObjects; 25 +import java.util.Arrays;
26 -import com.google.common.base.MoreObjects.ToStringHelper;
27 26
28 /** 27 /**
29 * Provides IPv6 Neighbor Address. Reference :[RFC6119]/4.3. 28 * Provides IPv6 Neighbor Address. Reference :[RFC6119]/4.3.
...@@ -63,15 +62,15 @@ public class IPv6NeighborAddressTlv implements PcepValueType { ...@@ -63,15 +62,15 @@ public class IPv6NeighborAddressTlv implements PcepValueType {
63 */ 62 */
64 public static IPv6NeighborAddressTlv of(final byte[] raw) { 63 public static IPv6NeighborAddressTlv of(final byte[] raw) {
65 //check NONE_VAL 64 //check NONE_VAL
66 - boolean bFoundNONE = true; 65 + boolean bFoundNone = true;
67 //value starts from 3rd byte. 66 //value starts from 3rd byte.
68 for (int i = 2; i < 20; ++i) { 67 for (int i = 2; i < 20; ++i) {
69 if (NONE_VAL[i] != raw[i]) { 68 if (NONE_VAL[i] != raw[i]) {
70 - bFoundNONE = false; 69 + bFoundNone = false;
71 } 70 }
72 } 71 }
73 72
74 - if (bFoundNONE) { 73 + if (bFoundNone) {
75 return NONE; 74 return NONE;
76 } 75 }
77 76
......
...@@ -16,15 +16,14 @@ ...@@ -16,15 +16,14 @@
16 16
17 package org.onosproject.pcepio.types; 17 package org.onosproject.pcepio.types;
18 18
19 -import java.util.Arrays; 19 +import com.google.common.base.MoreObjects;
20 - 20 +import com.google.common.base.MoreObjects.ToStringHelper;
21 import org.jboss.netty.buffer.ChannelBuffer; 21 import org.jboss.netty.buffer.ChannelBuffer;
22 import org.onosproject.pcepio.protocol.PcepVersion; 22 import org.onosproject.pcepio.protocol.PcepVersion;
23 import org.slf4j.Logger; 23 import org.slf4j.Logger;
24 import org.slf4j.LoggerFactory; 24 import org.slf4j.LoggerFactory;
25 25
26 -import com.google.common.base.MoreObjects; 26 +import java.util.Arrays;
27 -import com.google.common.base.MoreObjects.ToStringHelper;
28 27
29 /** 28 /**
30 * Provides IPv6 Sub Object. 29 * Provides IPv6 Sub Object.
...@@ -115,15 +114,15 @@ public class IPv6SubObject implements PcepValueType { ...@@ -115,15 +114,15 @@ public class IPv6SubObject implements PcepValueType {
115 */ 114 */
116 public static IPv6SubObject of(final byte[] raw) { 115 public static IPv6SubObject of(final byte[] raw) {
117 //check NONE_VAL 116 //check NONE_VAL
118 - boolean bFoundNONE = true; 117 + boolean bFoundNone = true;
119 //value starts from 3rd byte. 118 //value starts from 3rd byte.
120 for (int i = 2; i < 20; ++i) { 119 for (int i = 2; i < 20; ++i) {
121 if (NONE_VAL[i] != raw[i]) { 120 if (NONE_VAL[i] != raw[i]) {
122 - bFoundNONE = false; 121 + bFoundNone = false;
123 } 122 }
124 } 123 }
125 124
126 - if (bFoundNONE) { 125 + if (bFoundNone) {
127 return NONE; 126 return NONE;
128 } 127 }
129 128
......
...@@ -15,15 +15,14 @@ ...@@ -15,15 +15,14 @@
15 */ 15 */
16 package org.onosproject.pcepio.types; 16 package org.onosproject.pcepio.types;
17 17
18 -import java.util.Arrays; 18 +import com.google.common.base.MoreObjects;
19 - 19 +import com.google.common.base.MoreObjects.ToStringHelper;
20 import org.jboss.netty.buffer.ChannelBuffer; 20 import org.jboss.netty.buffer.ChannelBuffer;
21 import org.onosproject.pcepio.protocol.PcepVersion; 21 import org.onosproject.pcepio.protocol.PcepVersion;
22 import org.slf4j.Logger; 22 import org.slf4j.Logger;
23 import org.slf4j.LoggerFactory; 23 import org.slf4j.LoggerFactory;
24 24
25 -import com.google.common.base.MoreObjects; 25 +import java.util.Arrays;
26 -import com.google.common.base.MoreObjects.ToStringHelper;
27 26
28 /** 27 /**
29 * Provides IPv6 TE Router Id of Local Node. Reference :[RFC6119]/4.1. 28 * Provides IPv6 TE Router Id of Local Node. Reference :[RFC6119]/4.1.
...@@ -63,15 +62,15 @@ public class IPv6TERouterIdofLocalNodeTlv implements PcepValueType { ...@@ -63,15 +62,15 @@ public class IPv6TERouterIdofLocalNodeTlv implements PcepValueType {
63 */ 62 */
64 public static IPv6TERouterIdofLocalNodeTlv of(final byte[] raw) { 63 public static IPv6TERouterIdofLocalNodeTlv of(final byte[] raw) {
65 //check NONE_VAL 64 //check NONE_VAL
66 - boolean bFoundNONE = true; 65 + boolean bFoundNone = true;
67 //value starts from 3rd byte. 66 //value starts from 3rd byte.
68 for (int i = 2; i < 20; ++i) { 67 for (int i = 2; i < 20; ++i) {
69 if (NONE_VAL[i] != raw[i]) { 68 if (NONE_VAL[i] != raw[i]) {
70 - bFoundNONE = false; 69 + bFoundNone = false;
71 } 70 }
72 } 71 }
73 72
74 - if (bFoundNONE) { 73 + if (bFoundNone) {
75 return NONE; 74 return NONE;
76 } 75 }
77 76
......
...@@ -15,15 +15,14 @@ ...@@ -15,15 +15,14 @@
15 */ 15 */
16 package org.onosproject.pcepio.types; 16 package org.onosproject.pcepio.types;
17 17
18 -import java.util.Arrays; 18 +import com.google.common.base.MoreObjects;
19 - 19 +import com.google.common.base.MoreObjects.ToStringHelper;
20 import org.jboss.netty.buffer.ChannelBuffer; 20 import org.jboss.netty.buffer.ChannelBuffer;
21 import org.onosproject.pcepio.protocol.PcepVersion; 21 import org.onosproject.pcepio.protocol.PcepVersion;
22 import org.slf4j.Logger; 22 import org.slf4j.Logger;
23 import org.slf4j.LoggerFactory; 23 import org.slf4j.LoggerFactory;
24 24
25 -import com.google.common.base.MoreObjects; 25 +import java.util.Arrays;
26 -import com.google.common.base.MoreObjects.ToStringHelper;
27 26
28 /** 27 /**
29 * Provides IPv6 TE Router Id of Remote Node. Reference :[RFC6119]/4.1. 28 * Provides IPv6 TE Router Id of Remote Node. Reference :[RFC6119]/4.1.
...@@ -64,15 +63,15 @@ public class IPv6TERouterIdofRemoteNodeTlv implements PcepValueType { ...@@ -64,15 +63,15 @@ public class IPv6TERouterIdofRemoteNodeTlv implements PcepValueType {
64 */ 63 */
65 public static IPv6TERouterIdofRemoteNodeTlv of(final byte[] raw) { 64 public static IPv6TERouterIdofRemoteNodeTlv of(final byte[] raw) {
66 //check NONE_VAL 65 //check NONE_VAL
67 - boolean bFoundNONE = true; 66 + boolean bFoundNone = true;
68 //value starts from 3rd byte. 67 //value starts from 3rd byte.
69 for (int i = 2; i < 20; ++i) { 68 for (int i = 2; i < 20; ++i) {
70 if (NONE_VAL[i] != raw[i]) { 69 if (NONE_VAL[i] != raw[i]) {
71 - bFoundNONE = false; 70 + bFoundNone = false;
72 } 71 }
73 } 72 }
74 73
75 - if (bFoundNONE) { 74 + if (bFoundNone) {
76 return NONE; 75 return NONE;
77 } 76 }
78 77
......
...@@ -15,20 +15,19 @@ ...@@ -15,20 +15,19 @@
15 */ 15 */
16 package org.onosproject.pcepio.types; 16 package org.onosproject.pcepio.types;
17 17
18 -import java.util.Arrays; 18 +import com.google.common.base.MoreObjects;
19 - 19 +import com.google.common.base.MoreObjects.ToStringHelper;
20 import org.jboss.netty.buffer.ChannelBuffer; 20 import org.jboss.netty.buffer.ChannelBuffer;
21 import org.onosproject.pcepio.protocol.PcepVersion; 21 import org.onosproject.pcepio.protocol.PcepVersion;
22 import org.slf4j.Logger; 22 import org.slf4j.Logger;
23 import org.slf4j.LoggerFactory; 23 import org.slf4j.LoggerFactory;
24 24
25 -import com.google.common.base.MoreObjects; 25 +import java.util.Arrays;
26 -import com.google.common.base.MoreObjects.ToStringHelper;
27 26
28 /** 27 /**
29 * Provides IGP Link Metric . 28 * Provides IGP Link Metric .
30 */ 29 */
31 -public class IGPMetricTlv implements PcepValueType { 30 +public class IgpMetricTlv implements PcepValueType {
32 31
33 /* Reference :[I-D.ietf-idr-ls-distribution] /3.3.2.4 32 /* Reference :[I-D.ietf-idr-ls-distribution] /3.3.2.4
34 * 0 1 2 3 33 * 0 1 2 3
...@@ -40,7 +39,7 @@ public class IGPMetricTlv implements PcepValueType { ...@@ -40,7 +39,7 @@ public class IGPMetricTlv implements PcepValueType {
40 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 39 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
41 */ 40 */
42 41
43 - protected static final Logger log = LoggerFactory.getLogger(IGPMetricTlv.class); 42 + protected static final Logger log = LoggerFactory.getLogger(IgpMetricTlv.class);
44 43
45 public static final short TYPE = 1095; //TODO:NEED TO HANDLE TDB40 44 public static final short TYPE = 1095; //TODO:NEED TO HANDLE TDB40
46 private short hLength; 45 private short hLength;
...@@ -53,7 +52,7 @@ public class IGPMetricTlv implements PcepValueType { ...@@ -53,7 +52,7 @@ public class IGPMetricTlv implements PcepValueType {
53 * @param rawValue IGP Link Metric 52 * @param rawValue IGP Link Metric
54 * @param hLength length 53 * @param hLength length
55 */ 54 */
56 - public IGPMetricTlv(byte[] rawValue, short hLength) { 55 + public IgpMetricTlv(byte[] rawValue, short hLength) {
57 this.rawValue = rawValue; 56 this.rawValue = rawValue;
58 this.hLength = hLength; 57 this.hLength = hLength;
59 } 58 }
...@@ -65,8 +64,8 @@ public class IGPMetricTlv implements PcepValueType { ...@@ -65,8 +64,8 @@ public class IGPMetricTlv implements PcepValueType {
65 * @param hLength length 64 * @param hLength length
66 * @return object of IGPMetricTlv 65 * @return object of IGPMetricTlv
67 */ 66 */
68 - public static IGPMetricTlv of(final byte[] raw, short hLength) { 67 + public static IgpMetricTlv of(final byte[] raw, short hLength) {
69 - return new IGPMetricTlv(raw, hLength); 68 + return new IgpMetricTlv(raw, hLength);
70 } 69 }
71 70
72 /** 71 /**
...@@ -103,8 +102,8 @@ public class IGPMetricTlv implements PcepValueType { ...@@ -103,8 +102,8 @@ public class IGPMetricTlv implements PcepValueType {
103 if (this == obj) { 102 if (this == obj) {
104 return true; 103 return true;
105 } 104 }
106 - if (obj instanceof IGPMetricTlv) { 105 + if (obj instanceof IgpMetricTlv) {
107 - IGPMetricTlv other = (IGPMetricTlv) obj; 106 + IgpMetricTlv other = (IgpMetricTlv) obj;
108 return Arrays.equals(rawValue, other.rawValue); 107 return Arrays.equals(rawValue, other.rawValue);
109 } 108 }
110 return false; 109 return false;
...@@ -127,9 +126,9 @@ public class IGPMetricTlv implements PcepValueType { ...@@ -127,9 +126,9 @@ public class IGPMetricTlv implements PcepValueType {
127 * @return object of IGPMetricTlv 126 * @return object of IGPMetricTlv
128 */ 127 */
129 public static PcepValueType read(ChannelBuffer c, short hLength) { 128 public static PcepValueType read(ChannelBuffer c, short hLength) {
130 - byte[] iIGPMetric = new byte[hLength]; 129 + byte[] iIgpMetric = new byte[hLength];
131 - c.readBytes(iIGPMetric, 0, hLength); 130 + c.readBytes(iIgpMetric, 0, hLength);
132 - return new IGPMetricTlv(iIGPMetric, hLength); 131 + return new IgpMetricTlv(iIgpMetric, hLength);
133 } 132 }
134 133
135 @Override 134 @Override
......
...@@ -15,21 +15,20 @@ ...@@ -15,21 +15,20 @@
15 */ 15 */
16 package org.onosproject.pcepio.types; 16 package org.onosproject.pcepio.types;
17 17
18 -import java.util.Arrays; 18 +import com.google.common.base.MoreObjects;
19 -import java.util.Objects; 19 +import com.google.common.base.MoreObjects.ToStringHelper;
20 -
21 import org.jboss.netty.buffer.ChannelBuffer; 20 import org.jboss.netty.buffer.ChannelBuffer;
22 import org.onosproject.pcepio.protocol.PcepVersion; 21 import org.onosproject.pcepio.protocol.PcepVersion;
23 import org.slf4j.Logger; 22 import org.slf4j.Logger;
24 import org.slf4j.LoggerFactory; 23 import org.slf4j.LoggerFactory;
25 24
26 -import com.google.common.base.MoreObjects; 25 +import java.util.Arrays;
27 -import com.google.common.base.MoreObjects.ToStringHelper; 26 +import java.util.Objects;
28 27
29 /** 28 /**
30 * Provides ISIS Area Identifier. 29 * Provides ISIS Area Identifier.
31 */ 30 */
32 -public class ISISAreaIdentifierTlv implements PcepValueType { 31 +public class IsisAreaIdentifierTlv implements PcepValueType {
33 32
34 /* Reference :[I-D.ietf-idr- ls-distribution]/3.3.1.2 33 /* Reference :[I-D.ietf-idr- ls-distribution]/3.3.1.2
35 * 0 1 2 3 34 * 0 1 2 3
...@@ -41,7 +40,7 @@ public class ISISAreaIdentifierTlv implements PcepValueType { ...@@ -41,7 +40,7 @@ public class ISISAreaIdentifierTlv implements PcepValueType {
41 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 40 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
42 */ 41 */
43 42
44 - protected static final Logger log = LoggerFactory.getLogger(ISISAreaIdentifierTlv.class); 43 + protected static final Logger log = LoggerFactory.getLogger(IsisAreaIdentifierTlv.class);
45 44
46 public static final short TYPE = 107; //TODO:NEED TO HANDLE TBD24 45 public static final short TYPE = 107; //TODO:NEED TO HANDLE TBD24
47 private short hLength; 46 private short hLength;
...@@ -54,7 +53,7 @@ public class ISISAreaIdentifierTlv implements PcepValueType { ...@@ -54,7 +53,7 @@ public class ISISAreaIdentifierTlv implements PcepValueType {
54 * @param rawValue ISIS-Area-Identifier 53 * @param rawValue ISIS-Area-Identifier
55 * @param hLength length 54 * @param hLength length
56 */ 55 */
57 - public ISISAreaIdentifierTlv(byte[] rawValue, short hLength) { 56 + public IsisAreaIdentifierTlv(byte[] rawValue, short hLength) {
58 log.debug("ISISAreaIdentifierTlv"); 57 log.debug("ISISAreaIdentifierTlv");
59 this.rawValue = rawValue; 58 this.rawValue = rawValue;
60 if (0 == hLength) { 59 if (0 == hLength) {
...@@ -71,8 +70,8 @@ public class ISISAreaIdentifierTlv implements PcepValueType { ...@@ -71,8 +70,8 @@ public class ISISAreaIdentifierTlv implements PcepValueType {
71 * @param hLength length 70 * @param hLength length
72 * @return object of ISISAreaIdentifierTlv 71 * @return object of ISISAreaIdentifierTlv
73 */ 72 */
74 - public static ISISAreaIdentifierTlv of(final byte[] raw, short hLength) { 73 + public static IsisAreaIdentifierTlv of(final byte[] raw, short hLength) {
75 - return new ISISAreaIdentifierTlv(raw, hLength); 74 + return new IsisAreaIdentifierTlv(raw, hLength);
76 } 75 }
77 76
78 /** 77 /**
...@@ -109,8 +108,8 @@ public class ISISAreaIdentifierTlv implements PcepValueType { ...@@ -109,8 +108,8 @@ public class ISISAreaIdentifierTlv implements PcepValueType {
109 if (this == obj) { 108 if (this == obj) {
110 return true; 109 return true;
111 } 110 }
112 - if (obj instanceof ISISAreaIdentifierTlv) { 111 + if (obj instanceof IsisAreaIdentifierTlv) {
113 - ISISAreaIdentifierTlv other = (ISISAreaIdentifierTlv) obj; 112 + IsisAreaIdentifierTlv other = (IsisAreaIdentifierTlv) obj;
114 return Objects.equals(hLength, other.hLength) && Arrays.equals(rawValue, other.rawValue); 113 return Objects.equals(hLength, other.hLength) && Arrays.equals(rawValue, other.rawValue);
115 } 114 }
116 return false; 115 return false;
...@@ -133,9 +132,9 @@ public class ISISAreaIdentifierTlv implements PcepValueType { ...@@ -133,9 +132,9 @@ public class ISISAreaIdentifierTlv implements PcepValueType {
133 * @return object of ISISAreaIdentifierTlv 132 * @return object of ISISAreaIdentifierTlv
134 */ 133 */
135 public static PcepValueType read(ChannelBuffer c, short hLength) { 134 public static PcepValueType read(ChannelBuffer c, short hLength) {
136 - byte[] iISISAreaIdentifier = new byte[hLength]; 135 + byte[] iIsisAreaIdentifier = new byte[hLength];
137 - c.readBytes(iISISAreaIdentifier, 0, hLength); 136 + c.readBytes(iIsisAreaIdentifier, 0, hLength);
138 - return new ISISAreaIdentifierTlv(iISISAreaIdentifier, hLength); 137 + return new IsisAreaIdentifierTlv(iIsisAreaIdentifier, hLength);
139 } 138 }
140 139
141 @Override 140 @Override
......
...@@ -201,13 +201,13 @@ public class LocalTENodeDescriptorsTlv implements PcepValueType { ...@@ -201,13 +201,13 @@ public class LocalTENodeDescriptorsTlv implements PcepValueType {
201 iValue = tempCb.readInt(); 201 iValue = tempCb.readInt();
202 tlv = new AutonomousSystemTlv(iValue); 202 tlv = new AutonomousSystemTlv(iValue);
203 break; 203 break;
204 - case BGPLSidentifierTlv.TYPE: 204 + case BgpLsIdentifierTlv.TYPE:
205 iValue = tempCb.readInt(); 205 iValue = tempCb.readInt();
206 - tlv = new BGPLSidentifierTlv(iValue); 206 + tlv = new BgpLsIdentifierTlv(iValue);
207 break; 207 break;
208 - case OSPFareaIDsubTlv.TYPE: 208 + case OspfAreaIdSubTlv.TYPE:
209 iValue = tempCb.readInt(); 209 iValue = tempCb.readInt();
210 - tlv = new OSPFareaIDsubTlv(iValue); 210 + tlv = new OspfAreaIdSubTlv(iValue);
211 break; 211 break;
212 case RouterIDSubTlv.TYPE: 212 case RouterIDSubTlv.TYPE:
213 tlv = RouterIDSubTlv.read(tempCb, length); 213 tlv = RouterIDSubTlv.read(tempCb, length);
......
...@@ -27,7 +27,7 @@ import com.google.common.base.MoreObjects; ...@@ -27,7 +27,7 @@ import com.google.common.base.MoreObjects;
27 /** 27 /**
28 * Provides MPLS Protocol Mask. 28 * Provides MPLS Protocol Mask.
29 */ 29 */
30 -public class MPLSProtocolMaskTlv implements PcepValueType { 30 +public class MplsProtocolMaskTlv implements PcepValueType {
31 31
32 /* Reference :[I-D.ietf-idr-ls-distribution]/3.3.2.2 32 /* Reference :[I-D.ietf-idr-ls-distribution]/3.3.2.2
33 * 0 1 2 3 33 * 0 1 2 3
...@@ -38,7 +38,7 @@ public class MPLSProtocolMaskTlv implements PcepValueType { ...@@ -38,7 +38,7 @@ public class MPLSProtocolMaskTlv implements PcepValueType {
38 |L|R| Reserved | 38 |L|R| Reserved |
39 +-+-+-+-+-+-+-+-+ 39 +-+-+-+-+-+-+-+-+
40 */ 40 */
41 - protected static final Logger log = LoggerFactory.getLogger(MPLSProtocolMaskTlv.class); 41 + protected static final Logger log = LoggerFactory.getLogger(MplsProtocolMaskTlv.class);
42 42
43 public static final short TYPE = 1094; //TDB39 43 public static final short TYPE = 1094; //TDB39
44 public static final short LENGTH = 1; 44 public static final short LENGTH = 1;
...@@ -55,7 +55,7 @@ public class MPLSProtocolMaskTlv implements PcepValueType { ...@@ -55,7 +55,7 @@ public class MPLSProtocolMaskTlv implements PcepValueType {
55 * 55 *
56 * @param rawValue MPLS Protocol Mask Flag Bits 56 * @param rawValue MPLS Protocol Mask Flag Bits
57 */ 57 */
58 - public MPLSProtocolMaskTlv(byte rawValue) { 58 + public MplsProtocolMaskTlv(byte rawValue) {
59 this.rawValue = rawValue; 59 this.rawValue = rawValue;
60 this.isRawValueSet = true; 60 this.isRawValueSet = true;
61 this.bLFlag = (rawValue & LFLAG_SET) == LFLAG_SET; 61 this.bLFlag = (rawValue & LFLAG_SET) == LFLAG_SET;
...@@ -68,7 +68,7 @@ public class MPLSProtocolMaskTlv implements PcepValueType { ...@@ -68,7 +68,7 @@ public class MPLSProtocolMaskTlv implements PcepValueType {
68 * @param bLFlag L-flag 68 * @param bLFlag L-flag
69 * @param bRFlag R-flag 69 * @param bRFlag R-flag
70 */ 70 */
71 - public MPLSProtocolMaskTlv(boolean bLFlag, boolean bRFlag) { 71 + public MplsProtocolMaskTlv(boolean bLFlag, boolean bRFlag) {
72 this.bLFlag = bLFlag; 72 this.bLFlag = bLFlag;
73 this.bRFlag = bRFlag; 73 this.bRFlag = bRFlag;
74 this.rawValue = 0; 74 this.rawValue = 0;
...@@ -81,8 +81,8 @@ public class MPLSProtocolMaskTlv implements PcepValueType { ...@@ -81,8 +81,8 @@ public class MPLSProtocolMaskTlv implements PcepValueType {
81 * @param raw MPLS Protocol Mask Tlv 81 * @param raw MPLS Protocol Mask Tlv
82 * @return new object of MPLS Protocol Mask Tlv 82 * @return new object of MPLS Protocol Mask Tlv
83 */ 83 */
84 - public static MPLSProtocolMaskTlv of(final byte raw) { 84 + public static MplsProtocolMaskTlv of(final byte raw) {
85 - return new MPLSProtocolMaskTlv(raw); 85 + return new MplsProtocolMaskTlv(raw);
86 } 86 }
87 87
88 /** 88 /**
...@@ -141,8 +141,8 @@ public class MPLSProtocolMaskTlv implements PcepValueType { ...@@ -141,8 +141,8 @@ public class MPLSProtocolMaskTlv implements PcepValueType {
141 if (this == obj) { 141 if (this == obj) {
142 return true; 142 return true;
143 } 143 }
144 - if (obj instanceof MPLSProtocolMaskTlv) { 144 + if (obj instanceof MplsProtocolMaskTlv) {
145 - MPLSProtocolMaskTlv other = (MPLSProtocolMaskTlv) obj; 145 + MplsProtocolMaskTlv other = (MplsProtocolMaskTlv) obj;
146 if (isRawValueSet) { 146 if (isRawValueSet) {
147 return Objects.equals(this.rawValue, other.rawValue); 147 return Objects.equals(this.rawValue, other.rawValue);
148 } else { 148 } else {
...@@ -186,7 +186,7 @@ public class MPLSProtocolMaskTlv implements PcepValueType { ...@@ -186,7 +186,7 @@ public class MPLSProtocolMaskTlv implements PcepValueType {
186 bLFlag = (temp & LFLAG_SET) == LFLAG_SET; 186 bLFlag = (temp & LFLAG_SET) == LFLAG_SET;
187 bRFlag = (temp & RFLAG_SET) == RFLAG_SET; 187 bRFlag = (temp & RFLAG_SET) == RFLAG_SET;
188 188
189 - return new MPLSProtocolMaskTlv(bLFlag, bRFlag); 189 + return new MplsProtocolMaskTlv(bLFlag, bRFlag);
190 } 190 }
191 191
192 @Override 192 @Override
......
...@@ -16,15 +16,14 @@ ...@@ -16,15 +16,14 @@
16 16
17 package org.onosproject.pcepio.types; 17 package org.onosproject.pcepio.types;
18 18
19 -import java.util.Objects; 19 +import com.google.common.base.MoreObjects;
20 - 20 +import com.google.common.base.MoreObjects.ToStringHelper;
21 import org.jboss.netty.buffer.ChannelBuffer; 21 import org.jboss.netty.buffer.ChannelBuffer;
22 import org.onosproject.pcepio.protocol.PcepVersion; 22 import org.onosproject.pcepio.protocol.PcepVersion;
23 import org.slf4j.Logger; 23 import org.slf4j.Logger;
24 import org.slf4j.LoggerFactory; 24 import org.slf4j.LoggerFactory;
25 25
26 -import com.google.common.base.MoreObjects; 26 +import java.util.Objects;
27 -import com.google.common.base.MoreObjects.ToStringHelper;
28 27
29 /** 28 /**
30 * NexthopIPv6addressTlv provides Ipv6 address of next hop. 29 * NexthopIPv6addressTlv provides Ipv6 address of next hop.
...@@ -84,15 +83,15 @@ public class NexthopIPv6addressTlv implements PcepValueType { ...@@ -84,15 +83,15 @@ public class NexthopIPv6addressTlv implements PcepValueType {
84 //logic to be checked 83 //logic to be checked
85 public static NexthopIPv6addressTlv of(final byte[] raw) { 84 public static NexthopIPv6addressTlv of(final byte[] raw) {
86 //check NONE_VAL 85 //check NONE_VAL
87 - boolean bFoundNONE = true; 86 + boolean bFoundNone = true;
88 //value starts from 3rd byte. 87 //value starts from 3rd byte.
89 for (int i = 5; i < 20; ++i) { 88 for (int i = 5; i < 20; ++i) {
90 if (NONE_VAL[i] != raw[i]) { 89 if (NONE_VAL[i] != raw[i]) {
91 - bFoundNONE = false; 90 + bFoundNone = false;
92 } 91 }
93 } 92 }
94 93
95 - if (bFoundNONE) { 94 + if (bFoundNone) {
96 return NONE; 95 return NONE;
97 } 96 }
98 97
......
...@@ -15,18 +15,18 @@ ...@@ -15,18 +15,18 @@
15 */ 15 */
16 package org.onosproject.pcepio.types; 16 package org.onosproject.pcepio.types;
17 17
18 -import java.util.Objects; 18 +import com.google.common.base.MoreObjects;
19 import org.jboss.netty.buffer.ChannelBuffer; 19 import org.jboss.netty.buffer.ChannelBuffer;
20 import org.onosproject.pcepio.protocol.PcepVersion; 20 import org.onosproject.pcepio.protocol.PcepVersion;
21 import org.slf4j.Logger; 21 import org.slf4j.Logger;
22 import org.slf4j.LoggerFactory; 22 import org.slf4j.LoggerFactory;
23 23
24 -import com.google.common.base.MoreObjects; 24 +import java.util.Objects;
25 25
26 /** 26 /**
27 * Provides area ID for OSPF area. 27 * Provides area ID for OSPF area.
28 */ 28 */
29 -public class OSPFareaIDsubTlv implements PcepValueType { 29 +public class OspfAreaIdSubTlv implements PcepValueType {
30 30
31 /* Reference :draft-ietf-idr-ls-distribution-10. 31 /* Reference :draft-ietf-idr-ls-distribution-10.
32 * 0 1 2 3 32 * 0 1 2 3
...@@ -38,7 +38,7 @@ public class OSPFareaIDsubTlv implements PcepValueType { ...@@ -38,7 +38,7 @@ public class OSPFareaIDsubTlv implements PcepValueType {
38 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 38 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
39 */ 39 */
40 40
41 - protected static final Logger log = LoggerFactory.getLogger(OSPFareaIDsubTlv.class); 41 + protected static final Logger log = LoggerFactory.getLogger(OspfAreaIdSubTlv.class);
42 42
43 public static final short TYPE = 600; //TODD:change this TBD12 43 public static final short TYPE = 600; //TODD:change this TBD12
44 public static final short LENGTH = 4; 44 public static final short LENGTH = 4;
...@@ -50,7 +50,7 @@ public class OSPFareaIDsubTlv implements PcepValueType { ...@@ -50,7 +50,7 @@ public class OSPFareaIDsubTlv implements PcepValueType {
50 * 50 *
51 * @param rawValue area ID for OSPF area. 51 * @param rawValue area ID for OSPF area.
52 */ 52 */
53 - public OSPFareaIDsubTlv(int rawValue) { 53 + public OspfAreaIdSubTlv(int rawValue) {
54 this.rawValue = rawValue; 54 this.rawValue = rawValue;
55 } 55 }
56 56
...@@ -60,8 +60,8 @@ public class OSPFareaIDsubTlv implements PcepValueType { ...@@ -60,8 +60,8 @@ public class OSPFareaIDsubTlv implements PcepValueType {
60 * @param raw opaque value of AreaID 60 * @param raw opaque value of AreaID
61 * @return new object of OSPF area ID sub TLV 61 * @return new object of OSPF area ID sub TLV
62 */ 62 */
63 - public static OSPFareaIDsubTlv of(final int raw) { 63 + public static OspfAreaIdSubTlv of(final int raw) {
64 - return new OSPFareaIDsubTlv(raw); 64 + return new OspfAreaIdSubTlv(raw);
65 } 65 }
66 66
67 /** 67 /**
...@@ -98,8 +98,8 @@ public class OSPFareaIDsubTlv implements PcepValueType { ...@@ -98,8 +98,8 @@ public class OSPFareaIDsubTlv implements PcepValueType {
98 if (this == obj) { 98 if (this == obj) {
99 return true; 99 return true;
100 } 100 }
101 - if (obj instanceof OSPFareaIDsubTlv) { 101 + if (obj instanceof OspfAreaIdSubTlv) {
102 - OSPFareaIDsubTlv other = (OSPFareaIDsubTlv) obj; 102 + OspfAreaIdSubTlv other = (OspfAreaIdSubTlv) obj;
103 return Objects.equals(this.rawValue, other.rawValue); 103 return Objects.equals(this.rawValue, other.rawValue);
104 } 104 }
105 return false; 105 return false;
...@@ -120,8 +120,8 @@ public class OSPFareaIDsubTlv implements PcepValueType { ...@@ -120,8 +120,8 @@ public class OSPFareaIDsubTlv implements PcepValueType {
120 * @param c input channel buffer 120 * @param c input channel buffer
121 * @return object of OSPFAreaIdSubTlv 121 * @return object of OSPFAreaIdSubTlv
122 */ 122 */
123 - public static OSPFareaIDsubTlv read(ChannelBuffer c) { 123 + public static OspfAreaIdSubTlv read(ChannelBuffer c) {
124 - return OSPFareaIDsubTlv.of(c.readInt()); 124 + return OspfAreaIdSubTlv.of(c.readInt());
125 } 125 }
126 126
127 @Override 127 @Override
......