From ad8960b474e5d52efca4f7d10b6724f9655a455c Mon Sep 17 00:00:00 2001 From: Hideyuki Tai Date: Tue, 12 Aug 2014 20:31:00 -0400 Subject: [PATCH] Bug 1536: Fixed minimum values of SET_TP_SRC/DST. This patch changed the minimum values of SET_TP_SRC and SET_TP_DST actions from 1 to 0. Change-Id: I8f328f393fd1e06152283afea30ad4ffffd90705 Signed-off-by: Hideyuki Tai --- .../opendaylight/controller/sal/action/ActionType.java | 7 +++---- .../opendaylight/controller/sal/action/ActionTest.java | 9 +++++---- opendaylight/web/flows/src/main/resources/js/page.js | 6 +++--- 3 files changed, 11 insertions(+), 11 deletions(-) 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 b491c5fcea..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; diff --git a/opendaylight/sal/api/src/test/java/org/opendaylight/controller/sal/action/ActionTest.java b/opendaylight/sal/api/src/test/java/org/opendaylight/controller/sal/action/ActionTest.java index 5c09a43fed..3fe9a18b3f 100644 --- a/opendaylight/sal/api/src/test/java/org/opendaylight/controller/sal/action/ActionTest.java +++ b/opendaylight/sal/api/src/test/java/org/opendaylight/controller/sal/action/ActionTest.java @@ -1,12 +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; import org.opendaylight.controller.sal.core.ConstructionException; @@ -176,8 +174,11 @@ public class ActionTest { action = new SetTpDst(65535); Assert.assertTrue(action.isValid()); + action = new SetTpSrc(0); + Assert.assertTrue(action.isValid()); + action = new SetTpDst(0); - Assert.assertFalse(action.isValid()); + Assert.assertTrue(action.isValid()); action = new SetTpSrc(-1); Assert.assertFalse(action.isValid()); diff --git a/opendaylight/web/flows/src/main/resources/js/page.js b/opendaylight/web/flows/src/main/resources/js/page.js index 6e7fd25e04..5e638cf9cc 100644 --- a/opendaylight/web/flows/src/main/resources/js/page.js +++ b/opendaylight/web/flows/src/main/resources/js/page.js @@ -1,5 +1,5 @@ /* - * 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, @@ -1191,7 +1191,7 @@ one.f.flows = { var h3 = "Set Transport Source Port"; var placeholder = "Transport Source Port"; var id = one.f.flows.id.modal.action.modifyTransportSourcePort; - var help = "Range: 1 - 65535"; + var help = "Range: 0 - 65535"; var action = 'SET_TP_SRC'; var name = "Source Port"; var body = function() { @@ -1207,7 +1207,7 @@ one.f.flows = { var h3 = "Set Transport Destination Port"; var placeholder = "Transport Destination Port"; var id = one.f.flows.id.modal.action.modifyTransportDestinationPort; - var help = "Range: 1 - 65535"; + var help = "Range: 0 - 65535"; var action = 'SET_TP_DST'; var name = "Destination Port"; var body = function() { -- 2.36.6