aboutsummaryrefslogtreecommitdiffstats
path: root/openecomp-be/lib/openecomp-tosca-lib/src/test/resources/mock/model/serviceTemplate.yaml
blob: c93061996bf9868b2a9f53f5d919b9fa19956abd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
tosca_definitions_version: tosca_simple_yaml_1_0_0
metadata:
  template_name: Test
  template_author: OPENECOMP
  template_version: 1.0.0
description: testing desc tosca service template
imports:
- myfile1:
    file: path1/path2/file1.yaml
- myfile2:
    file: path1/path2/file2.yaml
artifact_types:
  one_artifact:
    mime_type: application/java-archive
    file_ext:
    - yaml
    - xml
node_types:
  compute_node_type:
    derived_from: tosca.nodes.Root
    version: 1.0.0
    description: tosca compute test
    properties:
      cpu_num:
        type: integer
        description: Number of CPUs requested for a software node instance
        required: true
        default: 1
        status: SUPPORTED
        constraints:
        - greater_or_equal: 5.0
        - equal: 5
        - greater_than: 6.02
        - in_range:
          - 0
          - UNBOUNDED
    attributes:
      attDef1:
        type: string
        default: hi
        status: SUPPORTED
    requirements:
    - re1:
        capability: tosca.cap1
        occurrences:
        - 5
        - 1
    capabilities:
      cap1:
        type: tosca.cap
        valid_source_types:
        - node1
        - node2
        occurrences:
        - 1
        - UNBOUNDED
topology_template:
  description: topologi template descroption
  inputs:
    inParam1:
      type: string
      description: desc
      required: false
      default: my default val
      constraints:
      - greater_than: 6
      - greater_or_equal: 9
      entry_schema:
        type: tosca.myType
  node_templates:
    firstNodeTemplate:
      type: nodeTypeRef
      directives:
      - selectable
      - substitutable
      properties:
        prop2: '{ get_input: my_mysql_rootpw }'
        prop1: abcd
      attributes:
        att2: '{ get_input: my_mysql_rootpw }'
        att1: att1Val
      requirements:
      - req1:
          capability: capA
          node: nodeA
          relationship: relationB
          node_filter:
           properties:
            - propName1:
              - greater_or_equal: 9
            - propName2:
              - min_length: 1
              - max_length: 2
          occurrences:
          - 1
          - 2
      - req2:
          capability: capA
          node: nodeA
          relationship: relationB
  substitution_mappings:
    node_type: myNodeType.node
    capabilities:
      database_endpoint:
      - database
      - database_endpoint