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