Bug 3379:java.lang.IllegalArgumentException: ControllerEntryKey 29/22529/1
authorSam Hague <shague@redhat.com>
Tue, 9 Jun 2015 19:50:00 +0000 (15:50 -0400)
committerSam Hague <shague@redhat.com>
Sat, 13 Jun 2015 15:24:08 +0000 (15:24 +0000)
commite23dfc139335c1ba6bd9862ca87d56d417a5bdb5
tree88a8923b3f83db4d6cb2eed7e276ac6d3c0e32cd
parent75ca9757ff9f9c4baa53c485d381b660bf6bd374
Bug 3379:java.lang.IllegalArgumentException: ControllerEntryKey

Problem: OVSDB Controller updates are indpendent of Bridge updates but the ovsdb.yang model includes the controller data in the OVsdbBridgeAugmentation. This existing code assumed that the Controller and Bridge updates would be together and thus would always have the OvsdbBridgeAugmentation to update. That is not the case since the Controller updates can be received without a Bridge update.

Solution: Add the ControllerEntry to the OvsdbBridgeAugmentation using the Bridge if it was included with the Controller update. Otherwise, find all the OvsdbBridgeAugmentations for the connection and update them if they are using the updated Controller.

Patch also includes updates to SouthboundIT and NetvirtIT. NetvirtIT was needed so that the isConnected=true case would be tested. Southbound does not include the openflowplugin but Netvirt does. The openflowplugin is needed to test when the switch connects to the openflow controller.

Other fixes were made to the existing testOvsdbBridgeControllerInfo(). That test was using the ovsdb node ip:port as the controller target but it should have been the controller's ip:port.

Change-Id: I30785dbdf955614ad6fc675507da048434c2485e
Signed-off-by: Sam Hague <shague@redhat.com>
(cherry picked from commit fd1b45b2100fb2bfe7a7b58295cebdc949833680)
openstack/net-virt-it/src/test/java/org/opendaylight/ovsdb/openstack/netvirt/it/NetvirtIT.java
openstack/net-virt-it/src/test/java/org/opendaylight/ovsdb/openstack/netvirt/it/NetvirtITConstants.java
southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/SouthboundConstants.java
southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/SouthboundMapper.java
southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/SouthboundUtil.java
southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbBridgeUpdateCommand.java
southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbControllerUpdateCommand.java
southbound/southbound-it/src/test/java/org/opendaylight/ovsdb/southbound/it/SouthboundIT.java
southbound/southbound-it/src/test/java/org/opendaylight/ovsdb/southbound/it/SouthboundITConstants.java