Package org.onosproject.routing
Class RouterInfo
- java.lang.Object
-
- org.onosproject.routing.RouterInfo
-
public class RouterInfo extends Object
Stores configuration information about a router.
-
-
Constructor Summary
Constructors Constructor Description RouterInfo(ConnectPoint controlPlaneConnectPoint, boolean ospfEnabled, Set<String> interfaces)Creates a new router info.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ConnectPointcontrolPlaneConnectPoint()Returns the control plane connect point.DeviceIddeviceId()Returns the router device ID.static RouterInfofrom(RoutersConfig.Router config)Creates a router info from a router config.Set<String>interfaces()Returns the set of interfaces belonging to the router.booleanospfEnabled()Returns whether OSPF is enabled on the router.
-
-
-
Constructor Detail
-
RouterInfo
public RouterInfo(ConnectPoint controlPlaneConnectPoint, boolean ospfEnabled, Set<String> interfaces)
Creates a new router info.- Parameters:
controlPlaneConnectPoint- control plane connect pointospfEnabled- whether OSPF is enabledinterfaces- set of interface names
-
-
Method Detail
-
controlPlaneConnectPoint
public ConnectPoint controlPlaneConnectPoint()
Returns the control plane connect point.- Returns:
- connect point
-
deviceId
public DeviceId deviceId()
Returns the router device ID.- Returns:
- device ID
-
ospfEnabled
public boolean ospfEnabled()
Returns whether OSPF is enabled on the router.- Returns:
- OSPF enabled
-
interfaces
public Set<String> interfaces()
Returns the set of interfaces belonging to the router.- Returns:
- set of interface names
-
from
public static RouterInfo from(RoutersConfig.Router config)
Creates a router info from a router config.- Parameters:
config- router config- Returns:
- new router info object
-
-