blob: a64ea32ea4f6d41dd17d39f2624d7004bbc95bd8 [file] [log] [blame]
VinodKumarS-Huaweiaf9c7a72016-08-30 19:43:39 +05301/*
Brian O'Connora09fe5b2017-08-03 21:12:30 -07002 * Copyright 2016-present Open Networking Foundation
VinodKumarS-Huaweiaf9c7a72016-08-30 19:43:39 +05303 *
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 */
16package org.onosproject.yms.ysr;
17
sonu guptaeff184b2016-11-24 12:43:49 +053018import org.onosproject.yangutils.datamodel.YangNamespace;
19
VinodKumarS-Huaweiaf9c7a72016-08-30 19:43:39 +053020import 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 */
47public interface YangModuleInformation {
48 /**
49 * Retrieves the YANG modules identifier.
50 *
51 * @return YANG modules identifier
52 */
Bharat saraswalf53b29a2016-09-27 15:35:15 +053053 YangModuleIdentifier moduleIdentifier();
VinodKumarS-Huaweiaf9c7a72016-08-30 19:43:39 +053054
55 /**
56 * Retrieves the YANG modules namespace.
57 * The XML namespace identifier for this module.
58 *
59 * @return YANG modules namespace
60 */
sonu guptaeff184b2016-11-24 12:43:49 +053061 YangNamespace namespace();
VinodKumarS-Huaweiaf9c7a72016-08-30 19:43:39 +053062
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 saraswalf53b29a2016-09-27 15:35:15 +053071 List<String> featureList();
VinodKumarS-Huaweiaf9c7a72016-08-30 19:43:39 +053072
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 saraswalf53b29a2016-09-27 15:35:15 +053083 List<YangModuleIdentifier> subModuleIdentifiers();
VinodKumarS-Huaweiaf9c7a72016-08-30 19:43:39 +053084}