-
Bug
-
Resolution: Done
-
Medium
-
Honolulu Release, Istanbul Release
-
None
Step to reproduce:
- Run following REST request to retrieve RAN model:
http://<host>:<port>/cps/api/v1/dataspaces/NFP-Operational/schema-sets/cps-ran-schema-model
Expected result:
- RAN model is provided
- If ever the model is not valid, the detail about the validation error is provided in the response.
Actual result:
- The RAN model is not provided, retrieval is failing, the model is not valid.
- The detail of the validation error is not provided in the response. It is in the logs.
Actual response:
{ "status": "400 BAD_REQUEST", "message": "Yang resource is invalid.", "details": "Yang syntax validation failed for resource cps-ran-schema-model2021-01-28.yang." }
Actual logs:
org.onap.cps.spi.exceptions.ModelValidationException: Yang resource is invalid. at org.onap.cps.yang.YangTextSchemaSourceSetBuilder.generateSchemaContext(YangTextSchemaSourceSetBuilder.java:129) at org.onap.cps.yang.YangTextSchemaSourceSetBuilder.build(YangTextSchemaSourceSetBuilder.java:64) at org.onap.cps.yang.YangTextSchemaSourceSetBuilder.of(YangTextSchemaSourceSetBuilder.java:69) at org.onap.cps.api.impl.YangTextSchemaSourceSetCache.get(YangTextSchemaSourceSetCache.java:54) Caused by: org.opendaylight.yangtools.yang.model.parser.api.YangSyntaxErrorException: extraneous input ',' expecting {SEP, DQUOT_STRING, SQUOT_STRING, DQUOT_END, SQUOT_END} in source RevisionSourceIdentifier [name=cps-ran-schema-model2021-01-28.yang] on line 492 character 41 extraneous input '(Comma)' expecting {SEP, DQUOT_STRING, SQUOT_STRING, DQUOT_END, SQUOT_END} in source RevisionSourceIdentifier [name=cps-ran-schema-model2021-01-28.yang] on line 492 character 43 extraneous input 'and' expecting {SEP, DQUOT_STRING, SQUOT_STRING, DQUOT_END, SQUOT_END} in source RevisionSourceIdentifier [name=cps-ran-schema-model2021-01-28.yang] on line 492 character 51 extraneous input 'space' expecting {';', '{', SEP} in source RevisionSourceIdentifier [name=cps-ran-schema-model2021-01-28.yang] on line 492 character 61 extraneous input 'Attribute' expecting {';', '{', SEP} in source RevisionSourceIdentifier [name=cps-ran-schema-model2021-01-28.yang] on line 493 character 11 extraneous input 'can' expecting {';', '{', SEP} in source RevisionSourceIdentifier [name=cps-ran-schema-model2021-01-28.yang] on line 493 character 27 extraneous input 'the' expecting {';', '{', SEP} in source RevisionSourceIdentifier [name=cps-ran-schema-model2021-01-28.yang] on line 493 character 39 extraneous input 'characters' expecting {';', '{', SEP} in source RevisionSourceIdentifier [name=cps-ran-schema-model2021-01-28.yang] on line 493 character 53 extraneous input 'they' expecting {';', '{', SEP} in source RevisionSourceIdentifier [name=cps-ran-schema-model2021-01-28.yang] on line 493 character 67 extraneous input 'excaped' expecting {';', '{', SEP} in source RevisionSourceIdentifier [name=cps-ran-schema-model2021-01-28.yang] on line 494 character 11 extraneous input '>' expecting {';', '{', SEP} in source RevisionSourceIdentifier [name=cps-ran-schema-model2021-01-28.yang] on line 494 character 22 extraneous input '<' expecting {';', '{', SEP} in source RevisionSourceIdentifier [name=cps-ran-schema-model2021-01-28.yang] on line 494 character 24 extraneous input ' + , (Comma) and White space\n The Attribute value can contain control characters if its an escaped\n double digit hex number.\n Examples could be\n UID=nobody@example.com,DC=example,DC=com\n CN=John Smith,OU=Sales,O=ACME Limited,L=Moab,ST=Utah,C=US' expecting {'}', SEP, IDENTIFIER} in source RevisionSourceIdentifier [name=cps-ran-schema-model2021-01-28.yang] on line 494 character 29 extraneous input '<EOF>' expecting {'}', SEP, IDENTIFIER} in source RevisionSourceIdentifier [name=cps-ran-schema-model2021-01-28.yang] on line 1298 character 4 at org.opendaylight.yangtools.yang.parser.rfc7950.repo.YangErrorListener.validate(YangErrorListener.java:62) at org.opendaylight.yangtools.yang.parser.rfc7950.repo.YangStatementStreamSource.parseYangSource(YangStatementStreamSource.java:171) at org.opendaylight.yangtools.yang.parser.rfc7950.repo.YangStatementStreamSource.parseYangSource(YangStatementStreamSource.java:154) at org.opendaylight.yangtools.yang.parser.rfc7950.repo.YangStatementStreamSource.create(YangStatementStreamSource.java:73) at org.onap.cps.yang.YangTextSchemaSourceSetBuilder.generateSchemaContext(YangTextSchemaSourceSetBuilder.java:123) ... 124 common frames omitted
Note:
This is 2 issues for this bug, they could be split in 2 different bugs if needed.
- mentioned in
-
Page Loading...