Attempting to Reproduce presto-nrp.yaml #24
Replies: 6 comments
-
@jahveen given I am responsible for quite extensive part of yang2swagger I will try to help. |
Beta Was this translation helpful? Give feedback.
-
@bartoszm @jahveen Hi , I am a colleague of @jahveen , I see many warnings and errors when I run - .. Many Warnings follow .. The first ERROR , followed by many more : 2020-09-10 15:43:37,527 [main] ERROR o.o.y.y.p.s.r.BuildGlobalContext - Failed to parse YANG from source SourceSpecificContext [source=null, current=EFFECTIVE_MODEL, finished=FULL_DECLARATION]: Grouping '(urn:onf:otcc:yang:tapi-connectivity?revision=2018-03-07)connection-end-point-ref' was not resolved. [at null:83:16] Any help would be appreciated , we plan to add to the yang models later , but we are having difficulty getting up and running with default files . I am hoping its something that we can easily address. Thanks - regards, |
Beta Was this translation helpful? Give feedback.
-
Hello @bartoszm, We have performed more extensive testing and here are the details: Testing EnvironmentOS: Ubuntu 20.04.1 LTS (GNU/Linux 5.4.0-48-generic x86_64) Command Usedjava -classpath /home/jahveen/y2s-tapi-cli/target/yang2swagger-tapi-cli-1.0-cli.jar com.amartus.y2s.Generator mef-common tapi-topology tapi-common tapi-connectivity tapi-path-computation mef-common-types nrm-connectivity nrp-interface -yang-dir /home/jahveen/yangs/ -api-version 2018R2 -output /home/jahveen/presto-nrp.yaml Notes: nrp-interface.yang, tapi-connectivity@2018-03-07.yang, tapi-common@2018-03-07.yang, nrm-connectivity.yang, tapi-topology@2018-03-07.yang, tapi-path-computation@2018-03-07.yang, mef-common-types.yang, mef-common.yang The combination of modules that I settled on was because of trial and error selection - there was no clear definition of which revision of each module I should use (2) I specified all of the YANG modules in the command. The result is no different to me not specifying them at all, since only the specified modules are in the yang-dir (3) I specified api-version to match the one specified in presto-nrp.yaml Output99% the same as the repo version in /home/jahveen/MEF-LSO-Presto-SDK/api/swagger/presto-nrp.yaml. The differences I found are: (1) description: The repo version is "MEF 60 (PRESTO NRP) swagger definition". My generated version is a list of the modules (2) title: Both versions are a list of the modules, but in a different order, and the repo version is missing the module name "tapi-path-computation" (3) basepath: This is included in the repo version only (4) consumes / produces: The repo version has two ("application/json", "application/xml"), the generated version only allows one to be specified Questions(1) Please comment on the differences I found. Are they expected? If so, am I supposed to manually edit my output to match the repo (2) More a statement than a question - it would be useful to provide clearer instructions on how to reproduce the swagger output so that we can be confident on how to generate it, and more importantly, we can be confident that we can incorporate our own YANG deviations and generate the correct swagger definitions (3) You have since updated yang2swagger (tag/1.1.7) and y2s-tapi-cli (tag/v1.0.0), and the output I see when using later versions is noticeably different. Should I expect the next release of the SDK (presumably r4) to use the latest versions of y2s-tapi-cli with all its bug fixes, etc.? |
Beta Was this translation helpful? Give feedback.
-
Hello, Is someone able to assist me with my questions? Thanks. Jahveen |
Beta Was this translation helpful? Give feedback.
-
Hi @jahveen, |
Beta Was this translation helpful? Give feedback.
-
Answers:
(1) I suppose (since I was not generating the files for the latest
releases) that there were some manual modifications applied to generated
content (e.g. title basepath etc. )
(2) I would agree with the statement - I am CC Michal to let him take that
under consideration for community content improvement
(3) I suppose that the new versions will be generated with the latest tool
support. The fixes I've been able to introduce were answers to some of the
community requests. Unfortunately, there are still issues awaiting
resolution or discussion but I am afraid that without additional
contribution (tool is an open source project) it will be hard to
address these given my limited availability.
Cheers,
Bartosz
…On Wed, 21 Oct 2020 at 11:02, jahveen ***@***.***> wrote:
Hello @bartoszm <https://github.com/bartoszm>,
We have performed more extensive testing and here are the details:
Testing Environment
OS: Ubuntu 20.04.1 LTS (GNU/Linux 5.4.0-48-generic x86_64)
java: openjdk version "1.8.0_265"
maven: 3.6.3
yang2swagger: tag/1.1.7
y2s-tapi-cli: tag/v1.0.0
MEF-LSO-Presto-SDK: tags/r3
Command Used
java -classpath
/home/jahveen/y2s-tapi-cli/target/yang2swagger-tapi-cli-1.0-cli.jar
com.amartus.y2s.Generator mef-common tapi-topology tapi-common
tapi-connectivity tapi-path-computation mef-common-types nrm-connectivity
nrp-interface -yang-dir /home/jahveen/yangs/ -api-version 2018R2 -output
/home/jahveen/presto-nrp.yaml
Notes:
(1) I created the yang-dir /home/jahveen/yangs/ and copied the following
YANG modules from /home/jahveen/MEF-LSO-Presto-SDK/api/yang:
nrp-interface.yang, ***@***.***,
***@***.***, nrm-connectivity.yang,
***@***.***, ***@***.***,
mef-common-types.yang, mef-common.yang
The combination of modules that I settled on was because of trial and
error selection - there was no clear definition of which revision of each
module I should use
(2) I specified all of the YANG modules in the command. The result is no
different to me not specifying them at all, since only the specified
modules are in the yang-dir
(3) I specified api-version to match the one specified in presto-nrp.yaml
Output
99% the same as the repo version in
/home/jahveen/MEF-LSO-Presto-SDK/api/swagger/presto-nrp.yaml. The
differences I found are:
(1) description: The repo version is "MEF 60 (PRESTO NRP) swagger
definition". My generated version is a list of the modules
(2) title: Both versions are a list of the modules, but in a different
order, and the repo version is missing the module name
"tapi-path-computation"
(3) basepath: This is included in the repo version only
(4) consumes / produces: The repo version has two ("application/json",
"application/xml"), the generated version only allows one to be specified
Questions
(1) Please comment on the differences I found. Are they expected? If so,
am I supposed to manually edit my output to match the repo
(2) More a statement than a question - it would be useful to provide
clearer instructions on how to reproduce the swagger output so that we can
be confident on how to generate it, and more importantly, we can be
confident that we can incorporate our own YANG deviations and generate the
correct swagger definitions
(3) You have since updated yang2swagger (tag/1.1.7) and y2s-tapi-cli
(tag/v1.0.0), and the output I see when using later versions is noticeably
different. Should I expect the next release of the SDK (presumably r4) to
use the latest versions of y2s-tapi-cli with all its bug fixes, etc.?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<https://github.com/orgs/MEF-GIT/teams/mef-lso-presto-sdk-community/discussions/7/comments/3>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AALBB3GT45EGO66KPQP5SZTSL2PR7ANCNFSM4RE5SBWA>
.
--
--
Bartosz Michalik
|
Beta Was this translation helpful? Give feedback.
-
Hello again,
My colleagues and I have followed the yang2swagger tool instructions to try to replicate the presto-nrp.yaml swagger definition that is published in this repo. However, we cannot generate an identical copy (nor indeed similar) to the file MEF-LSO-Presto-SDK/api/swagger/presto-nrp.yaml. I wonder - is there a specific environment that is required to successfully replicate the result?
In other words, I am saying that the instructions provided do not give enough information to allow us to confidently reproduce the published presto-nrp.yaml swagger definition - so we request some assistance.
Thanks,
Jahveen
Beta Was this translation helpful? Give feedback.
All reactions