summaryrefslogtreecommitdiffstats
path: root/dcae-policy/dcaepolicy-node-type.yaml
blob: ec7f37302f4e6d7c6eab11ede84c1226ed18db8d (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
# ================================================================================
# Copyright (c) 2017-2019 AT&T Intellectual Property. All rights reserved.
# ================================================================================
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ============LICENSE_END=========================================================
#
# ECOMP is a trademark and service mark of AT&T Intellectual Property.

plugins:
  dcaepolicy:
    executor: 'central_deployment_agent'
    package_name: dcaepolicyplugin
    package_version: 2.3.2

data_types:
    # the properties inside dcae.data.policy_filter are identical to /getConfig API of policy-engine except the requestID field.
    # refer to policy-engine /getConfig wiki for explanation of these properties.
    # policy-engine /getConfig wiki: The filter works as a combined "AND" operation.
    #                                To retrieve all policies using "sample" as configName,
    #                                   the request needs to have policyName = ".*"  and configName as = "sample"
    # configAttributes is a key-value dictionary or a stringified json of the dictionary
    dcae.data.policy_filter:
        properties:
            policyName:
                type: string
                default: "DCAE.Config_.*"
            configName:
                type: string
                default: ""
            onapName:
                type: string
                default: "DCAE"
            configAttributes:
                default: {}
            unique:
                type: boolean
                default: false

node_types:
    # node that points to a single latest policy identified by policy_id
    #   policy_id is the versionless left part of policyName in policy-engine
    dcae.nodes.policy:
        derived_from: cloudify.nodes.Root
        properties:
            policy_id:
                description: versionless key to policy in policy-engine
                type: string
                default: DCAE.Config_unknown-policy
            policy_required:
                description: whether to throw an exception when failed to get the policy
                type: boolean
                default: false
        interfaces:
            cloudify.interfaces.lifecycle:
                create:
                    implementation: dcaepolicy.dcaepolicyplugin.policy_get

    # node that points to varying collection of policies by selection criteria = policy_filter.
    dcae.nodes.policies:
        derived_from: cloudify.nodes.Root
        properties:
            policy_filter:
                type: dcae.data.policy_filter
                default: {}
            policy_required:
                description: whether to throw an exception when failed to get a policy
                type: boolean
                default: false
        interfaces:
            cloudify.interfaces.lifecycle:
                create:
                    implementation: dcaepolicy.dcaepolicyplugin.policy_get