391 Commits

Author SHA1 Message Date
Sho SHIMIZU
f57a73916e Remove final modifier from static methods
Change-Id: I93dd84874f46114011840ef840315a0d27c221ac
2014-11-26 00:44:38 +00:00
Ray Milkey
37f6a381e1 Unit test refactoring
- removed tests no longer useful now that all Intent objects are unique
- fixed intent object equality tests
- enabled several immutable base class tests
- renamed several Test....java classes to ...Test.Java to
  match project best practices

Change-Id: Ic829d6d39556d2f63323f5e82f3807dba86c62ec
2014-11-25 23:19:34 +00:00
Yuta HIGUCHI
0658627cc1 Run Anti-Entropy in background
Change-Id: I233185d15f52359899427e214339be44cb62971c
2014-11-25 14:27:27 -08:00
Yuta HIGUCHI
a22f69f28a Slice out MetricsHelper/Util
Change-Id: Ic6848f47d38550b78ebd6cdcf414305e54408882
2014-11-25 06:49:43 +00:00
Yuta HIGUCHI
6a46283219 metrics command to dump all the Metric in the system.
- Add probe to measure the time spent querying for Mastership.

Change-Id: I48fe37568a3261ee5b6229a3884e42a3a741b407
2014-11-24 08:32:19 -08:00
Yuta HIGUCHI
91768e30e5 Kryo related fixes
- KryoNamespace to allow control over registration id

Change-Id: Idc2a0e27a09916657c725ee97e4366109144cc66
2014-11-22 19:35:28 -08:00
Brian O'Connor
8576c2af7d change MAC address hash to reduce collisions
Change-Id: I0ec7b53edcfce27508b0ea862da63597aa0ad3fd
2014-11-19 17:03:03 -08:00
Yuta HIGUCHI
75fb1f4a75 Slice out byte[] printer
Change-Id: I095575df5f03057c386be77328897be59c96eaf9
2014-11-19 14:15:17 -08:00
Ray Milkey
705d9bc78d Last two high priority findbugs errors
Change-Id: I180d9156b49c79980f2b2361ec062e5c1cda64a8
2014-11-18 09:26:30 -08:00
Ray Milkey
241b96accd Fix high priority findbugs reported issues
Fixed some code that was reporting findbugs errors

Implemented a suppression mechanism for findbugs
reported errors and a suppression file.

Change-Id: Ie8a2e84cc57ec6ddfa14d782ee89feb095b9dd59
2014-11-17 16:38:30 -08:00
Praseed Balakrishnan
8c67d17142 MPLS label selector and treatment
Change-Id: Id1fba1e04155e6d97de4c8fd95573641537f1b7a
2014-11-15 10:42:36 -08:00
Yuta HIGUCHI
6b38ee3533 Minor fixes
- Format string fix
- FlowRuleEventTest: minor bugfix
- HexString: accept null
- byte[] toString() format change

Change-Id: I9db419cfc211670cc2abd796a21396ba960e23a9
2014-11-14 18:04:38 -08:00
Thomas Vachuska
21e03649dd Cleaning up Javadocs.
Change-Id: I41d075e3e6f6a26b340ce21a5baa8b238dc069ad
2014-11-11 10:23:08 -08:00
Yuta HIGUCHI
3878205f7d KryoNamespace: smaller initial buffer size
Change-Id: I12bf2b09824302c3f626435a64c1e9795621dd6d
2014-11-09 23:55:17 -08:00
Yuta HIGUCHI
d2a3882171 Switched KryoNamespace internal buffer to ByteBufferOutput
Change-Id: Iee3738bf0133440f4b6e695b9b92a9a2c8cc202f
2014-11-06 19:05:04 -08:00
Pavlin Radoslavov
d5087d13d0 Removed method IpAddress.toInt(), because it is semantically incorrect:
It lacks the guarantee the underlying IP address is IPv4.

Potential users of toInt() should use Ip4Address.toInt()
or IpAddress.getIp4Address().toInt()
Tthe latter obviously might require the explicit check that
getIp4Address() is not null.

Change-Id: I3f939695cf3c496e3fdd3fbd4a2988b565cca69a
2014-11-06 13:40:40 -08:00
Thomas Vachuska
ca60f2b0f1 Initial sketch of codecs and REST API approach.
FIxed typos and defects.
ONOS-81

Change-Id: I789444a181abea509c354966545c927e305710d1
2014-11-06 13:29:42 -08:00
Pavlin Radoslavov
50b7067cb9 Changed the semantics of IpAddress.equals() to (eventually) return true
if both objects are instanceof IpAddress.
I.e., comparing IpAddress and Ip4Address objects could return true
if the underlying value is same.

Applied the same change to IpPrefix.equals() as well.

Change-Id: Ie0644565501d3ecce2a8603117b994d033d5b82f
2014-11-05 11:22:25 -08:00
Pavlin Radoslavov
34c8164a61 * Added methods IpAddress.getIp4Address() and IpAddress.getIp6Address()
to get the Ip4Address and Ip6Address view of the IpAddress.

* Added methods IpPrefix.getIp4Prefix() and IpPrefix.getIp6Prefix()
  to get the Ip4Prefix and Ip6Prefix view of the IpPrefix.

Added the corresponding unit tests as well.
2014-11-04 16:21:38 -08:00
Pavlin Radoslavov
315d6c8b89 Minor refactoring (for code consistency).
No functional changes.
2014-11-04 15:36:04 -08:00
Pavlin Radoslavov
f182f015a5 Reimplementation of classes Ip4Address/Ip6Address/Ip4Prefix/Ip6Prefix
and the corresponding unit tests.

* Reimplemented classes Ip4Address and Ip6Address by inheriting from
  class IpAddress
