From: Ed Warnicke Date: Fri, 28 Mar 2014 00:57:35 +0000 (+0000) Subject: Merge "Bug 500: Updated data APIs with new concepts." X-Git-Tag: autorelease-tag-v20140601202136_82eb3f9~309 X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=commitdiff_plain;h=5dc63c9502b18d9060826c581c71f9237b45160b;hp=9fda938ef6dc037ef1c5a9fbed25469d4a532150 Merge "Bug 500: Updated data APIs with new concepts." --- diff --git a/opendaylight/commons/opendaylight/pom.xml b/opendaylight/commons/opendaylight/pom.xml index e05059b4ae..e7c7bbe637 100644 --- a/opendaylight/commons/opendaylight/pom.xml +++ b/opendaylight/commons/opendaylight/pom.xml @@ -91,7 +91,7 @@ 0.1.2-SNAPSHOT 0.5.2-SNAPSHOT 0.5.0-SNAPSHOT - 4.0.10.Final + 4.0.17.Final 2.4 0.4.2-SNAPSHOT 0.4.2-SNAPSHOT diff --git a/opendaylight/distribution/opendaylight/src/main/resources/configuration/config.ini b/opendaylight/distribution/opendaylight/src/main/resources/configuration/config.ini index 0d223b8df2..4598bac593 100644 --- a/opendaylight/distribution/opendaylight/src/main/resources/configuration/config.ini +++ b/opendaylight/distribution/opendaylight/src/main/resources/configuration/config.ini @@ -49,7 +49,7 @@ netconf.config.persister.2.properties.numberOfBackups=1 # Set Default start level for framework osgi.bundles.defaultStartLevel=4 # Extra packages to import from the boot class loader -org.osgi.framework.system.packages.extra=sun.reflect,sun.reflect.misc,sun.misc +org.osgi.framework.system.packages.extra=sun.reflect,sun.reflect.misc,sun.misc,sun.nio.ch # This is not Eclipse App eclipse.ignoreApp=true # Don't shutdown equinox if the eclipse App has ended, diff --git a/opendaylight/md-sal/model/model-flow-statistics/src/main/yang/opendaylight-statistics-types.yang b/opendaylight/md-sal/model/model-flow-statistics/src/main/yang/opendaylight-statistics-types.yang index c4cccc1102..19d6eafa78 100644 --- a/opendaylight/md-sal/model/model-flow-statistics/src/main/yang/opendaylight-statistics-types.yang +++ b/opendaylight/md-sal/model/model-flow-statistics/src/main/yang/opendaylight-statistics-types.yang @@ -2,7 +2,7 @@ module opendaylight-statistics-types { namespace "urn:opendaylight:model:statistics:types"; prefix stat-types; - import ietf-yang-types {prefix yang;} + import ietf-yang-types {prefix yang; revision-date "2010-09-24";} revision "2013-09-25" { description "Initial revision of flow service"; diff --git a/opendaylight/md-sal/sal-binding-it/src/test/java/org/opendaylight/controller/test/sal/binding/it/AbstractTest.java b/opendaylight/md-sal/sal-binding-it/src/test/java/org/opendaylight/controller/test/sal/binding/it/AbstractTest.java index 9ac94e7b89..019fc0eb73 100644 --- a/opendaylight/md-sal/sal-binding-it/src/test/java/org/opendaylight/controller/test/sal/binding/it/AbstractTest.java +++ b/opendaylight/md-sal/sal-binding-it/src/test/java/org/opendaylight/controller/test/sal/binding/it/AbstractTest.java @@ -25,6 +25,7 @@ import static org.opendaylight.controller.test.sal.binding.it.TestHelper.junitAn import static org.opendaylight.controller.test.sal.binding.it.TestHelper.mdSalCoreBundles; import static org.ops4j.pax.exam.CoreOptions.mavenBundle; import static org.ops4j.pax.exam.CoreOptions.options; +import static org.ops4j.pax.exam.CoreOptions.systemPackages; import static org.ops4j.pax.exam.CoreOptions.systemProperty; @RunWith(PaxExam.class) @@ -70,6 +71,7 @@ public abstract class AbstractTest { mavenBundle("ch.qos.logback", "logback-core").versionAsInProject(), // mavenBundle("ch.qos.logback", "logback-classic").versionAsInProject(), // systemProperty("osgi.bundles.defaultStartLevel").value("4"), + systemPackages("sun.nio.ch"), mdSalCoreBundles(), diff --git a/opendaylight/md-sal/samples/toaster-it/src/test/java/org/opendaylight/controller/sample/toaster/it/ToasterTest.java b/opendaylight/md-sal/samples/toaster-it/src/test/java/org/opendaylight/controller/sample/toaster/it/ToasterTest.java index 38a4dd4661..000783bd07 100644 --- a/opendaylight/md-sal/samples/toaster-it/src/test/java/org/opendaylight/controller/sample/toaster/it/ToasterTest.java +++ b/opendaylight/md-sal/samples/toaster-it/src/test/java/org/opendaylight/controller/sample/toaster/it/ToasterTest.java @@ -52,6 +52,7 @@ public class ToasterTest { mavenBundle("ch.qos.logback", "logback-core").versionAsInProject(), // mavenBundle("ch.qos.logback", "logback-classic").versionAsInProject(), // systemProperty("osgi.bundles.defaultStartLevel").value("4"), + systemPackages("sun.nio.ch"), toasterBundles(), mdSalCoreBundles(), diff --git a/opendaylight/md-sal/test/sal-rest-connector-it/pom.xml b/opendaylight/md-sal/test/sal-rest-connector-it/pom.xml index 15fee781ef..a9fc739456 100644 --- a/opendaylight/md-sal/test/sal-rest-connector-it/pom.xml +++ b/opendaylight/md-sal/test/sal-rest-connector-it/pom.xml @@ -136,7 +136,7 @@ io.netty netty-all - 4.0.10.Final + ${netty.version} test diff --git a/opendaylight/netconf/netconf-it/src/test/java/org/opendaylight/controller/netconf/it/pax/IdentityRefNetconfTest.java b/opendaylight/netconf/netconf-it/src/test/java/org/opendaylight/controller/netconf/it/pax/IdentityRefNetconfTest.java index 5fd9f2fcd1..ee971a65dd 100644 --- a/opendaylight/netconf/netconf-it/src/test/java/org/opendaylight/controller/netconf/it/pax/IdentityRefNetconfTest.java +++ b/opendaylight/netconf/netconf-it/src/test/java/org/opendaylight/controller/netconf/it/pax/IdentityRefNetconfTest.java @@ -44,6 +44,7 @@ import static org.opendaylight.controller.test.sal.binding.it.TestHelper.junitAn import static org.opendaylight.controller.test.sal.binding.it.TestHelper.mdSalCoreBundles; import static org.ops4j.pax.exam.CoreOptions.mavenBundle; import static org.ops4j.pax.exam.CoreOptions.options; +import static org.ops4j.pax.exam.CoreOptions.systemPackages; import static org.ops4j.pax.exam.CoreOptions.systemProperty; @RunWith(PaxExam.class) @@ -62,6 +63,7 @@ public class IdentityRefNetconfTest { systemProperty("osgi.console").value("2401"), systemProperty("osgi.bundles.defaultStartLevel").value("4"), systemProperty("pax.exam.osgi.unresolved.fail").value("true"), + systemPackages("sun.nio.ch"), testingModules(), loggingModules(), diff --git a/opendaylight/netconf/pom.xml b/opendaylight/netconf/pom.xml index e7b9a02552..586366f41a 100644 --- a/opendaylight/netconf/pom.xml +++ b/opendaylight/netconf/pom.xml @@ -47,7 +47,6 @@ 5.0.0 2.4.0 1.7.2 - 4.0.10.Final ${project.build.directory}/generated-sources/sal diff --git a/opendaylight/web/devices/src/main/java/org/opendaylight/controller/devices/web/Devices.java b/opendaylight/web/devices/src/main/java/org/opendaylight/controller/devices/web/Devices.java index e4bb790676..a9f11fafb5 100644 --- a/opendaylight/web/devices/src/main/java/org/opendaylight/controller/devices/web/Devices.java +++ b/opendaylight/web/devices/src/main/java/org/opendaylight/controller/devices/web/Devices.java @@ -774,7 +774,7 @@ public class Devices implements IDaylightWeb { return result; } - @RequestMapping(value = "/connect/{nodeId}", method = RequestMethod.POST) + @RequestMapping(value = "/connect/{nodeId:.+}", method = RequestMethod.POST) @ResponseBody public Status addNode(HttpServletRequest request, @PathVariable("nodeId") String nodeId, @RequestParam(required = true) String ipAddress, @RequestParam(required = true) String port, @@ -811,7 +811,7 @@ public class Devices implements IDaylightWeb { return new Status(StatusCode.SUCCESS); } - @RequestMapping(value = "/disconnect/{nodeId}", method = RequestMethod.POST) + @RequestMapping(value = "/disconnect/{nodeId:.+}", method = RequestMethod.POST) @ResponseBody public Status removeNode(HttpServletRequest request, @PathVariable("nodeId") String nodeId, @RequestParam(required = true) String nodeType) { diff --git a/opendaylight/web/flows/src/main/java/org/opendaylight/controller/flows/web/Flows.java b/opendaylight/web/flows/src/main/java/org/opendaylight/controller/flows/web/Flows.java index 4304d76b0d..9c3c895916 100644 --- a/opendaylight/web/flows/src/main/java/org/opendaylight/controller/flows/web/Flows.java +++ b/opendaylight/web/flows/src/main/java/org/opendaylight/controller/flows/web/Flows.java @@ -363,7 +363,6 @@ public class Flows implements IDaylightWeb { SupportedFlowActions supportedFlows = (SupportedFlowActions) switchManager.getNodeProp(node, "supportedFlowActions"); List> actions = supportedFlows.getActions(); for (Class action : actions) { - String actionName = action.getSimpleName().toLowerCase(); if (action.isAssignableFrom(org.opendaylight.controller.sal.action.Drop.class)) { result.put(ActionType.DROP.toString(), "Drop"); } else if (action.isAssignableFrom(org.opendaylight.controller.sal.action.Loopback.class)) { diff --git a/opendaylight/web/flows/src/main/resources/js/page.js b/opendaylight/web/flows/src/main/resources/js/page.js index 61d7748976..6e7fd25e04 100644 --- a/opendaylight/web/flows/src/main/resources/js/page.js +++ b/opendaylight/web/flows/src/main/resources/js/page.js @@ -303,6 +303,11 @@ one.f.flows = { modifyTosBits : "one_f_flows_modal_action_modifyTosBits", modifyTransportSourcePort : "one_f_flows_modal_action_modifyTransportSourcePort", modifyTransportDestinationPort : "one_f_flows_modal_action_modifyTransportDestinationPort", + enqueue : 'one-f-flows-modal-action-enqueue', + queue : 'one-f-flows-modal-action-queue', + setEthertype : 'one-f-flows-modal-action-setEthertype', + pushVlan : 'one-f-flows-modal-action-pushVlan', + setVlanCfi : 'one-f-flows-modal-action-setVlanCfi', modal : { modal : "one_f_flows_modal_action_modal_modal", remove : "one_f_flows_modal_action_modal_remove", @@ -1052,7 +1057,7 @@ one.f.flows = { case "SET_VLAN_CFI" : var h3 = "Set VLAN CFI"; var placeholder = "VLAN CFI"; - var id = one.f.flows.id.modal.action.setVlanPriority; + var id = one.f.flows.id.modal.action.setVlanCfi; var help = "Range: 0 - 1"; var action = 'SET_VLAN_CFI'; var name = "VLAN CFI"; @@ -1073,7 +1078,7 @@ one.f.flows = { case "PUSH_VLAN" : var h3 = "Push VLAN"; var placeholder = "VLAN"; - var id = one.f.flows.id.modal.action.setVlanPriority; + var id = one.f.flows.id.modal.action.pushVlan; var help = "Range: 0 - 4095"; var action = 'PUSH_VLAN'; var name = "VLAN"; @@ -1121,7 +1126,7 @@ one.f.flows = { case "SET_DL_TYPE" : var h3 = "Set Ethertype"; var placeholder = "Ethertype"; - var id = one.f.flows.id.modal.action.setVlanPriority; + var id = one.f.flows.id.modal.action.setEthertype; var help = "Range: 0 - 65535"; var action = 'SET_DL_TYPE'; var name = "Ethertype"; @@ -1214,6 +1219,13 @@ one.f.flows = { var $modal = one.f.flows.modal.action.initialize(h3, body, add); $modal.modal(); break; + case "ENQUEUE" : + var h3 = "Enqueue"; + var placeholder = "Enqueue"; + var id = one.f.flows.id.modal.action.enqueue; + var $modal = one.f.flows.modal.action.initialize(h3, one.f.flows.modal.action.body.addEnqueue, one.f.flows.modal.action.add.addEnqueue); + $modal.modal(); + break; case "DROP" : var name = "Drop"; var action = 'DROP'; @@ -1249,11 +1261,6 @@ one.f.flows = { var action = 'CONTROLLER'; one.f.flows.modal.action.add.add(name, action); break; - case "ENQUEUE" : - var name = "Enqueue"; - var action = 'ENQUEUE'; - one.f.flows.modal.action.add.add(name, action); - break; } }, initialize : function(h3, bodyCallback, addCallback) { @@ -1284,6 +1291,37 @@ one.f.flows = { one.f.flows.modal.action.add.addPortsToTable(ports, pid); $modal.modal('hide'); }, + addEnqueue : function($modal) { + var $options = $('#'+one.f.flows.id.modal.action.addOutputPorts).find('option:selected'); + var ports = ''; + var pid = ''; + $options.each(function(index, value) { + ports = ports+$(value).text()+", "; + pid = pid+$(value).attr('value')+","; + }); + var $input = $('#'+one.f.flows.id.modal.action.queue); + var queue = $input.val(); + ports = ports.slice(0,-2); + pid = pid.slice(0,-1); + one.f.flows.modal.action.add.addEnqueueToTable(ports, pid, queue); + $modal.modal('hide'); + }, + addEnqueueToTable : function(ports, pid, queue) { + if (queue !== '' && queue >= 0) { + ports += ':'+queue; + } + var $tr = one.f.flows.modal.action.table.add("Enqueue", ports); + $tr.attr('id', 'ENQUEUE'); + if (queue !== '' && queue >= 0) { + $tr.data('action', 'ENQUEUE='+pid+':'+queue); + } else { + $tr.data('action', 'ENQUEUE='+pid+':0'); // default queue to 0 + } + $tr.click(function() { + one.f.flows.modal.action.add.modal.initialize(this); + }); + one.f.flows.modal.action.table.append($tr); + }, addPortsToTable : function(ports, pid){ var $tr = one.f.flows.modal.action.table.add("Add Output Ports", ports); $tr.attr('id', 'OUTPUT'); @@ -1410,6 +1448,27 @@ one.f.flows = { $form.append($fieldset); return $form; }, + addEnqueue : function() { + var common = one.f.flows.modal.action.body.common(); + var $form = common[0]; + var $fieldset = common[1]; + // output port + $label = one.lib.form.label("Select Output Ports"); + if (one.f.flows.registry.currentNode == undefined){ + return; //Selecting Output ports without selecting node throws an exception + } + var ports = one.f.flows.registry.nodeports[one.f.flows.registry.currentNode]['ports']; + $select = one.lib.form.select.create(ports); + $select.attr('id', one.f.flows.id.modal.action.addOutputPorts); + $fieldset.append($label).append($select); + $label = one.lib.form.label('Queue (Optional)'); + $input = one.lib.form.input('Queue') + .attr('id', one.f.flows.id.modal.action.queue); + $help = one.lib.form.help('Range: 1 - 2147483647'); + $fieldset.append($label).append($input).append($help); + $form.append($fieldset); + return $form; + }, set : function(label, placeholder, id, help) { var common = one.f.flows.modal.action.body.common(); var $form = common[0];