OpenFlow port values are uint32, correcting the size in the model for that 03/17803/2
authorEd Warnicke <eaw@cisco.com>
Mon, 6 Apr 2015 18:07:14 +0000 (11:07 -0700)
committerEd Warnicke <eaw@cisco.com>
Mon, 6 Apr 2015 18:12:08 +0000 (18:12 +0000)
Change-Id: I1c810137d5c2f103b2679a4aa15cf32fa38e019e
Signed-off-by: Ed Warnicke <eaw@cisco.com>
southbound/southbound-api/src/main/yang/ovsdb.yang
southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/ovsdb/transact/TerminationPointCreateCommand.java
southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbPortUpdateCommand.java

index 6da025f7b76d0e36bf63cf79830fd404bfcf5ada..f4652ee2c31f03f864afff5269299b37419ce395 100755 (executable)
@@ -336,7 +336,7 @@ module ovsdb {
 
         leaf ofport {
             description "Port/Interface related optional ofport";
-            type uint16;
+            type uint32;
         }
 
         leaf ofport_request {
index 55a324bf18b1908cae697672858f20485f1a7d19..2ea1493decdc48085a53b7a8de5957b8f766febb 100644 (file)
@@ -57,9 +57,9 @@ public class TerminationPointCreateCommand implements TransactCommand {
             Interface ovsInterface = TyperUtils.getTypedRowWrapper(transaction.getDatabaseSchema(), Interface.class);
             ovsInterface.setName(terminationPoint.getName());
             ovsInterface.setType(SouthboundMapper.createOvsdbInterfaceType(terminationPoint.getInterfaceType()));
-            Integer ofPort = terminationPoint.getOfport();
+            Long ofPort = terminationPoint.getOfport();
             if (ofPort != null) {
-                ovsInterface.setOpenFlowPort(Sets.newHashSet(ofPort.longValue()));
+                ovsInterface.setOpenFlowPort(Sets.newHashSet(ofPort));
             }
             Integer ofPortRequest = terminationPoint.getOfportRequest();
             if (ofPortRequest != null) {
index f69b7458cc97d99027992eb801d5e4ef4b929464..3332999dc894995acbb9e0e34cec44979257d778 100644 (file)
@@ -135,7 +135,7 @@ public class OvsdbPortUpdateCommand extends AbstractTransactionCommand {
                                         Set<Long> ofPorts = interfIter.getOpenFlowPortColumn().getData();
                                         if (ofPorts != null && !ofPorts.isEmpty()) {
                                             Iterator<Long> ofPortsIter = ofPorts.iterator();
-                                            int ofPort = ofPortsIter.next().intValue();
+                                            long ofPort = ofPortsIter.next();
                                             if (ofPort >= 0) {
                                                 ovsdbTerminationPointBuilder
                                                     .setOfport(ofPort);