From 39656015fd063e833ab7ce728eec67cafed5f659 Mon Sep 17 00:00:00 2001 From: Maros Marsalek Date: Tue, 24 Jun 2014 13:54:57 +0200 Subject: [PATCH] BUG-874 Remove rolback cabaility advertised by config netconf The rollback on error option is not supported by the netconf server endpoint for config subsystem therefore it cannot advertise rollback on error capability. If it is present in message, the rpc will fail. Change-Id: If32113aa77d9ef5d614b143741d1d04fbdc0d22d Signed-off-by: Maros Marsalek --- opendaylight/commons/opendaylight/pom.xml | 12 ++++++------ .../sal-binding-it/src/test/resources/controller.xml | 1 - .../osgi/NetconfOperationServiceImpl.java | 4 +++- .../netconf/it/NetconfConfigPersisterITTest.java | 4 ++-- 4 files changed, 11 insertions(+), 10 deletions(-) diff --git a/opendaylight/commons/opendaylight/pom.xml b/opendaylight/commons/opendaylight/pom.xml index c83bf751ee..89f4466a44 100644 --- a/opendaylight/commons/opendaylight/pom.xml +++ b/opendaylight/commons/opendaylight/pom.xml @@ -996,12 +996,12 @@ netconf-client ${netconf.version} - - org.opendaylight.controller - netconf-client - ${netconf.version} - test-jar - + + org.opendaylight.controller + netconf-client + ${netconf.version} + test-jar + diff --git a/opendaylight/md-sal/sal-binding-it/src/test/resources/controller.xml b/opendaylight/md-sal/sal-binding-it/src/test/resources/controller.xml index 37ef257224..63a921d6f3 100644 --- a/opendaylight/md-sal/sal-binding-it/src/test/resources/controller.xml +++ b/opendaylight/md-sal/sal-binding-it/src/test/resources/controller.xml @@ -20,7 +20,6 @@ urn:ietf:params:xml:ns:yang:ietf-inet-types?module=ietf-inet-types&revision=2010-09-24 - urn:ietf:params:netconf:capability:rollback-on-error:1.0 urn:ietf:params:xml:ns:yang:ietf-yang-types?module=ietf-yang-types&revision=2010-09-24 diff --git a/opendaylight/netconf/config-netconf-connector/src/main/java/org/opendaylight/controller/netconf/confignetconfconnector/osgi/NetconfOperationServiceImpl.java b/opendaylight/netconf/config-netconf-connector/src/main/java/org/opendaylight/controller/netconf/confignetconfconnector/osgi/NetconfOperationServiceImpl.java index 1069858b47..f5fe089d4d 100644 --- a/opendaylight/netconf/config-netconf-connector/src/main/java/org/opendaylight/controller/netconf/confignetconfconnector/osgi/NetconfOperationServiceImpl.java +++ b/opendaylight/netconf/config-netconf-connector/src/main/java/org/opendaylight/controller/netconf/confignetconfconnector/osgi/NetconfOperationServiceImpl.java @@ -95,8 +95,10 @@ public class NetconfOperationServiceImpl implements NetconfOperationService { Set capabilities = new HashSet<>(); // [RFC6241] 8.3. Candidate Configuration Capability capabilities.add(new BasicCapability("urn:ietf:params:netconf:capability:candidate:1.0")); + + // TODO rollback on error not supported EditConfigXmlParser:100 // [RFC6241] 8.5. Rollback-on-Error Capability - capabilities.add(new BasicCapability("urn:ietf:params:netconf:capability:rollback-on-error:1.0")); + // capabilities.add(new BasicCapability("urn:ietf:params:netconf:capability:rollback-on-error:1.0")); Set modules = yangStoreSnapshot.getModules(); for (Module module : modules) { diff --git a/opendaylight/netconf/netconf-it/src/test/java/org/opendaylight/controller/netconf/it/NetconfConfigPersisterITTest.java b/opendaylight/netconf/netconf-it/src/test/java/org/opendaylight/controller/netconf/it/NetconfConfigPersisterITTest.java index 148b0446e3..f7091beba5 100644 --- a/opendaylight/netconf/netconf-it/src/test/java/org/opendaylight/controller/netconf/it/NetconfConfigPersisterITTest.java +++ b/opendaylight/netconf/netconf-it/src/test/java/org/opendaylight/controller/netconf/it/NetconfConfigPersisterITTest.java @@ -143,8 +143,8 @@ public class NetconfConfigPersisterITTest extends AbstractNetconfConfigTest { } notificationVerifier.assertNotificationCount(2); - notificationVerifier.assertNotificationContent(0, 0, 0, 9); - notificationVerifier.assertNotificationContent(1, 4, 3, 9); + notificationVerifier.assertNotificationContent(0, 0, 0, 8); + notificationVerifier.assertNotificationContent(1, 4, 3, 8); mockedAggregator.assertSnapshotCount(2); // Capabilities are stripped for persister -- 2.36.6