Normalize predicate order in ImmutableNodes.fromInstanceId() 95/85595/1
authorRobert Varga <robert.varga@pantheon.tech>
Tue, 5 Nov 2019 13:04:56 +0000 (14:04 +0100)
committerRobert Varga <robert.varga@pantheon.tech>
Tue, 5 Nov 2019 16:13:04 +0000 (17:13 +0100)
commita695007f8cb3ef61c6dd4eae67c4f76301be1156
tree40953c06b4cc55cacca36815a7f7abc7c000107b
parentaaf8dca7253f612c4dce429ceca6e6a935da529b
Normalize predicate order in ImmutableNodes.fromInstanceId()

The only user of this method is NETCONF, which requires predicates
to be ordered in the order of key definition, as per XML encoding
rules.

Make sure we re-create NodeIdentifierWithPredicates in the schema
definition order if the provided order does not already match it.

JIRA: YANGTOOLS-1037
Change-Id: I57c389eeecb9680062be8b56c834eb569e7d3d3b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 4f869bbe2f963d9168eb659bc1761bfd174e6ab3)
yang/yang-data-impl/src/main/java/org/opendaylight/yangtools/yang/data/impl/schema/InstanceIdToCompositeNodes.java
yang/yang-data-impl/src/test/java/org/opendaylight/yangtools/yang/data/impl/schema/InstanceIdToNodesTest.java
yang/yang-data-impl/src/test/resources/filter-test.yang