Jonathan Hart
Committed by Gerrit Code Review

Enforce naming convention regarding abbreviations

Change-Id: Ic81038d3869268a55624ccbbf66048545158b0da
Showing 121 changed files with 856 additions and 875 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;
......
...@@ -16,10 +16,6 @@ ...@@ -16,10 +16,6 @@
16 package org.onosproject.bgpio.protocol; 16 package org.onosproject.bgpio.protocol;
17 17
18 18
19 -import static org.hamcrest.MatcherAssert.assertThat;
20 -import static org.hamcrest.Matchers.instanceOf;
21 -import static org.hamcrest.core.Is.is;
22 -
23 import org.jboss.netty.buffer.ChannelBuffer; 19 import org.jboss.netty.buffer.ChannelBuffer;
24 import org.jboss.netty.buffer.ChannelBuffers; 20 import org.jboss.netty.buffer.ChannelBuffers;
25 import org.junit.Test; 21 import org.junit.Test;
...@@ -43,13 +39,13 @@ import org.onosproject.bgpio.types.IPReachabilityInformationTlv; ...@@ -43,13 +39,13 @@ import org.onosproject.bgpio.types.IPReachabilityInformationTlv;
43 import org.onosproject.bgpio.types.IsIsNonPseudonode; 39 import org.onosproject.bgpio.types.IsIsNonPseudonode;
44 import org.onosproject.bgpio.types.IsIsPseudonode; 40 import org.onosproject.bgpio.types.IsIsPseudonode;
45 import org.onosproject.bgpio.types.LinkStateAttributes; 41 import org.onosproject.bgpio.types.LinkStateAttributes;
42 +import org.onosproject.bgpio.types.LocalPref;
46 import org.onosproject.bgpio.types.Med; 43 import org.onosproject.bgpio.types.Med;
47 import org.onosproject.bgpio.types.MpReachNlri; 44 import org.onosproject.bgpio.types.MpReachNlri;
48 import org.onosproject.bgpio.types.MpUnReachNlri; 45 import org.onosproject.bgpio.types.MpUnReachNlri;
49 -import org.onosproject.bgpio.types.Origin;
50 import org.onosproject.bgpio.types.NextHop; 46 import org.onosproject.bgpio.types.NextHop;
51 -import org.onosproject.bgpio.types.LocalPref; 47 +import org.onosproject.bgpio.types.Origin;
52 -import org.onosproject.bgpio.types.Origin.ORIGINTYPE; 48 +import org.onosproject.bgpio.types.Origin.OriginType;
53 import org.onosproject.bgpio.types.attr.BgpAttrRouterIdV4; 49 import org.onosproject.bgpio.types.attr.BgpAttrRouterIdV4;
54 import org.onosproject.bgpio.types.attr.BgpLinkAttrName; 50 import org.onosproject.bgpio.types.attr.BgpLinkAttrName;
55 import org.onosproject.bgpio.types.attr.BgpPrefixAttrExtRouteTag; 51 import org.onosproject.bgpio.types.attr.BgpPrefixAttrExtRouteTag;
...@@ -61,6 +57,10 @@ import java.util.LinkedList; ...@@ -61,6 +57,10 @@ import java.util.LinkedList;
61 import java.util.List; 57 import java.util.List;
62 import java.util.ListIterator; 58 import java.util.ListIterator;
63 59
60 +import static org.hamcrest.MatcherAssert.assertThat;
61 +import static org.hamcrest.Matchers.instanceOf;
62 +import static org.hamcrest.core.Is.is;
63 +
64 /** 64 /**
65 * Test cases for BGP update Message. 65 * Test cases for BGP update Message.
66 */ 66 */
...@@ -255,7 +255,7 @@ public class BgpUpdateMsgTest { ...@@ -255,7 +255,7 @@ public class BgpUpdateMsgTest {
255 BgpPathAttributes actualpathAttribute = other.bgpPathAttributes(); 255 BgpPathAttributes actualpathAttribute = other.bgpPathAttributes();
256 pathAttributes = actualpathAttribute.pathAttributes(); 256 pathAttributes = actualpathAttribute.pathAttributes();
257 ListIterator<BgpValueType> listIterator = pathAttributes.listIterator(); 257 ListIterator<BgpValueType> listIterator = pathAttributes.listIterator();
258 - ORIGINTYPE originValue = org.onosproject.bgpio.types.Origin.ORIGINTYPE.IGP; 258 + OriginType originValue = OriginType.IGP;
259 259
260 testPathAttribute = listIterator.next(); 260 testPathAttribute = listIterator.next();
261 origin = (Origin) testPathAttribute; 261 origin = (Origin) testPathAttribute;
...@@ -639,7 +639,7 @@ public class BgpUpdateMsgTest { ...@@ -639,7 +639,7 @@ public class BgpUpdateMsgTest {
639 BgpPathAttributes actualpathAttribute = other.bgpPathAttributes(); 639 BgpPathAttributes actualpathAttribute = other.bgpPathAttributes();
640 pathAttributes = actualpathAttribute.pathAttributes(); 640 pathAttributes = actualpathAttribute.pathAttributes();
641 ListIterator<BgpValueType> listIterator = pathAttributes.listIterator(); 641 ListIterator<BgpValueType> listIterator = pathAttributes.listIterator();
642 - ORIGINTYPE originValue = org.onosproject.bgpio.types.Origin.ORIGINTYPE.IGP; 642 + OriginType originValue = OriginType.IGP;
643 643
644 testPathAttribute = listIterator.next(); 644 testPathAttribute = listIterator.next();
645 origin = (Origin) testPathAttribute; 645 origin = (Origin) testPathAttribute;
...@@ -684,13 +684,13 @@ public class BgpUpdateMsgTest { ...@@ -684,13 +684,13 @@ public class BgpUpdateMsgTest {
684 assertThat(testAutonomousSystemTlv.getAsNum(), is(2222)); 684 assertThat(testAutonomousSystemTlv.getAsNum(), is(2222));
685 assertThat(testAutonomousSystemTlv.getType(), is((short) 512)); 685 assertThat(testAutonomousSystemTlv.getType(), is((short) 512));
686 686
687 - BgpLSIdentifierTlv testBGPLSIdentifierTlv = (BgpLSIdentifierTlv) subtlvlist1.next(); 687 + BgpLSIdentifierTlv testBgpLsIdentifierTlv = (BgpLSIdentifierTlv) subtlvlist1.next();
688 - assertThat(testBGPLSIdentifierTlv.getBgpLsIdentifier(), is(33686018)); 688 + assertThat(testBgpLsIdentifierTlv.getBgpLsIdentifier(), is(33686018));
689 - assertThat(testBGPLSIdentifierTlv.getType(), is((short) 513)); 689 + assertThat(testBgpLsIdentifierTlv.getType(), is((short) 513));
690 690
691 IsIsNonPseudonode testIsIsNonPseudonode = (IsIsNonPseudonode) subtlvlist1.next(); 691 IsIsNonPseudonode testIsIsNonPseudonode = (IsIsNonPseudonode) subtlvlist1.next();
692 - byte[] expISONodeID = new byte[] {0x19, 0x00, (byte) 0x95, 0x01, (byte) 0x90, 0x58}; 692 + byte[] expIsoNodeId = new byte[] {0x19, 0x00, (byte) 0x95, 0x01, (byte) 0x90, 0x58};
693 - assertThat(testIsIsNonPseudonode.getISONodeID(), is(expISONodeID)); 693 + assertThat(testIsIsNonPseudonode.getIsoNodeId(), is(expIsoNodeId));
694 assertThat(testIsIsNonPseudonode.getType(), is((short) 515)); 694 assertThat(testIsIsNonPseudonode.getType(), is((short) 515));
695 695
696 } 696 }
...@@ -763,7 +763,7 @@ public class BgpUpdateMsgTest { ...@@ -763,7 +763,7 @@ public class BgpUpdateMsgTest {
763 BgpPathAttributes actualpathAttribute = other.bgpPathAttributes(); 763 BgpPathAttributes actualpathAttribute = other.bgpPathAttributes();
764 pathAttributes = actualpathAttribute.pathAttributes(); 764 pathAttributes = actualpathAttribute.pathAttributes();
765 ListIterator<BgpValueType> listIterator = pathAttributes.listIterator(); 765 ListIterator<BgpValueType> listIterator = pathAttributes.listIterator();
766 - ORIGINTYPE originValue = org.onosproject.bgpio.types.Origin.ORIGINTYPE.IGP; 766 + OriginType originValue = OriginType.IGP;
767 767
768 testPathAttribute = listIterator.next(); 768 testPathAttribute = listIterator.next();
769 origin = (Origin) testPathAttribute; 769 origin = (Origin) testPathAttribute;
...@@ -807,13 +807,13 @@ public class BgpUpdateMsgTest { ...@@ -807,13 +807,13 @@ public class BgpUpdateMsgTest {
807 assertThat(testAutonomousSystemTlv.getAsNum(), is(2222)); 807 assertThat(testAutonomousSystemTlv.getAsNum(), is(2222));
808 assertThat(testAutonomousSystemTlv.getType(), is((short) 512)); 808 assertThat(testAutonomousSystemTlv.getType(), is((short) 512));
809 809
810 - BgpLSIdentifierTlv testBGPLSIdentifierTlv = (BgpLSIdentifierTlv) subtlvlist1.next(); 810 + BgpLSIdentifierTlv testBgpLsIdentifierTlv = (BgpLSIdentifierTlv) subtlvlist1.next();
811 - assertThat(testBGPLSIdentifierTlv.getBgpLsIdentifier(), is(33686018)); 811 + assertThat(testBgpLsIdentifierTlv.getBgpLsIdentifier(), is(33686018));
812 - assertThat(testBGPLSIdentifierTlv.getType(), is((short) 513)); 812 + assertThat(testBgpLsIdentifierTlv.getType(), is((short) 513));
813 813
814 IsIsNonPseudonode testIsIsNonPseudonode = (IsIsNonPseudonode) subtlvlist1.next(); 814 IsIsNonPseudonode testIsIsNonPseudonode = (IsIsNonPseudonode) subtlvlist1.next();
815 - byte[] expISONodeID = new byte[] {0x19, 0x21, 0x68, 0x07, 0x70, 0x01}; 815 + byte[] expIsoNodeId = new byte[] {0x19, 0x21, 0x68, 0x07, 0x70, 0x01};
816 - assertThat(testIsIsNonPseudonode.getISONodeID(), is(expISONodeID)); 816 + assertThat(testIsIsNonPseudonode.getIsoNodeId(), is(expIsoNodeId));
817 assertThat(testIsIsNonPseudonode.getType(), is((short) 515)); 817 assertThat(testIsIsNonPseudonode.getType(), is((short) 515));
818 818
819 List<BgpValueType> testPrefixDescriptors = new LinkedList<>(); 819 List<BgpValueType> testPrefixDescriptors = new LinkedList<>();
...@@ -885,7 +885,7 @@ public class BgpUpdateMsgTest { ...@@ -885,7 +885,7 @@ public class BgpUpdateMsgTest {
885 BgpPathAttributes actualpathAttribute = other.bgpPathAttributes(); 885 BgpPathAttributes actualpathAttribute = other.bgpPathAttributes();
886 pathAttributes = actualpathAttribute.pathAttributes(); 886 pathAttributes = actualpathAttribute.pathAttributes();
887 ListIterator<BgpValueType> listIterator = pathAttributes.listIterator(); 887 ListIterator<BgpValueType> listIterator = pathAttributes.listIterator();
888 - ORIGINTYPE originValue = org.onosproject.bgpio.types.Origin.ORIGINTYPE.IGP; 888 + OriginType originValue = OriginType.IGP;
889 889
890 testPathAttribute = listIterator.next(); 890 testPathAttribute = listIterator.next();
891 origin = (Origin) testPathAttribute; 891 origin = (Origin) testPathAttribute;
...@@ -930,12 +930,12 @@ public class BgpUpdateMsgTest { ...@@ -930,12 +930,12 @@ public class BgpUpdateMsgTest {
930 assertThat(testAutonomousSystemTlv.getAsNum(), is(2222)); 930 assertThat(testAutonomousSystemTlv.getAsNum(), is(2222));
931 assertThat(testAutonomousSystemTlv.getType(), is((short) 512)); 931 assertThat(testAutonomousSystemTlv.getType(), is((short) 512));
932 932
933 - BgpLSIdentifierTlv testBGPLSIdentifierTlv = (BgpLSIdentifierTlv) subtlvlist1.next(); 933 + BgpLSIdentifierTlv testBgpLsIdentifierTlv = (BgpLSIdentifierTlv) subtlvlist1.next();
934 - assertThat(testBGPLSIdentifierTlv.getBgpLsIdentifier(), is(33686018)); 934 + assertThat(testBgpLsIdentifierTlv.getBgpLsIdentifier(), is(33686018));
935 - assertThat(testBGPLSIdentifierTlv.getType(), is((short) 513)); 935 + assertThat(testBgpLsIdentifierTlv.getType(), is((short) 513));
936 936
937 IsIsPseudonode testIsIsPseudonode = (IsIsPseudonode) subtlvlist1.next(); 937 IsIsPseudonode testIsIsPseudonode = (IsIsPseudonode) subtlvlist1.next();
938 - assertThat(testIsIsPseudonode.getPSNIdentifier(), is((byte) 3)); 938 + assertThat(testIsIsPseudonode.getPsnIdentifier(), is((byte) 3));
939 assertThat(testIsIsPseudonode.getType(), is((short) 515)); 939 assertThat(testIsIsPseudonode.getType(), is((short) 515));
940 940
941 NodeDescriptors testRemoteNodeDescriptors = testlinknlri.remoteNodeDescriptors(); 941 NodeDescriptors testRemoteNodeDescriptors = testlinknlri.remoteNodeDescriptors();
...@@ -947,13 +947,13 @@ public class BgpUpdateMsgTest { ...@@ -947,13 +947,13 @@ public class BgpUpdateMsgTest {
947 assertThat(testAutonomousSystemTlv.getAsNum(), is(2222)); 947 assertThat(testAutonomousSystemTlv.getAsNum(), is(2222));
948 assertThat(testAutonomousSystemTlv.getType(), is((short) 512)); 948 assertThat(testAutonomousSystemTlv.getType(), is((short) 512));
949 949
950 - testBGPLSIdentifierTlv = (BgpLSIdentifierTlv) subtlvlist2.next(); 950 + testBgpLsIdentifierTlv = (BgpLSIdentifierTlv) subtlvlist2.next();
951 - assertThat(testBGPLSIdentifierTlv.getBgpLsIdentifier(), is(33686018)); 951 + assertThat(testBgpLsIdentifierTlv.getBgpLsIdentifier(), is(33686018));
952 - assertThat(testBGPLSIdentifierTlv.getType(), is((short) 513)); 952 + assertThat(testBgpLsIdentifierTlv.getType(), is((short) 513));
953 953
954 IsIsNonPseudonode testIsIsNonPseudonode = (IsIsNonPseudonode) subtlvlist2.next(); 954 IsIsNonPseudonode testIsIsNonPseudonode = (IsIsNonPseudonode) subtlvlist2.next();
955 - byte[] expISONodeID = new byte[] {0x19, 0x00, (byte) 0x95, 0x02, 0x50, 0x21}; 955 + byte[] expIsoNodeId = new byte[] {0x19, 0x00, (byte) 0x95, 0x02, 0x50, 0x21};
956 - assertThat(testIsIsNonPseudonode.getISONodeID(), is(expISONodeID)); 956 + assertThat(testIsIsNonPseudonode.getIsoNodeId(), is(expIsoNodeId));
957 assertThat(testIsIsNonPseudonode.getType(), is((short) 515)); 957 assertThat(testIsIsNonPseudonode.getType(), is((short) 515));
958 } 958 }
959 959
...@@ -1231,7 +1231,7 @@ public class BgpUpdateMsgTest { ...@@ -1231,7 +1231,7 @@ public class BgpUpdateMsgTest {
1231 BgpPathAttributes actualpathAttribute = other.bgpPathAttributes(); 1231 BgpPathAttributes actualpathAttribute = other.bgpPathAttributes();
1232 pathAttributes = actualpathAttribute.pathAttributes(); 1232 pathAttributes = actualpathAttribute.pathAttributes();
1233 ListIterator<BgpValueType> listIterator = pathAttributes.listIterator(); 1233 ListIterator<BgpValueType> listIterator = pathAttributes.listIterator();
1234 - ORIGINTYPE originValue = org.onosproject.bgpio.types.Origin.ORIGINTYPE.IGP; 1234 + OriginType originValue = OriginType.IGP;
1235 1235
1236 testPathAttribute = listIterator.next(); 1236 testPathAttribute = listIterator.next();
1237 origin = (Origin) testPathAttribute; 1237 origin = (Origin) testPathAttribute;
...@@ -1239,7 +1239,7 @@ public class BgpUpdateMsgTest { ...@@ -1239,7 +1239,7 @@ public class BgpUpdateMsgTest {
1239 1239
1240 testPathAttribute = listIterator.next(); 1240 testPathAttribute = listIterator.next();
1241 as4Path = (As4Path) testPathAttribute; 1241 as4Path = (As4Path) testPathAttribute;
1242 - ListIterator<Integer> listIterator2 = as4Path.as4PathSEQ().listIterator(); 1242 + ListIterator<Integer> listIterator2 = as4Path.as4PathSeq().listIterator();
1243 assertThat(listIterator2.next(), is(655361)); 1243 assertThat(listIterator2.next(), is(655361));
1244 1244
1245 testPathAttribute = listIterator.next(); 1245 testPathAttribute = listIterator.next();
...@@ -1309,7 +1309,7 @@ public class BgpUpdateMsgTest { ...@@ -1309,7 +1309,7 @@ public class BgpUpdateMsgTest {
1309 BgpPathAttributes actualpathAttribute = other.bgpPathAttributes(); 1309 BgpPathAttributes actualpathAttribute = other.bgpPathAttributes();
1310 pathAttributes = actualpathAttribute.pathAttributes(); 1310 pathAttributes = actualpathAttribute.pathAttributes();
1311 ListIterator<BgpValueType> listIterator = pathAttributes.listIterator(); 1311 ListIterator<BgpValueType> listIterator = pathAttributes.listIterator();
1312 - ORIGINTYPE originValue = org.onosproject.bgpio.types.Origin.ORIGINTYPE.IGP; 1312 + OriginType originValue = OriginType.IGP;
1313 1313
1314 testPathAttribute = listIterator.next(); 1314 testPathAttribute = listIterator.next();
1315 origin = (Origin) testPathAttribute; 1315 origin = (Origin) testPathAttribute;
...@@ -1355,13 +1355,13 @@ public class BgpUpdateMsgTest { ...@@ -1355,13 +1355,13 @@ public class BgpUpdateMsgTest {
1355 assertThat(testAutonomousSystemTlv.getAsNum(), is(2222)); 1355 assertThat(testAutonomousSystemTlv.getAsNum(), is(2222));
1356 assertThat(testAutonomousSystemTlv.getType(), is((short) 512)); 1356 assertThat(testAutonomousSystemTlv.getType(), is((short) 512));
1357 1357
1358 - BgpLSIdentifierTlv testBGPLSIdentifierTlv = (BgpLSIdentifierTlv) subtlvlist1.next(); 1358 + BgpLSIdentifierTlv testBgpLsIdentifierTlv = (BgpLSIdentifierTlv) subtlvlist1.next();
1359 - assertThat(testBGPLSIdentifierTlv.getBgpLsIdentifier(), is(33686018)); 1359 + assertThat(testBgpLsIdentifierTlv.getBgpLsIdentifier(), is(33686018));
1360 - assertThat(testBGPLSIdentifierTlv.getType(), is((short) 513)); 1360 + assertThat(testBgpLsIdentifierTlv.getType(), is((short) 513));
1361 1361
1362 IsIsNonPseudonode testIsIsNonPseudonode = (IsIsNonPseudonode) subtlvlist1.next(); 1362 IsIsNonPseudonode testIsIsNonPseudonode = (IsIsNonPseudonode) subtlvlist1.next();
1363 - byte[] expISONodeID = new byte[] {0x19, 0x00, (byte) 0x95, 0x01, (byte) 0x90, 0x58}; 1363 + byte[] expIsoNodeId = new byte[] {0x19, 0x00, (byte) 0x95, 0x01, (byte) 0x90, 0x58};
1364 - assertThat(testIsIsNonPseudonode.getISONodeID(), is(expISONodeID)); 1364 + assertThat(testIsIsNonPseudonode.getIsoNodeId(), is(expIsoNodeId));
1365 assertThat(testIsIsNonPseudonode.getType(), is((short) 515)); 1365 assertThat(testIsIsNonPseudonode.getType(), is((short) 515));
1366 } 1366 }
1367 1367
...@@ -1753,7 +1753,7 @@ public class BgpUpdateMsgTest { ...@@ -1753,7 +1753,7 @@ public class BgpUpdateMsgTest {
1753 BgpPathAttributes pathAttribute = other.bgpPathAttributes(); 1753 BgpPathAttributes pathAttribute = other.bgpPathAttributes();
1754 pathAttributeList = pathAttribute.pathAttributes(); 1754 pathAttributeList = pathAttribute.pathAttributes();
1755 ListIterator<BgpValueType> listIterator = pathAttributeList.listIterator(); 1755 ListIterator<BgpValueType> listIterator = pathAttributeList.listIterator();
1756 - ORIGINTYPE originValue = org.onosproject.bgpio.types.Origin.ORIGINTYPE.IGP; 1756 + OriginType originValue = OriginType.IGP;
1757 1757
1758 testPathAttribute = listIterator.next(); 1758 testPathAttribute = listIterator.next();
1759 origin = (Origin) testPathAttribute; 1759 origin = (Origin) testPathAttribute;
...@@ -1857,7 +1857,7 @@ public class BgpUpdateMsgTest { ...@@ -1857,7 +1857,7 @@ public class BgpUpdateMsgTest {
1857 BgpPathAttributes pathAttribute = other.bgpPathAttributes(); 1857 BgpPathAttributes pathAttribute = other.bgpPathAttributes();
1858 pathAttributeList = pathAttribute.pathAttributes(); 1858 pathAttributeList = pathAttribute.pathAttributes();
1859 ListIterator<BgpValueType> listIterator = pathAttributeList.listIterator(); 1859 ListIterator<BgpValueType> listIterator = pathAttributeList.listIterator();
1860 - ORIGINTYPE originValue = org.onosproject.bgpio.types.Origin.ORIGINTYPE.IGP; 1860 + OriginType originValue = OriginType.IGP;
1861 1861
1862 testPathAttribute = listIterator.next(); 1862 testPathAttribute = listIterator.next();
1863 origin = (Origin) testPathAttribute; 1863 origin = (Origin) testPathAttribute;
...@@ -1954,7 +1954,7 @@ public class BgpUpdateMsgTest { ...@@ -1954,7 +1954,7 @@ public class BgpUpdateMsgTest {
1954 BgpPathAttributes pathAttribute = other.bgpPathAttributes(); 1954 BgpPathAttributes pathAttribute = other.bgpPathAttributes();
1955 pathAttributeList = pathAttribute.pathAttributes(); 1955 pathAttributeList = pathAttribute.pathAttributes();
1956 ListIterator<BgpValueType> listIterator = pathAttributeList.listIterator(); 1956 ListIterator<BgpValueType> listIterator = pathAttributeList.listIterator();
1957 - ORIGINTYPE originValue = org.onosproject.bgpio.types.Origin.ORIGINTYPE.IGP; 1957 + OriginType originValue = OriginType.IGP;
1958 1958
1959 testPathAttribute = listIterator.next(); 1959 testPathAttribute = listIterator.next();
1960 origin = (Origin) testPathAttribute; 1960 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 +}
......
...@@ -15,16 +15,12 @@ ...@@ -15,16 +15,12 @@
15 */ 15 */
16 package org.onosproject.controller.impl; 16 package org.onosproject.controller.impl;
17 17
18 -import static org.hamcrest.MatcherAssert.assertThat;
19 -import static org.hamcrest.core.Is.is;
20 -
21 -import java.util.LinkedList;
22 -
23 import org.jboss.netty.buffer.ChannelBuffer; 18 import org.jboss.netty.buffer.ChannelBuffer;
24 import org.jboss.netty.buffer.ChannelBuffers; 19 import org.jboss.netty.buffer.ChannelBuffers;
25 import org.junit.Test; 20 import org.junit.Test;
26 import org.onlab.packet.IpAddress; 21 import org.onlab.packet.IpAddress;
27 import org.onlab.packet.IpAddress.Version; 22 import org.onlab.packet.IpAddress.Version;
23 +import org.onosproject.bgp.controller.impl.BgpSelectionAlgo;
28 import org.onosproject.bgpio.exceptions.BgpParseException; 24 import org.onosproject.bgpio.exceptions.BgpParseException;
29 import org.onosproject.bgpio.protocol.linkstate.BgpNodeLSNlriVer4.ProtocolType; 25 import org.onosproject.bgpio.protocol.linkstate.BgpNodeLSNlriVer4.ProtocolType;
30 import org.onosproject.bgpio.protocol.linkstate.PathAttrNlriDetails; 26 import org.onosproject.bgpio.protocol.linkstate.PathAttrNlriDetails;
...@@ -34,7 +30,11 @@ import org.onosproject.bgpio.types.BgpValueType; ...@@ -34,7 +30,11 @@ import org.onosproject.bgpio.types.BgpValueType;
34 import org.onosproject.bgpio.types.LocalPref; 30 import org.onosproject.bgpio.types.LocalPref;
35 import org.onosproject.bgpio.types.Med; 31 import org.onosproject.bgpio.types.Med;
36 import org.onosproject.bgpio.types.Origin; 32 import org.onosproject.bgpio.types.Origin;
37 -import org.onosproject.bgp.controller.impl.BgpSelectionAlgo; 33 +
34 +import java.util.LinkedList;
35 +
36 +import static org.hamcrest.MatcherAssert.assertThat;
37 +import static org.hamcrest.core.Is.is;
38 38
39 /** 39 /**
40 * Test cases for BGP Selection Algorithm. 40 * Test cases for BGP Selection Algorithm.
...@@ -65,14 +65,14 @@ public class BgpSelectionAlgoTest { ...@@ -65,14 +65,14 @@ public class BgpSelectionAlgoTest {
65 65
66 IpAddress ipAddress = IpAddress.valueOf(Version.INET, peerIp); 66 IpAddress ipAddress = IpAddress.valueOf(Version.INET, peerIp);
67 int bgpId = 168427777; 67 int bgpId = 168427777;
68 - short locRIBASNum = 100; 68 + short locRibAsNum = 100;
69 boolean isIbgp = false; 69 boolean isIbgp = false;
70 PathAttrNlriDetails attrList1 = new PathAttrNlriDetails(); 70 PathAttrNlriDetails attrList1 = new PathAttrNlriDetails();
71 attrList1.setIdentifier(0); 71 attrList1.setIdentifier(0);
72 attrList1.setPathAttribute(pathAttributes1); 72 attrList1.setPathAttribute(pathAttributes1);
73 attrList1.setProtocolID(ProtocolType.ISIS_LEVEL_ONE); 73 attrList1.setProtocolID(ProtocolType.ISIS_LEVEL_ONE);
74 PathAttrNlriDetailsLocalRib list1 = new PathAttrNlriDetailsLocalRib( 74 PathAttrNlriDetailsLocalRib list1 = new PathAttrNlriDetailsLocalRib(
75 - ipAddress, bgpId, locRIBASNum, isIbgp, attrList1); 75 + ipAddress, bgpId, locRibAsNum, isIbgp, attrList1);
76 76
77 peerIp = new byte[] {0x0b, 0x0b, 0x0b, 0x0b }; 77 peerIp = new byte[] {0x0b, 0x0b, 0x0b, 0x0b };
78 LinkedList<BgpValueType> pathAttributes2 = new LinkedList<>(); 78 LinkedList<BgpValueType> pathAttributes2 = new LinkedList<>();
...@@ -92,14 +92,14 @@ public class BgpSelectionAlgoTest { ...@@ -92,14 +92,14 @@ public class BgpSelectionAlgoTest {
92 92
93 ipAddress = IpAddress.valueOf(Version.INET, peerIp); 93 ipAddress = IpAddress.valueOf(Version.INET, peerIp);
94 bgpId = 536936448; 94 bgpId = 536936448;
95 - locRIBASNum = 200; 95 + locRibAsNum = 200;
96 isIbgp = true; 96 isIbgp = true;
97 PathAttrNlriDetails attrList2 = new PathAttrNlriDetails(); 97 PathAttrNlriDetails attrList2 = new PathAttrNlriDetails();
98 attrList2.setIdentifier(0); 98 attrList2.setIdentifier(0);
99 attrList2.setPathAttribute(pathAttributes2); 99 attrList2.setPathAttribute(pathAttributes2);
100 attrList2.setProtocolID(ProtocolType.OSPF_V2); 100 attrList2.setProtocolID(ProtocolType.OSPF_V2);
101 PathAttrNlriDetailsLocalRib list2 = new PathAttrNlriDetailsLocalRib( 101 PathAttrNlriDetailsLocalRib list2 = new PathAttrNlriDetailsLocalRib(
102 - ipAddress, bgpId, locRIBASNum, isIbgp, attrList2); 102 + ipAddress, bgpId, locRibAsNum, isIbgp, attrList2);
103 BgpSelectionAlgo algo = new BgpSelectionAlgo(); 103 BgpSelectionAlgo algo = new BgpSelectionAlgo();
104 int result = algo.compare(list1, list2); 104 int result = algo.compare(list1, list2);
105 assertThat(result, is(1)); 105 assertThat(result, is(1));
...@@ -128,14 +128,14 @@ public class BgpSelectionAlgoTest { ...@@ -128,14 +128,14 @@ public class BgpSelectionAlgoTest {
128 128
129 IpAddress ipAddress = IpAddress.valueOf(Version.INET, peerIp); 129 IpAddress ipAddress = IpAddress.valueOf(Version.INET, peerIp);
130 int bgpId = 168427777; 130 int bgpId = 168427777;
131 - short locRIBASNum = 100; 131 + short locRibAsNum = 100;
132 boolean isIbgp = false; 132 boolean isIbgp = false;
133 PathAttrNlriDetails attrList1 = new PathAttrNlriDetails(); 133 PathAttrNlriDetails attrList1 = new PathAttrNlriDetails();
134 attrList1.setIdentifier(0); 134 attrList1.setIdentifier(0);
135 attrList1.setPathAttribute(pathAttributes1); 135 attrList1.setPathAttribute(pathAttributes1);
136 attrList1.setProtocolID(ProtocolType.ISIS_LEVEL_ONE); 136 attrList1.setProtocolID(ProtocolType.ISIS_LEVEL_ONE);
137 PathAttrNlriDetailsLocalRib list1 = new PathAttrNlriDetailsLocalRib( 137 PathAttrNlriDetailsLocalRib list1 = new PathAttrNlriDetailsLocalRib(
138 - ipAddress, bgpId, locRIBASNum, isIbgp, attrList1); 138 + ipAddress, bgpId, locRibAsNum, isIbgp, attrList1);
139 139
140 peerIp = new byte[] {0x0b, 0x0b, 0x0b, 0x0b }; 140 peerIp = new byte[] {0x0b, 0x0b, 0x0b, 0x0b };
141 LinkedList<BgpValueType> pathAttributes2 = new LinkedList<>(); 141 LinkedList<BgpValueType> pathAttributes2 = new LinkedList<>();
...@@ -153,14 +153,14 @@ public class BgpSelectionAlgoTest { ...@@ -153,14 +153,14 @@ public class BgpSelectionAlgoTest {
153 153
154 ipAddress = IpAddress.valueOf(Version.INET, peerIp); 154 ipAddress = IpAddress.valueOf(Version.INET, peerIp);
155 bgpId = 536936448; 155 bgpId = 536936448;
156 - locRIBASNum = 200; 156 + locRibAsNum = 200;
157 isIbgp = true; 157 isIbgp = true;
158 PathAttrNlriDetails attrList2 = new PathAttrNlriDetails(); 158 PathAttrNlriDetails attrList2 = new PathAttrNlriDetails();
159 attrList2.setIdentifier(0); 159 attrList2.setIdentifier(0);
160 attrList2.setPathAttribute(pathAttributes2); 160 attrList2.setPathAttribute(pathAttributes2);
161 attrList2.setProtocolID(ProtocolType.OSPF_V2); 161 attrList2.setProtocolID(ProtocolType.OSPF_V2);
162 PathAttrNlriDetailsLocalRib list2 = new PathAttrNlriDetailsLocalRib( 162 PathAttrNlriDetailsLocalRib list2 = new PathAttrNlriDetailsLocalRib(
163 - ipAddress, bgpId, locRIBASNum, isIbgp, attrList2); 163 + ipAddress, bgpId, locRibAsNum, isIbgp, attrList2);
164 BgpSelectionAlgo algo = new BgpSelectionAlgo(); 164 BgpSelectionAlgo algo = new BgpSelectionAlgo();
165 int result = algo.compare(list1, list2); 165 int result = algo.compare(list1, list2);
166 assertThat(result, is(-1)); 166 assertThat(result, is(-1));
...@@ -189,14 +189,14 @@ public class BgpSelectionAlgoTest { ...@@ -189,14 +189,14 @@ public class BgpSelectionAlgoTest {
189 189
190 IpAddress ipAddress = IpAddress.valueOf(Version.INET, peerIp); 190 IpAddress ipAddress = IpAddress.valueOf(Version.INET, peerIp);
191 int bgpId = 168427777; 191 int bgpId = 168427777;
192 - short locRIBASNum = 100; 192 + short locRibAsNum = 100;
193 boolean isIbgp = false; 193 boolean isIbgp = false;
194 PathAttrNlriDetails attrList1 = new PathAttrNlriDetails(); 194 PathAttrNlriDetails attrList1 = new PathAttrNlriDetails();
195 attrList1.setIdentifier(0); 195 attrList1.setIdentifier(0);
196 attrList1.setPathAttribute(pathAttributes1); 196 attrList1.setPathAttribute(pathAttributes1);
197 attrList1.setProtocolID(ProtocolType.ISIS_LEVEL_ONE); 197 attrList1.setProtocolID(ProtocolType.ISIS_LEVEL_ONE);
198 PathAttrNlriDetailsLocalRib list1 = new PathAttrNlriDetailsLocalRib( 198 PathAttrNlriDetailsLocalRib list1 = new PathAttrNlriDetailsLocalRib(
199 - ipAddress, bgpId, locRIBASNum, isIbgp, attrList1); 199 + ipAddress, bgpId, locRibAsNum, isIbgp, attrList1);
200 200
201 peerIp = new byte[] {0x0b, 0x0b, 0x0b, 0x0b }; 201 peerIp = new byte[] {0x0b, 0x0b, 0x0b, 0x0b };
202 LinkedList<BgpValueType> pathAttributes2 = new LinkedList<>(); 202 LinkedList<BgpValueType> pathAttributes2 = new LinkedList<>();
...@@ -214,14 +214,14 @@ public class BgpSelectionAlgoTest { ...@@ -214,14 +214,14 @@ public class BgpSelectionAlgoTest {
214 214
215 ipAddress = IpAddress.valueOf(Version.INET, peerIp); 215 ipAddress = IpAddress.valueOf(Version.INET, peerIp);
216 bgpId = 536936448; 216 bgpId = 536936448;
217 - locRIBASNum = 200; 217 + locRibAsNum = 200;
218 isIbgp = true; 218 isIbgp = true;
219 PathAttrNlriDetails attrList2 = new PathAttrNlriDetails(); 219 PathAttrNlriDetails attrList2 = new PathAttrNlriDetails();
220 attrList2.setIdentifier(0); 220 attrList2.setIdentifier(0);
221 attrList2.setPathAttribute(pathAttributes2); 221 attrList2.setPathAttribute(pathAttributes2);
222 attrList2.setProtocolID(ProtocolType.OSPF_V2); 222 attrList2.setProtocolID(ProtocolType.OSPF_V2);
223 PathAttrNlriDetailsLocalRib list2 = new PathAttrNlriDetailsLocalRib( 223 PathAttrNlriDetailsLocalRib list2 = new PathAttrNlriDetailsLocalRib(
224 - ipAddress, bgpId, locRIBASNum, isIbgp, attrList2); 224 + ipAddress, bgpId, locRibAsNum, isIbgp, attrList2);
225 BgpSelectionAlgo algo = new BgpSelectionAlgo(); 225 BgpSelectionAlgo algo = new BgpSelectionAlgo();
226 int result = algo.compare(list1, list2); 226 int result = algo.compare(list1, list2);
227 assertThat(result, is(1)); 227 assertThat(result, is(1));
...@@ -254,14 +254,14 @@ public class BgpSelectionAlgoTest { ...@@ -254,14 +254,14 @@ public class BgpSelectionAlgoTest {
254 254
255 IpAddress ipAddress = IpAddress.valueOf(Version.INET, peerIp); 255 IpAddress ipAddress = IpAddress.valueOf(Version.INET, peerIp);
256 int bgpId = 168427777; 256 int bgpId = 168427777;
257 - short locRIBASNum = 100; 257 + short locRibAsNum = 100;
258 boolean isIbgp = false; 258 boolean isIbgp = false;
259 PathAttrNlriDetails attrList1 = new PathAttrNlriDetails(); 259 PathAttrNlriDetails attrList1 = new PathAttrNlriDetails();
260 attrList1.setIdentifier(0); 260 attrList1.setIdentifier(0);
261 attrList1.setPathAttribute(pathAttributes1); 261 attrList1.setPathAttribute(pathAttributes1);
262 attrList1.setProtocolID(ProtocolType.ISIS_LEVEL_ONE); 262 attrList1.setProtocolID(ProtocolType.ISIS_LEVEL_ONE);
263 PathAttrNlriDetailsLocalRib list1 = new PathAttrNlriDetailsLocalRib( 263 PathAttrNlriDetailsLocalRib list1 = new PathAttrNlriDetailsLocalRib(
264 - ipAddress, bgpId, locRIBASNum, isIbgp, attrList1); 264 + ipAddress, bgpId, locRibAsNum, isIbgp, attrList1);
265 265
266 peerIp = new byte[] {0x0b, 0x0b, 0x0b, 0x0b }; 266 peerIp = new byte[] {0x0b, 0x0b, 0x0b, 0x0b };
267 LinkedList<BgpValueType> pathAttributes2 = new LinkedList<>(); 267 LinkedList<BgpValueType> pathAttributes2 = new LinkedList<>();
...@@ -283,14 +283,14 @@ public class BgpSelectionAlgoTest { ...@@ -283,14 +283,14 @@ public class BgpSelectionAlgoTest {
283 283
284 ipAddress = IpAddress.valueOf(Version.INET, peerIp); 284 ipAddress = IpAddress.valueOf(Version.INET, peerIp);
285 bgpId = 536936448; 285 bgpId = 536936448;
286 - locRIBASNum = 200; 286 + locRibAsNum = 200;
287 isIbgp = true; 287 isIbgp = true;
288 PathAttrNlriDetails attrList2 = new PathAttrNlriDetails(); 288 PathAttrNlriDetails attrList2 = new PathAttrNlriDetails();
289 attrList2.setIdentifier(0); 289 attrList2.setIdentifier(0);
290 attrList2.setPathAttribute(pathAttributes2); 290 attrList2.setPathAttribute(pathAttributes2);
291 attrList2.setProtocolID(ProtocolType.OSPF_V2); 291 attrList2.setProtocolID(ProtocolType.OSPF_V2);
292 PathAttrNlriDetailsLocalRib list2 = new PathAttrNlriDetailsLocalRib( 292 PathAttrNlriDetailsLocalRib list2 = new PathAttrNlriDetailsLocalRib(
293 - ipAddress, bgpId, locRIBASNum, isIbgp, attrList2); 293 + ipAddress, bgpId, locRibAsNum, isIbgp, attrList2);
294 BgpSelectionAlgo algo = new BgpSelectionAlgo(); 294 BgpSelectionAlgo algo = new BgpSelectionAlgo();
295 int result = algo.compare(list1, list2); 295 int result = algo.compare(list1, list2);
296 assertThat(result, is(1)); 296 assertThat(result, is(1));
...@@ -314,14 +314,14 @@ public class BgpSelectionAlgoTest { ...@@ -314,14 +314,14 @@ public class BgpSelectionAlgoTest {
314 314
315 IpAddress ipAddress = IpAddress.valueOf(Version.INET, peerIp); 315 IpAddress ipAddress = IpAddress.valueOf(Version.INET, peerIp);
316 int bgpId = 168427777; 316 int bgpId = 168427777;
317 - short locRIBASNum = 100; 317 + short locRibAsNum = 100;
318 boolean isIbgp = false; 318 boolean isIbgp = false;
319 PathAttrNlriDetails attrList1 = new PathAttrNlriDetails(); 319 PathAttrNlriDetails attrList1 = new PathAttrNlriDetails();
320 attrList1.setIdentifier(0); 320 attrList1.setIdentifier(0);
321 attrList1.setPathAttribute(pathAttributes1); 321 attrList1.setPathAttribute(pathAttributes1);
322 attrList1.setProtocolID(ProtocolType.ISIS_LEVEL_ONE); 322 attrList1.setProtocolID(ProtocolType.ISIS_LEVEL_ONE);
323 PathAttrNlriDetailsLocalRib list1 = new PathAttrNlriDetailsLocalRib( 323 PathAttrNlriDetailsLocalRib list1 = new PathAttrNlriDetailsLocalRib(
324 - ipAddress, bgpId, locRIBASNum, isIbgp, attrList1); 324 + ipAddress, bgpId, locRibAsNum, isIbgp, attrList1);
325 325
326 peerIp = new byte[] {0x0b, 0x0b, 0x0b, 0x0b }; 326 peerIp = new byte[] {0x0b, 0x0b, 0x0b, 0x0b };
327 LinkedList<BgpValueType> pathAttributes2 = new LinkedList<>(); 327 LinkedList<BgpValueType> pathAttributes2 = new LinkedList<>();
...@@ -334,14 +334,14 @@ public class BgpSelectionAlgoTest { ...@@ -334,14 +334,14 @@ public class BgpSelectionAlgoTest {
334 334
335 ipAddress = IpAddress.valueOf(Version.INET, peerIp); 335 ipAddress = IpAddress.valueOf(Version.INET, peerIp);
336 bgpId = 536936448; 336 bgpId = 536936448;
337 - locRIBASNum = 200; 337 + locRibAsNum = 200;
338 isIbgp = true; 338 isIbgp = true;
339 PathAttrNlriDetails attrList2 = new PathAttrNlriDetails(); 339 PathAttrNlriDetails attrList2 = new PathAttrNlriDetails();
340 attrList2.setIdentifier(0); 340 attrList2.setIdentifier(0);
341 attrList2.setPathAttribute(pathAttributes2); 341 attrList2.setPathAttribute(pathAttributes2);
342 attrList2.setProtocolID(ProtocolType.OSPF_V2); 342 attrList2.setProtocolID(ProtocolType.OSPF_V2);
343 PathAttrNlriDetailsLocalRib list2 = new PathAttrNlriDetailsLocalRib( 343 PathAttrNlriDetailsLocalRib list2 = new PathAttrNlriDetailsLocalRib(
344 - ipAddress, bgpId, locRIBASNum, isIbgp, attrList2); 344 + ipAddress, bgpId, locRibAsNum, isIbgp, attrList2);
345 BgpSelectionAlgo algo = new BgpSelectionAlgo(); 345 BgpSelectionAlgo algo = new BgpSelectionAlgo();
346 int result = algo.compare(list1, list2); 346 int result = algo.compare(list1, list2);
347 assertThat(result, is(-1)); 347 assertThat(result, is(-1));
...@@ -369,14 +369,14 @@ public class BgpSelectionAlgoTest { ...@@ -369,14 +369,14 @@ public class BgpSelectionAlgoTest {
369 369
370 IpAddress ipAddress = IpAddress.valueOf(Version.INET, peerIp); 370 IpAddress ipAddress = IpAddress.valueOf(Version.INET, peerIp);
371 int bgpId = 168427777; 371 int bgpId = 168427777;
372 - short locRIBASNum = 100; 372 + short locRibAsNum = 100;
373 boolean isIbgp = true; 373 boolean isIbgp = true;
374 PathAttrNlriDetails attrList1 = new PathAttrNlriDetails(); 374 PathAttrNlriDetails attrList1 = new PathAttrNlriDetails();
375 attrList1.setIdentifier(0); 375 attrList1.setIdentifier(0);
376 attrList1.setPathAttribute(pathAttributes1); 376 attrList1.setPathAttribute(pathAttributes1);
377 attrList1.setProtocolID(ProtocolType.ISIS_LEVEL_ONE); 377 attrList1.setProtocolID(ProtocolType.ISIS_LEVEL_ONE);
378 PathAttrNlriDetailsLocalRib list1 = new PathAttrNlriDetailsLocalRib( 378 PathAttrNlriDetailsLocalRib list1 = new PathAttrNlriDetailsLocalRib(
379 - ipAddress, bgpId, locRIBASNum, isIbgp, attrList1); 379 + ipAddress, bgpId, locRibAsNum, isIbgp, attrList1);
380 380
381 peerIp = new byte[] {0x0b, 0x0b, 0x0b, 0x0b }; 381 peerIp = new byte[] {0x0b, 0x0b, 0x0b, 0x0b };
382 LinkedList<BgpValueType> pathAttributes2 = new LinkedList<>(); 382 LinkedList<BgpValueType> pathAttributes2 = new LinkedList<>();
...@@ -394,14 +394,14 @@ public class BgpSelectionAlgoTest { ...@@ -394,14 +394,14 @@ public class BgpSelectionAlgoTest {
394 394
395 ipAddress = IpAddress.valueOf(Version.INET, peerIp); 395 ipAddress = IpAddress.valueOf(Version.INET, peerIp);
396 bgpId = 536936448; 396 bgpId = 536936448;
397 - locRIBASNum = 200; 397 + locRibAsNum = 200;
398 isIbgp = false; 398 isIbgp = false;
399 PathAttrNlriDetails attrList2 = new PathAttrNlriDetails(); 399 PathAttrNlriDetails attrList2 = new PathAttrNlriDetails();
400 attrList2.setIdentifier(0); 400 attrList2.setIdentifier(0);
401 attrList2.setPathAttribute(pathAttributes2); 401 attrList2.setPathAttribute(pathAttributes2);
402 attrList2.setProtocolID(ProtocolType.OSPF_V2); 402 attrList2.setProtocolID(ProtocolType.OSPF_V2);
403 PathAttrNlriDetailsLocalRib list2 = new PathAttrNlriDetailsLocalRib( 403 PathAttrNlriDetailsLocalRib list2 = new PathAttrNlriDetailsLocalRib(
404 - ipAddress, bgpId, locRIBASNum, false, attrList2); 404 + ipAddress, bgpId, locRibAsNum, false, attrList2);
405 BgpSelectionAlgo algo = new BgpSelectionAlgo(); 405 BgpSelectionAlgo algo = new BgpSelectionAlgo();
406 int result = algo.compare(list1, list2); 406 int result = algo.compare(list1, list2);
407 assertThat(result, is(-1)); 407 assertThat(result, is(-1));
...@@ -430,14 +430,14 @@ public class BgpSelectionAlgoTest { ...@@ -430,14 +430,14 @@ public class BgpSelectionAlgoTest {
430 IpAddress ipAddress = IpAddress.valueOf(Version.INET, peerIp); 430 IpAddress ipAddress = IpAddress.valueOf(Version.INET, peerIp);
431 //A0A0A00 431 //A0A0A00
432 Integer bgpId = 168430080; 432 Integer bgpId = 168430080;
433 - short locRIBASNum = 100; 433 + short locRibAsNum = 100;
434 boolean isIbgp = false; 434 boolean isIbgp = false;
435 PathAttrNlriDetails attrList1 = new PathAttrNlriDetails(); 435 PathAttrNlriDetails attrList1 = new PathAttrNlriDetails();
436 attrList1.setIdentifier(0); 436 attrList1.setIdentifier(0);
437 attrList1.setPathAttribute(pathAttributes1); 437 attrList1.setPathAttribute(pathAttributes1);
438 attrList1.setProtocolID(ProtocolType.ISIS_LEVEL_ONE); 438 attrList1.setProtocolID(ProtocolType.ISIS_LEVEL_ONE);
439 PathAttrNlriDetailsLocalRib list1 = new PathAttrNlriDetailsLocalRib( 439 PathAttrNlriDetailsLocalRib list1 = new PathAttrNlriDetailsLocalRib(
440 - ipAddress, bgpId, locRIBASNum, isIbgp, attrList1); 440 + ipAddress, bgpId, locRibAsNum, isIbgp, attrList1);
441 441
442 peerIp = new byte[] {0x0b, 0x0b, 0x0b, 0x0b }; 442 peerIp = new byte[] {0x0b, 0x0b, 0x0b, 0x0b };
443 LinkedList<BgpValueType> pathAttributes2 = new LinkedList<>(); 443 LinkedList<BgpValueType> pathAttributes2 = new LinkedList<>();
...@@ -456,14 +456,14 @@ public class BgpSelectionAlgoTest { ...@@ -456,14 +456,14 @@ public class BgpSelectionAlgoTest {
456 ipAddress = IpAddress.valueOf(Version.INET, peerIp); 456 ipAddress = IpAddress.valueOf(Version.INET, peerIp);
457 //B0A0A00 457 //B0A0A00
458 bgpId = 185207296; 458 bgpId = 185207296;
459 - locRIBASNum = 200; 459 + locRibAsNum = 200;
460 isIbgp = false; 460 isIbgp = false;
461 PathAttrNlriDetails attrList2 = new PathAttrNlriDetails(); 461 PathAttrNlriDetails attrList2 = new PathAttrNlriDetails();
462 attrList2.setIdentifier(0); 462 attrList2.setIdentifier(0);
463 attrList2.setPathAttribute(pathAttributes2); 463 attrList2.setPathAttribute(pathAttributes2);
464 attrList2.setProtocolID(ProtocolType.OSPF_V2); 464 attrList2.setProtocolID(ProtocolType.OSPF_V2);
465 PathAttrNlriDetailsLocalRib list2 = new PathAttrNlriDetailsLocalRib( 465 PathAttrNlriDetailsLocalRib list2 = new PathAttrNlriDetailsLocalRib(
466 - ipAddress, bgpId, locRIBASNum, isIbgp, attrList2); 466 + ipAddress, bgpId, locRibAsNum, isIbgp, attrList2);
467 BgpSelectionAlgo algo = new BgpSelectionAlgo(); 467 BgpSelectionAlgo algo = new BgpSelectionAlgo();
468 int result = algo.compare(list1, list2); 468 int result = algo.compare(list1, list2);
469 assertThat(result, is(1)); 469 assertThat(result, is(1));
...@@ -492,14 +492,14 @@ public class BgpSelectionAlgoTest { ...@@ -492,14 +492,14 @@ public class BgpSelectionAlgoTest {
492 IpAddress ipAddress = IpAddress.valueOf(Version.INET, peerIp); 492 IpAddress ipAddress = IpAddress.valueOf(Version.INET, peerIp);
493 //A0A0A00 493 //A0A0A00
494 Integer bgpId = 168430080; 494 Integer bgpId = 168430080;
495 - short locRIBASNum = 100; 495 + short locRibAsNum = 100;
496 boolean isIbgp = false; 496 boolean isIbgp = false;
497 PathAttrNlriDetails attrList1 = new PathAttrNlriDetails(); 497 PathAttrNlriDetails attrList1 = new PathAttrNlriDetails();
498 attrList1.setIdentifier(0); 498 attrList1.setIdentifier(0);
499 attrList1.setPathAttribute(pathAttributes1); 499 attrList1.setPathAttribute(pathAttributes1);
500 attrList1.setProtocolID(ProtocolType.ISIS_LEVEL_ONE); 500 attrList1.setProtocolID(ProtocolType.ISIS_LEVEL_ONE);
501 PathAttrNlriDetailsLocalRib list1 = new PathAttrNlriDetailsLocalRib( 501 PathAttrNlriDetailsLocalRib list1 = new PathAttrNlriDetailsLocalRib(
502 - ipAddress, bgpId, locRIBASNum, isIbgp, attrList1); 502 + ipAddress, bgpId, locRibAsNum, isIbgp, attrList1);
503 503
504 peerIp = new byte[] {0x0a, 0x0a, 0x0a, 0x0a }; 504 peerIp = new byte[] {0x0a, 0x0a, 0x0a, 0x0a };
505 LinkedList<BgpValueType> pathAttributes2 = new LinkedList<>(); 505 LinkedList<BgpValueType> pathAttributes2 = new LinkedList<>();
...@@ -518,14 +518,14 @@ public class BgpSelectionAlgoTest { ...@@ -518,14 +518,14 @@ public class BgpSelectionAlgoTest {
518 ipAddress = IpAddress.valueOf(Version.INET, peerIp); 518 ipAddress = IpAddress.valueOf(Version.INET, peerIp);
519 //A0A0A00 519 //A0A0A00
520 bgpId = 168430080; 520 bgpId = 168430080;
521 - locRIBASNum = 200; 521 + locRibAsNum = 200;
522 isIbgp = false; 522 isIbgp = false;
523 PathAttrNlriDetails attrList2 = new PathAttrNlriDetails(); 523 PathAttrNlriDetails attrList2 = new PathAttrNlriDetails();
524 attrList2.setIdentifier(0); 524 attrList2.setIdentifier(0);
525 attrList2.setPathAttribute(pathAttributes2); 525 attrList2.setPathAttribute(pathAttributes2);
526 attrList2.setProtocolID(ProtocolType.OSPF_V2); 526 attrList2.setProtocolID(ProtocolType.OSPF_V2);
527 PathAttrNlriDetailsLocalRib list2 = new PathAttrNlriDetailsLocalRib( 527 PathAttrNlriDetailsLocalRib list2 = new PathAttrNlriDetailsLocalRib(
528 - ipAddress, bgpId, locRIBASNum, isIbgp, attrList2); 528 + ipAddress, bgpId, locRibAsNum, isIbgp, attrList2);
529 BgpSelectionAlgo algo = new BgpSelectionAlgo(); 529 BgpSelectionAlgo algo = new BgpSelectionAlgo();
530 int result = algo.compare(list1, list2); 530 int result = algo.compare(list1, list2);
531 assertThat(result, is(-1)); 531 assertThat(result, is(-1));
...@@ -554,14 +554,14 @@ public class BgpSelectionAlgoTest { ...@@ -554,14 +554,14 @@ public class BgpSelectionAlgoTest {
554 IpAddress ipAddress = IpAddress.valueOf(Version.INET, peerIp); 554 IpAddress ipAddress = IpAddress.valueOf(Version.INET, peerIp);
555 //A0A0A00 555 //A0A0A00
556 Integer bgpId = 168430080; 556 Integer bgpId = 168430080;
557 - short locRIBASNum = 100; 557 + short locRibAsNum = 100;
558 boolean isIbgp = false; 558 boolean isIbgp = false;
559 PathAttrNlriDetails attrList1 = new PathAttrNlriDetails(); 559 PathAttrNlriDetails attrList1 = new PathAttrNlriDetails();
560 attrList1.setIdentifier(0); 560 attrList1.setIdentifier(0);
561 attrList1.setPathAttribute(pathAttributes1); 561 attrList1.setPathAttribute(pathAttributes1);
562 attrList1.setProtocolID(ProtocolType.ISIS_LEVEL_ONE); 562 attrList1.setProtocolID(ProtocolType.ISIS_LEVEL_ONE);
563 PathAttrNlriDetailsLocalRib list1 = new PathAttrNlriDetailsLocalRib( 563 PathAttrNlriDetailsLocalRib list1 = new PathAttrNlriDetailsLocalRib(
564 - ipAddress, bgpId, locRIBASNum, isIbgp, attrList1); 564 + ipAddress, bgpId, locRibAsNum, isIbgp, attrList1);
565 565
566 peerIp = new byte[] {0x0a, 0x0a, 0x0a, 0x0a }; 566 peerIp = new byte[] {0x0a, 0x0a, 0x0a, 0x0a };
567 LinkedList<BgpValueType> pathAttributes2 = new LinkedList<>(); 567 LinkedList<BgpValueType> pathAttributes2 = new LinkedList<>();
...@@ -580,14 +580,14 @@ public class BgpSelectionAlgoTest { ...@@ -580,14 +580,14 @@ public class BgpSelectionAlgoTest {
580 ipAddress = IpAddress.valueOf(Version.INET, peerIp); 580 ipAddress = IpAddress.valueOf(Version.INET, peerIp);
581 //A0A0A00 581 //A0A0A00
582 bgpId = 168430080; 582 bgpId = 168430080;
583 - locRIBASNum = 200; 583 + locRibAsNum = 200;
584 isIbgp = false; 584 isIbgp = false;
585 PathAttrNlriDetails attrList2 = new PathAttrNlriDetails(); 585 PathAttrNlriDetails attrList2 = new PathAttrNlriDetails();
586 attrList2.setIdentifier(0); 586 attrList2.setIdentifier(0);
587 attrList2.setPathAttribute(pathAttributes2); 587 attrList2.setPathAttribute(pathAttributes2);
588 attrList2.setProtocolID(ProtocolType.OSPF_V2); 588 attrList2.setProtocolID(ProtocolType.OSPF_V2);
589 PathAttrNlriDetailsLocalRib list2 = new PathAttrNlriDetailsLocalRib( 589 PathAttrNlriDetailsLocalRib list2 = new PathAttrNlriDetailsLocalRib(
590 - ipAddress, bgpId, locRIBASNum, isIbgp, attrList2); 590 + ipAddress, bgpId, locRibAsNum, isIbgp, attrList2);
591 BgpSelectionAlgo algo = new BgpSelectionAlgo(); 591 BgpSelectionAlgo algo = new BgpSelectionAlgo();
592 int result = algo.compare(list1, list2); 592 int result = algo.compare(list1, list2);
593 assertThat(result, is(0)); 593 assertThat(result, is(0));
......
...@@ -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.
......
...@@ -52,7 +52,7 @@ import org.onosproject.ovsdb.rfc.notation.Mutation; ...@@ -52,7 +52,7 @@ import org.onosproject.ovsdb.rfc.notation.Mutation;
52 import org.onosproject.ovsdb.rfc.notation.OvsdbMap; 52 import org.onosproject.ovsdb.rfc.notation.OvsdbMap;
53 import org.onosproject.ovsdb.rfc.notation.OvsdbSet; 53 import org.onosproject.ovsdb.rfc.notation.OvsdbSet;
54 import org.onosproject.ovsdb.rfc.notation.Row; 54 import org.onosproject.ovsdb.rfc.notation.Row;
55 -import org.onosproject.ovsdb.rfc.notation.UUID; 55 +import org.onosproject.ovsdb.rfc.notation.Uuid;
56 import org.onosproject.ovsdb.rfc.operations.Delete; 56 import org.onosproject.ovsdb.rfc.operations.Delete;
57 import org.onosproject.ovsdb.rfc.operations.Insert; 57 import org.onosproject.ovsdb.rfc.operations.Insert;
58 import org.onosproject.ovsdb.rfc.operations.Mutate; 58 import org.onosproject.ovsdb.rfc.operations.Mutate;
...@@ -255,13 +255,13 @@ public class DefaultOvsdbClient ...@@ -255,13 +255,13 @@ public class DefaultOvsdbClient
255 if (bridge != null) { 255 if (bridge != null) {
256 OvsdbSet setPorts = (OvsdbSet) bridge.getPortsColumn().data(); 256 OvsdbSet setPorts = (OvsdbSet) bridge.getPortsColumn().data();
257 @SuppressWarnings("unchecked") 257 @SuppressWarnings("unchecked")
258 - Set<UUID> ports = setPorts.set(); 258 + Set<Uuid> ports = setPorts.set();
259 if (ports == null || ports.size() == 0) { 259 if (ports == null || ports.size() == 0) {
260 log.warn("The port uuid is null"); 260 log.warn("The port uuid is null");
261 return null; 261 return null;
262 } 262 }
263 263
264 - for (UUID uuid : ports) { 264 + for (Uuid uuid : ports) {
265 Row portRow = getRow(OvsdbConstant.DATABASENAME, 265 Row portRow = getRow(OvsdbConstant.DATABASENAME,
266 OvsdbConstant.PORT, uuid.value()); 266 OvsdbConstant.PORT, uuid.value());
267 Port port = (Port) TableGenerator.getTable(dbSchema, portRow, 267 Port port = (Port) TableGenerator.getTable(dbSchema, portRow,
...@@ -287,14 +287,14 @@ public class DefaultOvsdbClient ...@@ -287,14 +287,14 @@ public class DefaultOvsdbClient
287 if (port != null) { 287 if (port != null) {
288 OvsdbSet setInterfaces = (OvsdbSet) port.getInterfacesColumn().data(); 288 OvsdbSet setInterfaces = (OvsdbSet) port.getInterfacesColumn().data();
289 @SuppressWarnings("unchecked") 289 @SuppressWarnings("unchecked")
290 - Set<UUID> interfaces = setInterfaces.set(); 290 + Set<Uuid> interfaces = setInterfaces.set();
291 291
292 if (interfaces == null || interfaces.size() == 0) { 292 if (interfaces == null || interfaces.size() == 0) {
293 log.warn("The interface uuid is null"); 293 log.warn("The interface uuid is null");
294 return null; 294 return null;
295 } 295 }
296 296
297 - for (UUID uuid : interfaces) { 297 + for (Uuid uuid : interfaces) {
298 Row intfRow = getRow(OvsdbConstant.DATABASENAME, 298 Row intfRow = getRow(OvsdbConstant.DATABASENAME,
299 OvsdbConstant.INTERFACE, uuid.value()); 299 OvsdbConstant.INTERFACE, uuid.value());
300 Interface intf = (Interface) TableGenerator 300 Interface intf = (Interface) TableGenerator
...@@ -606,7 +606,7 @@ public class DefaultOvsdbClient ...@@ -606,7 +606,7 @@ public class DefaultOvsdbClient
606 return false; 606 return false;
607 } 607 }
608 608
609 - setControllersWithUUID(UUID.uuid(bridgeUuid), controllers); 609 + setControllersWithUuid(Uuid.uuid(bridgeUuid), controllers);
610 return true; 610 return true;
611 } 611 }
612 612
...@@ -623,11 +623,11 @@ public class DefaultOvsdbClient ...@@ -623,11 +623,11 @@ public class DefaultOvsdbClient
623 ControllerInfo controllerInfo = new ControllerInfo(ipAddress, OvsdbConstant.OFPORT, "tcp"); 623 ControllerInfo controllerInfo = new ControllerInfo(ipAddress, OvsdbConstant.OFPORT, "tcp");
624 log.debug("Automatically setting controller for bridge {} to {}", 624 log.debug("Automatically setting controller for bridge {} to {}",
625 bridgeUuid, controllerInfo.target()); 625 bridgeUuid, controllerInfo.target());
626 - setControllersWithUUID(UUID.uuid(bridgeUuid), ImmutableList.of(controllerInfo)); 626 + setControllersWithUuid(Uuid.uuid(bridgeUuid), ImmutableList.of(controllerInfo));
627 } 627 }
628 628
629 @Override 629 @Override
630 - public void setControllersWithUUID(UUID bridgeUuid, List<ControllerInfo> controllers) { 630 + public void setControllersWithUuid(Uuid bridgeUuid, List<ControllerInfo> controllers) {
631 631
632 DatabaseSchema dbSchema = schema.get(OvsdbConstant.DATABASENAME); 632 DatabaseSchema dbSchema = schema.get(OvsdbConstant.DATABASENAME);
633 if (dbSchema == null) { 633 if (dbSchema == null) {
...@@ -640,7 +640,7 @@ public class DefaultOvsdbClient ...@@ -640,7 +640,7 @@ public class DefaultOvsdbClient
640 return; 640 return;
641 } 641 }
642 642
643 - Set<UUID> newControllerUuids = new HashSet<>(); 643 + Set<Uuid> newControllerUuids = new HashSet<>();
644 644
645 Set<ControllerInfo> newControllers = new HashSet<>(controllers); 645 Set<ControllerInfo> newControllers = new HashSet<>(controllers);
646 List<Controller> removeControllers = new ArrayList<>(); 646 List<Controller> removeControllers = new ArrayList<>();
...@@ -672,7 +672,7 @@ public class DefaultOvsdbClient ...@@ -672,7 +672,7 @@ public class DefaultOvsdbClient
672 String uuid = insertConfig(OvsdbConstant.CONTROLLER, "_uuid", 672 String uuid = insertConfig(OvsdbConstant.CONTROLLER, "_uuid",
673 OvsdbConstant.BRIDGE, "controller", bridgeUuid.value(), 673 OvsdbConstant.BRIDGE, "controller", bridgeUuid.value(),
674 c.getRow()); 674 c.getRow());
675 - newControllerUuids.add(UUID.uuid(uuid)); 675 + newControllerUuids.add(Uuid.uuid(uuid));
676 676
677 }); 677 });
678 678
...@@ -691,17 +691,17 @@ public class DefaultOvsdbClient ...@@ -691,17 +691,17 @@ public class DefaultOvsdbClient
691 691
692 @Override 692 @Override
693 public void setControllersWithDeviceId(DeviceId deviceId, List<ControllerInfo> controllers) { 693 public void setControllersWithDeviceId(DeviceId deviceId, List<ControllerInfo> controllers) {
694 - setControllersWithUUID(getBridgeUUID(deviceId), controllers); 694 + setControllersWithUuid(getBridgeUuid(deviceId), controllers);
695 } 695 }
696 696
697 @Override 697 @Override
698 public void dropBridge(String bridgeName) { 698 public void dropBridge(String bridgeName) {
699 - String bridgeUUID = getBridgeUuid(bridgeName); 699 + String bridgeUuid = getBridgeUuid(bridgeName);
700 - if (bridgeUUID == null) { 700 + if (bridgeUuid == null) {
701 log.warn("Could not find bridge in node", nodeId.getIpAddress()); 701 log.warn("Could not find bridge in node", nodeId.getIpAddress());
702 return; 702 return;
703 } 703 }
704 - deleteConfig(OvsdbConstant.BRIDGE, "_uuid", bridgeUUID, 704 + deleteConfig(OvsdbConstant.BRIDGE, "_uuid", bridgeUuid,
705 OvsdbConstant.DATABASENAME, "bridges"); 705 OvsdbConstant.DATABASENAME, "bridges");
706 } 706 }
707 707
...@@ -798,12 +798,12 @@ public class DefaultOvsdbClient ...@@ -798,12 +798,12 @@ public class DefaultOvsdbClient
798 Port port = (Port) TableGenerator.createTable(dbSchema, OvsdbTable.PORT); 798 Port port = (Port) TableGenerator.createTable(dbSchema, OvsdbTable.PORT);
799 port.setName(portName); 799 port.setName(portName);
800 Insert portInsert = new Insert(dbSchema.getTableSchema("Port"), "Port", port.getRow()); 800 Insert portInsert = new Insert(dbSchema.getTableSchema("Port"), "Port", port.getRow());
801 - portInsert.getRow().put("interfaces", UUID.uuid("Interface")); 801 + portInsert.getRow().put("interfaces", Uuid.uuid("Interface"));
802 operations.add(portInsert); 802 operations.add(portInsert);
803 803
804 // update the bridge table 804 // update the bridge table
805 - Condition condition = ConditionUtil.isEqual("_uuid", UUID.uuid(bridgeUuid)); 805 + Condition condition = ConditionUtil.isEqual("_uuid", Uuid.uuid(bridgeUuid));
806 - Mutation mutation = MutationUtil.insert("ports", UUID.uuid("Port")); 806 + Mutation mutation = MutationUtil.insert("ports", Uuid.uuid("Port"));
807 List<Condition> conditions = new ArrayList<>(Arrays.asList(condition)); 807 List<Condition> conditions = new ArrayList<>(Arrays.asList(condition));
808 List<Mutation> mutations = new ArrayList<>(Arrays.asList(mutation)); 808 List<Mutation> mutations = new ArrayList<>(Arrays.asList(mutation));
809 operations.add(new Mutate(dbSchema.getTableSchema("Bridge"), conditions, mutations)); 809 operations.add(new Mutate(dbSchema.getTableSchema("Bridge"), conditions, mutations));
...@@ -831,10 +831,10 @@ public class DefaultOvsdbClient ...@@ -831,10 +831,10 @@ public class DefaultOvsdbClient
831 return; 831 return;
832 } 832 }
833 833
834 - String portUUID = getPortUuid(portName, bridgeUuid); 834 + String portUuid = getPortUuid(portName, bridgeUuid);
835 - if (portUUID != null) { 835 + if (portUuid != null) {
836 log.info("Delete tunnel"); 836 log.info("Delete tunnel");
837 - deleteConfig(OvsdbConstant.PORT, "_uuid", portUUID, 837 + deleteConfig(OvsdbConstant.PORT, "_uuid", portUuid,
838 OvsdbConstant.BRIDGE, "ports"); 838 OvsdbConstant.BRIDGE, "ports");
839 } 839 }
840 840
...@@ -864,18 +864,18 @@ public class DefaultOvsdbClient ...@@ -864,18 +864,18 @@ public class DefaultOvsdbClient
864 .getColumnSchema(parentColumnName); 864 .getColumnSchema(parentColumnName);
865 List<Mutation> mutations = Lists.newArrayList(); 865 List<Mutation> mutations = Lists.newArrayList();
866 Mutation mutation = MutationUtil.delete(parentColumnSchema.name(), 866 Mutation mutation = MutationUtil.delete(parentColumnSchema.name(),
867 - UUID.uuid(childUuid)); 867 + Uuid.uuid(childUuid));
868 mutations.add(mutation); 868 mutations.add(mutation);
869 List<Condition> conditions = Lists.newArrayList(); 869 List<Condition> conditions = Lists.newArrayList();
870 Condition condition = ConditionUtil.includes(parentColumnName, 870 Condition condition = ConditionUtil.includes(parentColumnName,
871 - UUID.uuid(childUuid)); 871 + Uuid.uuid(childUuid));
872 conditions.add(condition); 872 conditions.add(condition);
873 Mutate op = new Mutate(parentTableSchema, conditions, mutations); 873 Mutate op = new Mutate(parentTableSchema, conditions, mutations);
874 operations.add(op); 874 operations.add(op);
875 } 875 }
876 876
877 List<Condition> conditions = Lists.newArrayList(); 877 List<Condition> conditions = Lists.newArrayList();
878 - Condition condition = ConditionUtil.isEqual(childColumnName, UUID.uuid(childUuid)); 878 + Condition condition = ConditionUtil.isEqual(childColumnName, Uuid.uuid(childUuid));
879 conditions.add(condition); 879 conditions.add(condition);
880 Delete del = new Delete(childTableSchema, conditions); 880 Delete del = new Delete(childTableSchema, conditions);
881 operations.add(del); 881 operations.add(del);
...@@ -898,7 +898,7 @@ public class DefaultOvsdbClient ...@@ -898,7 +898,7 @@ public class DefaultOvsdbClient
898 TableSchema tableSchema = dbSchema.getTableSchema(tableName); 898 TableSchema tableSchema = dbSchema.getTableSchema(tableName);
899 899
900 List<Condition> conditions = Lists.newArrayList(); 900 List<Condition> conditions = Lists.newArrayList();
901 - Condition condition = ConditionUtil.isEqual(columnName, UUID.uuid(uuid)); 901 + Condition condition = ConditionUtil.isEqual(columnName, Uuid.uuid(uuid));
902 conditions.add(condition); 902 conditions.add(condition);
903 903
904 Update update = new Update(tableSchema, row, conditions); 904 Update update = new Update(tableSchema, row, conditions);
...@@ -940,12 +940,12 @@ public class DefaultOvsdbClient ...@@ -940,12 +940,12 @@ public class DefaultOvsdbClient
940 940
941 List<Mutation> mutations = Lists.newArrayList(); 941 List<Mutation> mutations = Lists.newArrayList();
942 Mutation mutation = MutationUtil.insert(parentColumnSchema.name(), 942 Mutation mutation = MutationUtil.insert(parentColumnSchema.name(),
943 - UUID.uuid(namedUuid)); 943 + Uuid.uuid(namedUuid));
944 mutations.add(mutation); 944 mutations.add(mutation);
945 945
946 List<Condition> conditions = Lists.newArrayList(); 946 List<Condition> conditions = Lists.newArrayList();
947 Condition condition = ConditionUtil.isEqual("_uuid", 947 Condition condition = ConditionUtil.isEqual("_uuid",
948 - UUID.uuid(parentUuid)); 948 + Uuid.uuid(parentUuid));
949 conditions.add(condition); 949 conditions.add(condition);
950 950
951 Mutate op = new Mutate(parentTableSchema, conditions, mutations); 951 Mutate op = new Mutate(parentTableSchema, conditions, mutations);
...@@ -962,7 +962,7 @@ public class DefaultOvsdbClient ...@@ -962,7 +962,7 @@ public class DefaultOvsdbClient
962 962
963 Insert ins = (Insert) operations.get(0); 963 Insert ins = (Insert) operations.get(0);
964 ins.getRow().put("interfaces", 964 ins.getRow().put("interfaces",
965 - UUID.uuid(OvsdbConstant.INTERFACE)); 965 + Uuid.uuid(OvsdbConstant.INTERFACE));
966 } 966 }
967 967
968 List<OperationResult> results; 968 List<OperationResult> results;
...@@ -1250,7 +1250,7 @@ public class DefaultOvsdbClient ...@@ -1250,7 +1250,7 @@ public class DefaultOvsdbClient
1250 1250
1251 @Override 1251 @Override
1252 public Set<ControllerInfo> getControllers(DeviceId openflowDeviceId) { 1252 public Set<ControllerInfo> getControllers(DeviceId openflowDeviceId) {
1253 - UUID bridgeUuid = getBridgeUUID(openflowDeviceId); 1253 + Uuid bridgeUuid = getBridgeUuid(openflowDeviceId);
1254 if (bridgeUuid == null) { 1254 if (bridgeUuid == null) {
1255 log.warn("bad bridge Uuid"); 1255 log.warn("bad bridge Uuid");
1256 return null; 1256 return null;
...@@ -1266,7 +1266,7 @@ public class DefaultOvsdbClient ...@@ -1266,7 +1266,7 @@ public class DefaultOvsdbClient
1266 .data())).collect(Collectors.toSet()); 1266 .data())).collect(Collectors.toSet());
1267 } 1267 }
1268 1268
1269 - private List<Controller> getControllers(UUID bridgeUuid) { 1269 + private List<Controller> getControllers(Uuid bridgeUuid) {
1270 DatabaseSchema dbSchema = schema.get(OvsdbConstant.DATABASENAME); 1270 DatabaseSchema dbSchema = schema.get(OvsdbConstant.DATABASENAME);
1271 if (dbSchema == null) { 1271 if (dbSchema == null) {
1272 return null; 1272 return null;
...@@ -1285,7 +1285,7 @@ public class DefaultOvsdbClient ...@@ -1285,7 +1285,7 @@ public class DefaultOvsdbClient
1285 //FIXME remove log 1285 //FIXME remove log
1286 log.warn("type of controller column", bridge.getControllerColumn() 1286 log.warn("type of controller column", bridge.getControllerColumn()
1287 .data().getClass()); 1287 .data().getClass());
1288 - Set<UUID> controllerUuids = (Set<UUID>) ((OvsdbSet) bridge 1288 + Set<Uuid> controllerUuids = (Set<Uuid>) ((OvsdbSet) bridge
1289 .getControllerColumn().data()).set(); 1289 .getControllerColumn().data()).set();
1290 // Set<String> controllerUuidStrings = (Set<String>) bridge.getControllerColumn().data(); 1290 // Set<String> controllerUuidStrings = (Set<String>) bridge.getControllerColumn().data();
1291 1291
...@@ -1299,7 +1299,7 @@ public class DefaultOvsdbClient ...@@ -1299,7 +1299,7 @@ public class DefaultOvsdbClient
1299 List<Controller> ovsdbControllers = new ArrayList<>(); 1299 List<Controller> ovsdbControllers = new ArrayList<>();
1300 ConcurrentMap<String, Row> controllerTableRows = controllerRowStore.getRowStore(); 1300 ConcurrentMap<String, Row> controllerTableRows = controllerRowStore.getRowStore();
1301 controllerTableRows.forEach((key, row) -> { 1301 controllerTableRows.forEach((key, row) -> {
1302 - if (!controllerUuids.contains(UUID.uuid(key))) { 1302 + if (!controllerUuids.contains(Uuid.uuid(key))) {
1303 return; 1303 return;
1304 } 1304 }
1305 Controller controller = (Controller) TableGenerator 1305 Controller controller = (Controller) TableGenerator
...@@ -1310,7 +1310,7 @@ public class DefaultOvsdbClient ...@@ -1310,7 +1310,7 @@ public class DefaultOvsdbClient
1310 } 1310 }
1311 1311
1312 1312
1313 - private UUID getBridgeUUID(DeviceId openflowDeviceId) { 1313 + private Uuid getBridgeUuid(DeviceId openflowDeviceId) {
1314 DatabaseSchema dbSchema = schema.get(OvsdbConstant.DATABASENAME); 1314 DatabaseSchema dbSchema = schema.get(OvsdbConstant.DATABASENAME);
1315 if (dbSchema == null) { 1315 if (dbSchema == null) {
1316 return null; 1316 return null;
...@@ -1323,13 +1323,13 @@ public class DefaultOvsdbClient ...@@ -1323,13 +1323,13 @@ public class DefaultOvsdbClient
1323 } 1323 }
1324 1324
1325 ConcurrentMap<String, Row> bridgeTableRows = rowStore.getRowStore(); 1325 ConcurrentMap<String, Row> bridgeTableRows = rowStore.getRowStore();
1326 - final AtomicReference<UUID> uuid = new AtomicReference<>(); 1326 + final AtomicReference<Uuid> uuid = new AtomicReference<>();
1327 for (Map.Entry<String, Row> entry : bridgeTableRows.entrySet()) { 1327 for (Map.Entry<String, Row> entry : bridgeTableRows.entrySet()) {
1328 Bridge b = (Bridge) TableGenerator.getTable(dbSchema, 1328 Bridge b = (Bridge) TableGenerator.getTable(dbSchema,
1329 entry.getValue(), 1329 entry.getValue(),
1330 OvsdbTable.BRIDGE); 1330 OvsdbTable.BRIDGE);
1331 if (matchesDpid(b, openflowDeviceId)) { 1331 if (matchesDpid(b, openflowDeviceId)) {
1332 - uuid.set(UUID.uuid(entry.getKey())); 1332 + uuid.set(Uuid.uuid(entry.getKey()));
1333 break; 1333 break;
1334 } 1334 }
1335 } 1335 }
......
...@@ -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
......
...@@ -43,7 +43,7 @@ public class PcepLabelMap { ...@@ -43,7 +43,7 @@ public class PcepLabelMap {
43 * 43 *
44 * @param fecObject PCEP fec object 44 * @param fecObject PCEP fec object
45 */ 45 */
46 - public void setFECObject(PcepFecObject fecObject) { 46 + public void setFecObject(PcepFecObject fecObject) {
47 this.fecObject = fecObject; 47 this.fecObject = fecObject;
48 } 48 }
49 49
...@@ -52,7 +52,7 @@ public class PcepLabelMap { ...@@ -52,7 +52,7 @@ public class PcepLabelMap {
52 * 52 *
53 * @return PCEP fec object 53 * @return PCEP fec object
54 */ 54 */
55 - public PcepFecObject getFECObject() { 55 + public PcepFecObject getFecObject() {
56 return this.fecObject; 56 return this.fecObject;
57 } 57 }
58 58
......
...@@ -204,13 +204,13 @@ public class RemoteTENodeDescriptorsTlv implements PcepValueType { ...@@ -204,13 +204,13 @@ public class RemoteTENodeDescriptorsTlv implements PcepValueType {
204 iValue = tempCb.readInt(); 204 iValue = tempCb.readInt();
205 tlv = new AutonomousSystemTlv(iValue); 205 tlv = new AutonomousSystemTlv(iValue);
206 break; 206 break;
207 - case BGPLSidentifierTlv.TYPE: 207 + case BgpLsIdentifierTlv.TYPE:
208 iValue = tempCb.readInt(); 208 iValue = tempCb.readInt();
209 - tlv = new BGPLSidentifierTlv(iValue); 209 + tlv = new BgpLsIdentifierTlv(iValue);
210 break; 210 break;
211 - case OSPFareaIDsubTlv.TYPE: 211 + case OspfAreaIdSubTlv.TYPE:
212 iValue = tempCb.readInt(); 212 iValue = tempCb.readInt();
213 - tlv = new OSPFareaIDsubTlv(iValue); 213 + tlv = new OspfAreaIdSubTlv(iValue);
214 break; 214 break;
215 case RouterIDSubTlv.TYPE: 215 case RouterIDSubTlv.TYPE:
216 tlv = RouterIDSubTlv.read(tempCb, hLength); 216 tlv = RouterIDSubTlv.read(tempCb, hLength);
......
...@@ -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 -
21 import org.jboss.netty.buffer.ChannelBuffer; 20 import org.jboss.netty.buffer.ChannelBuffer;
22 import org.onosproject.pcepio.protocol.PcepNai; 21 import org.onosproject.pcepio.protocol.PcepNai;
23 import org.onosproject.pcepio.protocol.PcepVersion; 22 import org.onosproject.pcepio.protocol.PcepVersion;
24 import org.slf4j.Logger; 23 import org.slf4j.Logger;
25 import org.slf4j.LoggerFactory; 24 import org.slf4j.LoggerFactory;
26 25
27 -import com.google.common.base.MoreObjects; 26 +import java.util.Objects;
28 27
29 /** 28 /**
30 * Provides SrEroSubObject. 29 * Provides SrEroSubObject.
...@@ -185,7 +184,7 @@ public class SrEroSubObject implements PcepValueType { ...@@ -185,7 +184,7 @@ public class SrEroSubObject implements PcepValueType {
185 * Returns sID. 184 * Returns sID.
186 * @return sID 185 * @return sID
187 */ 186 */
188 - public int getSID() { 187 + public int getSid() {
189 return sID; 188 return sID;
190 } 189 }
191 190
......
...@@ -242,12 +242,12 @@ public class TELinkAttributesTlv implements PcepValueType { ...@@ -242,12 +242,12 @@ public class TELinkAttributesTlv implements PcepValueType {
242 case LinkProtectionTypeTlv.TYPE: 242 case LinkProtectionTypeTlv.TYPE:
243 tlv = LinkProtectionTypeTlv.read(tempCb); 243 tlv = LinkProtectionTypeTlv.read(tempCb);
244 break; 244 break;
245 - case MPLSProtocolMaskTlv.TYPE: 245 + case MplsProtocolMaskTlv.TYPE:
246 byte cValue = tempCb.readByte(); 246 byte cValue = tempCb.readByte();
247 - tlv = new MPLSProtocolMaskTlv(cValue); 247 + tlv = new MplsProtocolMaskTlv(cValue);
248 break; 248 break;
249 - case IGPMetricTlv.TYPE: 249 + case IgpMetricTlv.TYPE:
250 - tlv = IGPMetricTlv.read(tempCb, length); 250 + tlv = IgpMetricTlv.read(tempCb, length);
251 break; 251 break;
252 case SharedRiskLinkGroupTlv.TYPE: 252 case SharedRiskLinkGroupTlv.TYPE:
253 tlv = SharedRiskLinkGroupTlv.read(tempCb, length); 253 tlv = SharedRiskLinkGroupTlv.read(tempCb, length);
......
...@@ -204,8 +204,8 @@ public class TENodeAttributesTlv implements PcepValueType { ...@@ -204,8 +204,8 @@ public class TENodeAttributesTlv implements PcepValueType {
204 case NodeNameTlv.TYPE: 204 case NodeNameTlv.TYPE:
205 tlv = NodeNameTlv.read(tempCb, length); 205 tlv = NodeNameTlv.read(tempCb, length);
206 break; 206 break;
207 - case ISISAreaIdentifierTlv.TYPE: 207 + case IsisAreaIdentifierTlv.TYPE:
208 - tlv = ISISAreaIdentifierTlv.read(tempCb, length); 208 + tlv = IsisAreaIdentifierTlv.read(tempCb, length);
209 break; 209 break;
210 case IPv4TERouterIdOfLocalNodeTlv.TYPE: 210 case IPv4TERouterIdOfLocalNodeTlv.TYPE:
211 iValue = tempCb.readInt(); 211 iValue = tempCb.readInt();
......
...@@ -21,10 +21,10 @@ import org.junit.Test; ...@@ -21,10 +21,10 @@ import org.junit.Test;
21 /** 21 /**
22 * Test of the BGPLSidentifierTlv. 22 * Test of the BGPLSidentifierTlv.
23 */ 23 */
24 -public class BGPLSidentifierTlvTest { 24 +public class BgpLsIdentifierTlvTest {
25 - private final BGPLSidentifierTlv tlv1 = BGPLSidentifierTlv.of(1); 25 + private final BgpLsIdentifierTlv tlv1 = BgpLsIdentifierTlv.of(1);
26 - private final BGPLSidentifierTlv sameAsTlv1 = BGPLSidentifierTlv.of(1); 26 + private final BgpLsIdentifierTlv sameAsTlv1 = BgpLsIdentifierTlv.of(1);
27 - private final BGPLSidentifierTlv tlv2 = BGPLSidentifierTlv.of(2); 27 + private final BgpLsIdentifierTlv tlv2 = BgpLsIdentifierTlv.of(2);
28 28
29 @Test 29 @Test
30 public void basics() { 30 public void basics() {
......
...@@ -21,12 +21,12 @@ import org.junit.Test; ...@@ -21,12 +21,12 @@ import org.junit.Test;
21 /** 21 /**
22 * Test of the IGPMetricTlv. 22 * Test of the IGPMetricTlv.
23 */ 23 */
24 -public class IGPMetricTlvTest { 24 +public class IgpMetricTlvTest {
25 private final byte[] b1 = new byte[] {0x01, 0x02}; 25 private final byte[] b1 = new byte[] {0x01, 0x02};
26 private final byte[] b2 = new byte[] {0x01, 0x03}; 26 private final byte[] b2 = new byte[] {0x01, 0x03};
27 - private final IGPMetricTlv tlv1 = IGPMetricTlv.of(b1, (short) 2); 27 + private final IgpMetricTlv tlv1 = IgpMetricTlv.of(b1, (short) 2);
28 - private final IGPMetricTlv sameAsTlv1 = IGPMetricTlv.of(b1, (short) 2); 28 + private final IgpMetricTlv sameAsTlv1 = IgpMetricTlv.of(b1, (short) 2);
29 - private final IGPMetricTlv tlv2 = IGPMetricTlv.of(b2, (short) 2); 29 + private final IgpMetricTlv tlv2 = IgpMetricTlv.of(b2, (short) 2);
30 30
31 @Test 31 @Test
32 public void basics() { 32 public void basics() {
......
...@@ -21,14 +21,14 @@ import org.junit.Test; ...@@ -21,14 +21,14 @@ import org.junit.Test;
21 /** 21 /**
22 * Test of the ISISAreaIdentifierTlv. 22 * Test of the ISISAreaIdentifierTlv.
23 */ 23 */
24 -public class ISISAreaIdentifierTlvTest { 24 +public class IsisAreaIdentifierTlvTest {
25 25
26 private final byte[] b1 = new byte[] {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }; 26 private final byte[] b1 = new byte[] {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
27 private final byte[] b2 = new byte[] {2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 }; 27 private final byte[] b2 = new byte[] {2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 };
28 28
29 - private final ISISAreaIdentifierTlv tlv1 = ISISAreaIdentifierTlv.of(b1, (short) 20); 29 + private final IsisAreaIdentifierTlv tlv1 = IsisAreaIdentifierTlv.of(b1, (short) 20);
30 - private final ISISAreaIdentifierTlv sameAsTlv1 = ISISAreaIdentifierTlv.of(b1, (short) 20); 30 + private final IsisAreaIdentifierTlv sameAsTlv1 = IsisAreaIdentifierTlv.of(b1, (short) 20);
31 - private final ISISAreaIdentifierTlv tlv2 = ISISAreaIdentifierTlv.of(b2, (short) 20); 31 + private final IsisAreaIdentifierTlv tlv2 = IsisAreaIdentifierTlv.of(b2, (short) 20);
32 32
33 @Test 33 @Test
34 public void basics() { 34 public void basics() {
......
...@@ -26,10 +26,10 @@ import java.util.LinkedList; ...@@ -26,10 +26,10 @@ import java.util.LinkedList;
26 public class LocalTENodeDescriptorsTlvTest { 26 public class LocalTENodeDescriptorsTlvTest {
27 27
28 private final AutonomousSystemTlv baAutoSysTlvRawValue1 = new AutonomousSystemTlv(1); 28 private final AutonomousSystemTlv baAutoSysTlvRawValue1 = new AutonomousSystemTlv(1);
29 - private final BGPLSidentifierTlv baBgplsIdRawValue1 = new BGPLSidentifierTlv(1); 29 + private final BgpLsIdentifierTlv baBgplsIdRawValue1 = new BgpLsIdentifierTlv(1);
30 30
31 private final AutonomousSystemTlv baAutoSysTlvRawValue2 = new AutonomousSystemTlv(2); 31 private final AutonomousSystemTlv baAutoSysTlvRawValue2 = new AutonomousSystemTlv(2);
32 - private final BGPLSidentifierTlv baBgplsIdRawValue2 = new BGPLSidentifierTlv(2); 32 + private final BgpLsIdentifierTlv baBgplsIdRawValue2 = new BgpLsIdentifierTlv(2);
33 33
34 private final LinkedList<PcepValueType> llNodeDescriptorSubTLVs1 = new LinkedList<PcepValueType>(); 34 private final LinkedList<PcepValueType> llNodeDescriptorSubTLVs1 = new LinkedList<PcepValueType>();
35 private final boolean a = llNodeDescriptorSubTLVs1.add(baAutoSysTlvRawValue1); 35 private final boolean a = llNodeDescriptorSubTLVs1.add(baAutoSysTlvRawValue1);
......
...@@ -21,13 +21,13 @@ import org.junit.Test; ...@@ -21,13 +21,13 @@ import org.junit.Test;
21 /** 21 /**
22 * Test of the MPLSProtocolMaskTlv. 22 * Test of the MPLSProtocolMaskTlv.
23 */ 23 */
24 -public class MPLSProtocolMaskTlvTest { 24 +public class MplsProtocolMaskTlvTest {
25 private final byte rawValue1 = 0x0A; 25 private final byte rawValue1 = 0x0A;
26 private final byte rawValue2 = 0x0B; 26 private final byte rawValue2 = 0x0B;
27 27
28 - private final MPLSProtocolMaskTlv tlv1 = new MPLSProtocolMaskTlv(rawValue1); 28 + private final MplsProtocolMaskTlv tlv1 = new MplsProtocolMaskTlv(rawValue1);
29 - private final MPLSProtocolMaskTlv sameAsTlv1 = new MPLSProtocolMaskTlv(rawValue1); 29 + private final MplsProtocolMaskTlv sameAsTlv1 = new MplsProtocolMaskTlv(rawValue1);
30 - private final MPLSProtocolMaskTlv tlv2 = MPLSProtocolMaskTlv.of(rawValue2); 30 + private final MplsProtocolMaskTlv tlv2 = MplsProtocolMaskTlv.of(rawValue2);
31 31
32 @Test 32 @Test
33 public void basics() { 33 public void basics() {
......
...@@ -21,11 +21,11 @@ import org.junit.Test; ...@@ -21,11 +21,11 @@ import org.junit.Test;
21 /** 21 /**
22 * Test of the OSPFareaIDsubTlv. 22 * Test of the OSPFareaIDsubTlv.
23 */ 23 */
24 -public class OSPFareaIDsubTlvTest { 24 +public class OspfAreaIdSubTlvTest {
25 private final int rawValue1 = 0x0A; 25 private final int rawValue1 = 0x0A;
26 26
27 - private final OSPFareaIDsubTlv tlv1 = new OSPFareaIDsubTlv(rawValue1); 27 + private final OspfAreaIdSubTlv tlv1 = new OspfAreaIdSubTlv(rawValue1);
28 - private final OSPFareaIDsubTlv tlv2 = OSPFareaIDsubTlv.of(tlv1.getInt()); 28 + private final OspfAreaIdSubTlv tlv2 = OspfAreaIdSubTlv.of(tlv1.getInt());
29 29
30 @Test 30 @Test
31 public void basics() { 31 public void basics() {
......
...@@ -26,10 +26,10 @@ import java.util.LinkedList; ...@@ -26,10 +26,10 @@ import java.util.LinkedList;
26 public class RemoteTENodeDescriptorsTlvTest { 26 public class RemoteTENodeDescriptorsTlvTest {
27 27
28 private final AutonomousSystemTlv autonomousSystemTlv1 = new AutonomousSystemTlv(10); 28 private final AutonomousSystemTlv autonomousSystemTlv1 = new AutonomousSystemTlv(10);
29 - private final BGPLSidentifierTlv bGPLSidentifierTlv1 = new BGPLSidentifierTlv(20); 29 + private final BgpLsIdentifierTlv bGPLSidentifierTlv1 = new BgpLsIdentifierTlv(20);
30 30
31 private final AutonomousSystemTlv autonomousSystemTlv2 = new AutonomousSystemTlv(20); 31 private final AutonomousSystemTlv autonomousSystemTlv2 = new AutonomousSystemTlv(20);
32 - private final BGPLSidentifierTlv bGPLSidentifierTlv2 = new BGPLSidentifierTlv(30); 32 + private final BgpLsIdentifierTlv bGPLSidentifierTlv2 = new BgpLsIdentifierTlv(30);
33 33
34 private final LinkedList<PcepValueType> llRemoteTENodeDescriptorSubTLV1 = new LinkedList<>(); 34 private final LinkedList<PcepValueType> llRemoteTENodeDescriptorSubTLV1 = new LinkedList<>();
35 private final boolean a = llRemoteTENodeDescriptorSubTLV1.add(autonomousSystemTlv1); 35 private final boolean a = llRemoteTENodeDescriptorSubTLV1.add(autonomousSystemTlv1);
......
...@@ -186,7 +186,7 @@ public class BgpTopologyProviderTest { ...@@ -186,7 +186,7 @@ public class BgpTopologyProviderTest {
186 } 186 }
187 187
188 @Override 188 @Override
189 - public void processBGPPacket(BgpId bgpId, BgpMessage msg) throws BgpParseException { 189 + public void processBgpPacket(BgpId bgpId, BgpMessage msg) throws BgpParseException {
190 // TODO Auto-generated method stub 190 // TODO Auto-generated method stub
191 191
192 } 192 }
......
...@@ -278,7 +278,7 @@ public class PcepTopologyProvider extends AbstractProvider ...@@ -278,7 +278,7 @@ public class PcepTopologyProvider extends AbstractProvider
278 } 278 }
279 279
280 @Override 280 @Override
281 - public void handlePCEPlink(PcepLink link) { 281 + public void handlePceplink(PcepLink link) {
282 282
283 OperationType operType = link.getOperationType(); 283 OperationType operType = link.getOperationType();
284 LinkDescription ld = buildLinkDescription(link); 284 LinkDescription ld = buildLinkDescription(link);
......
...@@ -15,24 +15,6 @@ ...@@ -15,24 +15,6 @@
15 */ 15 */
16 package org.onosproject.provider.pcep.tunnel.impl; 16 package org.onosproject.provider.pcep.tunnel.impl;
17 17
18 -import static com.google.common.base.Preconditions.checkNotNull;
19 -import static com.google.common.base.Strings.isNullOrEmpty;
20 -import static org.onosproject.net.DefaultAnnotations.EMPTY;
21 -import static org.onlab.util.Tools.get;
22 -import static org.onosproject.net.DeviceId.deviceId;
23 -import static org.onosproject.net.PortNumber.portNumber;
24 -import static org.onosproject.pcep.api.PcepDpid.uri;
25 -import static org.slf4j.LoggerFactory.getLogger;
26 -
27 -import java.util.ArrayList;
28 -import java.util.Collections;
29 -import java.util.Dictionary;
30 -import java.util.HashMap;
31 -import java.util.LinkedList;
32 -import java.util.List;
33 -import java.util.ListIterator;
34 -import java.util.Optional;
35 -
36 import com.google.common.collect.Maps; 18 import com.google.common.collect.Maps;
37 import org.apache.felix.scr.annotations.Activate; 19 import org.apache.felix.scr.annotations.Activate;
38 import org.apache.felix.scr.annotations.Component; 20 import org.apache.felix.scr.annotations.Component;
...@@ -47,8 +29,8 @@ import org.onosproject.core.DefaultGroupId; ...@@ -47,8 +29,8 @@ import org.onosproject.core.DefaultGroupId;
47 import org.onosproject.incubator.net.tunnel.DefaultOpticalTunnelEndPoint; 29 import org.onosproject.incubator.net.tunnel.DefaultOpticalTunnelEndPoint;
48 import org.onosproject.incubator.net.tunnel.DefaultTunnel; 30 import org.onosproject.incubator.net.tunnel.DefaultTunnel;
49 import org.onosproject.incubator.net.tunnel.DefaultTunnelDescription; 31 import org.onosproject.incubator.net.tunnel.DefaultTunnelDescription;
50 -import org.onosproject.incubator.net.tunnel.IpTunnelEndPoint;
51 import org.onosproject.incubator.net.tunnel.DefaultTunnelStatistics; 32 import org.onosproject.incubator.net.tunnel.DefaultTunnelStatistics;
33 +import org.onosproject.incubator.net.tunnel.IpTunnelEndPoint;
52 import org.onosproject.incubator.net.tunnel.OpticalLogicId; 34 import org.onosproject.incubator.net.tunnel.OpticalLogicId;
53 import org.onosproject.incubator.net.tunnel.OpticalTunnelEndPoint; 35 import org.onosproject.incubator.net.tunnel.OpticalTunnelEndPoint;
54 import org.onosproject.incubator.net.tunnel.Tunnel; 36 import org.onosproject.incubator.net.tunnel.Tunnel;
...@@ -79,11 +61,10 @@ import org.onosproject.pcep.api.PcepDpid; ...@@ -79,11 +61,10 @@ import org.onosproject.pcep.api.PcepDpid;
79 import org.onosproject.pcep.api.PcepHopNodeDescription; 61 import org.onosproject.pcep.api.PcepHopNodeDescription;
80 import org.onosproject.pcep.api.PcepOperator.OperationType; 62 import org.onosproject.pcep.api.PcepOperator.OperationType;
81 import org.onosproject.pcep.api.PcepTunnel; 63 import org.onosproject.pcep.api.PcepTunnel;
82 -import org.onosproject.pcep.api.PcepTunnel.PATHTYPE;
83 import org.onosproject.pcep.api.PcepTunnel.PathState; 64 import org.onosproject.pcep.api.PcepTunnel.PathState;
65 +import org.onosproject.pcep.api.PcepTunnel.PathType;
84 import org.onosproject.pcep.api.PcepTunnelListener; 66 import org.onosproject.pcep.api.PcepTunnelListener;
85 import org.onosproject.pcep.api.PcepTunnelStatistics; 67 import org.onosproject.pcep.api.PcepTunnelStatistics;
86 -import org.osgi.service.component.annotations.Modified;
87 import org.onosproject.pcep.controller.PccId; 68 import org.onosproject.pcep.controller.PccId;
88 import org.onosproject.pcep.controller.PcepClient; 69 import org.onosproject.pcep.controller.PcepClient;
89 import org.onosproject.pcep.controller.PcepClientController; 70 import org.onosproject.pcep.controller.PcepClientController;
...@@ -109,8 +90,27 @@ import org.onosproject.pcepio.types.IPv4SubObject; ...@@ -109,8 +90,27 @@ import org.onosproject.pcepio.types.IPv4SubObject;
109 import org.onosproject.pcepio.types.PcepValueType; 90 import org.onosproject.pcepio.types.PcepValueType;
110 import org.onosproject.pcepio.types.StatefulIPv4LspIdentidiersTlv; 91 import org.onosproject.pcepio.types.StatefulIPv4LspIdentidiersTlv;
111 import org.onosproject.pcepio.types.SymbolicPathNameTlv; 92 import org.onosproject.pcepio.types.SymbolicPathNameTlv;
112 -import org.slf4j.Logger;
113 import org.osgi.service.component.ComponentContext; 93 import org.osgi.service.component.ComponentContext;
94 +import org.osgi.service.component.annotations.Modified;
95 +import org.slf4j.Logger;
96 +
97 +import java.util.ArrayList;
98 +import java.util.Collections;
99 +import java.util.Dictionary;
100 +import java.util.HashMap;
101 +import java.util.LinkedList;
102 +import java.util.List;
103 +import java.util.ListIterator;
104 +import java.util.Optional;
105 +
106 +import static com.google.common.base.Preconditions.checkNotNull;
107 +import static com.google.common.base.Strings.isNullOrEmpty;
108 +import static org.onlab.util.Tools.get;
109 +import static org.onosproject.net.DefaultAnnotations.EMPTY;
110 +import static org.onosproject.net.DeviceId.deviceId;
111 +import static org.onosproject.net.PortNumber.portNumber;
112 +import static org.onosproject.pcep.api.PcepDpid.uri;
113 +import static org.slf4j.LoggerFactory.getLogger;
114 114
115 /** 115 /**
116 * Provider which uses an PCEP controller to detect, update, create network 116 * Provider which uses an PCEP controller to detect, update, create network
...@@ -156,7 +156,7 @@ public class PcepTunnelProvider extends AbstractProvider implements TunnelProvid ...@@ -156,7 +156,7 @@ public class PcepTunnelProvider extends AbstractProvider implements TunnelProvid
156 156
157 private InnerTunnelProvider listener = new InnerTunnelProvider(); 157 private InnerTunnelProvider listener = new InnerTunnelProvider();
158 158
159 - protected PcepTunnelApiMapper pcepTunnelAPIMapper = new PcepTunnelApiMapper(); 159 + protected PcepTunnelApiMapper pcepTunnelApiMapper = new PcepTunnelApiMapper();
160 private static final int DEFAULT_BANDWIDTH_VALUE = 10; 160 private static final int DEFAULT_BANDWIDTH_VALUE = 10;
161 161
162 /** 162 /**
...@@ -174,7 +174,7 @@ public class PcepTunnelProvider extends AbstractProvider implements TunnelProvid ...@@ -174,7 +174,7 @@ public class PcepTunnelProvider extends AbstractProvider implements TunnelProvid
174 pcepClientController.addListener(listener); 174 pcepClientController.addListener(listener);
175 pcepClientController.addEventListener(listener); 175 pcepClientController.addEventListener(listener);
176 tunnelService.queryAllTunnels().forEach(tunnel -> { 176 tunnelService.queryAllTunnels().forEach(tunnel -> {
177 - String pcepTunnelId = getPCEPTunnelKey(tunnel.tunnelId()); 177 + String pcepTunnelId = getPcepTunnelKey(tunnel.tunnelId());
178 TunnelStatsCollector tsc = new TunnelStatsCollector(pcepTunnelId, tunnelStatsPollFrequency); 178 TunnelStatsCollector tsc = new TunnelStatsCollector(pcepTunnelId, tunnelStatsPollFrequency);
179 tsc.start(); 179 tsc.start();
180 collectors.put(tunnel.tunnelId().id(), tsc); 180 collectors.put(tunnel.tunnelId().id(), tsc);
...@@ -373,7 +373,7 @@ public class PcepTunnelProvider extends AbstractProvider implements TunnelProvid ...@@ -373,7 +373,7 @@ public class PcepTunnelProvider extends AbstractProvider implements TunnelProvid
373 @Override 373 @Override
374 public TunnelId tunnelAdded(TunnelDescription tunnel) { 374 public TunnelId tunnelAdded(TunnelDescription tunnel) {
375 if (tunnel.type() == Tunnel.Type.MPLS) { 375 if (tunnel.type() == Tunnel.Type.MPLS) {
376 - pcepTunnelAPIMapper.removeFromCoreTunnelRequestQueue(tunnel.id()); 376 + pcepTunnelApiMapper.removeFromCoreTunnelRequestQueue(tunnel.id());
377 return service.tunnelAdded(tunnel); 377 return service.tunnelAdded(tunnel);
378 } 378 }
379 379
...@@ -419,7 +419,7 @@ public class PcepTunnelProvider extends AbstractProvider implements TunnelProvid ...@@ -419,7 +419,7 @@ public class PcepTunnelProvider extends AbstractProvider implements TunnelProvid
419 @Override 419 @Override
420 public void tunnelRemoved(TunnelDescription tunnel) { 420 public void tunnelRemoved(TunnelDescription tunnel) {
421 if (tunnel.type() == Tunnel.Type.MPLS) { 421 if (tunnel.type() == Tunnel.Type.MPLS) {
422 - pcepTunnelAPIMapper.removeFromCoreTunnelRequestQueue(tunnel.id()); 422 + pcepTunnelApiMapper.removeFromCoreTunnelRequestQueue(tunnel.id());
423 service.tunnelRemoved(tunnel); 423 service.tunnelRemoved(tunnel);
424 } 424 }
425 425
...@@ -429,7 +429,7 @@ public class PcepTunnelProvider extends AbstractProvider implements TunnelProvid ...@@ -429,7 +429,7 @@ public class PcepTunnelProvider extends AbstractProvider implements TunnelProvid
429 error("Illegal tunnel type. Only support VLAN tunnel deletion."); 429 error("Illegal tunnel type. Only support VLAN tunnel deletion.");
430 return; 430 return;
431 } 431 }
432 - String pcepTunnelId = getPCEPTunnelKey(tunnel.id()); 432 + String pcepTunnelId = getPcepTunnelKey(tunnel.id());
433 checkNotNull(pcepTunnelId, "The tunnel id is not exsited."); 433 checkNotNull(pcepTunnelId, "The tunnel id is not exsited.");
434 if (!controller.deleteTunnel(pcepTunnelId)) { 434 if (!controller.deleteTunnel(pcepTunnelId)) {
435 error("Delete tunnel failed, Maybe some devices have been disconnected."); 435 error("Delete tunnel failed, Maybe some devices have been disconnected.");
...@@ -442,7 +442,7 @@ public class PcepTunnelProvider extends AbstractProvider implements TunnelProvid ...@@ -442,7 +442,7 @@ public class PcepTunnelProvider extends AbstractProvider implements TunnelProvid
442 @Override 442 @Override
443 public void tunnelUpdated(TunnelDescription tunnel) { 443 public void tunnelUpdated(TunnelDescription tunnel) {
444 if (tunnel.type() == Tunnel.Type.MPLS) { 444 if (tunnel.type() == Tunnel.Type.MPLS) {
445 - pcepTunnelAPIMapper.removeFromCoreTunnelRequestQueue(tunnel.id()); 445 + pcepTunnelApiMapper.removeFromCoreTunnelRequestQueue(tunnel.id());
446 service.tunnelUpdated(tunnel); 446 service.tunnelUpdated(tunnel);
447 } 447 }
448 448
...@@ -457,7 +457,7 @@ public class PcepTunnelProvider extends AbstractProvider implements TunnelProvid ...@@ -457,7 +457,7 @@ public class PcepTunnelProvider extends AbstractProvider implements TunnelProvid
457 error("Update failed, invalid bandwidth."); 457 error("Update failed, invalid bandwidth.");
458 return; 458 return;
459 } 459 }
460 - String pcepTunnelId = getPCEPTunnelKey(tunnel.id()); 460 + String pcepTunnelId = getPcepTunnelKey(tunnel.id());
461 461
462 checkNotNull(pcepTunnelId, "Invalid tunnel id"); 462 checkNotNull(pcepTunnelId, "Invalid tunnel id");
463 if (!controller.updateTunnelBandwidth(pcepTunnelId, bandwidth)) { 463 if (!controller.updateTunnelBandwidth(pcepTunnelId, bandwidth)) {
...@@ -490,7 +490,7 @@ public class PcepTunnelProvider extends AbstractProvider implements TunnelProvid ...@@ -490,7 +490,7 @@ public class PcepTunnelProvider extends AbstractProvider implements TunnelProvid
490 490
491 // Creates a path that leads through the given devices. 491 // Creates a path that leads through the given devices.
492 private Path createPath(List<PcepHopNodeDescription> hopList, 492 private Path createPath(List<PcepHopNodeDescription> hopList,
493 - PATHTYPE pathtype, PathState pathState) { 493 + PathType pathtype, PathState pathState) {
494 if (hopList == null || hopList.size() == 0) { 494 if (hopList == null || hopList.size() == 0) {
495 return null; 495 return null;
496 } 496 }
...@@ -627,7 +627,7 @@ public class PcepTunnelProvider extends AbstractProvider implements TunnelProvid ...@@ -627,7 +627,7 @@ public class PcepTunnelProvider extends AbstractProvider implements TunnelProvid
627 * @param tunnelId tunnel id 627 * @param tunnelId tunnel id
628 * @return corresponding a tunnel key of the tunnel id. 628 * @return corresponding a tunnel key of the tunnel id.
629 */ 629 */
630 - private String getPCEPTunnelKey(TunnelId tunnelId) { 630 + private String getPcepTunnelKey(TunnelId tunnelId) {
631 for (String key : tunnelMap.keySet()) { 631 for (String key : tunnelMap.keySet()) {
632 if (tunnelMap.get(key).id() == tunnelId.id()) { 632 if (tunnelMap.get(key).id() == tunnelId.id()) {
633 return key; 633 return key;
...@@ -760,7 +760,7 @@ public class PcepTunnelProvider extends AbstractProvider implements TunnelProvid ...@@ -760,7 +760,7 @@ public class PcepTunnelProvider extends AbstractProvider implements TunnelProvid
760 int srpId = SrpIdGenerators.create(); 760 int srpId = SrpIdGenerators.create();
761 PcepTunnelData pcepTunnelData = new PcepTunnelData(tunnel, path, RequestType.CREATE); 761 PcepTunnelData pcepTunnelData = new PcepTunnelData(tunnel, path, RequestType.CREATE);
762 762
763 - pcepTunnelAPIMapper.addToCoreTunnelRequestQueue(pcepTunnelData); 763 + pcepTunnelApiMapper.addToCoreTunnelRequestQueue(pcepTunnelData);
764 764
765 LinkedList<PcInitiatedLspRequest> llPcInitiatedLspRequestList = createPcInitiatedLspReqList(tunnel, path, 765 LinkedList<PcInitiatedLspRequest> llPcInitiatedLspRequestList = createPcInitiatedLspReqList(tunnel, path,
766 pc, srpId); 766 pc, srpId);
...@@ -776,7 +776,7 @@ public class PcepTunnelProvider extends AbstractProvider implements TunnelProvid ...@@ -776,7 +776,7 @@ public class PcepTunnelProvider extends AbstractProvider implements TunnelProvid
776 776
777 pc.sendMessage(Collections.singletonList(pcInitiateMsg)); 777 pc.sendMessage(Collections.singletonList(pcInitiateMsg));
778 778
779 - pcepTunnelAPIMapper.addToTunnelRequestQueue(srpId, pcepTunnelData); 779 + pcepTunnelApiMapper.addToTunnelRequestQueue(srpId, pcepTunnelData);
780 } catch (PcepParseException e) { 780 } catch (PcepParseException e) {
781 log.error("PcepParseException occurred while processing setup tunnel {}", e.getMessage()); 781 log.error("PcepParseException occurred while processing setup tunnel {}", e.getMessage());
782 } 782 }
...@@ -791,17 +791,17 @@ public class PcepTunnelProvider extends AbstractProvider implements TunnelProvid ...@@ -791,17 +791,17 @@ public class PcepTunnelProvider extends AbstractProvider implements TunnelProvid
791 private void pcepReleaseTunnel(Tunnel tunnel, PcepClient pc) { 791 private void pcepReleaseTunnel(Tunnel tunnel, PcepClient pc) {
792 try { 792 try {
793 PcepTunnelData pcepTunnelData = new PcepTunnelData(tunnel, RequestType.DELETE); 793 PcepTunnelData pcepTunnelData = new PcepTunnelData(tunnel, RequestType.DELETE);
794 - pcepTunnelAPIMapper.addToCoreTunnelRequestQueue(pcepTunnelData); 794 + pcepTunnelApiMapper.addToCoreTunnelRequestQueue(pcepTunnelData);
795 int srpId = SrpIdGenerators.create(); 795 int srpId = SrpIdGenerators.create();
796 TunnelId tunnelId = tunnel.tunnelId(); 796 TunnelId tunnelId = tunnel.tunnelId();
797 int plspId = 0; 797 int plspId = 0;
798 StatefulIPv4LspIdentidiersTlv statefulIpv4IndentifierTlv = null; 798 StatefulIPv4LspIdentidiersTlv statefulIpv4IndentifierTlv = null;
799 799
800 - if (!(pcepTunnelAPIMapper.checkFromTunnelDBQueue(tunnelId))) { 800 + if (!(pcepTunnelApiMapper.checkFromTunnelDBQueue(tunnelId))) {
801 log.error("Tunnel doesnot exists. Tunnel id {}" + tunnelId.toString()); 801 log.error("Tunnel doesnot exists. Tunnel id {}" + tunnelId.toString());
802 return; 802 return;
803 } else { 803 } else {
804 - PcepTunnelData pcepTunnelDbData = pcepTunnelAPIMapper.getDataFromTunnelDBQueue(tunnelId); 804 + PcepTunnelData pcepTunnelDbData = pcepTunnelApiMapper.getDataFromTunnelDBQueue(tunnelId);
805 plspId = pcepTunnelDbData.plspId(); 805 plspId = pcepTunnelDbData.plspId();
806 statefulIpv4IndentifierTlv = pcepTunnelDbData.statefulIpv4IndentifierTlv(); 806 statefulIpv4IndentifierTlv = pcepTunnelDbData.statefulIpv4IndentifierTlv();
807 } 807 }
...@@ -837,7 +837,7 @@ public class PcepTunnelProvider extends AbstractProvider implements TunnelProvid ...@@ -837,7 +837,7 @@ public class PcepTunnelProvider extends AbstractProvider implements TunnelProvid
837 837
838 pc.sendMessage(Collections.singletonList(pcInitiateMsg)); 838 pc.sendMessage(Collections.singletonList(pcInitiateMsg));
839 839
840 - pcepTunnelAPIMapper.addToTunnelRequestQueue(srpId, pcepTunnelData); 840 + pcepTunnelApiMapper.addToTunnelRequestQueue(srpId, pcepTunnelData);
841 } catch (PcepParseException e) { 841 } catch (PcepParseException e) {
842 log.error("PcepParseException occurred while processing release tunnel {}", e.getMessage()); 842 log.error("PcepParseException occurred while processing release tunnel {}", e.getMessage());
843 } 843 }
...@@ -853,7 +853,7 @@ public class PcepTunnelProvider extends AbstractProvider implements TunnelProvid ...@@ -853,7 +853,7 @@ public class PcepTunnelProvider extends AbstractProvider implements TunnelProvid
853 private void pcepUpdateTunnel(Tunnel tunnel, Path path, PcepClient pc) { 853 private void pcepUpdateTunnel(Tunnel tunnel, Path path, PcepClient pc) {
854 try { 854 try {
855 PcepTunnelData pcepTunnelData = new PcepTunnelData(tunnel, path, RequestType.UPDATE); 855 PcepTunnelData pcepTunnelData = new PcepTunnelData(tunnel, path, RequestType.UPDATE);
856 - pcepTunnelAPIMapper.addToCoreTunnelRequestQueue(pcepTunnelData); 856 + pcepTunnelApiMapper.addToCoreTunnelRequestQueue(pcepTunnelData);
857 int srpId = SrpIdGenerators.create(); 857 int srpId = SrpIdGenerators.create();
858 TunnelId tunnelId = tunnel.tunnelId(); 858 TunnelId tunnelId = tunnel.tunnelId();
859 PcepValueType tlv; 859 PcepValueType tlv;
...@@ -866,11 +866,11 @@ public class PcepTunnelProvider extends AbstractProvider implements TunnelProvid ...@@ -866,11 +866,11 @@ public class PcepTunnelProvider extends AbstractProvider implements TunnelProvid
866 //build SRP object 866 //build SRP object
867 PcepSrpObject srpobj = pc.factory().buildSrpObject().setSrpID(srpId).setRFlag(false).build(); 867 PcepSrpObject srpobj = pc.factory().buildSrpObject().setSrpID(srpId).setRFlag(false).build();
868 868
869 - if (!(pcepTunnelAPIMapper.checkFromTunnelDBQueue(tunnelId))) { 869 + if (!(pcepTunnelApiMapper.checkFromTunnelDBQueue(tunnelId))) {
870 log.error("Tunnel doesnot exists in DB"); 870 log.error("Tunnel doesnot exists in DB");
871 return; 871 return;
872 } else { 872 } else {
873 - PcepTunnelData pcepTunnelDBData = pcepTunnelAPIMapper.getDataFromTunnelDBQueue(tunnelId); 873 + PcepTunnelData pcepTunnelDBData = pcepTunnelApiMapper.getDataFromTunnelDBQueue(tunnelId);
874 plspId = pcepTunnelDBData.plspId(); 874 plspId = pcepTunnelDBData.plspId();
875 } 875 }
876 876
...@@ -910,7 +910,7 @@ public class PcepTunnelProvider extends AbstractProvider implements TunnelProvid ...@@ -910,7 +910,7 @@ public class PcepTunnelProvider extends AbstractProvider implements TunnelProvid
910 PcepUpdateMsg pcUpdateMsg = pc.factory().buildUpdateMsg().setUpdateRequestList(llUpdateRequestList).build(); 910 PcepUpdateMsg pcUpdateMsg = pc.factory().buildUpdateMsg().setUpdateRequestList(llUpdateRequestList).build();
911 911
912 pc.sendMessage(Collections.singletonList(pcUpdateMsg)); 912 pc.sendMessage(Collections.singletonList(pcUpdateMsg));
913 - pcepTunnelAPIMapper.addToTunnelRequestQueue(srpId, pcepTunnelData); 913 + pcepTunnelApiMapper.addToTunnelRequestQueue(srpId, pcepTunnelData);
914 } catch (PcepParseException e) { 914 } catch (PcepParseException e) {
915 log.error("PcepParseException occurred while processing release tunnel {}", e.getMessage()); 915 log.error("PcepParseException occurred while processing release tunnel {}", e.getMessage());
916 } 916 }
...@@ -921,7 +921,7 @@ public class PcepTunnelProvider extends AbstractProvider implements TunnelProvid ...@@ -921,7 +921,7 @@ public class PcepTunnelProvider extends AbstractProvider implements TunnelProvid
921 private class InnerTunnelProvider implements PcepTunnelListener, PcepEventListener, PcepClientListener { 921 private class InnerTunnelProvider implements PcepTunnelListener, PcepEventListener, PcepClientListener {
922 922
923 @Override 923 @Override
924 - public void handlePCEPTunnel(PcepTunnel pcepTunnel) { 924 + public void handlePcepTunnel(PcepTunnel pcepTunnel) {
925 TunnelDescription tunnel = null; 925 TunnelDescription tunnel = null;
926 // instance and id identify a tunnel together 926 // instance and id identify a tunnel together
927 String tunnelKey = String.valueOf(pcepTunnel.getInstance()) 927 String tunnelKey = String.valueOf(pcepTunnel.getInstance())
...@@ -981,7 +981,7 @@ public class PcepTunnelProvider extends AbstractProvider implements TunnelProvid ...@@ -981,7 +981,7 @@ public class PcepTunnelProvider extends AbstractProvider implements TunnelProvid
981 log.debug("Plsp ID in handle message " + lspObj.getPlspId()); 981 log.debug("Plsp ID in handle message " + lspObj.getPlspId());
982 log.debug("SRP ID in handle message " + srpId); 982 log.debug("SRP ID in handle message " + srpId);
983 983
984 - if (!(pcepTunnelAPIMapper.checkFromTunnelRequestQueue(srpId))) { 984 + if (!(pcepTunnelApiMapper.checkFromTunnelRequestQueue(srpId))) {
985 985
986 // Check the sync status 986 // Check the sync status
987 if (lspObj.getSFlag()) { 987 if (lspObj.getSFlag()) {
...@@ -1013,7 +1013,7 @@ public class PcepTunnelProvider extends AbstractProvider implements TunnelProvid ...@@ -1013,7 +1013,7 @@ public class PcepTunnelProvider extends AbstractProvider implements TunnelProvid
1013 */ 1013 */
1014 private void handleReportMessage(int srpId, PcepLspObject lspObj) { 1014 private void handleReportMessage(int srpId, PcepLspObject lspObj) {
1015 ProviderId providerId = new ProviderId("pcep", PROVIDER_ID); 1015 ProviderId providerId = new ProviderId("pcep", PROVIDER_ID);
1016 - PcepTunnelData pcepTunnelData = pcepTunnelAPIMapper.getDataFromTunnelRequestQueue(srpId); 1016 + PcepTunnelData pcepTunnelData = pcepTunnelApiMapper.getDataFromTunnelRequestQueue(srpId);
1017 SparseAnnotations annotations = (SparseAnnotations) pcepTunnelData.tunnel().annotations(); 1017 SparseAnnotations annotations = (SparseAnnotations) pcepTunnelData.tunnel().annotations();
1018 1018
1019 // store the values required from report message 1019 // store the values required from report message
...@@ -1045,7 +1045,7 @@ public class PcepTunnelProvider extends AbstractProvider implements TunnelProvid ...@@ -1045,7 +1045,7 @@ public class PcepTunnelProvider extends AbstractProvider implements TunnelProvid
1045 if (RequestType.CREATE == pcepTunnelData.requestType()) { 1045 if (RequestType.CREATE == pcepTunnelData.requestType()) {
1046 log.debug("Report received for create request"); 1046 log.debug("Report received for create request");
1047 1047
1048 - pcepTunnelAPIMapper.handleCreateTunnelRequestQueue(srpId, pcepTunnelData); 1048 + pcepTunnelApiMapper.handleCreateTunnelRequestQueue(srpId, pcepTunnelData);
1049 if (0 == lspObj.getOFlag()) { 1049 if (0 == lspObj.getOFlag()) {
1050 log.warn("The tunnel is in down state"); 1050 log.warn("The tunnel is in down state");
1051 } 1051 }
...@@ -1053,20 +1053,20 @@ public class PcepTunnelProvider extends AbstractProvider implements TunnelProvid ...@@ -1053,20 +1053,20 @@ public class PcepTunnelProvider extends AbstractProvider implements TunnelProvid
1053 } 1053 }
1054 if (RequestType.DELETE == pcepTunnelData.requestType()) { 1054 if (RequestType.DELETE == pcepTunnelData.requestType()) {
1055 log.debug("Report received for delete request"); 1055 log.debug("Report received for delete request");
1056 - pcepTunnelAPIMapper.handleRemoveFromTunnelRequestQueue(srpId, pcepTunnelData); 1056 + pcepTunnelApiMapper.handleRemoveFromTunnelRequestQueue(srpId, pcepTunnelData);
1057 tunnelRemoved(td); 1057 tunnelRemoved(td);
1058 } 1058 }
1059 1059
1060 if (RequestType.UPDATE == pcepTunnelData.requestType()) { 1060 if (RequestType.UPDATE == pcepTunnelData.requestType()) {
1061 log.debug("Report received for update request"); 1061 log.debug("Report received for update request");
1062 pcepTunnelData.setRptFlag(true); 1062 pcepTunnelData.setRptFlag(true);
1063 - pcepTunnelAPIMapper.addToTunnelIdMap(pcepTunnelData); 1063 + pcepTunnelApiMapper.addToTunnelIdMap(pcepTunnelData);
1064 - pcepTunnelAPIMapper.handleUpdateTunnelRequestQueue(srpId, pcepTunnelData); 1064 + pcepTunnelApiMapper.handleUpdateTunnelRequestQueue(srpId, pcepTunnelData);
1065 1065
1066 if (0 == lspObj.getOFlag()) { 1066 if (0 == lspObj.getOFlag()) {
1067 log.warn("The tunnel is in down state"); 1067 log.warn("The tunnel is in down state");
1068 } 1068 }
1069 - if (!(pcepTunnelAPIMapper.checkFromTunnelRequestQueue(srpId))) { 1069 + if (!(pcepTunnelApiMapper.checkFromTunnelRequestQueue(srpId))) {
1070 tunnelUpdated(td); 1070 tunnelUpdated(td);
1071 } 1071 }
1072 } 1072 }
...@@ -1207,8 +1207,8 @@ public class PcepTunnelProvider extends AbstractProvider implements TunnelProvid ...@@ -1207,8 +1207,8 @@ public class PcepTunnelProvider extends AbstractProvider implements TunnelProvid
1207 1207
1208 PcepTunnelData pcepTunnelData = new PcepTunnelData(tunnel, path, RequestType.LSP_STATE_RPT); 1208 PcepTunnelData pcepTunnelData = new PcepTunnelData(tunnel, path, RequestType.LSP_STATE_RPT);
1209 pcepTunnelData.setStatefulIpv4IndentifierTlv(lspIdenTlv); 1209 pcepTunnelData.setStatefulIpv4IndentifierTlv(lspIdenTlv);
1210 - pcepTunnelAPIMapper.addPccTunnelDB(pcepTunnelData); 1210 + pcepTunnelApiMapper.addPccTunnelDB(pcepTunnelData);
1211 - pcepTunnelAPIMapper.addToTunnelIdMap(pcepTunnelData); 1211 + pcepTunnelApiMapper.addToTunnelIdMap(pcepTunnelData);
1212 } 1212 }
1213 1213
1214 @Override 1214 @Override
......
...@@ -58,7 +58,7 @@ public class PcepReleaseTunnelProviderTest { ...@@ -58,7 +58,7 @@ public class PcepReleaseTunnelProviderTest {
58 tunnelProvider.pcepClientController = controller; 58 tunnelProvider.pcepClientController = controller;
59 tunnelProvider.controller = ctl; 59 tunnelProvider.controller = ctl;
60 tunnelProvider.tunnelService = tunnelService; 60 tunnelProvider.tunnelService = tunnelService;
61 - tunnelProvider.pcepTunnelAPIMapper = pcepTunnelAPIMapper; 61 + tunnelProvider.pcepTunnelApiMapper = pcepTunnelAPIMapper;
62 tunnelProvider.cfgService = new ComponentConfigAdapter(); 62 tunnelProvider.cfgService = new ComponentConfigAdapter();
63 tunnelProvider.activate(); 63 tunnelProvider.activate();
64 64
...@@ -99,9 +99,9 @@ public class PcepReleaseTunnelProviderTest { ...@@ -99,9 +99,9 @@ public class PcepReleaseTunnelProviderTest {
99 pcepTunnelData.setPlspId(1); 99 pcepTunnelData.setPlspId(1);
100 StatefulIPv4LspIdentidiersTlv tlv = new StatefulIPv4LspIdentidiersTlv(0, (short) 1, (short) 2, 3, 4); 100 StatefulIPv4LspIdentidiersTlv tlv = new StatefulIPv4LspIdentidiersTlv(0, (short) 1, (short) 2, 3, 4);
101 pcepTunnelData.setStatefulIpv4IndentifierTlv(tlv); 101 pcepTunnelData.setStatefulIpv4IndentifierTlv(tlv);
102 - tunnelProvider.pcepTunnelAPIMapper.addToTunnelIdMap(pcepTunnelData); 102 + tunnelProvider.pcepTunnelApiMapper.addToTunnelIdMap(pcepTunnelData);
103 103
104 - tunnelProvider.pcepTunnelAPIMapper.handleCreateTunnelRequestQueue(1, pcepTunnelData); 104 + tunnelProvider.pcepTunnelApiMapper.handleCreateTunnelRequestQueue(1, pcepTunnelData);
105 105
106 tunnelProvider.releaseTunnel(tunnel); 106 tunnelProvider.releaseTunnel(tunnel);
107 } 107 }
......
...@@ -58,7 +58,7 @@ public class PcepUpdateTunnelProviderTest { ...@@ -58,7 +58,7 @@ public class PcepUpdateTunnelProviderTest {
58 tunnelProvider.tunnelProviderRegistry = registry; 58 tunnelProvider.tunnelProviderRegistry = registry;
59 tunnelProvider.pcepClientController = controller; 59 tunnelProvider.pcepClientController = controller;
60 tunnelProvider.controller = ctl; 60 tunnelProvider.controller = ctl;
61 - tunnelProvider.pcepTunnelAPIMapper = pcepTunnelAPIMapper; 61 + tunnelProvider.pcepTunnelApiMapper = pcepTunnelAPIMapper;
62 tunnelProvider.cfgService = new ComponentConfigAdapter(); 62 tunnelProvider.cfgService = new ComponentConfigAdapter();
63 tunnelProvider.tunnelService = tunnelService; 63 tunnelProvider.tunnelService = tunnelService;
64 tunnelProvider.activate(); 64 tunnelProvider.activate();
...@@ -98,9 +98,9 @@ public class PcepUpdateTunnelProviderTest { ...@@ -98,9 +98,9 @@ public class PcepUpdateTunnelProviderTest {
98 pcepTunnelData.setPlspId(1); 98 pcepTunnelData.setPlspId(1);
99 StatefulIPv4LspIdentidiersTlv tlv = new StatefulIPv4LspIdentidiersTlv(0, (short) 1, (short) 2, 3, 4); 99 StatefulIPv4LspIdentidiersTlv tlv = new StatefulIPv4LspIdentidiersTlv(0, (short) 1, (short) 2, 3, 4);
100 pcepTunnelData.setStatefulIpv4IndentifierTlv(tlv); 100 pcepTunnelData.setStatefulIpv4IndentifierTlv(tlv);
101 - tunnelProvider.pcepTunnelAPIMapper.addToTunnelIdMap(pcepTunnelData); 101 + tunnelProvider.pcepTunnelApiMapper.addToTunnelIdMap(pcepTunnelData);
102 102
103 - tunnelProvider.pcepTunnelAPIMapper.handleCreateTunnelRequestQueue(1, pcepTunnelData); 103 + tunnelProvider.pcepTunnelApiMapper.handleCreateTunnelRequestQueue(1, pcepTunnelData);
104 104
105 tunnelProvider.updateTunnel(tunnel, path); 105 tunnelProvider.updateTunnel(tunnel, path);
106 } 106 }
......
...@@ -21,45 +21,42 @@ import com.btisystems.pronx.ems.core.snmp.ISnmpSession; ...@@ -21,45 +21,42 @@ import com.btisystems.pronx.ems.core.snmp.ISnmpSession;
21 import com.btisystems.pronx.ems.core.snmp.ISnmpSessionFactory; 21 import com.btisystems.pronx.ems.core.snmp.ISnmpSessionFactory;
22 import com.btisystems.pronx.ems.core.snmp.SnmpSessionFactory; 22 import com.btisystems.pronx.ems.core.snmp.SnmpSessionFactory;
23 import com.btisystems.pronx.ems.core.snmp.V2cSnmpConfiguration; 23 import com.btisystems.pronx.ems.core.snmp.V2cSnmpConfiguration;
24 -import static com.google.common.base.Preconditions.checkNotNull;
25 import com.google.common.collect.Sets; 24 import com.google.common.collect.Sets;
26 -import java.io.IOException;
27 -import static org.slf4j.LoggerFactory.getLogger;
28 -
29 -import java.util.Collection;
30 -import java.util.HashMap;
31 -import java.util.HashSet;
32 -import java.util.Map;
33 -import java.util.Set;
34 -import java.util.concurrent.ExecutorService;
35 -import java.util.concurrent.Executors;
36 -
37 import org.apache.felix.scr.annotations.Activate; 25 import org.apache.felix.scr.annotations.Activate;
38 import org.apache.felix.scr.annotations.Component; 26 import org.apache.felix.scr.annotations.Component;
39 import org.apache.felix.scr.annotations.Deactivate; 27 import org.apache.felix.scr.annotations.Deactivate;
40 import org.apache.felix.scr.annotations.Modified; 28 import org.apache.felix.scr.annotations.Modified;
29 +import org.apache.felix.scr.annotations.Reference;
30 +import org.apache.felix.scr.annotations.ReferenceCardinality;
31 +import org.apache.felix.scr.annotations.Service;
32 +import org.onosproject.core.ApplicationId;
33 +import org.onosproject.core.CoreService;
41 import org.onosproject.incubator.net.faultmanagement.alarm.Alarm; 34 import org.onosproject.incubator.net.faultmanagement.alarm.Alarm;
42 import org.onosproject.incubator.net.faultmanagement.alarm.AlarmEvent; 35 import org.onosproject.incubator.net.faultmanagement.alarm.AlarmEvent;
43 import org.onosproject.incubator.net.faultmanagement.alarm.AlarmListener; 36 import org.onosproject.incubator.net.faultmanagement.alarm.AlarmListener;
44 import org.onosproject.incubator.net.faultmanagement.alarm.AlarmProvider; 37 import org.onosproject.incubator.net.faultmanagement.alarm.AlarmProvider;
45 - 38 +import org.onosproject.incubator.net.faultmanagement.alarm.DefaultAlarm;
46 import org.onosproject.net.DeviceId; 39 import org.onosproject.net.DeviceId;
40 +import org.onosproject.net.device.DeviceEvent;
41 +import org.onosproject.net.device.DeviceListener;
42 +import org.onosproject.net.device.DeviceService;
47 import org.onosproject.net.provider.AbstractProvider; 43 import org.onosproject.net.provider.AbstractProvider;
48 import org.onosproject.net.provider.ProviderId; 44 import org.onosproject.net.provider.ProviderId;
49 import org.osgi.service.component.ComponentContext; 45 import org.osgi.service.component.ComponentContext;
50 import org.slf4j.Logger; 46 import org.slf4j.Logger;
51 -import org.apache.felix.scr.annotations.Reference; 47 +
52 -import org.apache.felix.scr.annotations.ReferenceCardinality; 48 +import java.io.IOException;
53 -import org.apache.felix.scr.annotations.Service; 49 +import java.util.Collection;
50 +import java.util.HashMap;
51 +import java.util.HashSet;
52 +import java.util.Map;
53 +import java.util.Set;
54 +import java.util.concurrent.ExecutorService;
55 +import java.util.concurrent.Executors;
56 +
57 +import static com.google.common.base.Preconditions.checkNotNull;
54 import static org.onlab.util.Tools.groupedThreads; 58 import static org.onlab.util.Tools.groupedThreads;
55 -import org.onosproject.core.ApplicationId; 59 +import static org.slf4j.LoggerFactory.getLogger;
56 -import org.onosproject.core.CoreService;
57 -import org.onosproject.incubator.net.faultmanagement.alarm.DefaultAlarm;
58 -import org.onosproject.net.device.DeviceEvent;
59 -import static org.onosproject.net.device.DeviceEvent.Type.DEVICE_ADDED;
60 -import static org.onosproject.net.device.DeviceEvent.Type.DEVICE_AVAILABILITY_CHANGED;
61 -import org.onosproject.net.device.DeviceListener;
62 -import org.onosproject.net.device.DeviceService;
63 60
64 /** 61 /**
65 * SNMP alarms provider. 62 * SNMP alarms provider.
...@@ -145,8 +142,8 @@ public class SnmpAlarmProviderService extends AbstractProvider implements AlarmP ...@@ -145,8 +142,8 @@ public class SnmpAlarmProviderService extends AbstractProvider implements AlarmP
145 142
146 try (ISnmpSession session = getSessionFactory().createSession(config, ipAddress)) { 143 try (ISnmpSession session = getSessionFactory().createSession(config, ipAddress)) {
147 // Each session will be auto-closed. 144 // Each session will be auto-closed.
148 - String deviceOID = session.identifyDevice(); 145 + String deviceOid = session.identifyDevice();
149 - alarms.addAll(getAlarmsForDevice(deviceOID, session, deviceId)); 146 + alarms.addAll(getAlarmsForDevice(deviceOid, session, deviceId));
150 log.info("SNMP walk completed ok for deviceId={}", deviceId); 147 log.info("SNMP walk completed ok for deviceId={}", deviceId);
151 } catch (IOException | RuntimeException ex) { 148 } catch (IOException | RuntimeException ex) {
152 log.error("Failed to walk device.", ex.getMessage()); 149 log.error("Failed to walk device.", ex.getMessage());
...@@ -177,11 +174,11 @@ public class SnmpAlarmProviderService extends AbstractProvider implements AlarmP ...@@ -177,11 +174,11 @@ public class SnmpAlarmProviderService extends AbstractProvider implements AlarmP
177 return sessionFactory; 174 return sessionFactory;
178 } 175 }
179 176
180 - private Collection<Alarm> getAlarmsForDevice(String deviceOID, ISnmpSession session, 177 + private Collection<Alarm> getAlarmsForDevice(String deviceOid, ISnmpSession session,
181 DeviceId deviceID) throws IOException { 178 DeviceId deviceID) throws IOException {
182 Collection<Alarm> alarms = new HashSet<>(); 179 Collection<Alarm> alarms = new HashSet<>();
183 - if (providers.containsKey(deviceOID)) { 180 + if (providers.containsKey(deviceOid)) {
184 - alarms.addAll(providers.get(deviceOID).getAlarms(session, deviceID)); 181 + alarms.addAll(providers.get(deviceOid).getAlarms(session, deviceID));
185 } 182 }
186 return alarms; 183 return alarms;
187 } 184 }
......
...@@ -22,23 +22,6 @@ import com.btisystems.pronx.ems.core.snmp.ISnmpSession; ...@@ -22,23 +22,6 @@ import com.btisystems.pronx.ems.core.snmp.ISnmpSession;
22 import com.btisystems.pronx.ems.core.snmp.ISnmpSessionFactory; 22 import com.btisystems.pronx.ems.core.snmp.ISnmpSessionFactory;
23 import com.btisystems.pronx.ems.core.snmp.SnmpSessionFactory; 23 import com.btisystems.pronx.ems.core.snmp.SnmpSessionFactory;
24 import com.btisystems.pronx.ems.core.snmp.V2cSnmpConfiguration; 24 import com.btisystems.pronx.ems.core.snmp.V2cSnmpConfiguration;
25 -import static com.google.common.base.Strings.isNullOrEmpty;
26 -import java.io.IOException;
27 -import static org.onlab.util.Tools.delay;
28 -import static org.onlab.util.Tools.get;
29 -import static org.onlab.util.Tools.groupedThreads;
30 -import static org.slf4j.LoggerFactory.getLogger;
31 -
32 -import java.net.URI;
33 -import java.net.URISyntaxException;
34 -import java.util.Dictionary;
35 -import java.util.HashMap;
36 -import java.util.Map;
37 -import java.util.concurrent.ConcurrentHashMap;
38 -import java.util.concurrent.ExecutorService;
39 -import java.util.concurrent.Executors;
40 -import java.util.concurrent.TimeUnit;
41 -
42 import org.apache.felix.scr.annotations.Activate; 25 import org.apache.felix.scr.annotations.Activate;
43 import org.apache.felix.scr.annotations.Component; 26 import org.apache.felix.scr.annotations.Component;
44 import org.apache.felix.scr.annotations.Deactivate; 27 import org.apache.felix.scr.annotations.Deactivate;
...@@ -63,6 +46,23 @@ import org.onosproject.net.provider.ProviderId; ...@@ -63,6 +46,23 @@ import org.onosproject.net.provider.ProviderId;
63 import org.osgi.service.component.ComponentContext; 46 import org.osgi.service.component.ComponentContext;
64 import org.slf4j.Logger; 47 import org.slf4j.Logger;
65 48
49 +import java.io.IOException;
50 +import java.net.URI;
51 +import java.net.URISyntaxException;
52 +import java.util.Dictionary;
53 +import java.util.HashMap;
54 +import java.util.Map;
55 +import java.util.concurrent.ConcurrentHashMap;
56 +import java.util.concurrent.ExecutorService;
57 +import java.util.concurrent.Executors;
58 +import java.util.concurrent.TimeUnit;
59 +
60 +import static com.google.common.base.Strings.isNullOrEmpty;
61 +import static org.onlab.util.Tools.delay;
62 +import static org.onlab.util.Tools.get;
63 +import static org.onlab.util.Tools.groupedThreads;
64 +import static org.slf4j.LoggerFactory.getLogger;
65 +
66 /** 66 /**
67 * Provider which will try to fetch the details of SNMP devices from the core and run a capability discovery on each of 67 * Provider which will try to fetch the details of SNMP devices from the core and run a capability discovery on each of
68 * the device. 68 * the device.
...@@ -374,10 +374,10 @@ public class SnmpDeviceProvider extends AbstractProvider ...@@ -374,10 +374,10 @@ public class SnmpDeviceProvider extends AbstractProvider
374 374
375 try (ISnmpSession session = sessionFactory.createSession(config, ipAddress)) { 375 try (ISnmpSession session = sessionFactory.createSession(config, ipAddress)) {
376 // Each session will be auto-closed. 376 // Each session will be auto-closed.
377 - String deviceOID = session.identifyDevice(); 377 + String deviceOid = session.identifyDevice();
378 378
379 - if (providers.containsKey(deviceOID)) { 379 + if (providers.containsKey(deviceOid)) {
380 - desc = providers.get(deviceOID).populateDescription(session, desc); 380 + desc = providers.get(deviceOid).populateDescription(session, desc);
381 } 381 }
382 382
383 } catch (IOException | RuntimeException ex) { 383 } catch (IOException | RuntimeException ex) {
...@@ -392,10 +392,10 @@ public class SnmpDeviceProvider extends AbstractProvider ...@@ -392,10 +392,10 @@ public class SnmpDeviceProvider extends AbstractProvider
392 * This will build a device id for the device. 392 * This will build a device id for the device.
393 */ 393 */
394 private DeviceId getDeviceId() throws URISyntaxException { 394 private DeviceId getDeviceId() throws URISyntaxException {
395 - String additionalSSP = new StringBuilder( 395 + String additionalSsp = new StringBuilder(
396 device.getSnmpHost()).append(":") 396 device.getSnmpHost()).append(":")
397 .append(device.getSnmpPort()).toString(); 397 .append(device.getSnmpPort()).toString();
398 - return DeviceId.deviceId(new URI(SCHEME, additionalSSP, 398 + return DeviceId.deviceId(new URI(SCHEME, additionalSsp,
399 null)); 399 null));
400 } 400 }
401 } 401 }
......
...@@ -146,6 +146,9 @@ ...@@ -146,6 +146,9 @@
146 <property name="tagSeverity" value="error"/> 146 <property name="tagSeverity" value="error"/>
147 </module> 147 </module>
148 148
149 + <module name="AbbreviationAsWordInName">
150 + <property name="allowedAbbreviationLength" value="2" />
151 + </module>
149 152
150 <!-- Checks for Naming Conventions. --> 153 <!-- Checks for Naming Conventions. -->
151 <!-- See http://checkstyle.sf.net/config_naming.html --> 154 <!-- See http://checkstyle.sf.net/config_naming.html -->
......
...@@ -28,6 +28,12 @@ ...@@ -28,6 +28,12 @@
28 <suppress files=".*" checks="OperatorWrapCheck"/> 28 <suppress files=".*" checks="OperatorWrapCheck"/>
29 <suppress files=".*" checks="HiddenField"/> 29 <suppress files=".*" checks="HiddenField"/>
30 <suppress files=".java" checks="NewlineAtEndOfFile"/> 30 <suppress files=".java" checks="NewlineAtEndOfFile"/>
31 + <suppress files="org.onlab.packet.*" checks="AbbreviationAsWordInName" />
32 + <suppress files="org.onlab.jdvue.*" checks="AbbreviationAsWordInName" />
33 + <suppress files="org.onosproject.driver.pipeline.*" checks="AbbreviationAsWordInName" />
34 + <suppress files="org.onosproject.igmp.*" checks="AbbreviationAsWordInName" />
35 + <suppress files="org.onosproject.pim.*" checks="AbbreviationAsWordInName" />
36 + <suppress files="org.onosproject.segmentrouting.*" checks="AbbreviationAsWordInName" />
31 37
32 <!-- Suppressions for unit testing code --> 38 <!-- Suppressions for unit testing code -->
33 <suppress checks="JavadocPackage" 39 <suppress checks="JavadocPackage"
......