* Reimplemented classes Ip4Prefix and Ip6Prefix by inheriting from
  class IpPrefix
* Reimplemented the unit tests Ip4AddressTest and Ip6AddressTest to
  match the corresponding IpAddressTest unit tests
* Reimplemented the unit tests Ip4PrefixTest and Ip6PrefixTest to
  match the corresponding IpPrefixTest unit tests
* Minor refactoring/cleanup of classes IpAddress and IpPrefix
2014-11-04 15:03:18 -08:00
Yuta HIGUCHI
2281b3f5e9 rest
Change-Id: If0d838d02690ad4bb581152b40d366c124826634
2014-11-04 00:20:48 -08:00
Yuta HIGUCHI
5c94727a3c javadoc fixes
Change-Id: I3b4fc2d99f42b2413a535fb411b9c19bdd186ad8
2014-11-03 21:39:21 -08:00
weibit
6c415d12dd fix some formats in the k-shortestpathSearch
Change-Id: I3598fceb8f30c501eafcfb54d75b2e4f48d8537b
2014-11-03 19:15:42 -08:00
weibit
9a3631b746 K-shorest path algorithm to support UC1, it can be used by other modules as well.
Change-Id: I736ec55c6211a505d6cf43ab22e1197fdb86ecf3
2014-11-03 15:53:01 -08:00
Pavlin Radoslavov
34c921a02f Completed the IPv6 implementation for IpPrefix, and added
a new set of IpPrefix unit tests.

Also, fix few nits in IpAddress and IpAddressTest
2014-11-03 15:41:22 -08:00
Thomas Vachuska
9d8f72fb55 Removed unneeded import that was breaking the build. 2014-11-03 10:14:05 -08:00
Pavlin Radoslavov
854ecabf36 Updated the testEqualityIPv4 and testEqualityIPv6 to use
Google's EqualsTester.
2014-11-03 09:45:44 -08:00
Yuta HIGUCHI
3e848a8eb8 add methods to directly set MacAddress
Change-Id: Idab9dce493927d8943789177830df630f3b1326a
2014-11-03 09:29:59 -08:00
Pavlin Radoslavov
af5ff79583 Added new method IpAddress.valueOf(InetAddress inetAddress)
and use it as appropriate inside DistributedClusterStore.memberAddress()
2014-10-31 20:51:47 -07: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
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
Yuta HIGUCHI
2befc661d9 Loosen Kryo config only for DistributedIntentStore
Change-Id: Ie3f05e2d894b0d44f7c0ad645b77c65d1f2ce02b
2014-10-30 15:57:49 -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
Thomas Vachuska
7b652ad97c Fixed some javadoc warning/errors.
Fixed NPE error in objective tracker.
Preparing for upgrade to Java 8 and Karaf 3.0.2.
2014-10-30 14:10:51 -07:00
Jonathan Hart
4f60f98bd8 Implemented multi-instance packet out.
We've defined a PacketStore abstraction through which outbound packets are
sent. The packet store has a simple implementation (basically a no-op) and a
distributed implementation on top of the cluster messaging service.

Change-Id: Ib32753314fe518ef1fd67c858db744b004539938
2014-10-30 11:02:52 -07:00
Thomas Vachuska
d16ce18d0c Added Port.Type and plumbed it throughout. 2014-10-29 17:25:29 -07:00
Pavlin Radoslavov
49e159acff Updated the implementation of IpAddress:
* Added new static methods IpAddress.makeMaskPrefix and
   IpAddress.makeMaskedAddress
 * Cleanup

Also, removed obsoleted Javadoc comments in Ip4Prefix and Ip6Prefix classes
2014-10-29 16:22:13 -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
Thomas Vachuska
4f1a60c9fd Revised copyright message. 2014-10-28 13:39:11 -07:00
Pavlin Radoslavov
e7b5bd768c Updated creation of IpAddress instance inside IpPrefixTest
to exclude specifying the prefix length, because it is not
applicable for IpAddress.
2014-10-27 20:17:24 -07:00
Thomas Vachuska
e1bcb0b3ef Added isLinkLocal predicate to MacAddress and used it in ReactiveForwarding. 2014-10-27 17:45:10 -07:00
Thomas Vachuska
4353a5a390 Fixed graph relaxEdge to properly deal with Double.MIN_VALUE. 2014-10-27 15:18:10 -07:00
Thomas Vachuska
24c849c488 Added copyrights to the utils code 2014-10-27 09:53:05 -07:00
Thomas Vachuska
4d69087215 Doh! Forgot to actually check for negative cycles in relaxEdge. 2014-10-27 08:57:08 -07:00
Pavlin Radoslavov
9de2772d0d Work toward common IP address classes.
Ported the following IP address classes from the older codebase:
Ip4Address, Ip6Address, Ip4Prefix, Ip6Prefix (and the corresponding
unit tests).
NOTE: Those classes are not ready to be used yet.

Change-Id: I234875abbc9df8daa2f8ae28706af591dd2c5f2d
2014-10-23 20:35:48 -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
Pavlin Radoslavov
41d5adb3d4 Added a new class EventMetric that can be used for measuring events:
rate and last event timestamp (ms from epoch)

Change-Id: Ifce6c2ca911f3b288a0efd9061befc936d06da51
2014-10-23 13:44:21 -07:00
Yuta HIGUCHI
e5ca93bf1f fix some of findbugs issues
Change-Id: I20aa54af16f3a1e3323d735fe53cc26c03d5e52e
2014-10-23 12:14:37 -07:00
Thomas Vachuska
9252bc33a0 Added a REST command to upload topology configuration. 2014-10-23 02:33:25 -07:00