Skip to content

Commit

Permalink
Update tests to use capabilities.Compute where appropriate
Browse files Browse the repository at this point in the history
* Update all nodes hosting on a "tosca.nodes.Compute" and
  "tosca.nodes.WebServer" node to have a requirement from
  type "tosca.capabilities.Compute" as in TOSCA profile v1.3.
* For other nodes, they continue to have the requirement
  "tosca.capabilities.Container" as they are hosted on a
  SoftwareComponent.

ystiaGH-589
  • Loading branch information
trihoangvo committed Feb 4, 2020
1 parent 49aa8c6 commit c3dbc24
Show file tree
Hide file tree
Showing 23 changed files with 54 additions and 54 deletions.
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
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
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ topology_template:
- hostedOnComputeHost:
type_requirement: host
node: Compute
capability: tosca.capabilities.Container
capability: tosca.capabilities.Compute
relationship: tosca.relationships.HostedOn
capabilities:
appA_capA:
Expand Down
4 changes: 2 additions & 2 deletions deployments/testdata/test_component.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,15 +82,15 @@ topology_template:
type: yorc.test.nodes.TestContainer
properties: {component_version: 1.0, port: 80, document_root: /var/www}
requirements:
- host: {node: TestCompute, capability: tosca.capabilities.Container, relationship: tosca.relationships.HostedOn}
- host: {node: TestCompute, capability: tosca.capabilities.Compute, relationship: tosca.relationships.HostedOn}
Network:
type: tosca.nodes.Network
properties: {ip_version: 4}
TestModule:
type: yorc.test.nodes.TestModule
properties: {component_version: 1.0}
requirements:
- host: {node: TestCompute, capability: tosca.capabilities.Container, relationship: tosca.relationships.HostedOn}
- host: {node: TestCompute, capability: tosca.capabilities.Compute, relationship: tosca.relationships.HostedOn}
outputs:
TestComponent_url:
description: The URL
Expand Down
2 changes: 1 addition & 1 deletion deployments/testdata/test_container.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,4 @@ node_types:
implementation: scripts/install_testcontainer.sh
start: scripts/start_testcontainer.sh
capability_types:
yorc.test.capabilities.TestContainerCapability: {derived_from: tosca.capabilities.Container}
yorc.test.capabilities.TestContainerCapability: {derived_from: tosca.capabilities.Compute}
2 changes: 1 addition & 1 deletion deployments/testdata/test_module.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ node_types:
attachWebsite: {type: yorc.test.capabilities.TestModuleCapability}
requirements:
- host:
capability: tosca.capabilities.Container
capability: tosca.capabilities.Compute
node: tosca.nodes.Compute
relationship: tosca.relationships.HostedOn
occurrences: [1, 1]
Expand Down
4 changes: 2 additions & 2 deletions deployments/testdata/test_topology.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ topology_template:
type: yorc.test.nodes.TestContainer
properties: {component_version: 1.0, port: 80, document_root: /var/www}
requirements:
- host: {node: TestCompute, capability: tosca.capabilities.Container, relationship: tosca.relationships.HostedOn}
- host: {node: TestCompute, capability: tosca.capabilities.Compute, relationship: tosca.relationships.HostedOn}
capabilities:
data_endpoint:
properties: {protocol: tcp, secure: false, network_name: PRIVATE, initiator: source}
Expand All @@ -53,7 +53,7 @@ topology_template:
type: yorc.test.nodes.TestModule
properties: {component_version: 1.0}
requirements:
- host: {node: TestCompute, capability: tosca.capabilities.Container, relationship: tosca.relationships.HostedOn}
- host: {node: TestCompute, capability: tosca.capabilities.Compute, relationship: tosca.relationships.HostedOn}
outputs:
TestComponent_url:
value:
Expand Down
2 changes: 1 addition & 1 deletion deployments/testdata/test_topology_client_service.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ topology_template:
- hostedOnComputeHost:
type_requirement: host
node: ComputeInstance
capability: tosca.capabilities.Container
capability: tosca.capabilities.Compute
relationship: tosca.relationships.HostedOn
- joinServiceAppACapA:
type_requirement: appA_capA
Expand Down
2 changes: 1 addition & 1 deletion deployments/testdata/test_topology_service.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ topology_template:
- hostedOnComputeHost:
type_requirement: host
node: Compute
capability: tosca.capabilities.Container
capability: tosca.capabilities.Compute
relationship: tosca.relationships.HostedOn
capabilities:
appA_capA:
Expand Down
2 changes: 1 addition & 1 deletion deployments/testdata/test_topology_substitution.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ topology_template:
- hostedOnComputeHost:
type_requirement: host
node: Compute
capability: tosca.capabilities.Container
capability: tosca.capabilities.Compute
relationship: tosca.relationships.HostedOn
SrvImpl2Instance:
type: yorc.tests.nodes.SrvImpl2
Expand Down
Loading

0 comments on commit c3dbc24

Please sign in to comment.