From a5ff43646483548a85800869853a5558276f6a16 Mon Sep 17 00:00:00 2001 From: Philippe Merle Date: Fri, 3 May 2019 15:26:05 +0200 Subject: [PATCH 1/2] Corrected some syntaxic and typing errors --- data/tosca/yorc-google-types.yml | 4 ++-- .../test_client_service_generated_topology.yml | 2 +- deployments/testdata/test_component.yml | 2 +- .../testdata/test_topology_client_service.yml | 2 +- deployments/testdata/test_topology_service.yml | 2 +- prov/ansible/testdata/execTemplate.yml | 2 +- prov/slurm/testdata/multipleSlurmNodeAllocation.yaml | 2 +- prov/slurm/testdata/simpleSlurmNodeAllocation.yaml | 2 +- .../simpleComputeInstanceWithPersistentDisk.yaml | 8 ++++---- .../google/testdata/simplePersistentDisk.yaml | 4 ++-- prov/terraform/google/testdata/simpleSubnet.yaml | 2 +- .../testdata/OSInstanceWithServerGroup.yaml | 12 ++++++------ tasks/workflow/testdata/workflow.yaml | 4 ++-- 13 files changed, 24 insertions(+), 24 deletions(-) diff --git a/data/tosca/yorc-google-types.yml b/data/tosca/yorc-google-types.yml index 2a0a5a028..b342cf989 100644 --- a/data/tosca/yorc-google-types.yml +++ b/data/tosca/yorc-google-types.yml @@ -221,8 +221,8 @@ node_types: required: false entry_schema: type: yorc.datatypes.google.ScratchDisk - constraints: - - greater_or_equal: 0 + constraints: # must be applied to the list type instead of list entries of ScratchDisk type, isn't it? + # - greater_or_equal: 0 # can't be applied to a list, isn't it? - max_length: 8 requirements: - assignment: diff --git a/deployments/testdata/test_client_service_generated_topology.yml b/deployments/testdata/test_client_service_generated_topology.yml index 8dea79127..aca5d964a 100644 --- a/deployments/testdata/test_client_service_generated_topology.yml +++ b/deployments/testdata/test_client_service_generated_topology.yml @@ -14,7 +14,7 @@ topology_template: appA_capA: [ AppAInstance, appA_capA ] appA_capA: [ AppAInstance, appA_capA ] requirements: - hosted: [ AppAInstance, hostedOnComputeHost ] + - hosted: [ AppAInstance, hostedOnComputeHost ] node_templates: Compute: type: yorc.nodes.hostspool.Compute diff --git a/deployments/testdata/test_component.yml b/deployments/testdata/test_component.yml index 51f4c2abb..0c7d22896 100644 --- a/deployments/testdata/test_component.yml +++ b/deployments/testdata/test_component.yml @@ -7,7 +7,7 @@ imports: [] description: | Test Component definition. Contains types as well as a template definition data_types: -yorc.test.ComplexDataType: + yorc.test.ComplexDataType: derived_from: tosca.datatypes.Root properties: nested: {type: string} diff --git a/deployments/testdata/test_topology_client_service.yml b/deployments/testdata/test_topology_client_service.yml index 770d04442..9e5c1c77d 100644 --- a/deployments/testdata/test_topology_client_service.yml +++ b/deployments/testdata/test_topology_client_service.yml @@ -74,7 +74,7 @@ topology_template: secure: false network_name: PRIVATE initiator: source -workflows: + workflows: install: steps: AppBInstance_configured: diff --git a/deployments/testdata/test_topology_service.yml b/deployments/testdata/test_topology_service.yml index 1d9872763..af4235f99 100644 --- a/deployments/testdata/test_topology_service.yml +++ b/deployments/testdata/test_topology_service.yml @@ -22,7 +22,7 @@ topology_template: properties: network_name: PRIVATE requirements: - hosted: [ AppAInstance, hostedOnComputeHost ] + - hosted: [ AppAInstance, hostedOnComputeHost ] properties: aProp: [ AppAInstance, appA_propBString ] attributes: diff --git a/prov/ansible/testdata/execTemplate.yml b/prov/ansible/testdata/execTemplate.yml index 6dc473aed..da1f70a16 100644 --- a/prov/ansible/testdata/execTemplate.yml +++ b/prov/ansible/testdata/execTemplate.yml @@ -88,7 +88,7 @@ topology_template: node: ComputeA capability: tosca.capabilities.Container relationship: tosca.relationships.HostedOn - - connect: + - connect: # This requirement is not defined in the A type, isn't it? node: NodeB capability: yorc.types.Cap relationship: yorc.types.Rel diff --git a/prov/slurm/testdata/multipleSlurmNodeAllocation.yaml b/prov/slurm/testdata/multipleSlurmNodeAllocation.yaml index 250b42293..c80d89b3d 100644 --- a/prov/slurm/testdata/multipleSlurmNodeAllocation.yaml +++ b/prov/slurm/testdata/multipleSlurmNodeAllocation.yaml @@ -16,7 +16,7 @@ topology_template: type: yorc.nodes.slurm.Compute properties: partition: debug - user: root +# user: root # this property is undefined, isn't it? gres: gpu:1 constraint: "[rack1*2&rack2*4]" job_name: xyz diff --git a/prov/slurm/testdata/simpleSlurmNodeAllocation.yaml b/prov/slurm/testdata/simpleSlurmNodeAllocation.yaml index d517197ea..e3a2e6380 100644 --- a/prov/slurm/testdata/simpleSlurmNodeAllocation.yaml +++ b/prov/slurm/testdata/simpleSlurmNodeAllocation.yaml @@ -16,7 +16,7 @@ topology_template: type: yorc.nodes.slurm.Compute properties: partition: debug - user: root +# user: root # this property is undefined, isn't it? gres: gpu:1 constraint: "[rack1|rack2|rack3|rack4]" job_name: xyz diff --git a/prov/terraform/google/testdata/simpleComputeInstanceWithPersistentDisk.yaml b/prov/terraform/google/testdata/simpleComputeInstanceWithPersistentDisk.yaml index 1ccffde77..25631bd84 100644 --- a/prov/terraform/google/testdata/simpleComputeInstanceWithPersistentDisk.yaml +++ b/prov/terraform/google/testdata/simpleComputeInstanceWithPersistentDisk.yaml @@ -15,7 +15,7 @@ imports: topology_template: node_templates: Compute: - metadata: + metadata: {} # or remove this line type: yorc.nodes.google.Compute properties: image_project: "centos-cloud" @@ -28,8 +28,8 @@ topology_template: capability: tosca.capabilities.Attachment relationship: type: tosca.relationships.AttachesTo - properties: - mode: "READ_ONLY" +# properties: +# mode: "READ_ONLY" # undefined property capabilities: endpoint: properties: @@ -47,7 +47,7 @@ topology_template: max_instances: 1 default_instances: 1 BS1: - metadata: + metadata: {} # or remove this line type: yorc.nodes.google.PersistentDisk properties: zone: "europe-west1-b" diff --git a/prov/terraform/google/testdata/simplePersistentDisk.yaml b/prov/terraform/google/testdata/simplePersistentDisk.yaml index 31267f129..7aab97420 100644 --- a/prov/terraform/google/testdata/simplePersistentDisk.yaml +++ b/prov/terraform/google/testdata/simplePersistentDisk.yaml @@ -29,7 +29,7 @@ topology_template: sha256: 5678 requirements: - attachToComputeAttach: - type_requirement: attachment - node: Comp + type_requirement: attachment # Where is defined this requirement type? + node: Comp # Where is defined this node template? capability: tosca.capabilities.Attachment relationship: tosca.relationships.AttachTo diff --git a/prov/terraform/google/testdata/simpleSubnet.yaml b/prov/terraform/google/testdata/simpleSubnet.yaml index feba4382c..f03a09bd6 100644 --- a/prov/terraform/google/testdata/simpleSubnet.yaml +++ b/prov/terraform/google/testdata/simpleSubnet.yaml @@ -29,7 +29,7 @@ topology_template: name: "custom-subnet" ip_cidr_range: "10.10.0.0/24" region: "europe-west1" - description: "mydesc" +# description: "mydesc" # this property is not defined in the type, isn't it? project: "myproj" enable_flow_logs: true private_ip_google_access: false diff --git a/prov/terraform/openstack/testdata/OSInstanceWithServerGroup.yaml b/prov/terraform/openstack/testdata/OSInstanceWithServerGroup.yaml index 5db81252f..c7861795e 100644 --- a/prov/terraform/openstack/testdata/OSInstanceWithServerGroup.yaml +++ b/prov/terraform/openstack/testdata/OSInstanceWithServerGroup.yaml @@ -48,9 +48,9 @@ topology_template: properties: policy: "anti-affinity" name: "sg-SimpleApp-ServerGroupPolicy" - policies: - - ServerGroupPolicy: - type: yorc.openstack.policies.ServerGroupPolicy - targets: [ ComputeA ] - properties: - policy: "anti-affinity" +# policies: +# - ServerGroupPolicy: +# type: yorc.openstack.policies.ServerGroupPolicy # undefined type +# targets: [ ComputeA ] +# properties: +# policy: "anti-affinity" diff --git a/tasks/workflow/testdata/workflow.yaml b/tasks/workflow/testdata/workflow.yaml index cbce2ccfa..4dea38cf0 100644 --- a/tasks/workflow/testdata/workflow.yaml +++ b/tasks/workflow/testdata/workflow.yaml @@ -10,9 +10,9 @@ description: "" imports: - normative-types: -artifacts_types: +artifact_types: ystia.yorc.tests.artifacts.Implementation.Custom: - derived_from: tosca.artifact.Implementation + derived_from: tosca.artifacts.Implementation node_types: ystia.yorc.tests.nodes.WFCompute: From a3d6ef4cc82aac1a6567e6573f7798a69ff09efd Mon Sep 17 00:00:00 2001 From: Philippe Merle Date: Tue, 7 May 2019 12:31:11 +0200 Subject: [PATCH 2/2] Take suggested changes of PR#390 into account --- data/tosca/yorc-google-types.yml | 3 +-- .../testdata/test_client_service_generated_topology.yml | 2 +- deployments/testdata/test_topology_service.yml | 2 +- prov/slurm/testdata/multipleSlurmNodeAllocation.yaml | 1 - prov/slurm/testdata/simpleSlurmNodeAllocation.yaml | 1 - .../testdata/simpleComputeInstanceWithPersistentDisk.yaml | 8 +++----- .../openstack/testdata/OSInstanceWithServerGroup.yaml | 6 ------ 7 files changed, 6 insertions(+), 17 deletions(-) diff --git a/data/tosca/yorc-google-types.yml b/data/tosca/yorc-google-types.yml index b342cf989..0b6813855 100644 --- a/data/tosca/yorc-google-types.yml +++ b/data/tosca/yorc-google-types.yml @@ -221,8 +221,7 @@ node_types: required: false entry_schema: type: yorc.datatypes.google.ScratchDisk - constraints: # must be applied to the list type instead of list entries of ScratchDisk type, isn't it? - # - greater_or_equal: 0 # can't be applied to a list, isn't it? + constraints: - max_length: 8 requirements: - assignment: diff --git a/deployments/testdata/test_client_service_generated_topology.yml b/deployments/testdata/test_client_service_generated_topology.yml index aca5d964a..8dea79127 100644 --- a/deployments/testdata/test_client_service_generated_topology.yml +++ b/deployments/testdata/test_client_service_generated_topology.yml @@ -14,7 +14,7 @@ topology_template: appA_capA: [ AppAInstance, appA_capA ] appA_capA: [ AppAInstance, appA_capA ] requirements: - - hosted: [ AppAInstance, hostedOnComputeHost ] + hosted: [ AppAInstance, hostedOnComputeHost ] node_templates: Compute: type: yorc.nodes.hostspool.Compute diff --git a/deployments/testdata/test_topology_service.yml b/deployments/testdata/test_topology_service.yml index af4235f99..1d9872763 100644 --- a/deployments/testdata/test_topology_service.yml +++ b/deployments/testdata/test_topology_service.yml @@ -22,7 +22,7 @@ topology_template: properties: network_name: PRIVATE requirements: - - hosted: [ AppAInstance, hostedOnComputeHost ] + hosted: [ AppAInstance, hostedOnComputeHost ] properties: aProp: [ AppAInstance, appA_propBString ] attributes: diff --git a/prov/slurm/testdata/multipleSlurmNodeAllocation.yaml b/prov/slurm/testdata/multipleSlurmNodeAllocation.yaml index c80d89b3d..5b83a9e87 100644 --- a/prov/slurm/testdata/multipleSlurmNodeAllocation.yaml +++ b/prov/slurm/testdata/multipleSlurmNodeAllocation.yaml @@ -16,7 +16,6 @@ topology_template: type: yorc.nodes.slurm.Compute properties: partition: debug -# user: root # this property is undefined, isn't it? gres: gpu:1 constraint: "[rack1*2&rack2*4]" job_name: xyz diff --git a/prov/slurm/testdata/simpleSlurmNodeAllocation.yaml b/prov/slurm/testdata/simpleSlurmNodeAllocation.yaml index e3a2e6380..71fa0f0a4 100644 --- a/prov/slurm/testdata/simpleSlurmNodeAllocation.yaml +++ b/prov/slurm/testdata/simpleSlurmNodeAllocation.yaml @@ -16,7 +16,6 @@ topology_template: type: yorc.nodes.slurm.Compute properties: partition: debug -# user: root # this property is undefined, isn't it? gres: gpu:1 constraint: "[rack1|rack2|rack3|rack4]" job_name: xyz diff --git a/prov/terraform/google/testdata/simpleComputeInstanceWithPersistentDisk.yaml b/prov/terraform/google/testdata/simpleComputeInstanceWithPersistentDisk.yaml index 25631bd84..2aeea107b 100644 --- a/prov/terraform/google/testdata/simpleComputeInstanceWithPersistentDisk.yaml +++ b/prov/terraform/google/testdata/simpleComputeInstanceWithPersistentDisk.yaml @@ -15,7 +15,6 @@ imports: topology_template: node_templates: Compute: - metadata: {} # or remove this line type: yorc.nodes.google.Compute properties: image_project: "centos-cloud" @@ -27,9 +26,9 @@ topology_template: node: BS1 capability: tosca.capabilities.Attachment relationship: - type: tosca.relationships.AttachesTo -# properties: -# mode: "READ_ONLY" # undefined property + type: tosca.relationships.google.AttachesTo + properties: + mode: "READ_ONLY" capabilities: endpoint: properties: @@ -47,7 +46,6 @@ topology_template: max_instances: 1 default_instances: 1 BS1: - metadata: {} # or remove this line type: yorc.nodes.google.PersistentDisk properties: zone: "europe-west1-b" diff --git a/prov/terraform/openstack/testdata/OSInstanceWithServerGroup.yaml b/prov/terraform/openstack/testdata/OSInstanceWithServerGroup.yaml index c7861795e..3c5b4beb4 100644 --- a/prov/terraform/openstack/testdata/OSInstanceWithServerGroup.yaml +++ b/prov/terraform/openstack/testdata/OSInstanceWithServerGroup.yaml @@ -48,9 +48,3 @@ topology_template: properties: policy: "anti-affinity" name: "sg-SimpleApp-ServerGroupPolicy" -# policies: -# - ServerGroupPolicy: -# type: yorc.openstack.policies.ServerGroupPolicy # undefined type -# targets: [ ComputeA ] -# properties: -# policy: "anti-affinity"