[NETCONF-203] Restconf draft11 - bad parsing Created: 18/May/16  Updated: 15/Mar/19  Resolved: 16/Jun/16

Status: Resolved
Project: netconf
Component/s: restconf-nb
Affects Version/s: None
Fix Version/s: None

Type: Bug
Reporter: Ivan Hrasko Assignee: Ivan Hrasko
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


External issue ID: 5911

 Description   

1. It is not possible to deserialize URI which contains leaf list identifier, for example: "/list-test:top/Y=x%3Ay". See test case "codecLeafListTest" in https://git.opendaylight.org/gerrit/#/c/39027/

2. When try to serialize YangInstanceIdentifier.EMPTY IndexOutOfBoundsException is thrown. See test case "emptyDataTest" in https://git.opendaylight.org/gerrit/#/c/39030/

3. Serializer does not know all reserved characters according to rfc3986. See test case "verifyReservedCharactersTest" in https://git.opendaylight.org/gerrit/#/c/39030/

4. When not all list keys are encoded serializer takes next identifier as next key value. https://git.opendaylight.org/gerrit/#/c/39027/



 Comments   
Comment by Ivan Hrasko [ 19/May/16 ]

5. Also lists without keys are possible but current implementation is expecting them and adding '=' also for lists without keys.
Tests: https://git.opendaylight.org/gerrit/#/c/39030/

Comment by Ivan Hrasko [ 19/May/16 ]

6. If list key value contains percent encoded chars at the beginning and ends with no percent encoded chars then the end of the key value is ignored.
See failing test "percentEncodedKeyEndsWithNoPercentEncodedChars" in https://git.opendaylight.org/gerrit/#/c/38965/

Comment by Ivan Hrasko [ 19/May/16 ]

7. There is no check if key for leaf list was encoded in URI.
See "leafListMissingKeyNegativeTest" in https://git.opendaylight.org/gerrit/#/c/38965/.

Comment by Ivan Hrasko [ 02/Jun/16 ]

8. It is not possible to have URIS which contains node names without module name.
Module name should be required only if node is defined in another module, otherwise it is optional:
api-identifier = [module-name ":"] identifier

Comment by Ivan Hrasko [ 06/Jun/16 ]

9. Key value should not be parsed with parsing rules for identifier. It can be quoted (also bug - not implemented) or unquoted string.

Comment by Ivan Hrasko [ 10/Jun/16 ]

10. Empty string as an input to deserialization should return error. But "/" should be valid according to https://tools.ietf.org/html/draft-ietf-netconf-restconf-13#section-3.5.1.1

Comment by Ivan Hrasko [ 13/Jun/16 ]

Fixed all problems except of:

CONTROLLER-3:
wrong bug report (bug does not exist)

CONTROLLER-7:
1. it is not true that list key value can be quoted:
"changed list key encoding to clarify that quoted strings are not allowed. Percent-encoded values are used if quotes would be required. A missing key is treated as a zero-length string"
A.5. v08 - v09 in [draft-ietf-netconf-restconf-13]
2. fixed matcher for values

patch:
https://git.opendaylight.org/gerrit/#/c/39769/
unit tests:
https://git.opendaylight.org/gerrit/#/c/38965/
https://git.opendaylight.org/gerrit/#/c/39027/
https://git.opendaylight.org/gerrit/#/c/39030/

Comment by Ivan Hrasko [ 13/Jun/16 ]

CONTROLLER-3: was also fixed in this patch.

Generated at Wed Feb 07 20:14:25 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.