Skip to content
Unfurl Cloud
  • Dashboard
  • Blueprints
  • Cloud
Projects Groups Topics Snippets
  • Help
  • Register
  • Sign in
  • unfurl unfurl
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 12
    • Issues 12
    • List
    • Boards
    • Milestones
  • Merge requests 10
    • Merge requests 10
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Container Registry
    • Terraform modules
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
Closed
Open
Issue created May 05, 2021 by Adam@adamOwner

tosca parser should catch and report malformed property definitions and declarations

The tosca parser should have a generic exception handler that catches and reports malformed property definitions and declarations instead of throwing an uncaught exception in these two functions in toscaparser/entity_template.py:

  • _common_validate_properties()
  • _create_properties()

E.g. a missing "type" key currently throws an error like this:

      File "/Users/adam/_dev/unfurl/unfurl/vendor/toscaparser/entity_template.py", line 90, in __init__
         for prop in self.get_properties_objects():
       File "/Users/adam/_dev/unfurl/unfurl/vendor/toscaparser/entity_template.py", line 128, in get_properties_objects
         self._properties = self._create_properties()
      File "/Users/adam/_dev/unfurl/unfurl/vendor/toscaparser/entity_template.py", line 334, in _create_properties
          prop = Property(p.name, p.default, p.schema, self.custom_def)
        File "/Users/adam/_dev/unfurl/unfurl/vendor/toscaparser/properties.py", line 37, in __init__
          self.entity = DataEntity(schema_dict['type'], self.value, self.custom_def, self.name)
        File "/Users/adam/.unfurl_home/.venv/lib/python3.8/site-packages/ruamel/yaml/comments.py", line 753, in __getitem__
          return ordereddict.__getitem__(self, key)
      KeyError: 'type'
Assignee
Assign to
Time tracking