commit | bc1a7b5116da481bd73ef40efa0cfc0f3ec413ea | [log] [tgz] |
---|---|---|
author | Jian Li <pyguni@gmail.com> | Thu May 03 16:56:50 2018 +0900 |
committer | Jian Li <pyguni@gmail.com> | Tue May 08 10:18:55 2018 +0900 |
tree | 6ccb4e1f71684b2482d767bbe1661550fa77aa4f | |
parent | 9b1bc9d78a484db5f915cebc8e49e1fe0e79c5ae [diff] |
Enforce OVSDB runs as an OVSDB client mode only during SONA startup Change-Id: I9aefab86ba8e13e349f75ec0beccfc5b0048f809
diff --git a/apps/openstacknode/app/src/main/java/org/onosproject/openstacknode/impl/DefaultOpenstackNodeHandler.java b/apps/openstacknode/app/src/main/java/org/onosproject/openstacknode/impl/DefaultOpenstackNodeHandler.java index 025757e..51852df 100644 --- a/apps/openstacknode/app/src/main/java/org/onosproject/openstacknode/impl/DefaultOpenstackNodeHandler.java +++ b/apps/openstacknode/app/src/main/java/org/onosproject/openstacknode/impl/DefaultOpenstackNodeHandler.java
@@ -152,6 +152,7 @@ deviceService.addListener(ovsdbListener); deviceService.addListener(bridgeListener); osNodeService.addListener(osNodeListener); + ovsdbController.setServerMode(false); log.info("Started"); }
diff --git a/apps/openstacknode/app/src/test/java/org/onosproject/openstacknode/impl/DefaultOpenstackNodeHandlerTest.java b/apps/openstacknode/app/src/test/java/org/onosproject/openstacknode/impl/DefaultOpenstackNodeHandlerTest.java index fccfd1b..18876ee 100644 --- a/apps/openstacknode/app/src/test/java/org/onosproject/openstacknode/impl/DefaultOpenstackNodeHandlerTest.java +++ b/apps/openstacknode/app/src/test/java/org/onosproject/openstacknode/impl/DefaultOpenstackNodeHandlerTest.java
@@ -81,9 +81,11 @@ import java.util.Set; import java.util.stream.Collectors; +import static org.easymock.EasyMock.anyBoolean; import static org.easymock.EasyMock.anyObject; import static org.easymock.EasyMock.createMock; import static org.easymock.EasyMock.expect; +import static org.easymock.EasyMock.expectLastCall; import static org.easymock.EasyMock.replay; import static org.junit.Assert.assertEquals; import static org.onosproject.net.AnnotationKeys.PORT_NAME; @@ -237,6 +239,9 @@ expect(mockOvsdbController.getOvsdbClient(anyObject())) .andReturn(mockOvsdbClient) .anyTimes(); + mockOvsdbController.setServerMode(anyBoolean()); + expectLastCall(); + replay(mockOvsdbController); testNodeManager = new TestOpenstackNodeManager();