321 Commits

Author SHA1 Message Date
Jonathan Hart
9965d77a8e Cleaned up some commented code, javadocs and names in SDN-IP.
No functional changes.

Change-Id: Ic4421428ec468049f1d93ac457c08103543d5140
2014-12-02 20:49:09 +00:00
Pavlin Radoslavov
248c2ae78a Updated SDN-IP to use the Intent framework batch-based intents.
Also, created a local cache of IPv4-to-MAC address mapping,
to avoid relatively costly hostService.getHostsByIp() calls
per added route.

Change-Id: I8abed378985708e883fd99e85c54b01f38756515
2014-12-02 09:51:25 -08:00
Madan Jampani
8d21c790ee LeadershipService API change: Using NodeId in place of ControllerNode.
Change-Id: I6f688506c3672977456fc6921b26e98be2239632
2014-12-02 04:55:15 +00:00
Pavlin Radoslavov
1c5e48b5c0 Removed bogus pom.xml.orig file that was merged by accident.
Change-Id: I15f548c6ee58500209dd4e876bb7a01c37ec6720
2014-12-01 02:48:25 +00:00
Jonathan Hart
949c28455e Added a trivial implementation of the LeadershipService.
Also renamed SdnIpLeadershipService to HazelcastLeadershipService, and moved
it into the distributed core bundle.

This allows applications which depend on LeadershipService to be used with
the trivial core.

Change-Id: Ie71a946d95653a4d2209afd3af0e7f23b5a4f818
2014-11-30 18:17:15 -08:00
Yuta HIGUCHI
c2bf3d8fb9 IntentManager: use IntentStore batch APIs
Change-Id: Ie60f3e53f48fa6acbcaf5cf6837bdef12b36a98d
2014-12-01 00:26:30 +00:00
Brian O'Connor
72a034c863 Initial implementation of distributed intent batch queue
Change-Id: I7ffed03651569ade1be1e8dca905bfaf369b7e03
2014-11-28 22:42:44 +00:00
Pavlin Radoslavov
deb8a1098d Fix for bug ONOS-330:
Add missing "null" checks for IntentService.getIntentState()

Change-Id: Idd574227636f6cdd3a0dbae4c753ada6157e04e1
2014-11-26 13:32:57 -08:00
Pavlin Radoslavov
caf6337c46 Updated some of the SDN-IP log messages inside the IntentSynchronizer.
Also, fixed a typo in file TestIntentServiceHelper.java

Change-Id: I0c0f7ad0f5e02f80465fb643184e20924fd49153
2014-11-26 11:59:11 -08:00
Yuta HIGUCHI
f845cc3740 Give a name to each ThreadPool
Change-Id: Iec2b044fca542672608fd67ff43680f0d34b9da2
2014-11-25 20:44:10 -08:00
Pavlin Radoslavov
c91eebe810 Added Hazelcast-based Leadership implementation that is needed/used by SDN-IP.
This is a drop-in replacement until the generic ONOS Leadership service
is robust enough.

Change-Id: I72a84331dd948f98707eb59844dab425aa9d5c08
2014-11-25 19:39:26 -08:00
Pavlin Radoslavov
20be3e6bdc Don't withdraw the intents during SDN-IP shutdown, because this creates
flux in the dataplane during switchover to another SDN-IP instance being
the new SDN-IP leader.

Change-Id: I93e271770001678c3438637d5a804d934cd83848
2014-11-25 18:52:08 -08:00
Pavlin Radoslavov
f1288b8217 Removed bogus debug message in SDN-IP.
Change-Id: I61c3c06256508772c3e78f4ce61d1483f56107ca
2014-11-24 22:09:24 -08:00
Pavlin Radoslavov
97e8a8bd55 Fix the SDN-IP unit tests after changing the Intent IDs to use
explicit ID assignment.

Change-Id: I50bc20188922193cfa47bf0ec324a69929744745
2014-11-25 06:05:29 +00:00
Brian O'Connor
520c052e36 Changing Intent Ids to use explicit id assignment
Change-Id: I5a4bff87842c37a869e7691b353529eaefc929db
2014-11-25 05:49:35 +00:00
Pavlin Radoslavov
93ae832fed Updated the debug log messages for SDN-IP IntentSynchronizer.
Change-Id: I74ababe18113489ad64a2ca4a63bc1c63211a3ee
2014-11-24 20:54:36 -08:00
Pavlin Radoslavov
dde22ae5f4 Updates related to SDN-IP submitting intent operations:
* Updated IntentSynchronizer.submitPeerIntents() to use intent batch
    operation

  * Refactored the SDN-IP unit tests:
    The verification for intent service operations is moved to a new class
    TestIntentServiceHeler

Change-Id: Id6766ebb4d6bf492e8f9787c2c2247ac38d42964
2014-11-24 13:33:04 -08:00
Pavlin Radoslavov
a7243cca5c Updates for SDN-IP:
* Use the new Leadership Service instead of Distributed Lock to
   elect the SDN-IP Leader
 * Reimplement the SDN-IP Intent Synchronizer. In the new implementation
   the Point-to-Point Peer intents are also synchronized by and pushed
   only by the Leader (same as the Multipoint-to-SinglePoint Route intents)
 * Minor cleanups

