move plugins from from ccsdk to dcaegen2
[dcaegen2/platform/plugins.git] / dcae-policy / dcaepolicy-node-type.yaml
1 # ================================================================================
2 # Copyright (c) 2017-2020 AT&T Intellectual Property. All rights reserved.
3 # ================================================================================
4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at
7 #
8 #      http://www.apache.org/licenses/LICENSE-2.0
9 #
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
15 # ============LICENSE_END=========================================================
16 #
17
18 plugins:
19   dcaepolicy:
20     executor: 'central_deployment_agent'
21     package_name: dcaepolicyplugin
22     package_version: 2.4.0
23
24 data_types:
25     # the properties inside dcae.data.policy_filter are identical to /getConfig API of policy-engine except the requestID field.
26     # refer to policy-engine /getConfig wiki for explanation of these properties.
27     # policy-engine /getConfig wiki: The filter works as a combined "AND" operation.
28     #                                To retrieve all policies using "sample" as configName,
29     #                                   the request needs to have policyName = ".*"  and configName as = "sample"
30     # configAttributes is a key-value dictionary or a stringified json of the dictionary
31     dcae.data.policy_filter:
32         properties:
33             policyName:
34                 type: string
35                 default: "DCAE.Config_.*"
36             configName:
37                 type: string
38                 default: ""
39             onapName:
40                 type: string
41                 default: "DCAE"
42             configAttributes:
43                 default: {}
44             unique:
45                 type: boolean
46                 default: false
47
48 node_types:
49     # node that points to a single latest policy identified by policy_id
50     #   policy_id is the versionless left part of policyName in policy-engine
51     dcae.nodes.policy:
52         derived_from: cloudify.nodes.Root
53         properties:
54             policy_id:
55                 description: versionless key to policy in policy-engine
56                 type: string
57                 default: DCAE.Config_unknown-policy
58             policy_required:
59                 description: whether to throw an exception when failed to get the policy
60                 type: boolean
61                 default: false
62         interfaces:
63             cloudify.interfaces.lifecycle:
64                 create:
65                     implementation: dcaepolicy.dcaepolicyplugin.policy_get
66
67     # node that points to varying collection of policies by selection criteria = policy_filter.
68     dcae.nodes.policies:
69         derived_from: cloudify.nodes.Root
70         properties:
71             policy_filter:
72                 type: dcae.data.policy_filter
73                 default: {}
74             policy_required:
75                 description: whether to throw an exception when failed to get a policy
76                 type: boolean
77                 default: false
78         interfaces:
79             cloudify.interfaces.lifecycle:
80                 create:
81                     implementation: dcaepolicy.dcaepolicyplugin.policy_get