First part of onap rename
[appc.git] / appc-inbound / appc-artifact-handler / model / src / main / yang / artifact-handler.yang
1 /*-
2  * ============LICENSE_START=======================================================
3  * ONAP : APPC
4  * ================================================================================
5  * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
6  * ================================================================================
7  * Copyright (C) 2017 Amdocs
8  * =============================================================================
9  * Licensed under the Apache License, Version 2.0 (the "License");
10  * you may not use this file except in compliance with the License.
11  * You may obtain a copy of the License at
12  * 
13  *      http://www.apache.org/licenses/LICENSE-2.0
14  * 
15  * Unless required by applicable law or agreed to in writing, software
16  * distributed under the License is distributed on an "AS IS" BASIS,
17  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18  * See the License for the specific language governing permissions and
19  * limitations under the License.
20  * 
21  * ECOMP is a trademark and service mark of AT&T Intellectual Property.
22  * ============LICENSE_END=========================================================
23  */
24
25 module artifact-handler {
26     yang-version 1;
27
28     namespace "org.onap.appc:artifacthandler";
29     prefix artifacthandler;
30
31     import ietf-inet-types { prefix "ietf"; revision-date "2010-09-24"; }
32     organization "AT&T, Inc.";
33
34     description
35         "Defines APPC interface to push reference data and templates.";
36
37     revision "2017-03-21" {
38         description
39                 "Initial draft";
40     }
41
42     grouping configuration-document-information { 
43         uses request-information; 
44         uses document-parameters; 
45      }
46     
47      grouping request-information { 
48         container request-information { 
49            leaf request-id { 
50               type string; 
51            } 
52            leaf request-action { 
53               type enumeration { 
54                  enum "StoreSdcDocumentRequest";
55               } 
56            } 
57            leaf request-sub-action { 
58               type enumeration { 
59                  enum "STOREDOCUMENT";
60               } 
61            } 
62            leaf source { 
63               type string; 
64            } 
65         } 
66      }
67      grouping document-parameters { 
68         container document-parameters { 
69            leaf service-uuid { 
70               type string; 
71               mandatory true; 
72            } 
73            leaf distribution-id { 
74               type string; 
75            } 
76            leaf service-name { 
77               type string; 
78            } 
79            leaf service-description { 
80               type string; 
81            } 
82            leaf service-artifacts { 
83               type string; 
84            } 
85            leaf resource-uuid { 
86               type string; 
87            } 
88            leaf resource-instance-name { 
89               type string; 
90            } 
91            leaf resource-name { 
92               type string; 
93            } 
94            leaf resource-version { 
95               type string; 
96            } 
97            leaf resource-type { 
98               type string; 
99            } 
100            leaf artifact-uuid { 
101               type string; 
102            } 
103            leaf artifact-name { 
104               type string; 
105            } 
106            leaf artifact-type { 
107               type string; 
108            } 
109            leaf artifact-version { 
110               type string; 
111            } 
112            leaf artifact-description { 
113               type string; 
114            } 
115            leaf artifact-contents { 
116               type string; 
117            } 
118         } 
119      }
120      rpc uploadartifact {
121          description "upload the artifact into APPC";
122          input {
123                 uses configuration-document-information;
124          }
125          output { 
126              container config-document-response { 
127                 leaf request-id { 
128                    type string; 
129                 } 
130                 leaf status { 
131                    type string; 
132                 } 
133                 leaf error-reason { 
134                    type string; 
135                 } 
136              } 
137           }
138      }     
139 }