Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support TOSCA 1.3 to separate capability Compute from capability Container #599

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions commands/bootstrap/resources/topology/topology_ha.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ topology_template:
- hostedOnComputeConsulHost:
type_requirement: host
node: ConsulCompute
capability: tosca.capabilities.Container
capability: tosca.capabilities.Compute
relationship: tosca.relationships.HostedOn
capabilities:
consul_server:
Expand All @@ -92,7 +92,7 @@ topology_template:
- hostedOnComputeYorcHost:
type_requirement: host
node: YorcCompute
capability: tosca.capabilities.Container
capability: tosca.capabilities.Compute
relationship: tosca.relationships.HostedOn
JDK:
type: org.alien4cloud.java.jdk.linux.nodes.OracleJDK
Expand All @@ -104,7 +104,7 @@ topology_template:
- hostedOnAlien4CloudComputeHost:
type_requirement: host
node: Alien4CloudCompute
capability: tosca.capabilities.Container
capability: tosca.capabilities.Compute
relationship: tosca.relationships.HostedOn
Alien4Cloud:
type: org.alien4cloud.alien4cloud.webapp.nodes.Alien4Cloud
Expand Down Expand Up @@ -193,7 +193,7 @@ topology_template:
- hostedOnComputeNfsHost:
type_requirement: host
node: NFSCompute
capability: tosca.capabilities.Container
capability: tosca.capabilities.Compute
relationship: tosca.relationships.HostedOn
capabilities:
nfs_server:
Expand All @@ -211,7 +211,7 @@ topology_template:
- hostedOnComputeYorcHost:
type_requirement: host
node: YorcCompute
capability: tosca.capabilities.Container
capability: tosca.capabilities.Compute
relationship: tosca.relationships.HostedOn
NFSClient:
type: org.ystia.nfs.linux.ansible.nodes.NFSClient
Expand All @@ -227,7 +227,7 @@ topology_template:
- hostedOnComputeYorcHost:
type_requirement: host
node: YorcCompute
capability: tosca.capabilities.Container
capability: tosca.capabilities.Compute
relationship: tosca.relationships.HostedOn
ConsulAgentA4C:
type: org.ystia.yorc.experimental.consul.linux.ansible.nodes.ConsulAgent
Expand Down Expand Up @@ -256,7 +256,7 @@ topology_template:
- hostedOnAlien4CloudComputeHost:
type_requirement: host
node: Alien4CloudCompute
capability: tosca.capabilities.Container
capability: tosca.capabilities.Compute
relationship: tosca.relationships.HostedOn
capabilities:
consul_agent:
Expand Down Expand Up @@ -293,7 +293,7 @@ topology_template:
- hostedOnComputeYorcHost:
type_requirement: host
node: YorcCompute
capability: tosca.capabilities.Container
capability: tosca.capabilities.Compute
relationship: tosca.relationships.HostedOn
capabilities:
consul_agent:
Expand Down Expand Up @@ -332,7 +332,7 @@ topology_template:
- hostedOnComputeYorcHost:
type_requirement: host
node: VaultCompute
capability: tosca.capabilities.Container
capability: tosca.capabilities.Compute
relationship: tosca.relationships.HostedOn
capabilities:
consul_agent:
Expand Down Expand Up @@ -361,7 +361,7 @@ topology_template:
relationship: org.alien4cloud.vault.relationships.ConnectToConsulAgent
- host:
node: VaultCompute
capability: tosca.capabilities.Container
capability: tosca.capabilities.Compute
relationship: tosca.relationships.HostedOn
{{end}}
YorcServer:
Expand All @@ -380,7 +380,7 @@ topology_template:
- hostedOnComputeYorcHost:
type_requirement: host
node: YorcCompute
capability: tosca.capabilities.Container
capability: tosca.capabilities.Compute
relationship: tosca.relationships.HostedOn
- joinConsulAgentConsulAgentConsul_agent:
type_requirement: consul
Expand Down
12 changes: 6 additions & 6 deletions commands/bootstrap/resources/topology/topology_single_node.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ topology_template:
- hostedOnComputeHost:
type_requirement: host
node: YorcCompute
capability: tosca.capabilities.Container
capability: tosca.capabilities.Compute
relationship: tosca.relationships.HostedOn
Alien4Cloud:
type: org.alien4cloud.alien4cloud.webapp.nodes.Alien4Cloud
Expand Down Expand Up @@ -142,7 +142,7 @@ topology_template:
- hostedOnComputeHost:
type_requirement: host
node: YorcCompute
capability: tosca.capabilities.Container
capability: tosca.capabilities.Compute
relationship: tosca.relationships.HostedOn
YorcServer:
type: org.ystia.yorc.linux.ansible.nodes.YorcServer
Expand All @@ -160,7 +160,7 @@ topology_template:
- hostedOnComputeHost:
type_requirement: host
node: YorcCompute
capability: tosca.capabilities.Container
capability: tosca.capabilities.Compute
relationship: tosca.relationships.HostedOn
- joinConsulAgentConsulServerConsul_agent:
type_requirement: consul
Expand Down Expand Up @@ -214,7 +214,7 @@ topology_template:
- hostedOnComputeHost:
type_requirement: host
node: YorcCompute
capability: tosca.capabilities.Container
capability: tosca.capabilities.Compute
relationship: tosca.relationships.HostedOn
capabilities:
consul_server:
Expand Down Expand Up @@ -251,7 +251,7 @@ topology_template:
relationship: org.alien4cloud.vault.relationships.ConnectToConsulAgent
- host:
node: YorcCompute
capability: tosca.capabilities.Container
capability: tosca.capabilities.Compute
relationship: tosca.relationships.HostedOn
{{end}}
TerraformRuntime:
Expand All @@ -263,7 +263,7 @@ topology_template:
- hostedOnComputeHost:
type_requirement: host
node: YorcCompute
capability: tosca.capabilities.Container
capability: tosca.capabilities.Compute
relationship: tosca.relationships.HostedOn
Infrastructure: {{block "Infrastructure" .}} {{end}}
YorcAnsibleConfig:
Expand Down
25 changes: 15 additions & 10 deletions data/tosca/normative-types.yml
Original file line number Diff line number Diff line change
Expand Up @@ -183,10 +183,15 @@ capability_types:
description: The Node capability indicates the base capabilities of a TOSCA Node Type.

