incorrect parent_type definition in Policytype,RelationshipType, GroupType, ArtifactsType

Bug #1597443 reported by xiaodong shang
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
TOSCA Parser
New
Undecided
xiaodong shang

Bug Description

Policytype which is derived from statefulentity defines parent_type, but it's value shall be policytype object, not a string, so the method of is_derived_from in policy entity may be error currently.

    @property
    def parent_type(self):
        '''Return a policy this policy is derived from.'''
        return self.derived_from(self.defs)

    parent_type shall return PolicyType object.
 In addition, RelationshipType, GroupType, ArtifactsType are the similar problems.

Changed in tosca-parser:
assignee: nobody → shangxdy (shangxdy)
Revision history for this message
Sahdev Zala (spzala) wrote :

@shangxdy, thanks for the bug report but just to keep reviews simple and faster if a problem is reported to a specific thing e.g. parent_type in different types can you please just compiled them into a single bug and fix, unless it involves any complexities which I guess not the case in this kind of bugs? Thanks!

Also please add the error which I am sure you are able to produce, instead of 'may', in the bug so that people get an idea.

description: updated
summary: - incorrect parent_type definition in policytype
+ incorrect parent_type definition in Policytype,RelationshipType,
+ GroupType, ArtifactsType
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.