[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: 2015-04-13 tosca_elk_DRAFT_CSAR: issues with capabilities
A second set of issues in the latest CSAR has to do with capabilities. I’ll use the logstash example again. The Logstash node type defines the following capabilities: node_types: tosca.nodes.SoftwareComponent.Logstash: derived_from: tosca.nodes.SoftwareComponent capabilities: collectd_endpoint: type: tosca.capabilities.Endpoint rsyslog_endpoint: type: tosca.capabilities.Endpoint The problem here is that the collectd_endpoint and rsyslog_endpoint capabilities are semantically identical since they both have the same type and (presumably)
the same valid_source_nodes. The only thing that distinguishes them is their (symbolic) name.
The problem becomes obvious when we look at the app_collectd and app_rsyslog node templates that use these capabilities: app_collectd: type: tosca.nodes.SoftwareComponent.Collectd requirements: - host: app_server - collectd_endpoint: logstash app_rsyslog: type: tosca.nodes.SoftwareComponent.Rsyslog requirements: - host: app_server - rsyslog_endpoint: logstash Based on the requirement assignments, either capability in the Logstash node type can be used to satisfy either requirement.
We could fix this specific use case by augmenting the requirement assignment with the symbolic name of the specific capability that’s needed, as follows: app_rsyslog: type: tosca.nodes.SoftwareComponent.Rsyslog requirements: - host: app_server - rsyslog_endpoint:
node: logstash capability: rsyslog_endpoint However, it believe it is bad practice to rely on symbolic names to differentiate between things that are semantically different. If the collectd_endpoint and
rsyslog_endpoint capabilities are different, they should have different types. Relying on symbolic names only also makes it impossible to do “requirements fulfillment” dynamically (i.e. have the orchestrator dynamically match nodes to requirements). 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]