CORD-180 Changed the way how learnt hosts are suppressed in gerrit 9195
Change-Id: I086ba82147ef716c076cb6140b03da2886515c32
Showing
10 changed files
with
103 additions
and
77 deletions
... | @@ -5,7 +5,6 @@ COMPILE_DEPS = [ | ... | @@ -5,7 +5,6 @@ COMPILE_DEPS = [ |
5 | '//cli:onos-cli', | 5 | '//cli:onos-cli', |
6 | '//core/store/serializers:onos-core-serializers', | 6 | '//core/store/serializers:onos-core-serializers', |
7 | '//incubator/api:onos-incubator-api', | 7 | '//incubator/api:onos-incubator-api', |
8 | - '//providers/netcfghost:onos-providers-netcfghost', | ||
9 | '//utils/rest:onlab-rest', | 8 | '//utils/rest:onlab-rest', |
10 | ] | 9 | ] |
11 | 10 | ... | ... |
... | @@ -76,11 +76,6 @@ | ... | @@ -76,11 +76,6 @@ |
76 | <version>${project.version}</version> | 76 | <version>${project.version}</version> |
77 | </dependency> | 77 | </dependency> |
78 | <dependency> | 78 | <dependency> |
79 | - <groupId>org.onosproject</groupId> | ||
80 | - <artifactId>onos-netcfg-host-provider</artifactId> | ||
81 | - <version>${project.version}</version> | ||
82 | - </dependency> | ||
83 | - <dependency> | ||
84 | <groupId>javax.ws.rs</groupId> | 79 | <groupId>javax.ws.rs</groupId> |
85 | <artifactId>javax.ws.rs-api</artifactId> | 80 | <artifactId>javax.ws.rs-api</artifactId> |
86 | <version>2.0.1</version> | 81 | <version>2.0.1</version> | ... | ... |
... | @@ -38,7 +38,6 @@ import org.onosproject.net.flowobjective.ForwardingObjective; | ... | @@ -38,7 +38,6 @@ import org.onosproject.net.flowobjective.ForwardingObjective; |
38 | import org.onosproject.net.flowobjective.ObjectiveContext; | 38 | import org.onosproject.net.flowobjective.ObjectiveContext; |
39 | import org.onosproject.net.host.HostEvent; | 39 | import org.onosproject.net.host.HostEvent; |
40 | import org.onosproject.net.host.HostService; | 40 | import org.onosproject.net.host.HostService; |
41 | -import org.onosproject.provider.netcfghost.NetworkConfigHostProvider; | ||
42 | import org.onosproject.segmentrouting.config.SegmentRoutingAppConfig; | 41 | import org.onosproject.segmentrouting.config.SegmentRoutingAppConfig; |
43 | import org.slf4j.Logger; | 42 | import org.slf4j.Logger; |
44 | import org.slf4j.LoggerFactory; | 43 | import org.slf4j.LoggerFactory; |
... | @@ -351,16 +350,12 @@ public class HostHandler { | ... | @@ -351,16 +350,12 @@ public class HostHandler { |
351 | * @return true if segment routing accepts the host | 350 | * @return true if segment routing accepts the host |
352 | */ | 351 | */ |
353 | private boolean accepted(Host host) { | 352 | private boolean accepted(Host host) { |
354 | - // Always accept configured hosts | ||
355 | - if (host.providerId().equals(NetworkConfigHostProvider.PROVIDER_ID)) { | ||
356 | - return true; | ||
357 | - } | ||
358 | - | ||
359 | SegmentRoutingAppConfig appConfig = srManager.cfgService | 353 | SegmentRoutingAppConfig appConfig = srManager.cfgService |
360 | .getConfig(srManager.appId, SegmentRoutingAppConfig.class); | 354 | .getConfig(srManager.appId, SegmentRoutingAppConfig.class); |
361 | - boolean accepted = appConfig != null && | 355 | + |
362 | - appConfig.hostLearning() && | 356 | + boolean accepted = appConfig == null || |
363 | - !appConfig.suppressHost().contains(host.location()); | 357 | + (!appConfig.suppressHostByProvider().contains(host.providerId().id()) && |
358 | + !appConfig.suppressHostByPort().contains(host.location())); | ||
364 | if (!accepted) { | 359 | if (!accepted) { |
365 | log.info("Ignore suppressed host {}", host.id()); | 360 | log.info("Ignore suppressed host {}", host.id()); |
366 | } | 361 | } | ... | ... |
apps/segmentrouting/src/main/java/org/onosproject/segmentrouting/config/SegmentRoutingAppConfig.java
... | @@ -37,15 +37,17 @@ public class SegmentRoutingAppConfig extends Config<ApplicationId> { | ... | @@ -37,15 +37,17 @@ public class SegmentRoutingAppConfig extends Config<ApplicationId> { |
37 | private static final String VROUTER_MACS = "vRouterMacs"; | 37 | private static final String VROUTER_MACS = "vRouterMacs"; |
38 | private static final String VROUTER_ID = "vRouterId"; | 38 | private static final String VROUTER_ID = "vRouterId"; |
39 | private static final String SUPPRESS_SUBNET = "suppressSubnet"; | 39 | private static final String SUPPRESS_SUBNET = "suppressSubnet"; |
40 | - private static final String SUPPRESS_HOST = "suppressHost"; | 40 | + private static final String SUPPRESS_HOST_BY_PORT = "suppressHostByPort"; |
41 | - private static final String HOST_LEARNING = "hostLearning"; | 41 | + // TODO We might want to move SUPPRESS_HOST_BY_PROVIDER to Component Config |
42 | + private static final String SUPPRESS_HOST_BY_PROVIDER = "suppressHostByProvider"; | ||
42 | 43 | ||
43 | @Override | 44 | @Override |
44 | public boolean isValid() { | 45 | public boolean isValid() { |
45 | return hasOnlyFields(VROUTER_MACS, VROUTER_ID, SUPPRESS_SUBNET, | 46 | return hasOnlyFields(VROUTER_MACS, VROUTER_ID, SUPPRESS_SUBNET, |
46 | - SUPPRESS_HOST, HOST_LEARNING) && | 47 | + SUPPRESS_HOST_BY_PORT, SUPPRESS_HOST_BY_PROVIDER) && |
47 | vRouterMacs() != null && vRouterId() != null && | 48 | vRouterMacs() != null && vRouterId() != null && |
48 | - suppressSubnet() != null && suppressHost() != null; | 49 | + suppressSubnet() != null && suppressHostByPort() != null && |
50 | + suppressHostByProvider() != null; | ||
49 | } | 51 | } |
50 | 52 | ||
51 | /** | 53 | /** |
... | @@ -181,18 +183,18 @@ public class SegmentRoutingAppConfig extends Config<ApplicationId> { | ... | @@ -181,18 +183,18 @@ public class SegmentRoutingAppConfig extends Config<ApplicationId> { |
181 | } | 183 | } |
182 | 184 | ||
183 | /** | 185 | /** |
184 | - * Gets names of ports to which SegmentRouting does not push host rules. | 186 | + * Gets connect points to which SegmentRouting does not push host rules. |
185 | * | 187 | * |
186 | - * @return Set of port names, empty if not specified, or null | 188 | + * @return Set of connect points, empty if not specified, or null |
187 | * if not valid | 189 | * if not valid |
188 | */ | 190 | */ |
189 | - public Set<ConnectPoint> suppressHost() { | 191 | + public Set<ConnectPoint> suppressHostByPort() { |
190 | - if (!object.has(SUPPRESS_HOST)) { | 192 | + if (!object.has(SUPPRESS_HOST_BY_PORT)) { |
191 | return ImmutableSet.of(); | 193 | return ImmutableSet.of(); |
192 | } | 194 | } |
193 | 195 | ||
194 | ImmutableSet.Builder<ConnectPoint> builder = ImmutableSet.builder(); | 196 | ImmutableSet.Builder<ConnectPoint> builder = ImmutableSet.builder(); |
195 | - ArrayNode arrayNode = (ArrayNode) object.path(SUPPRESS_HOST); | 197 | + ArrayNode arrayNode = (ArrayNode) object.path(SUPPRESS_HOST_BY_PORT); |
196 | for (JsonNode jsonNode : arrayNode) { | 198 | for (JsonNode jsonNode : arrayNode) { |
197 | String portName = jsonNode.asText(null); | 199 | String portName = jsonNode.asText(null); |
198 | if (portName == null) { | 200 | if (portName == null) { |
... | @@ -208,42 +210,61 @@ public class SegmentRoutingAppConfig extends Config<ApplicationId> { | ... | @@ -208,42 +210,61 @@ public class SegmentRoutingAppConfig extends Config<ApplicationId> { |
208 | } | 210 | } |
209 | 211 | ||
210 | /** | 212 | /** |
211 | - * Sets names of ports to which SegmentRouting does not push host rules. | 213 | + * Sets connect points to which SegmentRouting does not push host rules. |
212 | * | 214 | * |
213 | - * @param suppressHost names of ports to which SegmentRouting does not push | 215 | + * @param connectPoints connect points to which SegmentRouting does not push |
214 | * host rules | 216 | * host rules |
215 | * @return this {@link SegmentRoutingAppConfig} | 217 | * @return this {@link SegmentRoutingAppConfig} |
216 | */ | 218 | */ |
217 | - public SegmentRoutingAppConfig setSuppressHost(Set<ConnectPoint> suppressHost) { | 219 | + public SegmentRoutingAppConfig setSuppressHostByPort(Set<ConnectPoint> connectPoints) { |
218 | - if (suppressHost == null) { | 220 | + if (connectPoints == null) { |
219 | - object.remove(SUPPRESS_HOST); | 221 | + object.remove(SUPPRESS_HOST_BY_PORT); |
220 | } else { | 222 | } else { |
221 | ArrayNode arrayNode = mapper.createArrayNode(); | 223 | ArrayNode arrayNode = mapper.createArrayNode(); |
222 | - suppressHost.forEach(connectPoint -> { | 224 | + connectPoints.forEach(connectPoint -> { |
223 | arrayNode.add(connectPoint.deviceId() + "/" + connectPoint.port()); | 225 | arrayNode.add(connectPoint.deviceId() + "/" + connectPoint.port()); |
224 | }); | 226 | }); |
225 | - object.set(SUPPRESS_HOST, arrayNode); | 227 | + object.set(SUPPRESS_HOST_BY_PORT, arrayNode); |
226 | } | 228 | } |
227 | return this; | 229 | return this; |
228 | } | 230 | } |
229 | 231 | ||
230 | /** | 232 | /** |
231 | - * Gets whether host learning is enabled or not. | 233 | + * Gets provider names from which SegmentRouting does not learn host info. |
232 | * | 234 | * |
233 | - * @return true if enabled. false if disabled or not configured | 235 | + * @return array of provider names that need to be ignored |
234 | */ | 236 | */ |
235 | - public boolean hostLearning() { | 237 | + public Set<String> suppressHostByProvider() { |
236 | - return object.has(HOST_LEARNING) && object.path(HOST_LEARNING).asBoolean(); | 238 | + if (!object.has(SUPPRESS_HOST_BY_PROVIDER)) { |
239 | + return ImmutableSet.of(); | ||
240 | + } | ||
241 | + | ||
242 | + ImmutableSet.Builder<String> builder = ImmutableSet.builder(); | ||
243 | + ArrayNode arrayNode = (ArrayNode) object.path(SUPPRESS_HOST_BY_PROVIDER); | ||
244 | + for (JsonNode jsonNode : arrayNode) { | ||
245 | + String providerName = jsonNode.asText(null); | ||
246 | + if (providerName == null) { | ||
247 | + return null; | ||
248 | + } | ||
249 | + builder.add(providerName); | ||
250 | + } | ||
251 | + return builder.build(); | ||
237 | } | 252 | } |
238 | 253 | ||
239 | /** | 254 | /** |
240 | - * Sets whether host learning is enabled or not. | 255 | + * Sets provider names from which SegmentRouting does not learn host info. |
241 | * | 256 | * |
242 | - * @param enabled true if enabled | 257 | + * @param providers set of provider names |
243 | * @return this {@link SegmentRoutingAppConfig} | 258 | * @return this {@link SegmentRoutingAppConfig} |
244 | */ | 259 | */ |
245 | - public SegmentRoutingAppConfig setHostLearning(boolean enabled) { | 260 | + public SegmentRoutingAppConfig setSuppressHostByProvider(Set<String> providers) { |
246 | - object.put(HOST_LEARNING, enabled); | 261 | + if (providers == null) { |
262 | + object.remove(SUPPRESS_HOST_BY_PROVIDER); | ||
263 | + } else { | ||
264 | + ArrayNode arrayNode = mapper.createArrayNode(); | ||
265 | + providers.forEach(arrayNode::add); | ||
266 | + object.set(SUPPRESS_HOST_BY_PROVIDER, arrayNode); | ||
267 | + } | ||
247 | return this; | 268 | return this; |
248 | } | 269 | } |
249 | 270 | ||
... | @@ -253,8 +274,8 @@ public class SegmentRoutingAppConfig extends Config<ApplicationId> { | ... | @@ -253,8 +274,8 @@ public class SegmentRoutingAppConfig extends Config<ApplicationId> { |
253 | .add("vRouterMacs", vRouterMacs()) | 274 | .add("vRouterMacs", vRouterMacs()) |
254 | .add("vRouterId", vRouterId()) | 275 | .add("vRouterId", vRouterId()) |
255 | .add("suppressSubnet", suppressSubnet()) | 276 | .add("suppressSubnet", suppressSubnet()) |
256 | - .add("suppressHost", suppressHost()) | 277 | + .add("suppressHostByPort", suppressHostByPort()) |
257 | - .add("hostLearning", hostLearning()) | 278 | + .add("suppressHostByProvider", suppressHostByProvider()) |
258 | .toString(); | 279 | .toString(); |
259 | } | 280 | } |
260 | } | 281 | } | ... | ... |
... | @@ -55,6 +55,9 @@ public class SegmentRoutingAppConfigTest { | ... | @@ -55,6 +55,9 @@ public class SegmentRoutingAppConfigTest { |
55 | private static final ConnectPoint PORT_3 = ConnectPoint.deviceConnectPoint("of:1/3"); | 55 | private static final ConnectPoint PORT_3 = ConnectPoint.deviceConnectPoint("of:1/3"); |
56 | private static final DeviceId VROUTER_ID_1 = DeviceId.deviceId("of:1"); | 56 | private static final DeviceId VROUTER_ID_1 = DeviceId.deviceId("of:1"); |
57 | private static final DeviceId VROUTER_ID_2 = DeviceId.deviceId("of:2"); | 57 | private static final DeviceId VROUTER_ID_2 = DeviceId.deviceId("of:2"); |
58 | + private static final String PROVIDER_1 = "org.onosproject.provider.host"; | ||
59 | + private static final String PROVIDER_2 = "org.onosproject.netcfghost"; | ||
60 | + private static final String PROVIDER_3 = "org.onosproject.anotherprovider"; | ||
58 | 61 | ||
59 | /** | 62 | /** |
60 | * Initialize test related variables. | 63 | * Initialize test related variables. |
... | @@ -180,55 +183,65 @@ public class SegmentRoutingAppConfigTest { | ... | @@ -180,55 +183,65 @@ public class SegmentRoutingAppConfigTest { |
180 | } | 183 | } |
181 | 184 | ||
182 | /** | 185 | /** |
183 | - * Tests suppressHost getter. | 186 | + * Tests suppressHostByPort getter. |
184 | * | 187 | * |
185 | * @throws Exception | 188 | * @throws Exception |
186 | */ | 189 | */ |
187 | @Test | 190 | @Test |
188 | - public void testSuppressHost() throws Exception { | 191 | + public void testSuppressHostByPort() throws Exception { |
189 | - Set<ConnectPoint> suppressHost = config.suppressHost(); | 192 | + Set<ConnectPoint> suppressHostByPort = config.suppressHostByPort(); |
190 | - assertNotNull("suppressHost should not be null", suppressHost); | 193 | + assertNotNull("suppressHostByPort should not be null", suppressHostByPort); |
191 | - assertThat(suppressHost.size(), is(2)); | 194 | + assertThat(suppressHostByPort.size(), is(2)); |
192 | - assertTrue(suppressHost.contains(PORT_1)); | 195 | + assertTrue(suppressHostByPort.contains(PORT_1)); |
193 | - assertTrue(suppressHost.contains(PORT_2)); | 196 | + assertTrue(suppressHostByPort.contains(PORT_2)); |
194 | } | 197 | } |
195 | 198 | ||
196 | /** | 199 | /** |
197 | - * Tests suppressHost setter. | 200 | + * Tests suppressHostByPort setter. |
198 | * | 201 | * |
199 | * @throws Exception | 202 | * @throws Exception |
200 | */ | 203 | */ |
201 | @Test | 204 | @Test |
202 | - public void testSetSuppressHost() throws Exception { | 205 | + public void testSetSuppressHostByPort() throws Exception { |
203 | ImmutableSet.Builder<ConnectPoint> builder = ImmutableSet.builder(); | 206 | ImmutableSet.Builder<ConnectPoint> builder = ImmutableSet.builder(); |
204 | builder.add(PORT_3); | 207 | builder.add(PORT_3); |
205 | - config.setSuppressHost(builder.build()); | 208 | + config.setSuppressHostByPort(builder.build()); |
206 | 209 | ||
207 | - Set<ConnectPoint> suppressHost = config.suppressHost(); | 210 | + Set<ConnectPoint> suppressHostByPort = config.suppressHostByPort(); |
208 | - assertNotNull("suppressHost should not be null", suppressHost); | 211 | + assertNotNull("suppressHostByPort should not be null", suppressHostByPort); |
209 | - assertThat(suppressHost.size(), is(1)); | 212 | + assertThat(suppressHostByPort.size(), is(1)); |
210 | - assertTrue(suppressHost.contains(PORT_3)); | 213 | + assertTrue(suppressHostByPort.contains(PORT_3)); |
211 | } | 214 | } |
212 | 215 | ||
213 | /** | 216 | /** |
214 | - * Tests hostLearning getter. | 217 | + * Tests suppressHostByProvider getter. |
215 | * | 218 | * |
216 | * @throws Exception | 219 | * @throws Exception |
217 | */ | 220 | */ |
218 | @Test | 221 | @Test |
219 | - public void testHostLearning() throws Exception { | 222 | + public void testSuppressHostByProvider() throws Exception { |
220 | - assertFalse(config.hostLearning()); | 223 | + Set<String> supprsuppressHostByProvider = config.suppressHostByProvider(); |
224 | + assertNotNull("suppressHostByProvider should not be null", supprsuppressHostByProvider); | ||
225 | + assertThat(supprsuppressHostByProvider.size(), is(2)); | ||
226 | + assertTrue(supprsuppressHostByProvider.contains(PROVIDER_1)); | ||
227 | + assertTrue(supprsuppressHostByProvider.contains(PROVIDER_2)); | ||
221 | } | 228 | } |
222 | 229 | ||
223 | /** | 230 | /** |
224 | - * Tests hostLearning setter. | 231 | + * Tests suppressHostByProvider setter. |
225 | * | 232 | * |
226 | * @throws Exception | 233 | * @throws Exception |
227 | */ | 234 | */ |
228 | @Test | 235 | @Test |
229 | public void testSetHostLearning() throws Exception { | 236 | public void testSetHostLearning() throws Exception { |
230 | - config.setHostLearning(true); | 237 | + ImmutableSet.Builder<String> builder = ImmutableSet.builder(); |
231 | - assertTrue(config.hostLearning()); | 238 | + builder.add(PROVIDER_3); |
239 | + config.setSuppressHostByProvider(builder.build()); | ||
240 | + | ||
241 | + Set<String> supprsuppressHostByProvider = config.suppressHostByProvider(); | ||
242 | + assertNotNull("suppressHostByProvider should not be null", supprsuppressHostByProvider); | ||
243 | + assertThat(supprsuppressHostByProvider.size(), is(1)); | ||
244 | + assertTrue(supprsuppressHostByProvider.contains(PROVIDER_3)); | ||
232 | } | 245 | } |
233 | 246 | ||
234 | private class MockDelegate implements ConfigApplyDelegate { | 247 | private class MockDelegate implements ConfigApplyDelegate { | ... | ... |
... | @@ -8,9 +8,12 @@ | ... | @@ -8,9 +8,12 @@ |
8 | "of:1/1", | 8 | "of:1/1", |
9 | "of:1/2" | 9 | "of:1/2" |
10 | ], | 10 | ], |
11 | - "suppressHost" : [ | 11 | + "suppressHostByPort" : [ |
12 | "of:1/1", | 12 | "of:1/1", |
13 | "of:1/2" | 13 | "of:1/2" |
14 | ], | 14 | ], |
15 | - "hostLearning" : false | 15 | + "suppressHostByProvider" : [ |
16 | + "org.onosproject.provider.host", | ||
17 | + "org.onosproject.netcfghost" | ||
18 | + ] | ||
16 | } | 19 | } | ... | ... |
... | @@ -61,7 +61,7 @@ public class NetworkConfigHostProvider extends AbstractProvider implements HostP | ... | @@ -61,7 +61,7 @@ public class NetworkConfigHostProvider extends AbstractProvider implements HostP |
61 | 61 | ||
62 | private ApplicationId appId; | 62 | private ApplicationId appId; |
63 | private static final String APP_NAME = "org.onosproject.netcfghost"; | 63 | private static final String APP_NAME = "org.onosproject.netcfghost"; |
64 | - public static final ProviderId PROVIDER_ID = new ProviderId("host", APP_NAME); | 64 | + private static final ProviderId PROVIDER_ID = new ProviderId("host", APP_NAME); |
65 | protected HostProviderService providerService; | 65 | protected HostProviderService providerService; |
66 | 66 | ||
67 | private final Logger log = LoggerFactory.getLogger(getClass()); | 67 | private final Logger log = LoggerFactory.getLogger(getClass()); |
... | @@ -95,7 +95,7 @@ public class NetworkConfigHostProvider extends AbstractProvider implements HostP | ... | @@ -95,7 +95,7 @@ public class NetworkConfigHostProvider extends AbstractProvider implements HostP |
95 | @Override | 95 | @Override |
96 | public void triggerProbe(Host host) { | 96 | public void triggerProbe(Host host) { |
97 | /* | 97 | /* |
98 | - * Note: In CORD deployment, we assume that all hosts are configured. | 98 | + * Note: All hosts are configured in network config host provider. |
99 | * Therefore no probe is required. | 99 | * Therefore no probe is required. |
100 | */ | 100 | */ |
101 | } | 101 | } | ... | ... |
... | @@ -15,7 +15,6 @@ | ... | @@ -15,7 +15,6 @@ |
15 | p.p6 {margin: 0.0px 0.0px 0.0px 0.0px; line-height: 14.0px; font: 12.0px Menlo; color: #ff2600; -webkit-text-stroke: #ff2600} | 15 | p.p6 {margin: 0.0px 0.0px 0.0px 0.0px; line-height: 14.0px; font: 12.0px Menlo; color: #ff2600; -webkit-text-stroke: #ff2600} |
16 | p.p7 {margin: 0.0px 0.0px 0.0px 0.0px; line-height: 14.0px; font: 12.0px Menlo; color: #000000; -webkit-text-stroke: #000000} | 16 | p.p7 {margin: 0.0px 0.0px 0.0px 0.0px; line-height: 14.0px; font: 12.0px Menlo; color: #000000; -webkit-text-stroke: #000000} |
17 | p.p8 {margin: 0.0px 0.0px 0.0px 0.0px; line-height: 14.0px; font: 12.0px Menlo; color: #00c7fc; -webkit-text-stroke: #000000} | 17 | p.p8 {margin: 0.0px 0.0px 0.0px 0.0px; line-height: 14.0px; font: 12.0px Menlo; color: #00c7fc; -webkit-text-stroke: #000000} |
18 | - p.p9 {margin: 0.0px 0.0px 0.0px 0.0px; line-height: 14.0px; font: 12.0px Menlo; color: #78ba5b; -webkit-text-stroke: #353535} | ||
19 | span.s1 {font-kerning: none} | 18 | span.s1 {font-kerning: none} |
20 | span.s2 {font-kerning: none; color: #0433ff; -webkit-text-stroke: 0px #0433ff} | 19 | span.s2 {font-kerning: none; color: #0433ff; -webkit-text-stroke: 0px #0433ff} |
21 | span.s3 {font-kerning: none; color: #000000; -webkit-text-stroke: 0px #000000} | 20 | span.s3 {font-kerning: none; color: #000000; -webkit-text-stroke: 0px #000000} |
... | @@ -25,8 +24,7 @@ | ... | @@ -25,8 +24,7 @@ |
25 | span.s7 {font-kerning: none; color: #ff40ff; -webkit-text-stroke: 0px #ff40ff} | 24 | span.s7 {font-kerning: none; color: #ff40ff; -webkit-text-stroke: 0px #ff40ff} |
26 | span.s8 {font-kerning: none; color: #ff2600; -webkit-text-stroke: 0px #ff2600} | 25 | span.s8 {font-kerning: none; color: #ff2600; -webkit-text-stroke: 0px #ff2600} |
27 | span.s9 {font-kerning: none; color: #000000} | 26 | span.s9 {font-kerning: none; color: #000000} |
28 | - span.s10 {font-kerning: none; -webkit-text-stroke: 0px #000000} | 27 | + span.s10 {font-kerning: none; color: #669c35; -webkit-text-stroke: 0px #669c35} |
29 | - span.s11 {font-kerning: none; color: #669c35; -webkit-text-stroke: 0px #669c35} | ||
30 | span.Apple-tab-span {white-space:pre} | 28 | span.Apple-tab-span {white-space:pre} |
31 | </style> | 29 | </style> |
32 | </head> | 30 | </head> |
... | @@ -227,9 +225,10 @@ | ... | @@ -227,9 +225,10 @@ |
227 | <p class="p4"><span class="s3"><span class="Apple-converted-space"> </span>"suppressSubnet" : [ </span><span class="s1">// Do not push subnet rules for these ports</span></p> | 225 | <p class="p4"><span class="s3"><span class="Apple-converted-space"> </span>"suppressSubnet" : [ </span><span class="s1">// Do not push subnet rules for these ports</span></p> |
228 | <p class="p7"><span class="s1"><span class="Apple-converted-space"> </span>"of:0000000000000002/31", "of:0000000000000002/32"</span></p> | 226 | <p class="p7"><span class="s1"><span class="Apple-converted-space"> </span>"of:0000000000000002/31", "of:0000000000000002/32"</span></p> |
229 | <p class="p7"><span class="s1"><span class="Apple-converted-space"> </span>],</span></p> | 227 | <p class="p7"><span class="s1"><span class="Apple-converted-space"> </span>],</span></p> |
230 | -<p class="p9"><span class="s3"><span class="Apple-converted-space"> </span>"hostLearning" : true, </span><span class="s10">// </span><span class="s1">Host learning is enabled if true. Host learning is disabled if false or the config is not provided</span></p> | 228 | +<p class="p4"><span class="s3"><span class="Apple-converted-space"> </span>"suppressHostByProvider" : [ </span><span class="s1">// Hosts come from these providers will be ignored.</span></p> |
231 | -<p class="p4"><span class="s3"><span class="Apple-converted-space"> </span>"suppressHost" : [ </span><span class="s1">// Hosts on these ports will be ignored. Only takes effect when hostLearning is enabled</span></p> | 229 | +<p class="p7"><span class="s1"><span class="Apple-converted-space"> </span>"org.onosproject.provider.host"</span></p> |
232 | -<p class="p7"><span class="s1"><span class="Apple-converted-space"> </span>"of:0000000000000001/65", "of:0000000000000001/73",</span></p> | 230 | +<p class="p7"><span class="s1"><span class="Apple-converted-space"> </span>],</span></p> |
231 | +<p class="p7"><span class="s1"><span class="Apple-converted-space"> </span>"suppressHostByPort" : [ </span><span class="s5">// Hosts on these ports will be ignored.</span></p> | ||
233 | <p class="p7"><span class="s1"><span class="Apple-converted-space"> </span>"of:0000000000000002/31", "of:0000000000000002/32"</span></p> | 232 | <p class="p7"><span class="s1"><span class="Apple-converted-space"> </span>"of:0000000000000002/31", "of:0000000000000002/32"</span></p> |
234 | <p class="p7"><span class="s1"><span class="Apple-converted-space"> </span>]</span></p> | 233 | <p class="p7"><span class="s1"><span class="Apple-converted-space"> </span>]</span></p> |
235 | <p class="p7"><span class="s1"><span class="Apple-converted-space"> </span>}</span></p> | 234 | <p class="p7"><span class="s1"><span class="Apple-converted-space"> </span>}</span></p> |
... | @@ -239,7 +238,7 @@ | ... | @@ -239,7 +238,7 @@ |
239 | <p class="p7"><span class="s1"><span class="Apple-converted-space"> </span>"controlPlaneConnectPoint" : "of:0000000000000002/31", </span><span class="s5">// location of Quagga</span></p> | 238 | <p class="p7"><span class="s1"><span class="Apple-converted-space"> </span>"controlPlaneConnectPoint" : "of:0000000000000002/31", </span><span class="s5">// location of Quagga</span></p> |
240 | <p class="p7"><span class="s1"><span class="Apple-converted-space"> </span>"ospfEnabled" : "true", </span><span class="s5">// enable OSPF</span></p> | 239 | <p class="p7"><span class="s1"><span class="Apple-converted-space"> </span>"ospfEnabled" : "true", </span><span class="s5">// enable OSPF</span></p> |
241 | <p class="p7"><span class="s1"><span class="Apple-converted-space"> </span>"pimEnabled" : "true", </span><span class="s6">// enable PIM</span></p> | 240 | <p class="p7"><span class="s1"><span class="Apple-converted-space"> </span>"pimEnabled" : "true", </span><span class="s6">// enable PIM</span></p> |
242 | -<p class="p7"><span class="s1"><span class="Apple-converted-space"> </span>"interfaces" : [ "external-quagga" ] </span><span class="s11">// </span><span class="s5">VR only handles peers on these ports</span></p> | 241 | +<p class="p7"><span class="s1"><span class="Apple-converted-space"> </span>"interfaces" : [ "external-quagga" ] </span><span class="s10">// </span><span class="s5">VR only handles peers on these ports</span></p> |
243 | <p class="p7"><span class="s1"><span class="Apple-converted-space"> </span>}</span></p> | 242 | <p class="p7"><span class="s1"><span class="Apple-converted-space"> </span>}</span></p> |
244 | <p class="p7"><span class="s1"><span class="Apple-converted-space"> </span>}</span></p> | 243 | <p class="p7"><span class="s1"><span class="Apple-converted-space"> </span>}</span></p> |
245 | <p class="p7"><span class="s1"><span class="Apple-converted-space"> </span>}</span></p> | 244 | <p class="p7"><span class="s1"><span class="Apple-converted-space"> </span>}</span></p> | ... | ... |
... | @@ -234,9 +234,10 @@ | ... | @@ -234,9 +234,10 @@ |
234 | "suppressSubnet" : [ | 234 | "suppressSubnet" : [ |
235 | "of:0000000000000002/31", "of:0000000000000002/32" | 235 | "of:0000000000000002/31", "of:0000000000000002/32" |
236 | ], | 236 | ], |
237 | - "hostLearning" : true, | 237 | + "suppressHostByProvider" : [ |
238 | - "suppressHost" : [ | 238 | + "org.onosproject.provider.host" |
239 | - "of:0000000000000001/65", "of:0000000000000001/73", | 239 | + ], |
240 | + "suppressHostByPort" : [ | ||
240 | "of:0000000000000002/31", "of:0000000000000002/32" | 241 | "of:0000000000000002/31", "of:0000000000000002/32" |
241 | ] | 242 | ] |
242 | } | 243 | } | ... | ... |
-
Please register or login to post a comment