Dilip kumar Pampana | 108ff43 | 2018-01-08 15:08:21 -0500 | [diff] [blame] | 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 | /* |
Patrick Brady | 8eb9f5d | 2018-02-06 16:11:42 -0500 | [diff] [blame^] | 26 | * Yang model for the Application Controller (APP-C) component of ONAP |
Dilip kumar Pampana | 108ff43 | 2018-01-08 15:08:21 -0500 | [diff] [blame] | 27 | * |
| 28 | * |
| 29 | *The main purpose of this model to provide an interface bewteen APPC Runtime and other interface |
| 30 | * to communicate. |
| 31 | * |
| 32 | * |
| 33 | * |
Dilip kumar Pampana | 108ff43 | 2018-01-08 15:08:21 -0500 | [diff] [blame] | 34 | */ |
| 35 | |
| 36 | module interfaces-service { |
| 37 | |
| 38 | yang-version 1; |
| 39 | namespace "org:onap:appc:interfaces:service"; |
| 40 | prefix interfaces.service; |
Dilip kumar Pampana | 108ff43 | 2018-01-08 15:08:21 -0500 | [diff] [blame] | 41 | |
| 42 | description |
| 43 | "Defines the services provided by Application Controller to external interfaces."; |
| 44 | |
| 45 | /* |
| 46 | * Note, the revision changes the package name of the generated java code. Do not |
| 47 | * change the revision unless you also update all references to the bindings. |
| 48 | */ |
| 49 | revision "2017-08-18" { |
| 50 | description |
| 51 | "APP-C Interface services version 1.1.0"; |
| 52 | } |
| 53 | |
| 54 | grouping request-info { |
| 55 | container request { |
| 56 | leaf request-id { |
| 57 | type string; |
| 58 | description "The request ID "; |
| 59 | mandatory true; |
| 60 | } |
| 61 | leaf action { |
| 62 | type string; |
| 63 | description "The Action Name"; |
| 64 | mandatory true; |
| 65 | } |
| 66 | leaf request-data { |
| 67 | type string; |
| 68 | description "The Payload"; |
| 69 | } |
| 70 | leaf request-data-type { |
| 71 | description "Data type for validation"; |
| 72 | type string; |
| 73 | } |
| 74 | } |
| 75 | } |
| 76 | |
| 77 | grouping response-info { |
| 78 | description "The Generic Data response which includes data key value pair as requested in Model"; |
| 79 | container response-info { |
| 80 | description "Data returned from APPC to external Interaface"; |
| 81 | leaf block { |
| 82 | description "Response message"; |
| 83 | type string; |
| 84 | } |
| 85 | leaf requestId { |
| 86 | description "Response message reqesut ID"; |
| 87 | type string; |
| 88 | mandatory true; |
| 89 | } |
| 90 | } |
| 91 | } |
| 92 | grouping status { |
| 93 | description "The specific response codes are to be aligned with APPC/ECOMP messaging Systems"; |
| 94 | container status { |
| 95 | description "The specific response codes are to be aligned with APPC."; |
| 96 | leaf code { |
| 97 | description "Response code"; |
| 98 | type string; |
| 99 | mandatory true; |
| 100 | } |
| 101 | leaf message { |
| 102 | description "Response message"; |
| 103 | type string; |
| 104 | } |
| 105 | } |
| 106 | } |
| 107 | |
| 108 | rpc execute-service { |
| 109 | description "Runs a given action if it exists."; |
| 110 | input { |
| 111 | uses request-info; |
| 112 | } |
| 113 | output { |
| 114 | uses response-info ; |
| 115 | uses status; |
| 116 | } |
| 117 | } |
| 118 | } |