tosca.capabilities.Container:
description: >
The Container capability, when included on a Node Type or Template definition, indicates that the node can act as a container for (or a host for)
one or more other declared Node Types.
derived_from: tosca.capabilities.Root

tosca.capabilities.Compute:
derived_from: tosca.capabilities.Container
description: >
The Container capability, when included on a Node Type or Template definition, indicates that the node can act as a container for
(or a host for) one or more other declared Node Types.
The Compute capability, when included on a Node Type or Template definition, indicates that the node can provide hosting on a named compute resource.
properties:
num_cpus:
type: integer
Expand Down Expand Up @@ -583,7 +588,7 @@ node_types:
occurrences: [ 0, UNBOUNDED ]
capabilities:
host:
type: tosca.capabilities.Container
type: tosca.capabilities.Compute
valid_source_types: [tosca.nodes.SoftwareComponent]
endpoint:
type: tosca.capabilities.Endpoint.Admin
Expand All @@ -610,7 +615,7 @@ node_types:
required: false
requirements:
- host:
capability: tosca.capabilities.Container
capability: tosca.capabilities.Compute
node: tosca.nodes.Compute
relationship: tosca.relationships.HostedOn

Expand All @@ -624,7 +629,7 @@ node_types:
data_endpoint: tosca.capabilities.Endpoint
admin_endpoint: tosca.capabilities.Endpoint.Admin
host:
type: tosca.capabilities.Container
type: tosca.capabilities.Compute
valid_source_types: [ tosca.nodes.WebApplication ]

