Initial commit for OpenECOMP SDN-C N-C 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-text {
52             type string;
53         }
54     }
55
56     container test-results {
57         description "Test results";
58
59             list test-result {
60                 key "test-identifier";
61
62                 leaf test-identifier {
63                     type string;
64                 }
65
66                 leaf-list results {
67                     type string;
68                 }
69             }
70     }
71
72     rpc execute-graph {
73         description " Method to add a new parameter.";
74         input {
75
76             leaf module-name {
77                 type string;
78             }
79
80             leaf rpc-name {
81                 type string;
82             }
83
84             leaf mode {
85                 type enumeration {
86                     enum sync;
87                     enum async;
88                 }
89             }
90
91             list sli-parameter {
92                 key "parameter-name";
93                 uses parameter-setting;
94             }
95         }
96
97         output {
98            uses response-fields;
99         }
100     }
101
102     rpc healthcheck {
103         output {
104             uses response-fields;
105         }
106     }
107
108 }