Committed by
Gerrit Code Review
ONOS-2846, ONOS-2812 Reworking link discovery provider to be fully configurable …
…and to prune links based on links rather than based on ports. Change-Id: I0a042403baf163bebd471bffd112b28571dae75b
Showing
4 changed files
with
68 additions
and
1 deletions
| 1 | +/* | ||
| 2 | + * Copyright 2015 Open Networking Laboratory | ||
| 3 | + * | ||
| 4 | + * Licensed under the Apache License, Version 2.0 (the "License"); | ||
| 5 | + * you may not use this file except in compliance with the License. | ||
| 6 | + * You may obtain a copy of the License at | ||
| 7 | + * | ||
| 8 | + * http://www.apache.org/licenses/LICENSE-2.0 | ||
| 9 | + * | ||
| 10 | + * Unless required by applicable law or agreed to in writing, software | ||
| 11 | + * distributed under the License is distributed on an "AS IS" BASIS, | ||
| 12 | + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| 13 | + * See the License for the specific language governing permissions and | ||
| 14 | + * limitations under the License. | ||
| 15 | + */ | ||
| 16 | +package org.onosproject.provider.lldp.impl; | ||
| 17 | + | ||
| 18 | +import org.onosproject.mastership.MastershipService; | ||
| 19 | +import org.onosproject.net.link.LinkProviderService; | ||
| 20 | +import org.onosproject.net.packet.PacketService; | ||
| 21 | + | ||
| 22 | +/** | ||
| 23 | + * Shared context for use by link discovery. | ||
| 24 | + */ | ||
| 25 | +public interface DiscoveryContext { | ||
| 26 | + | ||
| 27 | + /** | ||
| 28 | + * Returns the shared mastership service reference. | ||
| 29 | + * | ||
| 30 | + * @return mastership service | ||
| 31 | + */ | ||
| 32 | + MastershipService mastershipService(); | ||
| 33 | + | ||
| 34 | + /** | ||
| 35 | + * Returns the shared link provider service reference. | ||
| 36 | + * | ||
| 37 | + * @return link provider service | ||
| 38 | + */ | ||
| 39 | + LinkProviderService providerService(); | ||
| 40 | + | ||
| 41 | + /** | ||
| 42 | + * Returns the shared packet service reference. | ||
| 43 | + * | ||
| 44 | + * @return packet service | ||
| 45 | + */ | ||
| 46 | + PacketService packetService(); | ||
| 47 | + | ||
| 48 | + /** | ||
| 49 | + * Returns the probe rate in millis. | ||
| 50 | + * | ||
| 51 | + * @return probe rate | ||
| 52 | + */ | ||
| 53 | + long probeRate(); | ||
| 54 | + | ||
| 55 | + /** | ||
| 56 | + * Returns the max stale link age in millis. | ||
| 57 | + * | ||
| 58 | + * @return stale link age | ||
| 59 | + */ | ||
| 60 | + long staleLinkAge(); | ||
| 61 | + | ||
| 62 | + /** | ||
| 63 | + * Indicates whether to emit BDDP. | ||
| 64 | + * | ||
| 65 | + * @return true to emit BDDP | ||
| 66 | + */ | ||
| 67 | + boolean useBDDP(); | ||
| 68 | +} |
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
| ... | @@ -108,7 +108,6 @@ public class LLDPLinkProviderTest { | ... | @@ -108,7 +108,6 @@ public class LLDPLinkProviderTest { |
| 108 | provider.providerRegistry = linkService; | 108 | provider.providerRegistry = linkService; |
| 109 | provider.masterService = masterService; | 109 | provider.masterService = masterService; |
| 110 | 110 | ||
| 111 | - | ||
| 112 | provider.activate(null); | 111 | provider.activate(null); |
| 113 | } | 112 | } |
| 114 | 113 | ... | ... |
-
Please register or login to post a comment