Delete restconf Change-Id: I0cc4ea8375ec22b67ee93e1a02a9131f56f044c2 Signed-off-by: Tomas Cere <tcere@cisco.com>
Bug 3822: Improve error reporting for restconf PUT A runtime exception can be emitted by the netconf mount point which should be reported to the user, otherwise you get a 500 response with no error info which isn't very helpful. Also the fucntionality to output the error-info field was ommitted with the conversion from CompositeNode to NormalizedNode so I re-implemeneted it. It was originally ommitted with a TODO b/c the NormalizedNodeStreamWriters validate against the schema and error-info is defined as an empty container in the restconf yang. So there's no way to create a ContainerNode to represent the error-info data that conforms to the schema. To work around this, I created a leaf node and special-cased error-info in the stream writer to elide schema validation. I also added a regression unit test for the case where the URL contains an identityref. Change-Id: I93b4aea25c829af1232d539180f02dd61e252d50 Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
Fix license header violations in sal-rest-connector Change-Id: I2dfda9fe6b3185d20386cc9f6078c0b53f7be40b Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
Bug 2358 - Remove tests cnsn to json and add tests nn to json Tests of codecs are included in codecs yangtools yang-data-codec-gson and yang-data-impl but we test codec on input data and also with presentation of Rest path. * remove CnSnToJsonNotExistingLeafTypeTest.java test * add NnToJsonNotExistingLeafTypeTest.java to nn/to/json/test/ * test with not existing leaf type Change-Id: Id7a1256b42a3a754e13343613dcad7059a2316c4 Signed-off-by: Jakub Toth <jatoth@cisco.com> (cherry picked from commit 1fa839d51563b9588bf7502e86a5e9c2425fab2f)
Bug 2358 - Remove tests cnsn to json and add tests nn to json Tests of codecs are included in codecs yangtools yang-data-codec-gson and yang-data-impl but we test codec on input data and also with presentation of Rest path. * remove CnSnToJsonWithAugmentTest test * add NnToJsonWithAugmentTest to nn/to/json/test/ * positive test for test augmented elements Change-Id: I4c8b92e828ade1d43a5af5384ec7938854fda9ce Signed-off-by: Jakub Toth <jatoth@cisco.com> (cherry picked from commit 6b97753fc17bb2d9d73047038105754fcebe029d)
Bug 2358 - Remove tests json to cnsn and add tests json to nn Tests of codecs are included in codecs yangtools yang-data-codec-gson and yang-data-impl but we test codec on input data and also with presentation of Rest path. * remove all tests json to composite node and simple node * rewrite json leafref input tests from comp and simple node to normalized node * we're testing REST provider URI path translator with payload * add test for test data in json with identityref to normalized node * positive test * test data in builded normalized node with data in json * used identityref type to reference an existing identity * add test for test data in json with leafref to normalized node * positive test * test data in builded normalized node with data in json * used leafref type to reference particular leaf instance in the data tree * add test for test data in json with more type of nodes and values * positive tests * test normalized node from json with: * simple data in list * simple data in container * multiple items in leaf-list * multiple items in list * empty leaf * augmented data * negative tests * test fail on bad top level elements * contains 3 situations * test fail for null data * empty leaf-list * leaf without any value * test on build normalized node with blank json * test fail with different namespaces * test fail because of unsupported format of json * test on invalid URI character Change-Id: Icb5ff5d11843123c79859a0c75d7df7bad8a0b44 Signed-off-by: Jakub Toth <jatoth@cisco.com> (cherry picked from commit a3fd2b66c8121a8603d684b97c1fb7076d933d99)
Bug 868 - Continuous: remove deprecated APIs * removed deprecated API from Bug3595Test Change-Id: Ic8f987aeb000cfb150286ad44e478771e8a52384 Signed-off-by: Jan Hajnar <jhajnar@cisco.com> (cherry picked from commit e1b79358817f1202c50f7410b92746b0777d0642)
Bug 2358 - Remove tests cnsn to json and add tests nn to json Tests of codecs are included in codecs yangtools yang-data-codec-gson and yang-data-impl but we test codec on input data and also with presentation of Rest path. * add test NnToJsonLeafrefType to nn/to/json/test * positive tests of leafref * absolut path * relative path * leafref to not leaf * from leaflist to leaf * from leafref to leafref * negative tests of leafref * non existing Leaf Change-Id: I652204071d874d6c7a2a65e100dd68c16a12af8f Signed-off-by: Jakub Toth <jatoth@cisco.com> (cherry picked from commit 1f4b4062cbdd0cfadcf61e60bce9ee9e951c975c)
Bug 2358 - Remove tests cnsn to json and add tests nn to json Tests of codecs are included in codecs yangtools yang-data-codec-gson and yang-data-impl but we test codec on input data and also with presentation of Rest path. * remove CnSnJsonChoiceCaseTest test * add NnJsonChoiceCaseTest to nn/to/json/test/ * positive and negative tests for choice statement Change-Id: I83d351bf0de9bb4a1c649c5851209ae472aaaa24 Signed-off-by: Jakub Toth <jatoth@cisco.com> (cherry picked from commit 33657892ea175d459184732b0fbc08eb7589e787)
Bug 2358 - Remove tests cnsn to xml and add tests nn to xml Tests of codecs are included in codecs yangtools yang-data-codec-gson and yang-data-impl but we test codec on input data and also with presentation of Rest path. * remove CnSnToXmlWithDataFromSeveralModulesTest test * add NnToXmlWithDataFromSeveralModulesTest to nn/to/xml/test/ * positive test for test more modules Change-Id: I4f4eea89487e946b0a4a7edd75423d6bf551bd20 Signed-off-by: Jakub Toth <jatoth@cisco.com> (cherry picked from commit adc820f5aaa84b67f08b76982b74c4f790c9ba7c)
Bug 2358 - Remove tests cnsn to xml and add tests nn to xml Tests of codecs are included in codecs yangtools yang-data-codec-gson and yang-data-impl but we test codec on input data and also with presentation of Rest path. * remove CnSnInstanceIdentifierToXmlTest test * add NnInstanceIdentifierToXmlTest to nn/to/xml/test/ * positive test for instance identifier Change-Id: Iceb73ed4d96f7686fca04047524716532297a2f8 Signed-off-by: Jakub Toth <jatoth@cisco.com> (cherry picked from commit 6c0c438071d2e85ef2f08070935cb310165f25cf)
Bug 2358 - Remove tests cnsn to xml and add tests nn to xml Tests of codecs are included in codecs yangtools yang-data-codec-gson and yang-data-impl but we test codec on input data and also with presentation of Rest path. * remove CnSnToXmlTest test * add NnToXmlTest to nn/to/xml/test/ * positive tests for basic data types Change-Id: Iac408dc8ce25c8d9c46a21863733b30390ea8c34 Signed-off-by: Jakub Toth <jatoth@cisco.com> (cherry picked from commit bec0511bd378c069a2f51545736064a9821e44a7)
Bug 2358 - Remove tests cnsn to xml and add tests nn to xml Tests of codecs are included in codecs yangtools yang-data-codec-gson and yang-data-impl but we test codec on input data and also with presentation of Rest path. * remove CnSnToXmlWithChoiceTest test * add NnToXmlWithChoiceTest to nn/to/xml/test/ * positive test for choice statement Change-Id: Ie3fba1c51db57ef7621703812f7a98b6d417feca Signed-off-by: Jakub Toth <jatoth@cisco.com> (cherry picked from commit 015b6436357637c6cbd29b72e931735ff2a34007)
Bug 2358 - Remove tests cnsn to xml and add tests nn to xml Tests of codecs are included in codecs yangtools yang-data-codec-gson and yang-data-impl but we test codec on input data and also with presentation of Rest path. * remove CnSnToXmlNotExistingLeafTypeTest test * add NnToXmlNotExistingLeafTypeTest to nn/to/xml/test/ * negative test for not existing leaf type Change-Id: I6f55fd82c40a03726aecb78cfc2ece9888cf9717 Signed-off-by: Jakub Toth <jatoth@cisco.com> (cherry picked from commit 0c957832fd6587f5cfe6fb8de215d97cd6fd9c24)
Bug 3595 - RESTCONF: GET operation on a node in a list, identified by leaf-ref fails. * added referenced type resolution for leafrefs in ControllerContext Change-Id: Ic38b77038feb786a46a8bdd069448f006418d7bf Signed-off-by: Jan Hajnar <jhajnar@cisco.com> (cherry picked from commit 5af9027a8ce234f3dcc44ee0d1791036b7f0ed62)
BUG 2155 - depth parameter in URI * added interface RestconfNormalizedNodeWriter * added two implementations of RestconfNormalizedNodeWriter, RestconfDelegatingNormalizedNodeWriter just calls normalized node writer from yangtools and DepthAwareNormalizedNodeWriter is writer implementation tha checks depth * added CutDataToCorrectDepthTest (randomly failing, needs to be checked or removed for now) * added condition to xml and json normalized node writers to create depth aware normalized node writer id depth is specified in writer parameters Change-Id: I922942e24cbe505c2803644c25acd755fe4dfae7 Signed-off-by: Jozef Gloncak <jgloncak@cisco.com> Signed-off-by: Jan Hajnar <jhajnar@cisco.com> (cherry picked from commit f94de91bba1210fa852aaab0490743f9f3553e99)
Bug 3640 - RPC call error - impossible to call rpc * disabled children search in post if request is rpc input * fixed XmlNormalizedNodeBodyReader tests that were testing on wrong rpc input data Change-Id: I2602d34a4ab42169959b867acaffa988a11601f3 Signed-off-by: Jan Hajnar <jhajnar@cisco.com> (cherry picked from commit bc9579fb5cbb7db3b5ce071a9ce4a858c819caf7)
Bug 568 - Websockets: Test & fix data change notifications * changed WebSocketClient input parameter to accept "ws" protocol instead of "http" Change-Id: I2e1673707ca5231552195049024ebcb5e4964908 Signed-off-by: Jan Hajnar <jhajnar@cisco.com> (cherry picked from commit c0b35fcde6bd4dfda88eb8ee507bf20c77644aa3)
Bug 3104 - Sal Rest Connector: Data already exists for path when adding new item to list in augmentation * changed XmlNormalizedNodeBodyReader and JsonNormalizedNodeBodyReader to return YangInstanceIdentifier pointing to root of payload data. * changed BrokerFacade datastore functions for PUT and POST to use returned path from reader without modifications * modified rest connector tests according to new behavior and added tests for POST when payload is from augment/choice Change-Id: Iac6a9853ea4c4529d2f484c464bd27123f4fafa2 Signed-off-by: Jan Hajnar <jhajnar@cisco.com> (cherry picked from commit 3d4dc18c01ebca47030284dde81988a44424d821)
Bug 2358 - Changed modifier of method in AbstractBodyReaderTest to protected Tests of codecs are included in codecs yangtools yang-data-codec-gson and yang-data-impl but we test codec on input data and also with presentation of Rest path. * changed modifier of method getMediaType() to protected * fix tests with method getMediaType() * remove additional assertions Change-Id: I211c2dc43690b663cada31deb3942e10fcc95366 Signed-off-by: ary <jatoth@cisco.com> (cherry picked from commit 90aed8ac03ee3496178bdc3ec4b46f5c98dd78fc)