40 Commits

Author SHA1 Message Date
Pavlin Radoslavov
e6015265a2 Updated/fixed the SDN-IP BGP unit tests after some of the BGP-related
code whas changed.

Change-Id: Ie36ad03e3ae7544e7883e2b2aca4c94537750321
2014-11-07 13:08:53 -08:00
Pavlin Radoslavov
2ce1c52b42 Updates to the SDN-IP CLI:
* 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
2014-11-07 10:32:37 -08:00
Pavlin Radoslavov
6b570737c4 Updated SDN-IP to use Ip4Address and Ip4Prefix instead of IpAddress and
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
2014-11-06 13:16:45 -08:00
Pingping
32fa30cce1 port SdnIpTest.java to onos-next
Change-Id: Iec9de810b168e3fbc8f1aa447778d3883fba03a1
2014-11-05 10:43:38 -08:00
Jonathan Hart
739c835e55 Cleaned up SDN-IP config reader
Change-Id: I98100a77b7460eeba848c2b7016f51cdcfef072a
2014-11-04 18:53:45 -08:00
Jonathan Hart
a887ba8ae0 Refactored the HostStore to allow multiple MAC addresses bound to a single port
Change-Id: Icd3b2e483b15486251ac1cca107478a012d1a3e7
2014-11-03 17:14:10 -08:00
Pavlin Radoslavov
d0e32d7486 Added support for IPv6 addresses to class IpAddress:
- 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.
2014-10-31 18:11:43 -07:00
Pavlin Radoslavov
211f4e562c Removed extra IpAddress.toInt() calls, which are not needed.
Change-Id: Ic295d0e4ca963b15eb4ebf905d6360e457832c8f
2014-10-31 11:59:43 -07:00
Thomas Vachuska
4b42077418 Cleaned up a slew of Javadoc errors in preparation for switch over to Java 8. 2014-10-30 16:46:17 -07:00
Pavlin Radoslavov
855ea2d5b9 Refactor the IpPrefix API and implementation:
* 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
2014-10-30 15:32:39 -07:00
Pavlin Radoslavov
52307e60ba IpAddress and IpPrefix related cleanup:
* 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.
2014-10-29 15:07:37 -07:00
Jonathan Hart
ec2df013ed Fixed a few intent synchronization issues.
Also added a CLI command to test SDN-IP primary switchover.

Change-Id: Id31f79262a2b607f987adad2fdb3eb54eb939fea
2014-10-29 09:39:35 -07:00
Pingping
f5d90939a7 IntentSync test without state
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
2014-10-28 14:05:17 -07:00
Thomas Vachuska
4f1a60c9fd Revised copyright message. 2014-10-28 13:39:11 -07:00
Thomas Vachuska
e0f804aa3f Added application ID store; both trivial and distributed variants. 2014-10-27 23:40:48 -07:00
Pavlin Radoslavov
33f228af5a Replaced IpPrefix and IpAddress in the following methods
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
2014-10-27 19:33:16 -07:00
Pingping
fc58467f16 Unit test to Router class with Async ARP
Change-Id: I3797433ae5dcce06425159887e42ee75bcf621e4
2014-10-27 17:20:52 -07:00
Pavlin Radoslavov
76b0ae2789 Work toward common IP address classes.
* 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.
2014-10-27 15:33:19 -07:00
Thomas Vachuska
781d18bfa1 Added copyrights to cli, features, openflow, providers and web code 2014-10-27 10:31:25 -07:00
Pavlin Radoslavov
d26f57a8e6 Refactoring in the unit test utility framework:
* 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
2014-10-23 17:58:36 -07:00
Jonathan Hart
31582d1b39 Cleanup and javadocs for SDN-IP code
plus refactor a unit test that started failing

Change-Id: Ib9f0f8eefc2ba7a9798d8f01b537dae18dd2920c
2014-10-23 16:44:04 -07:00
Jonathan Hart
b358c1ec9a Updated example SDN-IP config files
Change-Id: I49b4a11b1ececddaf88f08dd8f1e97a42f274b8a
2014-10-23 11:05:17 -07:00
Pingping
3855f31f9e add unit test to Router class
Change-Id: I26d129fdae3b247e7f3976b7fbe953bef47cd4fd
2014-10-23 08:16:15 -07:00
Jonathan Hart
4c2b15e265 Implemented getMatchingInterface and added unit tests for
HostToInterfaceAdaptor.

Change-Id: Ibb56902e13f26dbd619d1ef87e283e8e4c5317db
2014-10-22 14:47:07 -07:00
Thomas Vachuska
b97cf28766 Refactoring intent API. 2014-10-21 00:21:24 -07:00
Jonathan Hart
bc3f7f7130 Remove test route from SDN-IP
Change-Id: I767cc9829438e56da945ab35def86a3f7b9b244d
2014-10-20 18:50:17 -07:00
Jonathan Hart
d7bd98290c Moved SDN-IP and config to fasterxml jackson package
Change-Id: I5a5319188bb54738238787b58a7854e8b5564c9a
2014-10-20 18:26:13 -07:00
Jonathan Hart
d0caacd397 Added example config files for SDN-IP
Change-Id: Ia40bea166c147e95c2d9f5dbe13c6ccbd622de3d
2014-10-20 17:56:35 -07:00
Jonathan Hart
ce37f6d66d Renamed a class to better name 2014-10-20 10:25:03 -07:00
Jonathan Hart
0e12fadd5b Fixed issues with reading masked IP addresses from Loxi 2014-10-17 14:55:13 -07:00
Jonathan Hart
ce430a4815 Ported the unit tests for PeerConnectivityManager 2014-10-16 20:48:52 -07:00
Jonathan Hart
0b04bed213 Implemented CLI commands to show SDN-IP routes 2014-10-16 16:40:12 -07:00
Jonathan Hart
20d8e5140b Ported BGP tests from old codebase 2014-10-16 11:44:57 -07:00
Jonathan Hart
bcae7bdf0e Removed faulty toInt method and renamed toRealInt to toInt. 2014-10-16 10:26:54 -07:00
Jonathan Hart
ab63aacae2 Port the BGP implementation of SDN-IP. 2014-10-16 09:51:38 -07:00
Jonathan Hart
335ef46cc1 Port the Router functionality from SDN-IP.
As part of this we added an onlab-thirdparty artifact which allows us to
bring in dependencies that aren't bundles.
2014-10-16 08:26:31 -07:00
Jonathan Hart
5e0aac0685 Cleanup some commented out code from PeerConnectivity 2014-10-15 11:43:45 -07:00
Jonathan Hart
dc711bd59d Ported PeerConnectivity onto ONOS next, and implemented a service that can
construct Interface objects based on PortAddresses from HostService.
2014-10-15 11:27:04 -07:00
Jonathan Hart
bac07a0f11 Ported the configuration reader for the SDN-IP specific configuration 2014-10-13 21:30:07 -07:00
Jonathan Hart
039d2b1dcb Added SDN-IP app 2014-10-10 09:33:04 -07:00