Replaced the usage of IpPrefix with IpAddress in the context of
Controller Nodes. Change-Id: Id2b25fb071bb20541db3f77b7afefe886520538e
Showing
17 changed files
with
46 additions
and
45 deletions
... | @@ -22,7 +22,7 @@ import org.apache.karaf.shell.commands.Argument; | ... | @@ -22,7 +22,7 @@ import org.apache.karaf.shell.commands.Argument; |
22 | import org.apache.karaf.shell.commands.Command; | 22 | import org.apache.karaf.shell.commands.Command; |
23 | import org.onlab.onos.cluster.ClusterAdminService; | 23 | import org.onlab.onos.cluster.ClusterAdminService; |
24 | import org.onlab.onos.cluster.NodeId; | 24 | import org.onlab.onos.cluster.NodeId; |
25 | -import org.onlab.packet.IpPrefix; | 25 | +import org.onlab.packet.IpAddress; |
26 | 26 | ||
27 | /** | 27 | /** |
28 | * Adds a new controller cluster node. | 28 | * Adds a new controller cluster node. |
... | @@ -46,7 +46,7 @@ public class NodeAddCommand extends AbstractShellCommand { | ... | @@ -46,7 +46,7 @@ public class NodeAddCommand extends AbstractShellCommand { |
46 | @Override | 46 | @Override |
47 | protected void execute() { | 47 | protected void execute() { |
48 | ClusterAdminService service = get(ClusterAdminService.class); | 48 | ClusterAdminService service = get(ClusterAdminService.class); |
49 | - service.addNode(new NodeId(nodeId), IpPrefix.valueOf(ip), tcpPort); | 49 | + service.addNode(new NodeId(nodeId), IpAddress.valueOf(ip), tcpPort); |
50 | } | 50 | } |
51 | 51 | ||
52 | } | 52 | } | ... | ... |
1 | package org.onlab.onos.cluster; | 1 | package org.onlab.onos.cluster; |
2 | 2 | ||
3 | -import org.onlab.packet.IpPrefix; | 3 | +import org.onlab.packet.IpAddress; |
4 | 4 | ||
5 | /** | 5 | /** |
6 | * Service for administering the cluster node membership. | 6 | * Service for administering the cluster node membership. |
... | @@ -15,7 +15,7 @@ public interface ClusterAdminService { | ... | @@ -15,7 +15,7 @@ public interface ClusterAdminService { |
15 | * @param tcpPort tcp listen port | 15 | * @param tcpPort tcp listen port |
16 | * @return newly added node | 16 | * @return newly added node |
17 | */ | 17 | */ |
18 | - ControllerNode addNode(NodeId nodeId, IpPrefix ip, int tcpPort); | 18 | + ControllerNode addNode(NodeId nodeId, IpAddress ip, int tcpPort); |
19 | 19 | ||
20 | /** | 20 | /** |
21 | * Removes the specified node from the cluster node list. | 21 | * Removes the specified node from the cluster node list. | ... | ... |
1 | package org.onlab.onos.cluster; | 1 | package org.onlab.onos.cluster; |
2 | 2 | ||
3 | import org.onlab.onos.store.Store; | 3 | import org.onlab.onos.store.Store; |
4 | -import org.onlab.packet.IpPrefix; | 4 | +import org.onlab.packet.IpAddress; |
5 | 5 | ||
6 | import java.util.Set; | 6 | import java.util.Set; |
7 | 7 | ||
... | @@ -48,7 +48,7 @@ public interface ClusterStore extends Store<ClusterEvent, ClusterStoreDelegate> | ... | @@ -48,7 +48,7 @@ public interface ClusterStore extends Store<ClusterEvent, ClusterStoreDelegate> |
48 | * @param tcpPort tcp listen port | 48 | * @param tcpPort tcp listen port |
49 | * @return newly added node | 49 | * @return newly added node |
50 | */ | 50 | */ |
51 | - ControllerNode addNode(NodeId nodeId, IpPrefix ip, int tcpPort); | 51 | + ControllerNode addNode(NodeId nodeId, IpAddress ip, int tcpPort); |
52 | 52 | ||
53 | /** | 53 | /** |
54 | * Removes the specified node from the inventory of cluster nodes. | 54 | * Removes the specified node from the inventory of cluster nodes. | ... | ... |
1 | package org.onlab.onos.cluster; | 1 | package org.onlab.onos.cluster; |
2 | 2 | ||
3 | -import org.onlab.packet.IpPrefix; | 3 | +import org.onlab.packet.IpAddress; |
4 | 4 | ||
5 | /** | 5 | /** |
6 | * Represents a controller instance as a member in a cluster. | 6 | * Represents a controller instance as a member in a cluster. |
... | @@ -33,7 +33,7 @@ public interface ControllerNode { | ... | @@ -33,7 +33,7 @@ public interface ControllerNode { |
33 | * | 33 | * |
34 | * @return IP address | 34 | * @return IP address |
35 | */ | 35 | */ |
36 | - IpPrefix ip(); | 36 | + IpAddress ip(); |
37 | 37 | ||
38 | 38 | ||
39 | /** | 39 | /** | ... | ... |
1 | package org.onlab.onos.cluster; | 1 | package org.onlab.onos.cluster; |
2 | 2 | ||
3 | -import org.onlab.packet.IpPrefix; | 3 | +import org.onlab.packet.IpAddress; |
4 | 4 | ||
5 | import java.util.Objects; | 5 | import java.util.Objects; |
6 | 6 | ||
... | @@ -14,7 +14,7 @@ public class DefaultControllerNode implements ControllerNode { | ... | @@ -14,7 +14,7 @@ public class DefaultControllerNode implements ControllerNode { |
14 | private static final int DEFAULT_PORT = 9876; | 14 | private static final int DEFAULT_PORT = 9876; |
15 | 15 | ||
16 | private final NodeId id; | 16 | private final NodeId id; |
17 | - private final IpPrefix ip; | 17 | + private final IpAddress ip; |
18 | private final int tcpPort; | 18 | private final int tcpPort; |
19 | 19 | ||
20 | // For serialization | 20 | // For serialization |
... | @@ -30,7 +30,7 @@ public class DefaultControllerNode implements ControllerNode { | ... | @@ -30,7 +30,7 @@ public class DefaultControllerNode implements ControllerNode { |
30 | * @param id instance identifier | 30 | * @param id instance identifier |
31 | * @param ip instance IP address | 31 | * @param ip instance IP address |
32 | */ | 32 | */ |
33 | - public DefaultControllerNode(NodeId id, IpPrefix ip) { | 33 | + public DefaultControllerNode(NodeId id, IpAddress ip) { |
34 | this(id, ip, DEFAULT_PORT); | 34 | this(id, ip, DEFAULT_PORT); |
35 | } | 35 | } |
36 | 36 | ||
... | @@ -40,7 +40,7 @@ public class DefaultControllerNode implements ControllerNode { | ... | @@ -40,7 +40,7 @@ public class DefaultControllerNode implements ControllerNode { |
40 | * @param id instance identifier | 40 | * @param id instance identifier |
41 | * @param ip instance IP address | 41 | * @param ip instance IP address |
42 | */ | 42 | */ |
43 | - public DefaultControllerNode(NodeId id, IpPrefix ip, int tcpPort) { | 43 | + public DefaultControllerNode(NodeId id, IpAddress ip, int tcpPort) { |
44 | this.id = id; | 44 | this.id = id; |
45 | this.ip = ip; | 45 | this.ip = ip; |
46 | this.tcpPort = tcpPort; | 46 | this.tcpPort = tcpPort; |
... | @@ -52,7 +52,7 @@ public class DefaultControllerNode implements ControllerNode { | ... | @@ -52,7 +52,7 @@ public class DefaultControllerNode implements ControllerNode { |
52 | } | 52 | } |
53 | 53 | ||
54 | @Override | 54 | @Override |
55 | - public IpPrefix ip() { | 55 | + public IpAddress ip() { |
56 | return ip; | 56 | return ip; |
57 | } | 57 | } |
58 | 58 | ... | ... |
... | @@ -8,7 +8,7 @@ import java.util.Arrays; | ... | @@ -8,7 +8,7 @@ import java.util.Arrays; |
8 | import java.util.List; | 8 | import java.util.List; |
9 | 9 | ||
10 | import org.junit.Test; | 10 | import org.junit.Test; |
11 | -import org.onlab.packet.IpPrefix; | 11 | +import org.onlab.packet.IpAddress; |
12 | 12 | ||
13 | import com.google.common.collect.FluentIterable; | 13 | import com.google.common.collect.FluentIterable; |
14 | 14 | ||
... | @@ -19,9 +19,9 @@ public class ControllerNodeToNodeIdTest { | ... | @@ -19,9 +19,9 @@ public class ControllerNodeToNodeIdTest { |
19 | private static final NodeId NID2 = new NodeId("bar"); | 19 | private static final NodeId NID2 = new NodeId("bar"); |
20 | private static final NodeId NID3 = new NodeId("buz"); | 20 | private static final NodeId NID3 = new NodeId("buz"); |
21 | 21 | ||
22 | - private static final IpPrefix IP1 = IpPrefix.valueOf("127.0.0.1"); | 22 | + private static final IpAddress IP1 = IpAddress.valueOf("127.0.0.1"); |
23 | - private static final IpPrefix IP2 = IpPrefix.valueOf("127.0.0.2"); | 23 | + private static final IpAddress IP2 = IpAddress.valueOf("127.0.0.2"); |
24 | - private static final IpPrefix IP3 = IpPrefix.valueOf("127.0.0.3"); | 24 | + private static final IpAddress IP3 = IpAddress.valueOf("127.0.0.3"); |
25 | 25 | ||
26 | private static final ControllerNode CN1 = new DefaultControllerNode(NID1, IP1); | 26 | private static final ControllerNode CN1 = new DefaultControllerNode(NID1, IP1); |
27 | private static final ControllerNode CN2 = new DefaultControllerNode(NID2, IP2); | 27 | private static final ControllerNode CN2 = new DefaultControllerNode(NID2, IP2); | ... | ... |
... | @@ -16,7 +16,7 @@ import org.onlab.onos.cluster.ControllerNode; | ... | @@ -16,7 +16,7 @@ import org.onlab.onos.cluster.ControllerNode; |
16 | import org.onlab.onos.cluster.NodeId; | 16 | import org.onlab.onos.cluster.NodeId; |
17 | import org.onlab.onos.event.AbstractListenerRegistry; | 17 | import org.onlab.onos.event.AbstractListenerRegistry; |
18 | import org.onlab.onos.event.EventDeliveryService; | 18 | import org.onlab.onos.event.EventDeliveryService; |
19 | -import org.onlab.packet.IpPrefix; | 19 | +import org.onlab.packet.IpAddress; |
20 | import org.slf4j.Logger; | 20 | import org.slf4j.Logger; |
21 | 21 | ||
22 | import java.util.Set; | 22 | import java.util.Set; |
... | @@ -83,7 +83,7 @@ public class ClusterManager implements ClusterService, ClusterAdminService { | ... | @@ -83,7 +83,7 @@ public class ClusterManager implements ClusterService, ClusterAdminService { |
83 | } | 83 | } |
84 | 84 | ||
85 | @Override | 85 | @Override |
86 | - public ControllerNode addNode(NodeId nodeId, IpPrefix ip, int tcpPort) { | 86 | + public ControllerNode addNode(NodeId nodeId, IpAddress ip, int tcpPort) { |
87 | checkNotNull(nodeId, INSTANCE_ID_NULL); | 87 | checkNotNull(nodeId, INSTANCE_ID_NULL); |
88 | checkNotNull(ip, "IP address cannot be null"); | 88 | checkNotNull(ip, "IP address cannot be null"); |
89 | checkArgument(tcpPort > 5000, "TCP port must be > 5000"); | 89 | checkArgument(tcpPort > 5000, "TCP port must be > 5000"); | ... | ... |
... | @@ -16,7 +16,7 @@ import org.onlab.onos.mastership.MastershipService; | ... | @@ -16,7 +16,7 @@ import org.onlab.onos.mastership.MastershipService; |
16 | import org.onlab.onos.mastership.MastershipTermService; | 16 | import org.onlab.onos.mastership.MastershipTermService; |
17 | import org.onlab.onos.net.DeviceId; | 17 | import org.onlab.onos.net.DeviceId; |
18 | import org.onlab.onos.store.trivial.impl.SimpleMastershipStore; | 18 | import org.onlab.onos.store.trivial.impl.SimpleMastershipStore; |
19 | -import org.onlab.packet.IpPrefix; | 19 | +import org.onlab.packet.IpAddress; |
20 | 20 | ||
21 | import com.google.common.collect.Sets; | 21 | import com.google.common.collect.Sets; |
22 | 22 | ||
... | @@ -31,7 +31,7 @@ public class MastershipManagerTest { | ... | @@ -31,7 +31,7 @@ public class MastershipManagerTest { |
31 | 31 | ||
32 | private static final NodeId NID_LOCAL = new NodeId("local"); | 32 | private static final NodeId NID_LOCAL = new NodeId("local"); |
33 | private static final NodeId NID_OTHER = new NodeId("foo"); | 33 | private static final NodeId NID_OTHER = new NodeId("foo"); |
34 | - private static final IpPrefix LOCALHOST = IpPrefix.valueOf("127.0.0.1"); | 34 | + private static final IpAddress LOCALHOST = IpAddress.valueOf("127.0.0.1"); |
35 | private static final DeviceId DEV_MASTER = DeviceId.deviceId("of:1"); | 35 | private static final DeviceId DEV_MASTER = DeviceId.deviceId("of:1"); |
36 | private static final DeviceId DEV_OTHER = DeviceId.deviceId("of:2"); | 36 | private static final DeviceId DEV_OTHER = DeviceId.deviceId("of:2"); |
37 | 37 | ... | ... |
... | @@ -38,7 +38,7 @@ import org.onlab.onos.net.provider.AbstractProvider; | ... | @@ -38,7 +38,7 @@ import org.onlab.onos.net.provider.AbstractProvider; |
38 | import org.onlab.onos.net.provider.ProviderId; | 38 | import org.onlab.onos.net.provider.ProviderId; |
39 | import org.onlab.onos.store.trivial.impl.SimpleDeviceStore; | 39 | import org.onlab.onos.store.trivial.impl.SimpleDeviceStore; |
40 | import org.onlab.packet.ChassisId; | 40 | import org.onlab.packet.ChassisId; |
41 | -import org.onlab.packet.IpPrefix; | 41 | +import org.onlab.packet.IpAddress; |
42 | 42 | ||
43 | import java.util.ArrayList; | 43 | import java.util.ArrayList; |
44 | import java.util.Iterator; | 44 | import java.util.Iterator; |
... | @@ -69,7 +69,7 @@ public class DeviceManagerTest { | ... | @@ -69,7 +69,7 @@ public class DeviceManagerTest { |
69 | private static final PortNumber P2 = PortNumber.portNumber(2); | 69 | private static final PortNumber P2 = PortNumber.portNumber(2); |
70 | private static final PortNumber P3 = PortNumber.portNumber(3); | 70 | private static final PortNumber P3 = PortNumber.portNumber(3); |
71 | private static final NodeId NID_LOCAL = new NodeId("local"); | 71 | private static final NodeId NID_LOCAL = new NodeId("local"); |
72 | - private static final IpPrefix LOCALHOST = IpPrefix.valueOf("127.0.0.1"); | 72 | + private static final IpAddress LOCALHOST = IpAddress.valueOf("127.0.0.1"); |
73 | 73 | ||
74 | private DeviceManager mgr; | 74 | private DeviceManager mgr; |
75 | 75 | ... | ... |
... | @@ -8,7 +8,7 @@ import com.fasterxml.jackson.databind.node.ArrayNode; | ... | @@ -8,7 +8,7 @@ import com.fasterxml.jackson.databind.node.ArrayNode; |
8 | import com.fasterxml.jackson.databind.node.ObjectNode; | 8 | import com.fasterxml.jackson.databind.node.ObjectNode; |
9 | import org.onlab.onos.cluster.DefaultControllerNode; | 9 | import org.onlab.onos.cluster.DefaultControllerNode; |
10 | import org.onlab.onos.cluster.NodeId; | 10 | import org.onlab.onos.cluster.NodeId; |
11 | -import org.onlab.packet.IpPrefix; | 11 | +import org.onlab.packet.IpAddress; |
12 | 12 | ||
13 | import java.io.File; | 13 | import java.io.File; |
14 | import java.io.IOException; | 14 | import java.io.IOException; |
... | @@ -46,7 +46,7 @@ public class ClusterDefinitionStore { | ... | @@ -46,7 +46,7 @@ public class ClusterDefinitionStore { |
46 | while (it.hasNext()) { | 46 | while (it.hasNext()) { |
47 | ObjectNode nodeDef = (ObjectNode) it.next(); | 47 | ObjectNode nodeDef = (ObjectNode) it.next(); |
48 | nodes.add(new DefaultControllerNode(new NodeId(nodeDef.get("id").asText()), | 48 | nodes.add(new DefaultControllerNode(new NodeId(nodeDef.get("id").asText()), |
49 | - IpPrefix.valueOf(nodeDef.get("ip").asText()), | 49 | + IpAddress.valueOf(nodeDef.get("ip").asText()), |
50 | nodeDef.get("tcpPort").asInt(9876))); | 50 | nodeDef.get("tcpPort").asInt(9876))); |
51 | } | 51 | } |
52 | return nodes; | 52 | return nodes; | ... | ... |
... | @@ -2,7 +2,7 @@ package org.onlab.onos.store.cluster.impl; | ... | @@ -2,7 +2,7 @@ package org.onlab.onos.store.cluster.impl; |
2 | 2 | ||
3 | import org.onlab.onos.cluster.DefaultControllerNode; | 3 | import org.onlab.onos.cluster.DefaultControllerNode; |
4 | import org.onlab.onos.cluster.NodeId; | 4 | import org.onlab.onos.cluster.NodeId; |
5 | -import org.onlab.packet.IpPrefix; | 5 | +import org.onlab.packet.IpAddress; |
6 | 6 | ||
7 | // Not used right now | 7 | // Not used right now |
8 | /** | 8 | /** |
... | @@ -19,7 +19,8 @@ public interface ClusterNodesDelegate { | ... | @@ -19,7 +19,8 @@ public interface ClusterNodesDelegate { |
19 | * @param tcpPort node TCP listen port | 19 | * @param tcpPort node TCP listen port |
20 | * @return the controller node | 20 | * @return the controller node |
21 | */ | 21 | */ |
22 | - DefaultControllerNode nodeDetected(NodeId nodeId, IpPrefix ip, int tcpPort); | 22 | + DefaultControllerNode nodeDetected(NodeId nodeId, IpAddress ip, |
23 | + int tcpPort); | ||
23 | 24 | ||
24 | /** | 25 | /** |
25 | * Notifies about cluster node going offline. | 26 | * Notifies about cluster node going offline. | ... | ... |
... | @@ -22,7 +22,7 @@ import org.onlab.onos.cluster.NodeId; | ... | @@ -22,7 +22,7 @@ import org.onlab.onos.cluster.NodeId; |
22 | import org.onlab.onos.store.hz.AbsentInvalidatingLoadingCache; | 22 | import org.onlab.onos.store.hz.AbsentInvalidatingLoadingCache; |
23 | import org.onlab.onos.store.hz.AbstractHazelcastStore; | 23 | import org.onlab.onos.store.hz.AbstractHazelcastStore; |
24 | import org.onlab.onos.store.hz.OptionalCacheLoader; | 24 | import org.onlab.onos.store.hz.OptionalCacheLoader; |
25 | -import org.onlab.packet.IpPrefix; | 25 | +import org.onlab.packet.IpAddress; |
26 | 26 | ||
27 | import java.util.Map; | 27 | import java.util.Map; |
28 | import java.util.Set; | 28 | import java.util.Set; |
... | @@ -105,7 +105,7 @@ public class DistributedClusterStore | ... | @@ -105,7 +105,7 @@ public class DistributedClusterStore |
105 | } | 105 | } |
106 | 106 | ||
107 | @Override | 107 | @Override |
108 | - public ControllerNode addNode(NodeId nodeId, IpPrefix ip, int tcpPort) { | 108 | + public ControllerNode addNode(NodeId nodeId, IpAddress ip, int tcpPort) { |
109 | return addNode(new DefaultControllerNode(nodeId, ip, tcpPort)); | 109 | return addNode(new DefaultControllerNode(nodeId, ip, tcpPort)); |
110 | } | 110 | } |
111 | 111 | ||
... | @@ -127,13 +127,13 @@ public class DistributedClusterStore | ... | @@ -127,13 +127,13 @@ public class DistributedClusterStore |
127 | 127 | ||
128 | // Creates a controller node descriptor from the Hazelcast member. | 128 | // Creates a controller node descriptor from the Hazelcast member. |
129 | private DefaultControllerNode node(Member member) { | 129 | private DefaultControllerNode node(Member member) { |
130 | - IpPrefix ip = memberAddress(member); | 130 | + IpAddress ip = memberAddress(member); |
131 | return new DefaultControllerNode(new NodeId(ip.toString()), ip); | 131 | return new DefaultControllerNode(new NodeId(ip.toString()), ip); |
132 | } | 132 | } |
133 | 133 | ||
134 | - private IpPrefix memberAddress(Member member) { | 134 | + private IpAddress memberAddress(Member member) { |
135 | byte[] address = member.getSocketAddress().getAddress().getAddress(); | 135 | byte[] address = member.getSocketAddress().getAddress().getAddress(); |
136 | - return IpPrefix.valueOf(address); | 136 | + return IpAddress.valueOf(address); |
137 | } | 137 | } |
138 | 138 | ||
139 | // Interceptor for membership events. | 139 | // Interceptor for membership events. | ... | ... |
... | @@ -8,7 +8,7 @@ import org.onlab.onos.cluster.DefaultControllerNode; | ... | @@ -8,7 +8,7 @@ import org.onlab.onos.cluster.DefaultControllerNode; |
8 | import org.onlab.onos.cluster.NodeId; | 8 | import org.onlab.onos.cluster.NodeId; |
9 | import org.onlab.onos.store.cluster.impl.ClusterNodesDelegate; | 9 | import org.onlab.onos.store.cluster.impl.ClusterNodesDelegate; |
10 | import org.onlab.netty.NettyMessagingService; | 10 | import org.onlab.netty.NettyMessagingService; |
11 | -import org.onlab.packet.IpPrefix; | 11 | +import org.onlab.packet.IpAddress; |
12 | 12 | ||
13 | import java.util.concurrent.CountDownLatch; | 13 | import java.util.concurrent.CountDownLatch; |
14 | import java.util.concurrent.TimeUnit; | 14 | import java.util.concurrent.TimeUnit; |
... | @@ -27,7 +27,7 @@ public class ClusterCommunicationManagerTest { | ... | @@ -27,7 +27,7 @@ public class ClusterCommunicationManagerTest { |
27 | private static final int P1 = 9881; | 27 | private static final int P1 = 9881; |
28 | private static final int P2 = 9882; | 28 | private static final int P2 = 9882; |
29 | 29 | ||
30 | - private static final IpPrefix IP = IpPrefix.valueOf("127.0.0.1"); | 30 | + private static final IpAddress IP = IpAddress.valueOf("127.0.0.1"); |
31 | 31 | ||
32 | private ClusterCommunicationManager ccm1; | 32 | private ClusterCommunicationManager ccm1; |
33 | private ClusterCommunicationManager ccm2; | 33 | private ClusterCommunicationManager ccm2; |
... | @@ -104,7 +104,7 @@ public class ClusterCommunicationManagerTest { | ... | @@ -104,7 +104,7 @@ public class ClusterCommunicationManagerTest { |
104 | NodeId nodeId; | 104 | NodeId nodeId; |
105 | 105 | ||
106 | @Override | 106 | @Override |
107 | - public DefaultControllerNode nodeDetected(NodeId nodeId, IpPrefix ip, int tcpPort) { | 107 | + public DefaultControllerNode nodeDetected(NodeId nodeId, IpAddress ip, int tcpPort) { |
108 | latch(nodeId, Op.DETECTED); | 108 | latch(nodeId, Op.DETECTED); |
109 | return new DefaultControllerNode(nodeId, ip, tcpPort); | 109 | return new DefaultControllerNode(nodeId, ip, tcpPort); |
110 | } | 110 | } | ... | ... |
... | @@ -55,7 +55,7 @@ import org.onlab.onos.store.cluster.messaging.ClusterMessage; | ... | @@ -55,7 +55,7 @@ import org.onlab.onos.store.cluster.messaging.ClusterMessage; |
55 | import org.onlab.onos.store.cluster.messaging.ClusterMessageHandler; | 55 | import org.onlab.onos.store.cluster.messaging.ClusterMessageHandler; |
56 | import org.onlab.onos.store.cluster.messaging.MessageSubject; | 56 | import org.onlab.onos.store.cluster.messaging.MessageSubject; |
57 | import org.onlab.packet.ChassisId; | 57 | import org.onlab.packet.ChassisId; |
58 | -import org.onlab.packet.IpPrefix; | 58 | +import org.onlab.packet.IpAddress; |
59 | 59 | ||
60 | import com.google.common.collect.Iterables; | 60 | import com.google.common.collect.Iterables; |
61 | import com.google.common.collect.Sets; | 61 | import com.google.common.collect.Sets; |
... | @@ -102,12 +102,12 @@ public class GossipDeviceStoreTest { | ... | @@ -102,12 +102,12 @@ public class GossipDeviceStoreTest { |
102 | // local node | 102 | // local node |
103 | private static final NodeId NID1 = new NodeId("local"); | 103 | private static final NodeId NID1 = new NodeId("local"); |
104 | private static final ControllerNode ONOS1 = | 104 | private static final ControllerNode ONOS1 = |
105 | - new DefaultControllerNode(NID1, IpPrefix.valueOf("127.0.0.1")); | 105 | + new DefaultControllerNode(NID1, IpAddress.valueOf("127.0.0.1")); |
106 | 106 | ||
107 | // remote node | 107 | // remote node |
108 | private static final NodeId NID2 = new NodeId("remote"); | 108 | private static final NodeId NID2 = new NodeId("remote"); |
109 | private static final ControllerNode ONOS2 = | 109 | private static final ControllerNode ONOS2 = |
110 | - new DefaultControllerNode(NID2, IpPrefix.valueOf("127.0.0.2")); | 110 | + new DefaultControllerNode(NID2, IpAddress.valueOf("127.0.0.2")); |
111 | private static final List<SparseAnnotations> NO_ANNOTATION = Collections.<SparseAnnotations>emptyList(); | 111 | private static final List<SparseAnnotations> NO_ANNOTATION = Collections.<SparseAnnotations>emptyList(); |
112 | 112 | ||
113 | 113 | ... | ... |
... | @@ -32,7 +32,7 @@ import org.onlab.onos.store.hz.StoreManager; | ... | @@ -32,7 +32,7 @@ import org.onlab.onos.store.hz.StoreManager; |
32 | import org.onlab.onos.store.hz.StoreService; | 32 | import org.onlab.onos.store.hz.StoreService; |
33 | import org.onlab.onos.store.hz.TestStoreManager; | 33 | import org.onlab.onos.store.hz.TestStoreManager; |
34 | import org.onlab.onos.store.serializers.KryoSerializer; | 34 | import org.onlab.onos.store.serializers.KryoSerializer; |
35 | -import org.onlab.packet.IpPrefix; | 35 | +import org.onlab.packet.IpAddress; |
36 | 36 | ||
37 | import com.google.common.collect.Sets; | 37 | import com.google.common.collect.Sets; |
38 | import com.hazelcast.config.Config; | 38 | import com.hazelcast.config.Config; |
... | @@ -47,7 +47,7 @@ public class DistributedMastershipStoreTest { | ... | @@ -47,7 +47,7 @@ public class DistributedMastershipStoreTest { |
47 | private static final DeviceId DID2 = DeviceId.deviceId("of:02"); | 47 | private static final DeviceId DID2 = DeviceId.deviceId("of:02"); |
48 | private static final DeviceId DID3 = DeviceId.deviceId("of:03"); | 48 | private static final DeviceId DID3 = DeviceId.deviceId("of:03"); |
49 | 49 | ||
50 | - private static final IpPrefix IP = IpPrefix.valueOf("127.0.0.1"); | 50 | + private static final IpAddress IP = IpAddress.valueOf("127.0.0.1"); |
51 | 51 | ||
52 | private static final NodeId N1 = new NodeId("node1"); | 52 | private static final NodeId N1 = new NodeId("node1"); |
53 | private static final NodeId N2 = new NodeId("node2"); | 53 | private static final NodeId N2 = new NodeId("node2"); | ... | ... |
... | @@ -12,7 +12,7 @@ import org.onlab.onos.cluster.ControllerNode; | ... | @@ -12,7 +12,7 @@ import org.onlab.onos.cluster.ControllerNode; |
12 | import org.onlab.onos.cluster.DefaultControllerNode; | 12 | import org.onlab.onos.cluster.DefaultControllerNode; |
13 | import org.onlab.onos.cluster.NodeId; | 13 | import org.onlab.onos.cluster.NodeId; |
14 | import org.onlab.onos.store.AbstractStore; | 14 | import org.onlab.onos.store.AbstractStore; |
15 | -import org.onlab.packet.IpPrefix; | 15 | +import org.onlab.packet.IpAddress; |
16 | import org.slf4j.Logger; | 16 | import org.slf4j.Logger; |
17 | 17 | ||
18 | import java.util.Set; | 18 | import java.util.Set; |
... | @@ -29,7 +29,7 @@ public class SimpleClusterStore | ... | @@ -29,7 +29,7 @@ public class SimpleClusterStore |
29 | extends AbstractStore<ClusterEvent, ClusterStoreDelegate> | 29 | extends AbstractStore<ClusterEvent, ClusterStoreDelegate> |
30 | implements ClusterStore { | 30 | implements ClusterStore { |
31 | 31 | ||
32 | - public static final IpPrefix LOCALHOST = IpPrefix.valueOf("127.0.0.1"); | 32 | + public static final IpAddress LOCALHOST = IpAddress.valueOf("127.0.0.1"); |
33 | 33 | ||
34 | private final Logger log = getLogger(getClass()); | 34 | private final Logger log = getLogger(getClass()); |
35 | 35 | ||
... | @@ -68,7 +68,7 @@ public class SimpleClusterStore | ... | @@ -68,7 +68,7 @@ public class SimpleClusterStore |
68 | } | 68 | } |
69 | 69 | ||
70 | @Override | 70 | @Override |
71 | - public ControllerNode addNode(NodeId nodeId, IpPrefix ip, int tcpPort) { | 71 | + public ControllerNode addNode(NodeId nodeId, IpAddress ip, int tcpPort) { |
72 | return null; | 72 | return null; |
73 | } | 73 | } |
74 | 74 | ... | ... |
... | @@ -26,7 +26,7 @@ import org.onlab.onos.mastership.MastershipTerm; | ... | @@ -26,7 +26,7 @@ import org.onlab.onos.mastership.MastershipTerm; |
26 | import org.onlab.onos.net.DeviceId; | 26 | import org.onlab.onos.net.DeviceId; |
27 | import org.onlab.onos.net.MastershipRole; | 27 | import org.onlab.onos.net.MastershipRole; |
28 | import org.onlab.onos.store.AbstractStore; | 28 | import org.onlab.onos.store.AbstractStore; |
29 | -import org.onlab.packet.IpPrefix; | 29 | +import org.onlab.packet.IpAddress; |
30 | import org.slf4j.Logger; | 30 | import org.slf4j.Logger; |
31 | 31 | ||
32 | import com.google.common.collect.Lists; | 32 | import com.google.common.collect.Lists; |
... | @@ -45,7 +45,7 @@ public class SimpleMastershipStore | ... | @@ -45,7 +45,7 @@ public class SimpleMastershipStore |
45 | 45 | ||
46 | private final Logger log = getLogger(getClass()); | 46 | private final Logger log = getLogger(getClass()); |
47 | 47 | ||
48 | - public static final IpPrefix LOCALHOST = IpPrefix.valueOf("127.0.0.1"); | 48 | + public static final IpAddress LOCALHOST = IpAddress.valueOf("127.0.0.1"); |
49 | 49 | ||
50 | private ControllerNode instance = | 50 | private ControllerNode instance = |
51 | new DefaultControllerNode(new NodeId("local"), LOCALHOST); | 51 | new DefaultControllerNode(new NodeId("local"), LOCALHOST); | ... | ... |
-
Please register or login to post a comment