* Added command options to show summary of the routes:
- "onos:routes -s" or "onos:routes --summary"
shows summary of the SDN-IP routes
- "onos:bgp-routes -s" or "onos:bgp-routes --summary"
shows summary of the BGP routes
* Implemented displaying JSON output for the "onos:routes" and
"onos:bgp-routes" commands (and the routes summary)
Also, added static methods BgpConstants.Update.AsPath.typeToString()
and BgpConstants.Update.Origin.typeToString() to return the
BGP AS_PATH type and BGP UPDATE ORIGIN type as a string.
Change-Id: I505c55a924721838bbbaf4ffccc30ffd61e90120
IpPrefix, because so far we haven't implemented IPv6.
Also, some of the BGP-related attributes (e.g., BGP Speaker ID)
are IPv4 by definition.
The following components are updated:
* BGP implementation
* Router component and relevant state (e.g., RouteEntry)
Other components (e.g., configuration) will continue to use
the more generic IpAddress and IpPrefix.
Change-Id: I1936ca9871fd5a9709cb4f2c2850d78ebc1472c4
- For some of the methods, the IP Version needs to be specified by the
caller. This applies to the IpPrefix API as well.
- For now, everywhere IpAddress is used and the IP version has to be
explicitly specified by the caller, we assume/specify IPv4.
- Added unit test for class IpAddress: for both IPv4 and IPv6 addresses.
* Now IpPrefix uses IpAddress to represent the subnet address
* The IpPrefix subnet address is masked-out by the prefix length.
E.g., IpPrefix("1.2.3.4/24") is now stored as IpPrefix("1.2.3.0/24")
* Removed IpPrefix methods that are not used or don't apply anymore
* Replaced usage of IpPrefix with IpAddress where appropriate
* Removed IpAddress.MAX_INET_MASK and use IpPrefix.MAX_INET_MASK_LENGTH
instead
* Renamed IpAddress.INET_LEN to INET_BYTE_LENGTH
* Added IpAddress.INET_BIT_LENGTH, INET6_BYTE_LENGTH, and INET6_BIT_LENGTH
* Removed methods that are semantically incorrect, or are not needed/used
- IpAddress.prefixLength()
- IpAddress.toPrefix()
- IpAddress.mask()
- IpAddress.netmask()
- IpAddress.network()
- IpAddress.host()
- IpAddress.isMasked()
- IpAddress.contains()
- IpPrefix constructor for version and bytes (but no netmask)
- IpPrefix.valueOf(int)
* Misc. other cleanup.
The current Router class does not check the Intent state.
So I did not add the state in this patch.
I will push another patch for testing the intent state.
Change-Id: Idb44dcace5f33a0144852a999445931bc2189448
and cleanup related code:
- Host.ipAddresses()
- DefaultHost.ipAddresses()
- HostDescription.ipAddress()
- DefaultHostDescription.ipAddress()
- HostService.getHostsByIp()
- HostManager.getHostsByIp()
- HostStore.getHosts()
- GossipHostStore.getHosts()
- SimpleHostStore.getHosts()
- ProxyArpService.known()
- ProxyArpManager.known()
As a result of the above cleanup, the "hosts" CLI command outputs
the IP addresses as "1.2.3.4" instead of "1.2.3.4/32".
Also, the following REST calls might be affected as well with
the above format replacement:
- REST POST: config/topology
- REST GET: topology/graph
* Updated classes PortAddresses (in core/api) and Interface (in sdnip)
to use class InterfaceIpAddress instead of IpPrefix
* Updated corresponding unit tests and relevant code
* Minor refactoring inside ProxyArpManager to simplify some of the
logic and usage related to PortAddresses. Also, renamed
method findOutsidePortInSubnet() to findPortInSubnet() and updated
its implementation to reflect better its usage.
* Moved unit test utilities to the onlab-junit package under utils/junit
- ImmutableClassChecker
- TestUtils and TestUtilsTest
* Added/ported unit test utilities from the older code
- UtilityClassChecker and UtilityClassCheckerTest
- ImmutableClassCheckerTest
* Updated/fixed some of the pom.xml files in the context of the
onlab-junit package:
- Added <scope>test</scope>
- Replaced hard-coded "1.0.0-SNAPSHOT" with "${project.version}"
Change-Id: Ie5f51ba401ca1748340f38848ab6bfc251964adc