Import OPNVF Yang based Event Stream
[scp/oam/modeling.git] / data-model / yang / published / opnfv / yes-object-deletion.yang
1 module yes-object-deletion {
2     yang-version 1.1;
3     namespace "urn:opnfv:params:xml:ns:yang:object-deletion";
4     prefix yod;
5
6     import yang-based-event-stream {
7         prefix yes;
8         reference
9           "wiki.opnfv.org/display/ves/VES+goes+YES";
10     }
11     import yes-types {
12         prefix yt;
13         reference
14           "wiki.opnfv.org/display/ves/VES+goes+YES";
15     }
16
17     organization
18       "Open Platform for NFV (OPNFV) - Virtual Event Streaming (VES) project";
19     contact
20       "wiki.opnfv.org/display/ves";
21     description
22       "This module contains a collection of YANG definitions for sending an
23        object creation notification.
24
25        Copyright 2020 highstreet technologies GmbH and others.
26
27        Licensed under the Apache License, Version 2.0 (the 'License');
28        you may not use this file except in compliance with the License.
29        You may obtain a copy of the License at
30
31         http://www.apache.org/licenses/LICENSE-2.0
32
33        Unless required by applicable law or agreed to in writing, software
34        distributed under the License is distributed on an 'AS IS' BASIS,
35        WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
36        See the License for the specific language governing permissions and
37        limitations under the License.";
38
39     revision 2020-07-04 {
40         description
41           "Initial version";
42         reference
43           "ONAP SDN-R: wiki.onap.org/display/DW/SDN-R
44            VES: wiki.opnfv.org/display/ves/VES+Home
45                 docs.onap.org/en/frankfurt/submodules/dcaegen2.git/docs/sections/services/ves-http
46            YES: wiki.opnfv.org/display/ves/VES+goes+YES";
47     }
48
49     /*
50      * Groupings
51      */
52     grouping object-deletion-grp {
53         leaf object-reference {
54             type instance-identifier {
55                 require-instance false;
56             }
57             mandatory true;
58             description
59               "A reference to the object containing the attribute (leaf).";
60         }
61         container schema {
62             uses yt:schema-grp;
63             description
64               "The YANG module, which defines the type of the attribute
65                identified by its namespace.";
66         }
67         anydata data {
68             description
69               "A set of data representing the deleted object instance.
70                TODO: does this make any sense?";
71         }
72         description
73           "An object class containing parameters for object deletion.";
74     }
75
76     /*
77      * Augmentation of YES
78      */
79     augment "/yes:event-history/yes:event" {
80         when "derived-from-or-self(/yes:event-history/yes:event/yes:header/yes:domain, 'yod:object-deletion')" {
81             description
82               "The event header must indicate 'object-deletion'.";
83         }
84         if-feature yes:event-history;
85         list object-deletion {
86             uses object-deletion-grp;
87             description
88               "A single object for specific parameters, used for the any object
89                deletion (list item or container).";
90         }
91         description
92           "Adds to YES the specifics of object-deletion notifications.";
93     }
94
95     augment "/yes:yang-based-event-stream/yes:event" {
96         when "derived-from-or-self(/yes:yang-based-event-stream/yes:event/yes:header/yes:domain, 'yod:object-deletion')" {
97             description
98               "The event header must indicate 'object-deletion'.";
99         }
100         list object-deletion {
101             uses object-deletion-grp;
102             description
103               "A single object for specific parameters, used for the any object
104                deletion (list item or container).";
105         }
106         description
107           "Adds to YES the specifics of object-deletion notifications.";
108     }
109 }