incorrect parent_type definition in artifacttype

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

Bug Description

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

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

    parent_type shall return ArtifactType object.

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

@shangxdy, to me there is no point in opening individual bugs for every type. 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!

Revision history for this message
Sahdev Zala (spzala) wrote :

I would rather create a single bug for this kind of issues that,
"custom definition is not included into certain types" with bug description something like "relationship, artifacts, policy and group type are missing consideration of custom def" - this will be easy to triage, less time consuming to report and can be fixed in a single patch. Hope makes sense.

Revision history for this message
Sahdev Zala (spzala) wrote :

Well, i.e. "parent_type shall return an appropriate object" and then it can cover 'artifacts, group and policy. Well, I guess you got the point :-) and hope it's a good suggestion.

Revision history for this message
xiaodong shang (shangxdy) wrote :

@spzala, i have merged into one bug, please refer to
https://bugs.launchpad.net/tosca-parser/+bug/1597443

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.