Showing
3 changed files
with
9 additions
and
5 deletions
| ... | @@ -25,10 +25,10 @@ import org.slf4j.LoggerFactory; | ... | @@ -25,10 +25,10 @@ import org.slf4j.LoggerFactory; |
| 25 | /** | 25 | /** |
| 26 | * Manages the connectivity requirements between peers. | 26 | * Manages the connectivity requirements between peers. |
| 27 | */ | 27 | */ |
| 28 | -public class PeerConnectivity { | 28 | +public class PeerConnectivityManager { |
| 29 | 29 | ||
| 30 | private static final Logger log = LoggerFactory.getLogger( | 30 | private static final Logger log = LoggerFactory.getLogger( |
| 31 | - PeerConnectivity.class); | 31 | + PeerConnectivityManager.class); |
| 32 | 32 | ||
| 33 | // TODO these shouldn't be defined here | 33 | // TODO these shouldn't be defined here |
| 34 | private static final short BGP_PORT = 179; | 34 | private static final short BGP_PORT = 179; |
| ... | @@ -41,7 +41,7 @@ public class PeerConnectivity { | ... | @@ -41,7 +41,7 @@ public class PeerConnectivity { |
| 41 | // TODO this sucks. | 41 | // TODO this sucks. |
| 42 | private int intentId = 0; | 42 | private int intentId = 0; |
| 43 | 43 | ||
| 44 | - public PeerConnectivity(SdnIpConfigService configInfoService, | 44 | + public PeerConnectivityManager(SdnIpConfigService configInfoService, |
| 45 | InterfaceService interfaceService, IntentService intentService) { | 45 | InterfaceService interfaceService, IntentService intentService) { |
| 46 | this.configInfoService = configInfoService; | 46 | this.configInfoService = configInfoService; |
| 47 | this.interfaceService = interfaceService; | 47 | this.interfaceService = interfaceService; | ... | ... |
| ... | @@ -36,7 +36,7 @@ public class SdnIp implements SdnIpService { | ... | @@ -36,7 +36,7 @@ public class SdnIp implements SdnIpService { |
| 36 | protected HostService hostService; | 36 | protected HostService hostService; |
| 37 | 37 | ||
| 38 | private SdnIpConfigReader config; | 38 | private SdnIpConfigReader config; |
| 39 | - private PeerConnectivity peerConnectivity; | 39 | + private PeerConnectivityManager peerConnectivity; |
| 40 | private Router router; | 40 | private Router router; |
| 41 | private BgpSessionManager bgpSessionManager; | 41 | private BgpSessionManager bgpSessionManager; |
| 42 | 42 | ||
| ... | @@ -49,7 +49,7 @@ public class SdnIp implements SdnIpService { | ... | @@ -49,7 +49,7 @@ public class SdnIp implements SdnIpService { |
| 49 | 49 | ||
| 50 | InterfaceService interfaceService = new HostServiceBasedInterfaceService(hostService); | 50 | InterfaceService interfaceService = new HostServiceBasedInterfaceService(hostService); |
| 51 | 51 | ||
| 52 | - peerConnectivity = new PeerConnectivity(config, interfaceService, intentService); | 52 | + peerConnectivity = new PeerConnectivityManager(config, interfaceService, intentService); |
| 53 | peerConnectivity.start(); | 53 | peerConnectivity.start(); |
| 54 | 54 | ||
| 55 | router = new Router(intentService, hostService, config, interfaceService); | 55 | router = new Router(intentService, hostService, config, interfaceService); |
| ... | @@ -79,4 +79,8 @@ public class SdnIp implements SdnIpService { | ... | @@ -79,4 +79,8 @@ public class SdnIp implements SdnIpService { |
| 79 | public Collection<RouteEntry> getRoutes() { | 79 | public Collection<RouteEntry> getRoutes() { |
| 80 | return router.getRoutes(); | 80 | return router.getRoutes(); |
| 81 | } | 81 | } |
| 82 | + | ||
| 83 | + static String dpidToUri(String dpid) { | ||
| 84 | + return "of:" + dpid.replace(":", ""); | ||
| 85 | + } | ||
| 82 | } | 86 | } | ... | ... |
This diff is collapsed. Click to expand it.
-
Please register or login to post a comment