Code Review
/
controller.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Merge "BUG-1521 Increase test coverage of netconf-netty-util"
[controller.git]
/
opendaylight
/
sal
/
api
/
src
/
main
/
java
/
org
/
opendaylight
/
controller
/
sal
/
action
/
ActionType.java
diff --git
a/opendaylight/sal/api/src/main/java/org/opendaylight/controller/sal/action/ActionType.java
b/opendaylight/sal/api/src/main/java/org/opendaylight/controller/sal/action/ActionType.java
index 0e085473d5513d929a9c18a3cd5fad3b087e67fd..8b6d3c4a1cd7fc98d6820562e73068be331e7372 100644
(file)
--- a/
opendaylight/sal/api/src/main/java/org/opendaylight/controller/sal/action/ActionType.java
+++ b/
opendaylight/sal/api/src/main/java/org/opendaylight/controller/sal/action/ActionType.java
@@
-1,20
+1,15
@@
-
/*
/*
- * Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved.
+ * Copyright (c) 2013
-2014
Cisco Systems, Inc. and others. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0 which accompanies this distribution,
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0 which accompanies this distribution,
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
-
package org.opendaylight.controller.sal.action;
/**
* The enumeration of actions supported by the controller
* Each entry has a unique id and the values range for the action element where applicable
package org.opendaylight.controller.sal.action;
/**
* The enumeration of actions supported by the controller
* Each entry has a unique id and the values range for the action element where applicable
- *
- *
- *
*/
public enum ActionType {
DROP("drop", 0, 0),
*/
public enum ActionType {
DROP("drop", 0, 0),
@@
-38,8
+33,8
@@
public enum ActionType {
SET_NW_SRC("setNwSrc", 0, 0),
SET_NW_DST("setNwDst", 0, 0),
SET_NW_TOS("setNwTos", 0, 0x3f),
SET_NW_SRC("setNwSrc", 0, 0),
SET_NW_DST("setNwDst", 0, 0),
SET_NW_TOS("setNwTos", 0, 0x3f),
- SET_TP_SRC("setTpSrc",
1, 0xffff),
- SET_TP_DST("setTpDst",
1, 0xffff),
+ SET_TP_SRC("setTpSrc",
0, 0xffff), // Set transport source port
+ SET_TP_DST("setTpDst",
0, 0xffff), // Set transport destination port
SET_NEXT_HOP("setNextHop", 0, 0);
private String id;
SET_NEXT_HOP("setNextHop", 0, 0);
private String id;
@@
-61,8
+56,7
@@
public enum ActionType {
}
public String getRange() {
}
public String getRange() {
- return "[0x" + Long.toHexString(minValue) + "-0x"
- + Long.toHexString(maxValue) + "]";
+ return "[0x" + Long.toHexString(minValue) + "-0x" + Long.toHexString(maxValue) + "]";
}
public boolean takesParameter() {
}
public boolean takesParameter() {
@@
-80,4
+74,12
@@
public enum ActionType {
return true;
}
}
return true;
}
}
-}
\ No newline at end of file
+
+ public int calculateConsistentHashCode() {
+ if (this.id != null) {
+ return this.id.hashCode();
+ } else {
+ return 0;
+ }
+ }
+}