X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fsal%2Fapi%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fsal%2Faction%2FActionType.java;h=8b6d3c4a1cd7fc98d6820562e73068be331e7372;hb=96e61c15761ca887620f53d6f20ac574d16287f8;hp=7da6fa911514d252bee6e647b5eae655420ff0cf;hpb=b8bb7db7c6133e00046e85ead70426eb1e05184d;p=controller.git 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 7da6fa9115..8b6d3c4a1c 100644 --- 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,11 +1,10 @@ /* - * 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 */ - package org.opendaylight.controller.sal.action; /** @@ -34,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_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; @@ -75,4 +74,12 @@ public enum ActionType { return true; } } -} \ No newline at end of file + + public int calculateConsistentHashCode() { + if (this.id != null) { + return this.id.hashCode(); + } else { + return 0; + } + } +}