-
Type: Bug
-
Status: Closed
-
Priority: Major
-
Resolution: Unresolved
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: Profile-YAML
-
Labels:None
-
Resolution:
Requirements section is currently a list, however since the get_attribute function allows to refer to a requirement by name, it forces the requirements names to be unique. This limitation implicitly forces the section to behave as a map, and I think this should be expressed explicitly by turning the section in to a map, like the current capabilities section.
current situation:
software:
type: tosca.nodes.SoftwareComponent
properties:...
attributes:
ip_address:
#which host???
requirements:
- the get attribute expression is referring to host, however there can be multiple "host"
- requirements, and each can have different attribute values.
- host: server_be
relationship: tosca.relationships.HostedOn - host: server_fe
relationship: tosca.relationships.HostedOn
server_be:
type: tosca.nodes.Compute
...
server_fe:
type: tosca.nodes.Compute
...
proposed fix:
software:
type: tosca.nodes.SoftwareComponent
properties:...
attributes:
ip_address:
requirements:
- in this case the reference will be mapped uniquely to the one matching requirement name.
host_be: # names are forced to be unique
target: server_be
relationship: tosca.relationships.HostedOn
host_fe: # names are forced to be unique
target: server_fe
relationship: tosca.relationships.HostedOn
server_be:
type: tosca.nodes.Compute
...
server_fe:
type: tosca.nodes.Compute
...