tosca.nodes.WebApplication:
Expand All @@ -641,7 +646,7 @@ node_types:
type: tosca.capabilities.Endpoint
requirements:
- host:
capability: tosca.capabilities.Container
capability: tosca.capabilities.Compute
node: tosca.nodes.WebServer
relationship: tosca.relationships.HostedOn

Expand All @@ -659,7 +664,7 @@ node_types:
description: the port the DBMS service will listen to for data and requests
capabilities:
host:
type: tosca.capabilities.Container
type: tosca.capabilities.Compute
valid_source_types: [ tosca.nodes.Database ]

tosca.nodes.Database:
Expand All @@ -682,7 +687,7 @@ node_types:
required: false
requirements:
- host:
capability: tosca.capabilities.Container
capability: tosca.capabilities.Compute
node: tosca.nodes.DBMS
relationship: tosca.relationships.HostedOn
capabilities:
Expand Down Expand Up @@ -747,7 +752,7 @@ node_types:
services on a single Compute host.
capabilities:
host:
type: tosca.capabilities.Container
type: tosca.capabilities.Compute
scalable:
type: tosca.capabilities.Scalable

Expand All @@ -756,7 +761,7 @@ node_types:
description: The TOSCA Container Application node represents an application that requires Container-level virtualization technology.
requirements:
- host:
capability: tosca.capabilities.Container
capability: tosca.capabilities.Compute
node: tosca.nodes.Container
relationship: tosca.relationships.HostedOn

