1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
|
/*-
* ============LICENSE_START=======================================================
* ONAP : APPC
* ================================================================================
* Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Copyright (C) 2017 Amdocs
* =============================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
* ============LICENSE_END=========================================================
*/
package org.openecomp.appc.yang.type;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
public class YangTypes {
private static final Map<String, String> yangTypeMap;
private YangTypes(){}
static {
Map<String, String> typeMap = new HashMap<>();
/* standard Types */
/* typeMap.put("bits","bits");
typeMap.put("leafref","leafref");
typeMap.put("decimal64","decimal64");
typeMap.put("enumeration","enumeration");
typeMap.put("identityref","identityref");
typeMap.put("union","union");*/
typeMap.put("binary","binary");
typeMap.put("boolean","boolean");
typeMap.put("empty","empty");
typeMap.put("instance-identifier","instance-identifier");
typeMap.put("int8","int8");
typeMap.put("int16","int16");
typeMap.put("int32","int32");
typeMap.put("int64","int64");
typeMap.put("string","string");
typeMap.put("uint8","uint8");
typeMap.put("uint16","uint16");
typeMap.put("uint32","uint32");
typeMap.put("uint64","uint64");
/* ietf-yang-types */
typeMap.put("counter32","yang:counter32");
typeMap.put("zero-based-counter32","yang:zero-based-counter32");
typeMap.put("counter64","yang:counter64");
typeMap.put("zero-based-counter64","yang:zero-based-counter64");
typeMap.put("gauge32","yang:gauge32");
typeMap.put("gauge64","yang:gauge64");
typeMap.put("object-identifier","yang:object-identifier");
typeMap.put("object-identifier-128","yang:object-identifier-128");
typeMap.put("yang-identifier","yang:yang-identifier");
typeMap.put("date-and-time","yang:date-and-time");
typeMap.put("timeticks","yang:timeticks");
typeMap.put("timestamp","yang:timestamp");
typeMap.put("phys-address","yang:phys-address");
typeMap.put("mac-address","yang:mac-address");
typeMap.put("xpath1.0","yang:xpath1.0");
typeMap.put("hex-string","yang:hex-string");
typeMap.put("uuid","yang:uuid");
typeMap.put("dotted-quad","yang:dotted-quad");
/* ietf-inet-types */
typeMap.put("ip-version","inet:ip-version");
typeMap.put("dscp","inet:dscp");
typeMap.put("ipv6-flow-label","inet:ipv6-flow-label");
typeMap.put("port-number","inet:port-number");
typeMap.put("as-number","inet:as-number");
typeMap.put("ip-address","inet:ip-address");
typeMap.put("ipv4-address","inet:ipv4-address");
typeMap.put("ipv6-address","inet:ipv6-address");
typeMap.put("ip-address-no-zone","inet:ip-address-no-zone");
typeMap.put("ipv4-address-no-zone","inet:ipv4-address-no-zone");
typeMap.put("ipv6-address-no-zone","inet:ipv6-address-no-zone");
typeMap.put("ip-prefix","inet:ip-prefix");
typeMap.put("ipv4-prefix","inet:ipv4-prefix");
typeMap.put("ipv6-prefix","inet:ipv6-prefix");
typeMap.put("domain-name","inet:domain-name");
typeMap.put("host","inet:host");
typeMap.put("uri","inet:uri");
yangTypeMap = Collections.unmodifiableMap(typeMap);
}
public static Map<String, String> getYangTypeMap(){
return yangTypeMap;
}
}
|