Adding nemo engine.
[nemo.git] / nemo-impl / src / main / yang / intent-processing-status.yang
1 /*\r
2  * Copyright (c) 2015 Huawei, Inc. and others. All rights reserved.\r
3  *\r
4  * This program and the accompanying materials are made available under the\r
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,\r
6  * and is available at http://www.eclipse.org/legal/epl-v10.html\r
7  */\r
8 \r
9 module intent-processing-status {\r
10     yang-version 1;\r
11 \r
12     namespace "urn:opendaylight:params:xml:ns:yang:intent:processing:status";\r
13     prefix "intent-processing-status";\r
14 \r
15     import nemo-common {prefix nemo-common;}\r
16 \r
17     revision "2015-10-10" {\r
18         description\r
19             "Initial revision.";\r
20     }\r
21 \r
22     grouping intent-status {\r
23         leaf status {\r
24             description\r
25                 "Represents the current processing status of the user intent\r
26                  maintained by the NEMO engine or the user's transaction.";\r
27             type enumeration {\r
28                 enum processing-succeeded {\r
29                     description\r
30                         "The user intent has been successfully processed by the\r
31                          NEMO engine and the underlying network has been configured\r
32                          by some renderer if necessary, or the user's transaction\r
33                          has been processed successfully.";\r
34                 }\r
35                 enum in-processing {\r
36                     description\r
37                         "The user intent is being processed by the NEMO engine, or\r
38                          some intents in the user's transaction are being processed.";\r
39                 }\r
40                 enum processing-failed {\r
41                     description\r
42                         "The processing for the user intent by the NEMO engine is\r
43                          failed, the reason might be syntax error, insufficient\r
44                          underlying network resources, etc, and is described in\r
45                          the message in detail. Or the processing for the user's\r
46                          transaction is failed.";\r
47                 }\r
48             }\r
49             config false;\r
50             mandatory true;\r
51         }\r
52 \r
53         leaf message {\r
54             description\r
55                 "The human-readable and detailed message about the status.";\r
56             type string;\r
57             config false;\r
58         }\r
59     }\r
60 \r
61     container intent-processing-statuses {\r
62         description\r
63             "Contains the intent processing statuses of all users\r
64              maintained by the NEMO engine.";\r
65 \r
66         list user-intent-status {\r
67             description\r
68                 "Represents the list of all users with their intent statuses.";\r
69 \r
70             key "user-id";\r
71             leaf user-id {\r
72                 description\r
73                     "The unique ID for the user.";\r
74                 type nemo-common:user-id;\r
75             }\r
76 \r
77             container transaction-status {\r
78                 description\r
79                     "Contains the user's transaction status information.\r
80                      When all user intents in the transaction have been\r
81                      successfully processed, the transaction status will\r
82                      be set to processing-succeeded. If the processing for\r
83                      some user intents in the transaction is failed, the\r
84                      transaction status will be set to processing-failed.";\r
85 \r
86                 uses intent-status;\r
87             }\r
88 \r
89             container object-statuses {\r
90                 description\r
91                     "Contains all object intent statuses of the user.";\r
92 \r
93                 list node-status {\r
94                     description\r
95                         "The list of all node intent statuses of the user.";\r
96 \r
97                     key "node-id";\r
98                     leaf node-id {\r
99                         description\r
100                             "The unique ID for the node.";\r
101                         type nemo-common:node-id;\r
102                     }\r
103 \r
104                     uses intent-status;\r
105                     config false;\r
106                 }\r
107 \r
108                 list connection-status {\r
109                     description\r
110                         "The list of all connection intent statuses of the user.";\r
111 \r
112                     key "connection-id";\r
113                     leaf connection-id {\r
114                         description\r
115                             "The unique ID for the connection.";\r
116                         type nemo-common:connection-id;\r
117                     }\r
118 \r
119                     uses intent-status;\r
120                     config false;\r
121                 }\r
122 \r
123                 list flow-status {\r
124                     description\r
125                         "The list of all flow intent statuses of the user.";\r
126 \r
127                     key "flow-id";\r
128                     leaf flow-id {\r
129                         description\r
130                             "The unique ID for the flow.";\r
131                         type nemo-common:flow-id;\r
132                     }\r
133 \r
134                     uses intent-status;\r
135                     config false;\r
136                 }\r
137             }\r
138 \r
139             container operation-statuses {\r
140                 description\r
141                     "Contains all operation intent statuses of the user.";\r
142 \r
143                 list operation-status {\r
144                     description\r
145                         "The list of all operation intent statuses of the user.";\r
146 \r
147                     key "operation-id";\r
148                     leaf operation-id {\r
149                         description\r
150                             "The unique ID for the operation.";\r
151                         type nemo-common:operation-id;\r
152                     }\r
153 \r
154                     uses intent-status;\r
155                     config false;\r
156                 }\r
157             }\r
158 \r
159             container result-statuses {\r
160                 // TBD\r
161             }\r
162         }\r
163     }\r
164 }\r