c66066632f5a47544529fea888583eb11c8625a2
[smo/teiv.git] /
1 /*
2  *  ============LICENSE_START=======================================================
3  *  Copyright (C) 2024 Ericsson
4  *  Modifications Copyright (C) 2024 OpenInfra Foundation Europe
5  *  ================================================================================
6  *  Licensed under the Apache License, Version 2.0 (the "License");
7  *  you may not use this file except in compliance with the License.
8  *  You may obtain a copy of the License at
9  *
10  *        http://www.apache.org/licenses/LICENSE-2.0
11  *
12  *  Unless required by applicable law or agreed to in writing, software
13  *  distributed under the License is distributed on an "AS IS" BASIS,
14  *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  *  See the License for the specific language governing permissions and
16  *  limitations under the License.
17  *
18  *  SPDX-License-Identifier: Apache-2.0
19  *  ============LICENSE_END=========================================================
20  */
21 package org.oran.smo.yangtools.parser.model.statements.ietf;
22
23 import java.util.Arrays;
24 import java.util.HashMap;
25 import java.util.List;
26 import java.util.Map;
27
28 import org.oran.smo.yangtools.parser.model.statements.StatementModuleAndName;
29
30 /**
31  * Constants relating to IETF modules.
32  *
33  * @author Mark Hollmann
34  */
35 public abstract class CIETF {
36
37     public static final String IETF_YANG_SCHEMA_MOUNT_MODULE_NAME = "ietf-yang-schema-mount";
38     public static final String IETF_YANG_METADATA_MODULE_NAME = "ietf-yang-metadata";
39     public static final String IETF_NETCONF_ACM_MODULE_NAME = "ietf-netconf-acm";
40
41     public static final String MOUNT_POINT = "mount-point";
42     public static final String ANNOTATION = "annotation";
43     public static final String DEFAULT_DENY_WRITE = "default-deny-write";
44     public static final String DEFAULT_DENY_ALL = "default-deny-all";
45
46     private static final List<String> FROM_MODULE_IETF_YANG_SCHEMA_MOUNT = Arrays.asList(MOUNT_POINT);
47     private static final List<String> FROM_MODULE_IETF_YANG_METADATA = Arrays.asList(ANNOTATION);
48     private static final List<String> FROM_MODULE_IETF_NETCONF_ACM = Arrays.asList(DEFAULT_DENY_WRITE, DEFAULT_DENY_ALL);
49
50     public static final StatementModuleAndName IETF_YANG_SCHEMA_MOUNT__MOUNT_POINT = new StatementModuleAndName(
51             IETF_YANG_SCHEMA_MOUNT_MODULE_NAME, MOUNT_POINT);
52     public static final StatementModuleAndName IETF_YANG_METADATA__ANNOTATION = new StatementModuleAndName(
53             IETF_YANG_METADATA_MODULE_NAME, ANNOTATION);
54     public static final StatementModuleAndName IETF_NETCONF_ACM__DEFAULT_DENY_WRITE = new StatementModuleAndName(
55             IETF_NETCONF_ACM_MODULE_NAME, DEFAULT_DENY_WRITE);
56     public static final StatementModuleAndName IETF_NETCONF_ACM__DEFAULT_DENY_ALL = new StatementModuleAndName(
57             IETF_NETCONF_ACM_MODULE_NAME, DEFAULT_DENY_ALL);
58
59     public static final Map<String, List<String>> HANDLED_STATEMENTS = new HashMap<>();
60
61     static {
62         HANDLED_STATEMENTS.put(IETF_YANG_SCHEMA_MOUNT_MODULE_NAME, FROM_MODULE_IETF_YANG_SCHEMA_MOUNT);
63         HANDLED_STATEMENTS.put(IETF_YANG_METADATA_MODULE_NAME, FROM_MODULE_IETF_YANG_METADATA);
64         HANDLED_STATEMENTS.put(IETF_NETCONF_ACM_MODULE_NAME, FROM_MODULE_IETF_NETCONF_ACM);
65     }
66 }