Clean up and fix logic in entity template constructor
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
TOSCA Parser |
New
|
Undecided
|
Sahdev Zala |
Bug Description
So lately, two new if conditions were added in the entity_template.py init,
if entity_name == 'policy_type':
type = self.entity_
if not type:
msg = (_('Policy definition of "%(pname)s" must have'
if entity_name == 'group_type':
type = self.entity_
if type is not None else None
there are many if for .get('type') so that should be refactored. Also validation error for type should be common. Also, it doesn't seem like we really need policy and group here, the node_type should be the on with group and policy type (thinking group and policy as node) but due to lack of concrete use cases, it wasn't tested properly.. need a second look.
Changed in tosca-parser: | |
assignee: | nobody → Sahdev Zala (spzala) |