Add documentation for ACM
[policy/parent.git] / docs / clamp / acm / files / acm-tosca.yaml
1 tosca_definitions_version: tosca_simple_yaml_1_3
2 data_types:
3   onap.datatypes.ToscaConceptIdentifier:
4     derived_from: tosca.datatypes.Root
5     properties:
6       name:
7         type: string
8         required: true
9       version:
10         type: string
11         required: true
12
13   onap.datatypes.clamp.acm.httpAutomationCompositionElement.RestRequest:
14     version: 1.0.0
15     derived_from: tosca.datatypes.Root
16     properties:
17       restRequestId:
18         type: onap.datatypes.ToscaConceptIdentifier
19         required: true
20         description: The name and version of a REST request to be sent to a REST endpoint
21       httpMethod:
22         type: string
23         required: true
24         constraints:
25           - valid_values:
26               - POST
27               - PUT
28               - GET
29               - DELETE
30         description: The REST method to use
31       path:
32         type: string
33         required: true
34         description: The path of the REST request relative to the base URL
35       body:
36         type: string
37         required: false
38         description: The body of the REST request for PUT and POST requests
39       expectedResponse:
40         type: integer
41         required: true
42         constraints: []
43         description: THe expected HTTP status code for the REST request
44   onap.datatypes.clamp.acm.httpAutomationCompositionElement.ConfigurationEntity:
45     version: 1.0.0
46     derived_from: tosca.datatypes.Root
47     properties:
48       configurationEntityId:
49         type: onap.datatypes.ToscaConceptIdentifier
50         required: true
51         description:
52           The name and version of a Configuration Entity to be handled
53           by the HTTP Automation Composition Element
54       restSequence:
55         type: list
56         entry_schema:
57           type: onap.datatypes.clamp.acm.httpAutomationCompositionElement.RestRequest
58           type_version: 1.0.0
59         description: A sequence of REST commands to send to the REST endpoint
60
61
62 node_types:
63   org.onap.policy.clamp.acm.Participant:
64     version: 1.0.1
65     derived_from: tosca.nodetypes.Root
66     properties:
67       provider:
68         type: string
69         required: false
70   org.onap.policy.clamp.acm.AutomationCompositionElement:
71     version: 1.0.1
72     derived_from: tosca.nodetypes.Root
73     properties:
74       provider:
75         type: string
76         required: false
77         metadata:
78           common: true
79         description: Specifies the organization that provides the automation composition element
80       startPhase:
81         type: integer
82         required: false
83         constraints:
84           - greater_or_equal: 0
85         metadata:
86           common: true
87         description:
88           A value indicating the start phase in which this automation composition element will be started, the
89           first start phase is zero. Automation Composition Elements are started in their start_phase order and stopped
90           in reverse start phase order. Automation Composition Elements with the same start phase are started and
91           stopped simultaneously
92       uninitializedToPassiveTimeout:
93         type: integer
94         required: false
95         constraints:
96           - greater_or_equal: 0
97         default: 60
98         metadata:
99           common: true
100         description: The maximum time in seconds to wait for a state chage from uninitialized to passive
101       passiveToRunningTimeout:
102         type: integer
103         required: false
104         constraints:
105           - greater_or_equal: 0
106         default: 60
107         metadata:
108           common: true
109         description: The maximum time in seconds to wait for a state chage from passive to running
110       runningToPassiveTimeout:
111         type: integer
112         required: false
113         constraints:
114           - greater_or_equal: 0
115         default: 60
116         metadata:
117           common: true
118         description: The maximum time in seconds to wait for a state chage from running to passive
119       passiveToUninitializedTimeout:
120         type: integer
121         required: false
122         constraints:
123           - greater_or_equal: 0
124         default: 60
125         metadata:
126           common: true
127         description: The maximum time in seconds to wait for a state chage from passive to uninitialized
128   org.onap.policy.clamp.acm.AutomationComposition:
129     version: 1.0.1
130     derived_from: tosca.nodetypes.Root
131     properties:
132       provider:
133         type: string
134         required: false
135         metadata:
136           common: true
137         description: Specifies the organization that provides the automation composition element
138       elements:
139         type: list
140         required: true
141         metadata:
142           common: true
143         entry_schema:
144           type: onap.datatypes.ToscaConceptIdentifier
145         description: Specifies a list of automation composition element definitions that make up this automation composition definition
146   org.onap.policy.clamp.acm.K8SMicroserviceAutomationCompositionElement:
147     version: 1.0.0
148     derived_from: org.onap.policy.clamp.acm.AutomationCompositionElement
149     properties:
150       chart:
151         type: dictionary
152         required: true
153         description: This consumes the helm chart information in key value pairs.
154   org.onap.policy.clamp.acm.HttpAutomationCompositionElement:
155     version: 1.0.0
156     derived_from: org.onap.policy.clamp.acm.AutomationCompositionElement
157     properties:
158       baseUrl:
159         type: string
160         required: true
161         description: The base URL to be prepended to each path, identifies the host for the REST endpoints.
162       httpHeaders:
163         type: map
164         required: false
165         entry_schema:
166           type: string
167         description: HTTP headers to send on REST requests
168       configurationEntities:
169         type: map
170         required: true
171         entry_schema:
172           type: org.onap.datatypes.policy.clamp.acm.httpAutomationCompositionElement.ConfigurationEntity
173           type_version: 1.0.0
174         description: The connfiguration entities the Automation Composition Element is managing and their associated REST requests
175
176 topology_template:
177   node_templates:
178     org.onap.k8s.acm.K8SAutomationCompositionParticipant:
179       version: 2.3.4
180       type: org.onap.policy.clamp.acm.Participant
181       type_version: 1.0.1
182       description: Participant for K8S
183       properties:
184         provider: ONAP
185     org.onap.policy.clamp.ac.element.K8S_AutomationCompositionElement:
186       # Helm chart parameters for the microservice
187       version: 1.2.3
188       type: org.onap.policy.clamp.acm.K8SMicroserviceAutomationCompositionElement
189       type_version: 1.0.0
190       description: Automation composition element for the K8S microservice for AC Element Starter
191       properties:
192         provider: ONAP
193         startPhase: 0
194         uninitializedToPassiveTimeout: 300
195         podStatusCheckInterval: 30
196     org.onap.policy.clamp.acm.HttpParticipant:
197       version: 2.3.4
198       type: org.onap.policy.clamp.acm.Participant
199       type_version: 1.0.1
200       description: Participant for Http requests
201       properties:
202         provider: ONAP
203     onap.policy.clamp.ac.element.Http_AutomationCompositionElement:
204       # Http config for AC Element microservice.
205       version: 1.2.3
206       type: org.onap.policy.clamp.acm.HttpAutomationCompositionElement
207       type_version: 1.0.0
208       description: Automation composition element for the http requests of AC Element Starter microservice
209       properties:
210         provider: ONAP
211         uninitializedToPassiveTimeout: 300
212         startPhase: 1
213
214     onap.policy.clamp.acm.AutomationCompositionElement:
215       version: 1.2.3
216       type: org.onap.policy.clamp.acm.AutomationComposition
217       type_version: 1.0.1
218       description: Automation composition for Demo
219       properties:
220         provider: ONAP
221         elements:
222           - name: onap.policy.clamp.ac.element.K8S_AutomationCompositionElement
223             version: 1.2.3
224           - name: onap.policy.clamp.ac.element.Http_AutomationCompositionElement
225             version: 1.2.3