Gaurav Agrawal | b102b01 | 2016-08-02 12:52:48 +0530 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2016-present Open Networking Laboratory |
| 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
| 16 | |
| 17 | /** |
| 18 | * Provides interfaces to build and obtain YANG data tree which is data |
| 19 | * (sub)instance representation, abstract of protocol. |
| 20 | * |
| 21 | * NBI protocol implementation takes care of the protocol specific |
| 22 | * operations. They are abstracted from the intricacies of understanding |
| 23 | * the application identification or handling the interaction with |
| 24 | * applications. |
| 25 | * |
| 26 | * NBI protocols need to handle the encoding and decoding of data to the |
| 27 | * protocol specific format. They are unaware of the YANG of applications, |
| 28 | * i.e. protocols are unaware of the data structure / organization in |
| 29 | * applications. |
| 30 | * |
| 31 | * They need to translate the protocol operation request, into a protocol |
| 32 | * independent abstract tree called the YANG data tree (YDT). In order to |
| 33 | * enable the protocol in building these abstract data tree, YANG |
| 34 | * management system provides a utility called the YANG data tree builder. |
| 35 | * |
| 36 | * Using the YANG data tree utility API's protocols are expected to walk |
| 37 | * the data received in request and pass the information during the walk. |
| 38 | * YANG data tree builder, identifies the application which supports the |
| 39 | * request and validates it against the schema defined in YANG, and |
| 40 | * constructs the abstract YANG data tree. |
| 41 | */ |
| 42 | package org.onosproject.yms.ydt; |