[SDNC-5] Rebase sdnc-core
[sdnc/core.git] / sliapi / model / src / main / yang / sliapi.yang
1 module SLI-API {
2
3     yang-version 1;
4
5     namespace "org:openecomp:sdnc:sliapi";
6
7     prefix sample;
8
9     import ietf-inet-types { prefix "inet"; revision-date 2010-09-24; }
10
11     organization "openECOMP";
12
13     contact
14         "Dan Timoney";
15
16     description
17         "Defines API to service logic interpreter";
18
19     revision "2016-11-10" {
20         description
21                 "REST API to Service Logic Interpreter";
22     }
23
24     grouping parameter-setting {
25         description
26                 "Parameter setting";
27
28         leaf parameter-name {
29             type string;
30             description "Parameter name";
31         }
32
33         leaf int-value {
34             type int32;
35         }
36         leaf string-value {
37             type string;
38         }
39         leaf boolean-value {
40             type boolean;
41         }
42     }
43
44     grouping response-fields {
45         leaf response-code {
46             type string;
47         }
48         leaf ack-final-indicator {
49             type string;
50         }
51         leaf response-message {
52             type string;
53         }
54         leaf context-memory-json {
55             type string;
56         }
57     }
58
59     container test-results {
60         description "Test results";
61
62             list test-result {
63                 key "test-identifier";
64
65                 leaf test-identifier {
66                     type string;
67                 }
68
69                 leaf-list results {
70                     type string;
71                 }
72             }
73     }
74
75     rpc execute-graph {
76         description " Method to add a new parameter.";
77         input {
78
79             leaf module-name {
80                 type string;
81             }
82
83             leaf rpc-name {
84                 type string;
85             }
86
87             leaf mode {
88                 type enumeration {
89                     enum sync;
90                     enum async;
91                 }
92             }
93
94             list sli-parameter {
95                 key "parameter-name";
96                 uses parameter-setting;
97             }
98         }
99
100         output {
101            uses response-fields;
102         }
103     }
104
105     rpc healthcheck {
106         output {
107             uses response-fields;
108         }
109     }
110
111 }