1 # Copyright (C) 2013 Nippon Telegraph and Telephone Corporation.
2 # Copyright (C) 2013 Isaku Yamahata <yamahata at private email ne jp>
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
8 # http://www.apache.org/licenses/LICENSE-2.0
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
14 # See the License for the specific language governing permissions and
15 # limitations under the License.
18 OF-Config implementation.
26 SCHEMA_DIR = os.path.dirname(__file__)
28 _PREFIX = 'of-config-'
30 _files = glob.glob(os.path.join(SCHEMA_DIR, 'of-config-*.xsd'))
31 OF_CONFIG_XSD_FILES = dict(
32 (os.path.basename(f)[len(_PREFIX):-len(_SUFFIX)], f) for f in _files)
35 # OF_CONFIG_1_0_XSD = os.path.join(SCHEMA_DIR, 'of-config-1.0.xsd')
37 _this_module = sys.modules[__name__]
38 for (version, xsd_file) in OF_CONFIG_XSD_FILES.items():
40 'OF_CONFIG_%s_XSD' % version.replace('.', '_'), xsd_file)
43 OFCONFIG_1_1_CONFIG = 'urn:onf:params:xml:ns:onf:of12:config'
44 OFCONFIG_1_1_YANG = 'urn:onf:of12:config:yang'
47 OFCONFIG_1_1_1_YANG = 'urn:onf:of111:config:yang'
49 OFCONFIG_YANG_NAMESPACES = {
50 '1.1': OFCONFIG_1_1_YANG,
51 '1.1.1': OFCONFIG_1_1_1_YANG,