Closed dorado18 closed 6 years ago
This is an issue I had come across but hadn't done research on what the keywords actually meant, since they were not prefixed by any yang keywords. It seems pyang spits out something different as a result, but I don't know exactly why or what I'm supposed to do with it.
But in particular, what does the keyword mean? From what I'm reading, it has to do with language extensions? Does pyang support this, and should the converter in spite of that?
'openconfig-extensions' is a module defined in openconfig-extensions.yang. Maybe this module is not being parsed correctly in the 'import' statement ?
When reaching "/home/ipedasia/prjs/swo/YANG-to-Redfish-Converter/YANG-to-Redfish-Plugin/rf/csdltree.py", line 335, 'yang_keyword' variable has as value a tuple ('openconfig-extensions', 'openconfig-version')
I don't know pyang nor the yang to csdl specification enough to answer your last questions.
Thanks
I think it's clearly being imported seeing as the alias is properly parsed, but I'll have to do research to see if pyang is doing anything more about it, and what's contained in the conversion spec. Do you know if this format of "importname:importitem" in Yang files as a Keyword subsititute is only to deal with extensions?
I will report back or contact @jcleung5549 for more info about how to handle extensions. I believe they can be treated like a csdl Annotation with an enum.
e.g. <Annotation "YangCustom.Keyword" "oc_ext/openconfig_version">, where the latter is the extension generated as an enum for a term. A more complicated mockup may be necessary, and the spec must be checked.
Should perform better on the latest branch yang-plugin
, along with e-mail based issues.
The latest update doesn't exhibit this problem. See issue #19 for the output from a current execution. Changed 'label' to "fixed". Issue originator should "close" issue, if satisfied.
The following error is reported when trying to convert file openconfig-vlan.yang:
The problem seens to be an error of not recognizing the keywords 'openconfig-extensions' and 'openconfig-version' onlines 16 and 29 respectively on file openconfig-vlan.yang.