Broken custom definitions and interfaces of relationships parents
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
TOSCA Parser |
New
|
Undecided
|
Unassigned |
Bug Description
When using custom definitions there are problems if multiple derivations is used
Example:
tosca_definitio
capability_types:
openstack.
derived_from: tosca.capabilit
properties:
provider:
type: string
required: false
relationship_types:
provider.
description: This type results in ordering of initializing objects.
derived_from: tosca.relations
valid_
interfaces:
Target:
type: provider.
openstack.
description: This type results in ordering of initializing objects.
derived_from: provider.
valid_
interface_types:
provider.
derived_from: tosca.interface
choose:
description: Choose one object
node_types:
openstack.
derived_from: tosca.nodes.Root
properties:
floating_
type: string
required: false
requirements:
- network:
node: tosca.nodes.Network
topology_template:
node_templates:
server_
type: openstack.
properties:
requirements:
- network:
- name:
relationship_
server_
type: openstack.
interfaces:
Target:
choose:
If tosca-parser is used in code
tosca_
print(
error occurred
Traceback (most recent call last):
File "/home/
self.
File "/home/
value=op_def)
File "/home/
if not self.interfacetype:
AttributeError: 'InterfacesDef' object has no attribute 'interfacetype'
The same happens when the following is used
print(
Error occurred
Error
Traceback (most recent call last):
File "/home/
return self.type_
File "/home/
return RelationshipTyp
File "/home/
custom_def)
File "/home/
InvalidType
File "/home/
raise exception
toscaparser.
This issue was fixed in the openstack/ tosca-parser 2.4.1 release.