[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: 2015-04-13 tosca_elk_DRAFT_CSAR: issues with requirements
As promised, here are a number of comments on the latest CSAR file. Most of the issues with this file are with requirements definitions and assignments and are
similar in nature. I’ll use the logstash.yaml file to illustrate a couple of them.
The first set of issues has to do with requirement definitions in node types. logstash.yaml defines the following node type: node_types: tosca.nodes.SoftwareComponent.Logstash: derived_from: tosca.nodes.SoftwareComponent requirements: search_endpoint: capability: tosca.capabilities.Endpoint node: tosca.nodes.SoftwareComponent.Elasticsearch relationship: type: tosca.relationships.ConnectsTo interfaces: tosca.interfaces.relationship.Configure: pre_configure_source: implementation: type: string inputs: elasticsearch_ip: type: string This node type has invalid grammar for the search_endpoint requirement definition. According to the requirements definition grammar (section A.6.2.2) the ‘relationship’
keyname is only allowed to take a relationship type name, not an extended grammar that overrides interfaces. The second set of issues have to do with requirement assignments. The logstash node template in the tosca_elk.yaml file contains the following: logstash: type: tosca.nodes.SoftwareComponent.Logstash requirements: - host: logstash_server - search_endpoint: elasticsearch interfaces: tosca.interfaces.relationship.Configure: pre_configure_source: implementation: Python/logstash/configure_elasticsearch.py input: elasticsearch_ip: { get_attribute: [elasticsearch_server, ip_address] } There are 2 issues with this:
1.
The syntax for ordered requirements assignment lists is invalid based on section A.7.2.2.2. The correct syntax is as follows: logstash: type: tosca.nodes.SoftwareComponent.Logstash requirements: - host: logstash_server - search_endpoint:
node: elasticsearch interfaces: tosca.interfaces.relationship.Configure: pre_configure_source: implementation: Python/logstash/configure_elasticsearch.py input: elasticsearch_ip: { get_attribute: [elasticsearch_server, ip_address] }
2.
More importantly, a requirement assignment does not take ‘interfaces’ as a top-level keyname. I imagine the intent here is to override interfaces for
the relationship in the requirement as follows: logstash: type: tosca.nodes.SoftwareComponent.Logstash requirements: - host: logstash_server - search_endpoint:
node: elasticsearch relationship: interfaces: tosca.interfaces.relationship.Configure: pre_configure_source: implementation: Python/logstash/configure_elasticsearch.py input: elasticsearch_ip: { get_attribute: [elasticsearch_server, ip_address] } Unfortunately, the latest version of the grammar seems to have removed support for that as well so it is no longer possible to define
interfaces directly in requirements. The only option here is to introduce a relationship template with the appropriate interfaces. Chris From: Sahdev P Zala [mailto:spzala@us.ibm.com]
Hi Chris, sounds great!
|
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]