blob: b66f887f3d30616af42bd00d091e31c6dcf634d7 [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
18/*-
19 * Abstraction of an entity which provides the servers YANG library information.
20 *
21 * Reference RFC 7895
22 * The "ietf-yang-library" module provides information about the YANG
23 * library used by a server. This module is defined using YANG version
24 * 1, but it supports the description of YANG modules written in any
25 * revision of YANG.
26 *
27 * Following is the YANG Tree Diagram for the "ietf-yang-library"
28 * module:
29 *
30 * +--ro modules-state
31 * +--ro module-set-id string
32 * +--ro module* [name revision]
33 * +--ro name yang:yang-identifier
34 * +--ro revision union
35 * +--ro schema? inet:uri
36 * +--ro namespace inet:uri
37 * +--ro feature* yang:yang-identifier
38 * +--ro deviation* [name revision]
39 * | +--ro name yang:yang-identifier
40 * | +--ro revision union
41 * +--ro conformance-type enumeration
42 * +--ro submodule* [name revision]
43 * +--ro name yang:yang-identifier
44 * +--ro revision union
45 * +--ro schema? inet:uri
46 */
47
48import java.util.List;
49
50public interface YangModuleLibrary {
51 /**
52 * Retrieves the current module set id of the YANG library.
53 *
54 * Reference RFC7895.
55 * modules-state/module-set-id
56 *
57 * This mandatory leaf contains a unique implementation-specific
58 * identifier representing the current set of modules and submodules on
59 * a specific server. The value of this leaf MUST change whenever the
60 * set of modules and submodules in the YANG library changes. There is
61 * no requirement that the same set always results in the same "module-
62 * set-id" value.
63 *
64 * @return module set id of the YANG library
65 */
Bharat saraswalf53b29a2016-09-27 15:35:15 +053066 String moduleSetId();
VinodKumarS-Huaweiaf9c7a72016-08-30 19:43:39 +053067
68 /**
69 * Retrieves the current list of YANG modules supported in the server.
70 *
71 * Reference RFC 7895.
72 * modules-state/module
73 *
74 * This mandatory list contains one entry for each YANG data model
75 * module supported by the server. There MUST be an entry in this list
76 * for each revision of each YANG module that is used by the server. It
77 * is possible for multiple revisions of the same module to be imported,
78 * in addition to an entry for the revision that is implemented by the
79 * server.
80 *
81 * @return the current list of YANG modules supported in the server
82 */
Bharat saraswalf53b29a2016-09-27 15:35:15 +053083 List<YangModuleInformation> yangModuleList();
VinodKumarS-Huaweiaf9c7a72016-08-30 19:43:39 +053084}