import org.custommonkey.xmlunit.XMLUnit;
import org.custommonkey.xmlunit.examples.RecursiveElementNameAndTextQualifier;
import org.junit.Before;
-import org.junit.Ignore;
import org.junit.Test;
import org.opendaylight.controller.cluster.datastore.ConcurrentDOMDataBroker;
import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType;
}
- @Ignore("Xml is not similar")
@Test
public void testMoreComplexEditConfigs() throws Exception {
}
}
- @Ignore("Xml is not similar")
@Test
public void testEditWithCreate() throws Exception {
verifyResponse(edit("messages/mapping/editConfig_create.xml"), RPC_REPLY_OK);
- verifyResponse(getConfigCandidate(), XmlFileLoader.xmlFileToDocument("messages/mapping/editConfig_merge_n1_control.xml"));
+ verifyResponse(getConfigCandidate(), XmlFileLoader.xmlFileToDocument("messages/mapping/editConfig_create_n1_control.xml"));
+
try {
edit("messages/mapping/editConfig_create.xml");
assertEmptyDatastore(getConfigRunning());
}
- private void verifyResponse(Document response, Document template) {
+ private void verifyResponse(Document response, Document template){
DetailedDiff dd = new DetailedDiff(new Diff(response, template));
dd.overrideElementQualifier(new RecursiveElementNameAndTextQualifier());
assertTrue(dd.similar());
--- /dev/null
+<!--
+ ~ Copyright (c) 2015 Cisco Systems, Inc. and others. All rights reserved.
+ ~
+ ~ This program and the accompanying materials are made available under the
+ ~ terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ ~ and is available at http://www.eclipse.org/legal/epl-v10.html
+ -->
+
+<rpc-reply a="64" id="a" message-id="101" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" xmlnx="a:b:c:d">
+ <data xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
+ <mapping-nodes xmlns:a="urn:ietf:params:xml:ns:netconf:base:1.0" a:operation="create" xmlns="urn:opendaylight:mdsal:mapping:test">
+ <mapping-node>
+ <id>node1-put</id>
+ <content>put content</content>
+ </mapping-node>
+ </mapping-nodes>
+ </data>
+</rpc-reply>
\ No newline at end of file
<rpc-reply a="64" id="a" message-id="101" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" xmlnx="a:b:c:d">
<data xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
- <mapping-nodes xmlns="urn:opendaylight:mdsal:mapping:test">
+ <mapping-nodes xmlns:a="urn:ietf:params:xml:ns:netconf:base:1.0" a:operation="replace" xmlns="urn:opendaylight:mdsal:mapping:test">
<mapping-node>
<id>new-node7</id>
<content>new node content</content>