1# Copyright (C) 2014 Nippon Telegraph and Telephone Corporation. 2# Copyright (C) 2014 YAMAMOTO Takashi <yamamoto at valinux co jp> 3# 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 13# implied. 14# See the License for the specific language governing permissions and 15# limitations under the License. 16 17import oslo_config.cfg 18 19# there are 3 ways to access the configuration. 20# 21# a. ryu.cfg.CONF (used to register cli options) 22# b. RyuApp.CONF (preferred way for ryu applications) 23# c. oslo_config.cfg.CONF 24# 25# Currently a. and b. shares a single ConfigOpts instance. 26# We intentionally avoid using c. for our options as a python program 27# which embeds ryu applications (eg. neutron agent) might want to put 28# its own set of cli options into it, which can conflict with ours. 29# (Currently there seems no conflict for the neutron agent. But who knows?) 30# At some point later we might want to unshare a. and b. as well, in order 31# to allow app-specific options. 32 33CONF = oslo_config.cfg.ConfigOpts() 34 35# re-export for convenience 36 37from oslo_config.cfg import ConfigOpts 38 39from oslo_config.cfg import Opt 40from oslo_config.cfg import BoolOpt 41from oslo_config.cfg import IntOpt 42from oslo_config.cfg import ListOpt 43from oslo_config.cfg import MultiStrOpt 44from oslo_config.cfg import StrOpt 45from oslo_config.cfg import FloatOpt 46 47from oslo_config.cfg import RequiredOptError 48from oslo_config.cfg import ConfigFilesNotFoundError 49