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 | /* |
| 26 | * Yang model for the Application Controller (APP-C) component of ECOMP |
| 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 | * |
| 34 | * Author: Anand Chaturvedi (ac204h@att.com) |
| 35 | */ |
| 36 | |
| 37 | module interfaces-service { |
| 38 | |
| 39 | yang-version 1; |
| 40 | namespace "org:onap:appc:interfaces:service"; |
| 41 | prefix interfaces.service; |
| 42 | organization "AT&T. Copyright (C) 2015. All rights reserved."; |
| 43 | contact |
| 44 | "Anand Chaturvedi <ac204h@att.com>"; |
| 45 | |
| 46 | description |
| 47 | "Defines the services provided by Application Controller to external interfaces."; |
| 48 | |
| 49 | /* |
| 50 | * Note, the revision changes the package name of the generated java code. Do not |
| 51 | * change the revision unless you also update all references to the bindings. |
| 52 | */ |
| 53 | revision "2017-08-18" { |
| 54 | description |
| 55 | "APP-C Interface services version 1.1.0"; |
| 56 | } |
| 57 | |
| 58 | grouping request-info { |
| 59 | container request { |
| 60 | leaf request-id { |
| 61 | type string; |
| 62 | description "The request ID "; |
| 63 | mandatory true; |
| 64 | } |
| 65 | leaf action { |
| 66 | type string; |
| 67 | description "The Action Name"; |
| 68 | mandatory true; |
| 69 | } |
| 70 | leaf request-data { |
| 71 | type string; |
| 72 | description "The Payload"; |
| 73 | } |
| 74 | leaf request-data-type { |
| 75 | description "Data type for validation"; |
| 76 | type string; |
| 77 | } |
| 78 | } |
| 79 | } |
| 80 | |
| 81 | grouping response-info { |
| 82 | description "The Generic Data response which includes data key value pair as requested in Model"; |
| 83 | container response-info { |
| 84 | description "Data returned from APPC to external Interaface"; |
| 85 | leaf block { |
| 86 | description "Response message"; |
| 87 | type string; |
| 88 | } |
| 89 | leaf requestId { |
| 90 | description "Response message reqesut ID"; |
| 91 | type string; |
| 92 | mandatory true; |
| 93 | } |
| 94 | } |
| 95 | } |
| 96 | grouping status { |
| 97 | description "The specific response codes are to be aligned with APPC/ECOMP messaging Systems"; |
| 98 | container status { |
| 99 | description "The specific response codes are to be aligned with APPC."; |
| 100 | leaf code { |
| 101 | description "Response code"; |
| 102 | type string; |
| 103 | mandatory true; |
| 104 | } |
| 105 | leaf message { |
| 106 | description "Response message"; |
| 107 | type string; |
| 108 | } |
| 109 | } |
| 110 | } |
| 111 | |
| 112 | rpc execute-service { |
| 113 | description "Runs a given action if it exists."; |
| 114 | input { |
| 115 | uses request-info; |
| 116 | } |
| 117 | output { |
| 118 | uses response-info ; |
| 119 | uses status; |
| 120 | } |
| 121 | } |
| 122 | } |