Adapt to namespace-less oslo
oslo packages got away from namespaces while ago. Update ryu to use the new namespace-less import path. Bump oslo.config requirement version accordingly. Reference: https://blueprints.launchpad.net/oslo-incubator/+spec/drop-namespace-packages Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
This commit is contained in:
parent
e14c49abc8
commit
c73d7303a6
24
ryu/cfg.py
24
ryu/cfg.py
@ -14,13 +14,13 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
import oslo.config.cfg
|
import oslo_config.cfg
|
||||||
|
|
||||||
# there are 3 ways to access the configuration.
|
# there are 3 ways to access the configuration.
|
||||||
#
|
#
|
||||||
# a. ryu.cfg.CONF (used to register cli options)
|
# a. ryu.cfg.CONF (used to register cli options)
|
||||||
# b. RyuApp.CONF (preferred way for ryu applications)
|
# b. RyuApp.CONF (preferred way for ryu applications)
|
||||||
# c. oslo.config.cfg.CONF
|
# c. oslo_config.cfg.CONF
|
||||||
#
|
#
|
||||||
# Currently a. and b. shares a single ConfigOpts instance.
|
# Currently a. and b. shares a single ConfigOpts instance.
|
||||||
# We intentionally avoid using c. for our options as a python program
|
# We intentionally avoid using c. for our options as a python program
|
||||||
@ -30,18 +30,18 @@ import oslo.config.cfg
|
|||||||
# At some point later we might want to unshare a. and b. as well, in order
|
# At some point later we might want to unshare a. and b. as well, in order
|
||||||
# to allow app-specific options.
|
# to allow app-specific options.
|
||||||
|
|
||||||
CONF = oslo.config.cfg.ConfigOpts()
|
CONF = oslo_config.cfg.ConfigOpts()
|
||||||
|
|
||||||
# re-export for convenience
|
# re-export for convenience
|
||||||
|
|
||||||
from oslo.config.cfg import ConfigOpts
|
from oslo_config.cfg import ConfigOpts
|
||||||
|
|
||||||
from oslo.config.cfg import BoolOpt
|
from oslo_config.cfg import BoolOpt
|
||||||
from oslo.config.cfg import IntOpt
|
from oslo_config.cfg import IntOpt
|
||||||
from oslo.config.cfg import ListOpt
|
from oslo_config.cfg import ListOpt
|
||||||
from oslo.config.cfg import MultiStrOpt
|
from oslo_config.cfg import MultiStrOpt
|
||||||
from oslo.config.cfg import StrOpt
|
from oslo_config.cfg import StrOpt
|
||||||
from oslo.config.cfg import FloatOpt
|
from oslo_config.cfg import FloatOpt
|
||||||
|
|
||||||
from oslo.config.cfg import RequiredOptError
|
from oslo_config.cfg import RequiredOptError
|
||||||
from oslo.config.cfg import ConfigFilesNotFoundError
|
from oslo_config.cfg import ConfigFilesNotFoundError
|
||||||
|
@ -25,7 +25,6 @@ hub.patch(thread=False)
|
|||||||
# use it
|
# use it
|
||||||
#
|
#
|
||||||
# NOTE: this modifies sys.path and thus affects the following imports.
|
# NOTE: this modifies sys.path and thus affects the following imports.
|
||||||
# eg. oslo.config.cfg.
|
|
||||||
import ryu.contrib
|
import ryu.contrib
|
||||||
ryu.contrib.update_module_path()
|
ryu.contrib.update_module_path()
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@ import imp
|
|||||||
import logging
|
import logging
|
||||||
import traceback
|
import traceback
|
||||||
from os import path
|
from os import path
|
||||||
from oslo.config import cfg
|
from oslo_config import cfg
|
||||||
|
|
||||||
from ryu.lib import hub
|
from ryu.lib import hub
|
||||||
from ryu.base.app_manager import RyuApp
|
from ryu.base.app_manager import RyuApp
|
||||||
|
@ -10,7 +10,7 @@ from mininet.node import OVSSwitch
|
|||||||
from mininet.node import UserSwitch
|
from mininet.node import UserSwitch
|
||||||
from mininet.term import makeTerm
|
from mininet.term import makeTerm
|
||||||
|
|
||||||
from oslo.config import cfg
|
from oslo_config import cfg
|
||||||
from ryu import version
|
from ryu import version
|
||||||
|
|
||||||
if '__main__' == __name__:
|
if '__main__' == __name__:
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
eventlet
|
eventlet
|
||||||
msgpack-python>=0.3.0 # RPC library, BGP speaker(net_cntl)
|
msgpack-python>=0.3.0 # RPC library, BGP speaker(net_cntl)
|
||||||
netaddr
|
netaddr
|
||||||
oslo.config>=1.2.0
|
oslo.config>=1.6.0
|
||||||
routes # wsgi
|
routes # wsgi
|
||||||
six>=1.4.0
|
six>=1.4.0
|
||||||
webob>=1.2 # wsgi
|
webob>=1.2 # wsgi
|
||||||
|
Loading…
Reference in New Issue
Block a user