VinodKumarS-Huawei | af9c7a7 | 2016-08-30 19:43:39 +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 | package org.onosproject.yms.ysr; |
| 17 | |
| 18 | import java.util.List; |
| 19 | |
| 20 | /** |
| 21 | * Abstraction of an entity which provides YANG module information. |
| 22 | * |
| 23 | * Reference RFC 7895 |
| 24 | * The following information is needed by a client application (for each |
| 25 | * YANG module in the library) to fully utilize the YANG data modeling |
| 26 | * language: |
| 27 | * |
| 28 | * o name: The name of the YANG module. |
| 29 | * |
| 30 | * o revision: Each YANG module and submodule within the library has a |
| 31 | * revision. This is derived from the most recent revision statement |
| 32 | * within the module or submodule. If no such revision statement |
| 33 | * exists, the module's or submodule's revision is the zero-length |
| 34 | * string. |
| 35 | * |
| 36 | * o submodule list: The name and revision of each submodule used by |
| 37 | * the module MUST be identified. |
| 38 | * |
| 39 | * o feature list: The name of each YANG feature supported by the |
| 40 | * server MUST be identified. |
| 41 | * |
| 42 | * o deviation list: The name of each YANG module used for deviation |
| 43 | * statements MUST be identified. |
| 44 | */ |
| 45 | public interface YangModuleInformation { |
| 46 | /** |
| 47 | * Retrieves the YANG modules identifier. |
| 48 | * |
| 49 | * @return YANG modules identifier |
| 50 | */ |
| 51 | YangModuleIdentifier getModuleIdentifier(); |
| 52 | |
| 53 | /** |
| 54 | * Retrieves the YANG modules namespace. |
| 55 | * The XML namespace identifier for this module. |
| 56 | * |
| 57 | * @return YANG modules namespace |
| 58 | */ |
| 59 | String getNamespace(); |
| 60 | |
| 61 | /** |
| 62 | * Reference RFC 7895 |
| 63 | * Retrieves the list of YANG feature names from this module that are |
| 64 | * supported by the server, regardless of whether they are |
| 65 | * defined in the module or any included submodule. |
| 66 | * |
| 67 | * @return list of YANG features |
| 68 | */ |
| 69 | List<String> getFeatureList(); |
| 70 | |
| 71 | /** |
| 72 | * Retrieves the list of submodules in the module. |
| 73 | * The name and revision of each submodule used by |
| 74 | * the module MUST be identified. |
| 75 | * |
| 76 | * Each entry represents one submodule within the |
| 77 | * parent module. |
| 78 | * |
| 79 | * @return list of submodules in the module |
| 80 | */ |
| 81 | List<YangModuleIdentifier> getSubModuleIdentifier(); |
| 82 | } |