KeyError is raised in get_attribute validation in case of nested data types

Bug #1965089 reported by Miguel Caballer
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
TOSCA Parser
Fix Released
Undecided
Miguel Caballer

Bug Description

Having these two data types defined:

  tosca.datatypes.SomeTask:
    derived_from: tosca.datatypes.Root
    properties:
      state:
        type: string
      output:
        type: string

  tosca.datatypes.OtherTask:
    derived_from: tosca.datatypes.Root
    properties:
      tasks:
        type: map
        entry_schema:
          type: tosca.datatypes.SomeTask

And trying to access an attribute value similar to that

    ansible_output:
      value: { get_attribute: [ web_server, other_task, some_map, tasks, some_other_map, output ] }

This error is raised:

 KeyError: 'Illegal arguments for function "get_attribute". Attribute name "output" not found in "tosca.datatypes.OtherTask"'

It seems that validation does not access nested data type.

Changed in tosca-parser:
assignee: nobody → Miguel Caballer (micafer1)
Changed in tosca-parser:
status: New → In Progress
Changed in tosca-parser:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/tosca-parser 2.6.0

This issue was fixed in the openstack/tosca-parser 2.6.0 release.

Changed in tosca-parser:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.