Change-Id: I8e142781211a1d0f2d362875bc28fd05d843cd4b
2014-11-23 15:17:45 -08:00
Madan Jampani
71582edbe7 1. DatabaseManager activate will attempt to listTables to ensure store is in good shape.
2. lock and tryLock can now throw InterruptedExceptions.

Change-Id: Ifa766ad441f677a4071b68d8f6caa564cf320869

Change-Id: I318ff762a96b261737831f6bd7c200b384c638e9

Change-Id: I0f509703520b3187931fa3669cd8213a91e85c96
2014-11-19 15:39:30 -08:00
Pavlin Radoslavov
8b75244c38 Added SDN-IP Leader election mechanism based on the Global Lock service.
NOTE: This is a short-term solution until the Leadership Service is
implemented.

Change-Id: Id1f21c06e67e08efb444ebec4e45eeca360e613d
2014-11-18 15:56:44 -08:00
Pavlin Radoslavov
a071b1e9a9 Moved the BGP Route Intent synchronization mechanism from the Router class
to the new class IntentSynchronizer.

Also, minor cleanup in some of the method names and access scope.

Change-Id: I38257cd1d9516ef3b3dd50f23c28015054c73d70
2014-11-17 15:47:00 -08:00
Thomas Vachuska
112c703dc5 Fixing javadocs and adding missing package javadocs.
Also marked a few packages and classes as deprecated.

Change-Id: I8629ad001f218f92c35721daa3b7c0ebe0916c27
2014-11-16 11:05:14 -08:00
Jonathan Hart
6ec682909c Rafactored PeerConnectivityManager for code reuse between the two path types.
Change-Id: Ib05f676d071ef1c545e93244a9ed5ed89672113f
2014-11-14 15:10:31 -08:00
Jonathan Hart
a42deeafc9 Fix for setting up peer paths where BGP speakers don't peer with all peers.
Returning prevents any further paths being set up, even though this isn't
an error condition.

Change-Id: I13eb4b3021c78f437dcfd2fa715bb4568e6046d1
2014-11-13 21:46:33 -08:00
Pavlin Radoslavov
7e19094616 Refactor the SDN-IP BGP code so the BGP routes are withdrawn if
the onos-app-sdnip feature is uninstalled.

Change-Id: I49c40ee172a06d5809da69f736648fa639745975
2014-11-13 21:39:34 -08:00
Jonathan Hart
2e3eef3e81 Compare ConnectPoints rather than Interfaces.
Now we can have multiple Interfaces per port, and the old code results in an
intent using the same port for ingress and egress.

Change-Id: I9f9ad396a0c6e7d31d654896f31c59a34240f82f
2014-11-12 13:49:02 -08:00
Pavlin Radoslavov
3066cf6c94 Removed leftover TODO comment, that was done in the past.
Change-Id: If4e89a19248a7915f11c408355bad9fc39442992
2014-11-12 10:38:30 -08:00
Pavlin Radoslavov
0a297b160b Cleanup in the SDN-IP related configuration files:
* The (deployed) Interface addresses configuration file "addresses.json"
   from the apps/config application is expected to be found in the
   /opt/onos/config directory

 * The (deployed) SDN-IP configuration file "sdnip.json" is expected
   to be found in the /opt/onos/config directory

 * All configuration files (i.e., addresses.json and sdnip.json) should
   be stored in the tools/package/config directory before deployment
   (i.e., before running onos-config)

 * Removed the apps/config/src/main/resources/config.json sample configuration
   file, because it was incorrect, and replaced it with "addresses.json"
   file in the same directory

 * Updated the text in files tools/package/config/README and
   apps/sdnip/src/main/resources/config-examples/README

 * Minor code cleanup in SdnIpConfigReader.java and NetworkConfigReader.java

Change-Id: I8af75e62a94e4fb701e2c6a09cde93cd8461e255
2014-11-11 16:11:41 -08:00
Jonathan Hart
857b9e005b Fix error in README
Change-Id: I08752eafa885eaef11a40d0357a22ac7370f7b68
2014-11-11 12:08:15 -08:00
Pavlin Radoslavov
49eb64d444 Added support for parsing and handling BGP Confederation related AS Path
attributes.
Note: BGP Confedertions are not supported (yet).

Also, updated/simplified the MED comparison in the BGP Path Comparison
implementation.

Change-Id: Iabe01facffd2c6912f33f647841c1244d85282f3
2014-11-10 17:14:57 -08:00
Pavlin Radoslavov
0c84da8299 Added SDN-IP CLI command to show the BGP neighbors:
onos:bgp-neighbors
OR
  onos:bgp-neighbors -n <NeighborID>
  onos:bgp-neighbors --neighbor <NeighborID>

Change-Id: I4e4185d9484384d9e3aa5304c897410b23a24238
2014-11-07 17:54:25 -08:00
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