Expand Down
6 changes: 3 additions & 3 deletions deployments/testdata/capabilities.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ topology_template:
- hostedOnComputeHost:
type_requirement: host
node: Compute
capability: tosca.capabilities.Container
capability: tosca.capabilities.Compute
relationship: tosca.relationships.HostedOn
EPCapNodePrivate:
type: yorc.type.TypeWithEndpointCap
Expand All @@ -135,7 +135,7 @@ topology_template:
- hostedOnComputeHost:
type_requirement: host
node: Compute
capability: tosca.capabilities.Container
capability: tosca.capabilities.Compute
relationship: tosca.relationships.HostedOn
EPCapNodeNamedNet:
type: yorc.type.TypeWithEndpointCap
Expand All @@ -149,5 +149,5 @@ topology_template:
- hostedOnComputeHost:
type_requirement: host
node: Compute
capability: tosca.capabilities.Container
capability: tosca.capabilities.Compute
relationship: tosca.relationships.HostedOn
4 changes: 2 additions & 2 deletions deployments/testdata/capabilities_properties.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ topology_template:
requirements:
- host:
node: Front
capability: tosca.capabilities.Container
capability: tosca.capabilities.Compute
relationship: tosca.relationships.HostedOn
Tomcat:
type: org.alien4cloud.nodes.Tomcat
Expand Down Expand Up @@ -235,6 +235,6 @@ capability_types:
org.alien4cloud.lang.java.pub.capabilities.JDK:
derived_from: tosca.capabilities.Container
org.alien4cloud.capabilities.WarContainer:
derived_from: tosca.capabilities.Container
derived_from: tosca.capabilities.Compute
org.alien4cloud.java.pub.capabilities.JDK:
derived_from: tosca.capabilities.Container
4 changes: 2 additions & 2 deletions deployments/testdata/get_op_output.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,14 +72,14 @@ topology_template:
relationship: yorc.tests.relationships.GetOPOutputsRel
- host:
node: Compute
capability: tosca.capabilities.Container
capability: tosca.capabilities.Compute
relationship: tosca.relationships.HostedOn
GetOPOutputsNodeSecondReq:
type: yorc.tests.nodes.GetOPOutputs
requirements:
- host:
node: Compute
capability: tosca.capabilities.Container
capability: tosca.capabilities.Compute
relationship: tosca.relationships.HostedOn
- partition:
node: BS
Expand Down
8 changes: 4 additions & 4 deletions deployments/testdata/get_op_output_real.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ node_types:
type: starlings.capabilities.DockerVolume
requirements:
- hosted_on:
capability: tosca.capabilities.Container
capability: tosca.capabilities.Compute
relationship: tosca.relationships.HostedOn
occurrences: [1,1]
- filesystem_endpoint:
Expand Down Expand Up @@ -229,7 +229,7 @@ topology_template:
requirements:
- host:
node: Compute
capability: tosca.capabilities.Container
capability: tosca.capabilities.Compute
relationship: tosca.relationships.HostedOn
Compute:
type: tosca.nodes.Compute
Expand All @@ -253,7 +253,7 @@ topology_template:
requirements:
- hosted_on:
node: Compute
capability: tosca.capabilities.Container
capability: tosca.capabilities.Compute
relationship: tosca.relationships.HostedOn
- filesystem_endpoint:
node: DockerContainer
Expand All @@ -267,7 +267,7 @@ topology_template:
requirements:
- hosted_on:
node: Compute
capability: tosca.capabilities.Container
capability: tosca.capabilities.Compute
relationship: tosca.relationships.HostedOn
- filesystem_endpoint:
node: DockerContainer
Expand Down
4 changes: 2 additions & 2 deletions deployments/testdata/get_secrets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ topology_template:
requirements:
- host:
node: Front
capability: tosca.capabilities.Container
capability: tosca.capabilities.Compute
relationship: tosca.relationships.HostedOn
Tomcat:
type: org.alien4cloud.nodes.Tomcat
Expand Down Expand Up @@ -243,6 +243,6 @@ capability_types:
org.alien4cloud.lang.java.pub.capabilities.JDK:
derived_from: tosca.capabilities.Container
org.alien4cloud.capabilities.WarContainer:
derived_from: tosca.capabilities.Container
derived_from: tosca.capabilities.Compute
org.alien4cloud.java.pub.capabilities.JDK:
derived_from: tosca.capabilities.Container
2 changes: 1 addition & 1 deletion deployments/testdata/global_interfaces_inputs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,6 @@ topology_template:
requirements:
- host:
node: Compute
capability: tosca.capabilities.Container
capability: tosca.capabilities.Compute
relationship: tosca.relationships.HostedOn

6 changes: 3 additions & 3 deletions deployments/testdata/issue_get_empty_prop_rel.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ node_types:
type: yorc.tests.capabilities.ValueAssignmentEndpoint
requirements:
- host:
capability: tosca.capabilities.Container
capability: tosca.capabilities.Compute
relationship: tosca.relationships.HostedOn
- server:
capability: yorc.tests.capabilities.ValueAssignmentEndpoint
Expand Down Expand Up @@ -319,7 +319,7 @@ topology_template:
requirements:
- host:
node: Compute
capability: tosca.capabilities.Container
capability: tosca.capabilities.Compute
relationship: tosca.relationships.HostedOn
ValueAssignmentNode2:
type: yorc.tests.nodes.ValueAssignmentNode
Expand Down Expand Up @@ -371,7 +371,7 @@ topology_template:
requirements:
- host:
node: Compute
capability: tosca.capabilities.Container
capability: tosca.capabilities.Compute
relationship: tosca.relationships.HostedOn
- server:
capability: yorc.tests.capabilities.ValueAssignmentEndpoint
Expand Down
2 changes: 1 addition & 1 deletion deployments/testdata/relationship_workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ topology_template:
- hostedOnComputeHost:
type_requirement: host
node: Compute
capability: tosca.capabilities.Container
capability: tosca.capabilities.Compute
relationship: tosca.relationships.HostedOn
Compute:
type: tosca.nodes.Compute
Expand Down
Loading