From: Ed Warnicke Date: Sat, 1 Feb 2014 15:57:56 +0000 (+0000) Subject: Merge "Added description to meter types yang model." X-Git-Tag: autorelease-tag-v20140601202136_82eb3f9~545 X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=commitdiff_plain;h=3a117f105f127bb255dd44f3cdde28e45d4d389a;hp=58f29499046f0d04002f196ef7ee4aef6539ae51 Merge "Added description to meter types yang model." --- diff --git a/opendaylight/archetypes/odl-model-project/src/main/resources/archetype-resources/pom.xml b/opendaylight/archetypes/odl-model-project/src/main/resources/archetype-resources/pom.xml index 70742bd550..ebb9302b78 100644 --- a/opendaylight/archetypes/odl-model-project/src/main/resources/archetype-resources/pom.xml +++ b/opendaylight/archetypes/odl-model-project/src/main/resources/archetype-resources/pom.xml @@ -9,8 +9,8 @@ UTF-8 http://nexus.opendaylight.org/content - 0.6.1 - 0.6.1 + 0.6.2-SNAPSHOT + 0.6.2-SNAPSHOT 2.3.7 diff --git a/opendaylight/commons/opendaylight/pom.xml b/opendaylight/commons/opendaylight/pom.xml index 47b31fb805..9d4f838992 100644 --- a/opendaylight/commons/opendaylight/pom.xml +++ b/opendaylight/commons/opendaylight/pom.xml @@ -69,7 +69,7 @@ 1.3.1 2.3.7 4.8.1 - 0.6.1 + 0.6.2-SNAPSHOT 0.4.2-SNAPSHOT 0.5.2-SNAPSHOT diff --git a/opendaylight/distribution/opendaylight/pom.xml b/opendaylight/distribution/opendaylight/pom.xml index dca781e7ec..28637bcf46 100644 --- a/opendaylight/distribution/opendaylight/pom.xml +++ b/opendaylight/distribution/opendaylight/pom.xml @@ -369,12 +369,12 @@ org.opendaylight.yangtools yang-binding - 0.6.1 + ${yangtools.version} org.opendaylight.yangtools binding-type-provider - 0.6.1 + ${yangtools.version} org.opendaylight.yangtools diff --git a/opendaylight/md-sal/clustered-data-store/implementation/pom.xml b/opendaylight/md-sal/clustered-data-store/implementation/pom.xml index c1e2fecedd..e6cfee15e1 100644 --- a/opendaylight/md-sal/clustered-data-store/implementation/pom.xml +++ b/opendaylight/md-sal/clustered-data-store/implementation/pom.xml @@ -72,7 +72,7 @@ org.opendaylight.yangtools maven-sal-api-gen-plugin - 0.6.1 + ${yangtools.version} jar diff --git a/opendaylight/md-sal/pom.xml b/opendaylight/md-sal/pom.xml index 521ec23859..674ea240eb 100644 --- a/opendaylight/md-sal/pom.xml +++ b/opendaylight/md-sal/pom.xml @@ -102,7 +102,6 @@ - 0.6.1 UTF-8 http://nexus.opendaylight.org/content diff --git a/opendaylight/md-sal/sal-binding-broker/pom.xml b/opendaylight/md-sal/sal-binding-broker/pom.xml index ea50e943ca..e5a74e42a1 100644 --- a/opendaylight/md-sal/sal-binding-broker/pom.xml +++ b/opendaylight/md-sal/sal-binding-broker/pom.xml @@ -56,7 +56,7 @@ org.opendaylight.yangtools maven-sal-api-gen-plugin - 0.6.1 + ${yangtools.version} jar diff --git a/opendaylight/md-sal/sal-binding-config/pom.xml b/opendaylight/md-sal/sal-binding-config/pom.xml index aec9fe4e33..d87e272032 100644 --- a/opendaylight/md-sal/sal-binding-config/pom.xml +++ b/opendaylight/md-sal/sal-binding-config/pom.xml @@ -69,7 +69,7 @@ org.opendaylight.yangtools maven-sal-api-gen-plugin - 0.6.1 + ${yangtools.version} jar diff --git a/opendaylight/md-sal/sal-common-api/pom.xml b/opendaylight/md-sal/sal-common-api/pom.xml index 437051e346..5dd08d062d 100644 --- a/opendaylight/md-sal/sal-common-api/pom.xml +++ b/opendaylight/md-sal/sal-common-api/pom.xml @@ -26,7 +26,6 @@ org.opendaylight.yangtools concepts - 0.6.1 org.osgi diff --git a/opendaylight/md-sal/sal-common-util/pom.xml b/opendaylight/md-sal/sal-common-util/pom.xml index 2ec66b57a3..3a9b00dce0 100644 --- a/opendaylight/md-sal/sal-common-util/pom.xml +++ b/opendaylight/md-sal/sal-common-util/pom.xml @@ -21,7 +21,6 @@ org.opendaylight.yangtools concepts - 0.6.1 com.google.guava diff --git a/opendaylight/md-sal/sal-dom-api/pom.xml b/opendaylight/md-sal/sal-dom-api/pom.xml index 76d80d15f7..d7b0296ce1 100644 --- a/opendaylight/md-sal/sal-dom-api/pom.xml +++ b/opendaylight/md-sal/sal-dom-api/pom.xml @@ -59,7 +59,7 @@ org.opendaylight.yangtools maven-sal-api-gen-plugin - 0.6.1 + ${yangtools.version} jar diff --git a/opendaylight/md-sal/sal-dom-broker/pom.xml b/opendaylight/md-sal/sal-dom-broker/pom.xml index 5b883d7c42..8b193e03aa 100644 --- a/opendaylight/md-sal/sal-dom-broker/pom.xml +++ b/opendaylight/md-sal/sal-dom-broker/pom.xml @@ -104,7 +104,7 @@ org.opendaylight.yangtools maven-sal-api-gen-plugin - 0.6.1 + ${yangtools.version} jar diff --git a/opendaylight/md-sal/sal-netconf-connector/pom.xml b/opendaylight/md-sal/sal-netconf-connector/pom.xml index f90c966ba3..597b02ebb5 100644 --- a/opendaylight/md-sal/sal-netconf-connector/pom.xml +++ b/opendaylight/md-sal/sal-netconf-connector/pom.xml @@ -247,7 +247,7 @@ org.opendaylight.yangtools maven-sal-api-gen-plugin - 0.6.1 + ${yangtools.version} jar diff --git a/opendaylight/md-sal/sal-remoterpc-connector/implementation/pom.xml b/opendaylight/md-sal/sal-remoterpc-connector/implementation/pom.xml index 619b42be05..ae31c2382f 100644 --- a/opendaylight/md-sal/sal-remoterpc-connector/implementation/pom.xml +++ b/opendaylight/md-sal/sal-remoterpc-connector/implementation/pom.xml @@ -189,7 +189,7 @@ org.opendaylight.yangtools maven-sal-api-gen-plugin - 0.6.1 + ${yangtools.version} jar diff --git a/opendaylight/protocol_plugins/openflow/src/main/java/org/opendaylight/controller/protocol_plugin/openflow/core/internal/SecureMessageReadWriteService.java b/opendaylight/protocol_plugins/openflow/src/main/java/org/opendaylight/controller/protocol_plugin/openflow/core/internal/SecureMessageReadWriteService.java index 90b47cf264..d60bcab8b3 100644 --- a/opendaylight/protocol_plugins/openflow/src/main/java/org/opendaylight/controller/protocol_plugin/openflow/core/internal/SecureMessageReadWriteService.java +++ b/opendaylight/protocol_plugins/openflow/src/main/java/org/opendaylight/controller/protocol_plugin/openflow/core/internal/SecureMessageReadWriteService.java @@ -407,9 +407,9 @@ public class SecureMessageReadWriteService implements IMessageReadWrite { this.myAppData = ByteBuffer .allocate(session.getApplicationBufferSize()); this.peerAppData = ByteBuffer.allocate(session - .getApplicationBufferSize()); + .getApplicationBufferSize() * 2); this.myNetData = ByteBuffer.allocate(session.getPacketBufferSize()); - this.peerNetData = ByteBuffer.allocate(session.getPacketBufferSize()); + this.peerNetData = ByteBuffer.allocate(session.getPacketBufferSize() * 2); } @Override diff --git a/opendaylight/protocol_plugins/openflow/src/main/java/org/opendaylight/controller/protocol_plugin/openflow/internal/FlowConverter.java b/opendaylight/protocol_plugins/openflow/src/main/java/org/opendaylight/controller/protocol_plugin/openflow/internal/FlowConverter.java index 78a2ea5120..6d1c563aa4 100644 --- a/opendaylight/protocol_plugins/openflow/src/main/java/org/opendaylight/controller/protocol_plugin/openflow/internal/FlowConverter.java +++ b/opendaylight/protocol_plugins/openflow/src/main/java/org/opendaylight/controller/protocol_plugin/openflow/internal/FlowConverter.java @@ -539,7 +539,7 @@ public class FlowConverter { salMatch.setField(new MatchField(MatchType.DL_VLAN, vlan)); } - if (ofMatch.getDataLayerVirtualLanPriorityCodePoint() != 0) { + if ((ofMatch.getWildcards() & OFMatch.OFPFW_DL_VLAN_PCP) == 0) { salMatch.setField(MatchType.DL_VLAN_PR, ofMatch .getDataLayerVirtualLanPriorityCodePoint()); } @@ -612,7 +612,7 @@ public class FlowConverter { salMatch.setField(new MatchField(MatchType.DL_VLAN, vlan)); } - if (v6Match.getDataLayerVirtualLanPriorityCodePoint() != 0) { + if ((v6Match.getWildcards() & OFMatch.OFPFW_DL_VLAN_PCP) == 0) { salMatch.setField(MatchType.DL_VLAN_PR, v6Match .getDataLayerVirtualLanPriorityCodePoint()); } diff --git a/opendaylight/protocol_plugins/openflow/src/main/java/org/opendaylight/controller/protocol_plugin/openflow/vendorextension/v6extension/V6Match.java b/opendaylight/protocol_plugins/openflow/src/main/java/org/opendaylight/controller/protocol_plugin/openflow/vendorextension/v6extension/V6Match.java index 4daa591ba1..cfe20a1fa2 100644 --- a/opendaylight/protocol_plugins/openflow/src/main/java/org/opendaylight/controller/protocol_plugin/openflow/vendorextension/v6extension/V6Match.java +++ b/opendaylight/protocol_plugins/openflow/src/main/java/org/opendaylight/controller/protocol_plugin/openflow/vendorextension/v6extension/V6Match.java @@ -216,7 +216,7 @@ public class V6Match extends OFMatch implements Cloneable { this.dlVlanIDState = MatchFieldState.MATCH_ABSENT; } - if (match.getDataLayerVirtualLanPriorityCodePoint() != 0) { + if ((match.getWildcards() & OFMatch.OFPFW_DL_VLAN_PCP) == 0) { this.setDataLayerVirtualLanPriorityCodePoint( match.getDataLayerVirtualLanPriorityCodePoint(), (byte) 0); } else { @@ -839,14 +839,12 @@ public class V6Match extends OFMatch implements Cloneable { // extract the vlan id super.setDataLayerVirtualLan(getVlanID(firstByte, secondByte)); - } else { this.wildcards ^= (1 << 1); // Sync with 0F 1.0 Match } if ((this.dataLayerVirtualLanTCIMask & 0xe000) != 0) { // else if its a vlan pcp mask // extract the vlan pcp super.setDataLayerVirtualLanPriorityCodePoint(getVlanPCP(firstByte)); - } else { this.wildcards ^= (1 << 20); } this.dlVlanTCIState = MatchFieldState.MATCH_FIELD_WITH_MASK; @@ -864,6 +862,8 @@ public class V6Match extends OFMatch implements Cloneable { super.setDataLayerVirtualLan(getVlanID(firstByte, secondByte)); this.dlVlanTCIState = MatchFieldState.MATCH_FIELD_ONLY; this.match_len += 6; + this.wildcards ^= (1 << 1); // Sync with 0F 1.0 Match + this.wildcards ^= (1 << 20); } } } @@ -1216,8 +1216,6 @@ public class V6Match extends OFMatch implements Cloneable { // ipv4 dest processing this.wildcards ^= (((1 << 5) - 1) << 14); } - } else { - this.wildcards = 0; } } diff --git a/opendaylight/protocol_plugins/openflow/src/test/java/org/opendaylight/controller/protocol_plugin/openflow/internal/FlowProgrammerServiceTest.java b/opendaylight/protocol_plugins/openflow/src/test/java/org/opendaylight/controller/protocol_plugin/openflow/internal/FlowProgrammerServiceTest.java index a751948de7..96f0d80022 100644 --- a/opendaylight/protocol_plugins/openflow/src/test/java/org/opendaylight/controller/protocol_plugin/openflow/internal/FlowProgrammerServiceTest.java +++ b/opendaylight/protocol_plugins/openflow/src/test/java/org/opendaylight/controller/protocol_plugin/openflow/internal/FlowProgrammerServiceTest.java @@ -18,9 +18,6 @@ import java.util.List; import org.junit.Assert; import org.junit.Test; import org.opendaylight.controller.protocol_plugin.openflow.vendorextension.v6extension.V6Match; -import org.openflow.protocol.OFMatch; -import org.openflow.protocol.action.OFAction; - import org.opendaylight.controller.sal.action.Action; import org.opendaylight.controller.sal.action.Flood; import org.opendaylight.controller.sal.action.FloodAll; @@ -46,6 +43,9 @@ import org.opendaylight.controller.sal.utils.EtherTypes; import org.opendaylight.controller.sal.utils.IPProtocols; import org.opendaylight.controller.sal.utils.NodeConnectorCreator; import org.opendaylight.controller.sal.utils.NodeCreator; +import org.openflow.protocol.OFMatch; +import org.openflow.protocol.action.OFAction; +import org.openflow.util.U32; public class FlowProgrammerServiceTest { @@ -298,6 +298,16 @@ public class FlowProgrammerServiceTest { */ FlowConverter salToOF = new FlowConverter(aFlow); V6Match v6Match = (V6Match) salToOF.getOFMatch(); + // need this hardcoding here to make the test pass. + // this should not be a problem in actual code. + // in the test the sal match is converted to a V6 match. + // we lose the wildcard info as the V6 match is used for nicira extensions + // and nicira deals with wildcards in a different way. + // converting the V6 match back to sal match is not going to preserve the wildcard info. + // and we need the wildcard info for reading the vlan pcp now. + // when creating a V6Match using the readFrom method + // we do convert the nicira extensions format correctly to populate the wildcard info. + v6Match.setWildcards(U32.t(Long.valueOf(~OFMatch.OFPFW_DL_VLAN_PCP))); List ofActions = salToOF.getOFActions(); /* diff --git a/opendaylight/protocol_plugins/openflow/src/test/java/org/opendaylight/controller/protocol_plugin/openflow/vendorextension/v6extension/V6ExtensionTest.java b/opendaylight/protocol_plugins/openflow/src/test/java/org/opendaylight/controller/protocol_plugin/openflow/vendorextension/v6extension/V6ExtensionTest.java index 7782aa9093..abbc43809d 100644 --- a/opendaylight/protocol_plugins/openflow/src/test/java/org/opendaylight/controller/protocol_plugin/openflow/vendorextension/v6extension/V6ExtensionTest.java +++ b/opendaylight/protocol_plugins/openflow/src/test/java/org/opendaylight/controller/protocol_plugin/openflow/vendorextension/v6extension/V6ExtensionTest.java @@ -17,6 +17,7 @@ import java.util.Arrays; import org.junit.Assert; import org.junit.Test; import org.openflow.protocol.OFMatch; +import org.openflow.util.U32; public class V6ExtensionTest { @@ -52,20 +53,18 @@ public class V6ExtensionTest { match.fromString("input_port=1"); match.fromString("dl_dst=20:A0:11:10:00:99"); match.fromString("dl_src=00:10:08:22:12:75"); - match.fromString("ip_src=10.1.1.1"); match.fromString("ip_dst=1.2.3.4"); match.fromString("eth_type=0x800"); match.fromString("dl_vlan=10"); - match.fromString("dl_vpcp=1"); match.fromString("nw_proto=6"); match.fromString("nw_tos=100"); match.fromString("tp_dst=8080"); match.fromString("tp_src=60"); + match.fromString("dl_vpcp=1"); Assert.assertTrue(match.getInputPort() == 1); // Assert.assertTrue(match.getIPv6MatchLen()==6); - ofm.setInputPort((short) 1); // V6Match is meant for IPv6, but if using OFMatch, it will be set to // IPv4 values, as OF1.0 doesn't support IPv6. @@ -89,6 +88,13 @@ public class V6ExtensionTest { ofm.setTransportSource((short) 60); ofm.setTransportDestination((short) 8080); + // this v6match ctor now looks at the wildcard field to + // determine if vlan pcp has been set + // so set the wildcards appropriately to reflect that vlan pcp + // has been set. + int wildcards = OFMatch.OFPFW_ALL; + wildcards &= ~OFMatch.OFPFW_DL_VLAN_PCP; + ofm.setWildcards(U32.t(Long.valueOf(wildcards))); V6Match match3 = new V6Match(ofm); Assert.assertTrue(match.getInputPort() == match3.getInputPort()); diff --git a/opendaylight/web/root/src/main/resources/js/lib.js b/opendaylight/web/root/src/main/resources/js/lib.js index 00eacdfce6..c265760b97 100644 --- a/opendaylight/web/root/src/main/resources/js/lib.js +++ b/opendaylight/web/root/src/main/resources/js/lib.js @@ -373,11 +373,11 @@ one.lib.nav = { one.lib.helper = { parseInt : function(value) { - return (value !== null && value !== '') ? + return (value != null && value.trim() !== '') ? parseInt(value) : '' }, parseFloat : function(value) { - return (value !== null && value !== '') ? + return (value != null && value.trim() !== '') ? parseFloat(value) : '' } } diff --git a/opendaylight/web/troubleshoot/src/main/java/org/opendaylight/controller/troubleshoot/web/Troubleshoot.java b/opendaylight/web/troubleshoot/src/main/java/org/opendaylight/controller/troubleshoot/web/Troubleshoot.java index 6d79f3cb05..36b5043dd9 100644 --- a/opendaylight/web/troubleshoot/src/main/java/org/opendaylight/controller/troubleshoot/web/Troubleshoot.java +++ b/opendaylight/web/troubleshoot/src/main/java/org/opendaylight/controller/troubleshoot/web/Troubleshoot.java @@ -62,7 +62,7 @@ import org.springframework.web.bind.annotation.ResponseBody; public class Troubleshoot implements IDaylightWeb { private static final UserLevel AUTH_LEVEL = UserLevel.CONTAINERUSER; private static final List flowStatsColumnNames = Arrays.asList("Node", "In Port", - "DL Src", "DL Dst", "DL Type", "DL Vlan", "NW Src", "NW Dst","ToS Bits", + "DL Src", "DL Dst", "DL Type", "DL Vlan","Vlan Priority", "NW Src", "NW Dst","ToS Bits", "NW Proto", "TP Src", "TP Dst", "Actions", "Bytes", "Packets", "Time (s)", "Timeout (s)", "Priority"); @@ -314,6 +314,19 @@ public class Troubleshoot implements IDaylightWeb { } else { row.put(MatchType.DL_VLAN.id(), "*"); } + //Vlan Priority + if (match.isPresent(MatchType.DL_VLAN_PR)) { + if (((Byte) flow.getMatch().getField(MatchType.DL_VLAN_PR).getValue()) + .shortValue() < 0) { + row.put(MatchType.DL_VLAN_PR.id(), "0"); + } else { + row.put(MatchType.DL_VLAN_PR.id(), ((Byte) flow.getMatch() + .getField(MatchType.DL_VLAN_PR).getValue()).toString()); + } + } else { + row.put(MatchType.DL_VLAN_PR.id(), "*"); + } + if (match.isPresent(MatchType.NW_SRC)) { row.put(MatchType.NW_SRC.id(), ((InetAddress) flow.getMatch() .getField(MatchType.NW_SRC).getValue()).getHostAddress()); @@ -407,7 +420,7 @@ public class Troubleshoot implements IDaylightWeb { row.put("durationSeconds", ((Integer) flowOnNode.getDurationSeconds()).toString()); row.put("idleTimeout", ((Short) flow.getIdleTimeout()).toString()); - row.put("priority", String.valueOf(flow.getPriority())); + row.put("priority", String.valueOf(NetUtils.getUnsignedShort(flow.getPriority()))); return row; } diff --git a/opendaylight/web/troubleshoot/src/main/resources/js/page.js b/opendaylight/web/troubleshoot/src/main/resources/js/page.js index 4b5e51a071..4bc4c76fc4 100644 --- a/opendaylight/web/troubleshoot/src/main/resources/js/page.js +++ b/opendaylight/web/troubleshoot/src/main/resources/js/page.js @@ -363,6 +363,11 @@ one.f.troubleshooting.existingNodes = { label: 'DL Vlan', sortable: true }, + { + property: 'dlVlanPriority', + label: 'Vlan PCP', + sortable: true + }, { property: 'nwSrc', label: 'NW Src',