Hi Suteertha,

Vnfsdk pkgtools now uses opnfv toscaparser as the backend tosca parser since 
aria has retired. It depends on the nfv-toscaparser to report any tosca syntax 
errors, while vnfsdk pkgtools itself validates the errors related to CSAR 
format (e.g. metadata, digest, signature etc.) as defined in SOL-004. I think 
the enhancement you asks for could go into nfv-toscaparser. Is it possible that 
you can send the csar file, so I can use yours as an example when talking to 
opnfv toscaparser community?

-Lianhao

From: onap-discuss@lists.onap.org [mailto:onap-discuss@lists.onap.org] On 
Behalf Of Suteertha Guha
Sent: Wednesday, October 10, 2018 12:13 AM
To: onap-discuss@lists.onap.org
Subject: Re: [onap-discuss] [VNFSDK] vnfsdk csar-validate - producing error

Lu,

I am using vnfsdk 1.2.0, with nfv-toscaparser 1.0.1.

When validating service-Demovlb-csar.csar, the VNFSDK fails with unhelpful 
stack traces.
I then extract the above csar and run tosca-parser on each of the yml files, 
like below:
 for i in `ls extracted_service/Definitions/*.yml`; do echo $i; tosca-parser   
--debug --template-file=$i; done

Most of the yml gets validated happily, but a few fail with unhelpful stacks as 
below. Is there a way to get better validation messages that point to what is 
in right?
extracted_service/Definitions/resource-B7d2fcebDd1143cdA3faNodesVdns-template-interface.yml

version: tosca_simple_yaml_1_1
extracted_service/Definitions/resource-B7d2fcebDd1143cdA3faNodesVdns-template.yml
Traceback (most recent call last):
  File "/usr/bin/tosca-parser", line 11, in <module>
    sys.exit(main())
  File "/usr/lib/python2.7/site-packages/toscaparser/shell.py", line 146, in 
main
    ParserShell().main(args)
  File "/usr/lib/python2.7/site-packages/toscaparser/shell.py", line 77, in main
    self.parse(path, no_required_paras_check=nrpv, debug_mode=debug)
  File "/usr/lib/python2.7/site-packages/toscaparser/shell.py", line 92, in 
parse
    debug_mode=debug_mode)
  File "/usr/lib/python2.7/site-packages/toscaparser/tosca_template.py", line 
112, in __init__
    self.topology_template = self._topology_template()
  File "/usr/lib/python2.7/site-packages/toscaparser/tosca_template.py", line 
132, in _topology_template
    self.sub_mapped_node_template)
  File "/usr/lib/python2.7/site-packages/toscaparser/topology_template.py", 
line 63, in __init__
    self._process_intrinsic_functions()
  File "/usr/lib/python2.7/site-packages/toscaparser/topology_template.py", 
line 278, in _process_intrinsic_functions
    if cap.get_properties_objects():
  File "/usr/lib/python2.7/site-packages/toscaparser/capabilities.py", line 31, 
in get_properties_objects
    props_def = self.definition.get_properties_def()
  File 
"/usr/lib/python2.7/site-packages/toscaparser/elements/capabilitytype.py", line 
54, in get_properties_def
    for prop in self.get_properties_def_objects()}
  File 
"/usr/lib/python2.7/site-packages/toscaparser/elements/capabilitytype.py", line 
44, in get_properties_def_objects
    for prop, schema in props.items():
AttributeError: 'NoneType' object has no attribute 'items'


Thanks a lot



-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#12906): https://lists.onap.org/g/onap-discuss/message/12906
Mute This Topic: https://lists.onap.org/mt/24210230/21656
Group Owner: onap-discuss+ow...@lists.onap.org
Unsubscribe: https://lists.onap.org/g/onap-discuss/unsub  
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to