Skip to content

Commit

Permalink
[TASK] Switch to oslo_config
Browse files Browse the repository at this point in the history
oslo.config namespace has been deprecated and replaced by the
namespace oslo_config. All references to the old namespace
have now been replaced by the new namespace.

Implements: 16
closes #16
  • Loading branch information
shad7 committed Mar 28, 2015
1 parent 1f6a208 commit 2dce3ba
Show file tree
Hide file tree
Showing 24 changed files with 35 additions and 35 deletions.
2 changes: 1 addition & 1 deletion requirements.txt
Expand Up @@ -2,7 +2,7 @@ pbr
twine

futures
oslo.config
oslo.config>=1.9.0
lockfile
rarfile>=2.6
six>=1.4.1
Expand Down
2 changes: 1 addition & 1 deletion seedbox/cli.py
Expand Up @@ -11,7 +11,7 @@

import lockfile
from lockfile import pidlockfile
from oslo.config import cfg
from oslo_config import cfg

from seedbox import db
from seedbox import logext as logmgr
Expand Down
8 changes: 4 additions & 4 deletions seedbox/db/__init__.py
@@ -1,7 +1,7 @@
"""Provides access to database API for interacting with the torrent data."""
import logging

from oslo.config import cfg
from oslo_config import cfg
import six.moves.urllib.parse as urlparse
from stevedore import driver

Expand Down Expand Up @@ -38,7 +38,7 @@ def _get_connection(conf):
def dbapi(conf=cfg.CONF):
"""Retrieves an instance of the configured database API.
:param oslo.config.cfg.ConfigOpts conf: an instance of the configuration
:param oslo_config.cfg.ConfigOpts conf: an instance of the configuration
file
:return: database API instance
:rtype: :class:`~seedbox.db.api.DBApi`
Expand All @@ -52,9 +52,9 @@ def dbapi(conf=cfg.CONF):


def list_opts():
"""Returns a list of oslo.config options available in the library.
"""Returns a list of oslo_config options available in the library.
The returned list includes all oslo.config options which may be registered
The returned list includes all oslo_config options which may be registered
at runtime by the library.
Each element of the list is a tuple. The first element is the name of the
Expand Down
2 changes: 1 addition & 1 deletion seedbox/db/admin.py
Expand Up @@ -7,7 +7,7 @@
import os

import click
from oslo.config import cfg
from oslo_config import cfg
from passlib.hash import sha256_crypt
import sandman
from sandman import model
Expand Down
2 changes: 1 addition & 1 deletion seedbox/db/base.py
Expand Up @@ -12,7 +12,7 @@ def __init__(self, conf):
"""Initializes new instance.
:param conf: an instance of configuration file
:type conf: oslo.config.cfg.ConfigOpts
:type conf: oslo_config.cfg.ConfigOpts
"""
self.conf = conf

Expand Down
2 changes: 1 addition & 1 deletion seedbox/db/maintenance.py
Expand Up @@ -13,7 +13,7 @@
def backup(conf):
"""create a backup copy of the database file.
:param oslo.config.cfg.ConfigOpts conf: an instance of configuration
:param oslo_config.cfg.ConfigOpts conf: an instance of configuration
"""

LOG.debug('starting database backup process')
Expand Down
2 changes: 1 addition & 1 deletion seedbox/db/sqlalchemy/api.py
Expand Up @@ -18,7 +18,7 @@ def __init__(self, conf):
"""Initialize new instance.
:param conf: an instance of configuration file
:type conf: oslo.config.cfg.ConfigOpts
:type conf: oslo_config.cfg.ConfigOpts
"""
super(Connection, self).__init__(conf)
self._engine_facade = db_session.EngineFacade.from_config(
Expand Down
6 changes: 3 additions & 3 deletions seedbox/db/sqlalchemy/session.py
Expand Up @@ -112,12 +112,12 @@ def session(self):

@classmethod
def from_config(cls, connection_string, conf):
"""Initialize EngineFacade using oslo.config config instance options.
"""Initialize EngineFacade using oslo_config config instance options.
:param connection_string: SQLAlchemy connection string
:type connection_string: string
:param conf: oslo.config config instance
:type conf: oslo.config.cfg.ConfigOpts
:param conf: oslo_config config instance
:type conf: oslo_config.cfg.ConfigOpts
"""
LOG.debug('making connection using connect string: %s',
Expand Down
2 changes: 1 addition & 1 deletion seedbox/logext.py
Expand Up @@ -8,7 +8,7 @@
import logging.handlers
import os

from oslo.config import cfg
from oslo_config import cfg
import six

if hasattr(logging, 'NullHandler'):
Expand Down
6 changes: 3 additions & 3 deletions seedbox/options.py
Expand Up @@ -6,7 +6,7 @@
import os
import sys

from oslo.config import cfg
from oslo_config import cfg
from six import moves

from seedbox import version
Expand Down Expand Up @@ -106,9 +106,9 @@ def initialize(args):


def list_opts():
"""Returns a list of oslo.config options available in the library.
"""Returns a list of oslo_config options available in the library.
The returned list includes all oslo.config options which may be registered
The returned list includes all oslo_config options which may be registered
at runtime by the library.
Each element of the list is a tuple. The first element is the name of the
Expand Down
4 changes: 2 additions & 2 deletions seedbox/process/__init__.py
Expand Up @@ -75,9 +75,9 @@ def start():


def list_opts():
"""Returns a list of oslo.config options available in the library.
"""Returns a list of oslo_config options available in the library.
The returned list includes all oslo.config options which may be registered
The returned list includes all oslo_config options which may be registered
at runtime by the library.
Each element of the list is a tuple. The first element is the name of the
Expand Down
2 changes: 1 addition & 1 deletion seedbox/process/flow.py
Expand Up @@ -5,7 +5,7 @@
"""
import logging

from oslo.config import cfg
from oslo_config import cfg
from stevedore import named
import xworkflows

Expand Down
2 changes: 1 addition & 1 deletion seedbox/process/manager.py
Expand Up @@ -2,7 +2,7 @@
import logging

import concurrent.futures as conc_futures
from oslo.config import cfg
from oslo_config import cfg

LOG = logging.getLogger(__name__)

Expand Down
4 changes: 2 additions & 2 deletions seedbox/tasks/__init__.py
Expand Up @@ -2,9 +2,9 @@


def list_opts():
"""Returns a list of oslo.config options available in the library.
"""Returns a list of oslo_config options available in the library.
The returned list includes all oslo.config options which may be registered
The returned list includes all oslo_config options which may be registered
at runtime by the library.
Each element of the list is a tuple. The first element is the name of the
Expand Down
2 changes: 1 addition & 1 deletion seedbox/tasks/base.py
Expand Up @@ -7,7 +7,7 @@
import os
import traceback

from oslo.config import cfg
from oslo_config import cfg
import six

from seedbox.common import timeutil
Expand Down
2 changes: 1 addition & 1 deletion seedbox/tasks/filecopy.py
Expand Up @@ -3,7 +3,7 @@
import os
import shutil

from oslo.config import cfg
from oslo_config import cfg

from seedbox.tasks import base

Expand Down
2 changes: 1 addition & 1 deletion seedbox/tasks/filedelete.py
Expand Up @@ -2,7 +2,7 @@
import logging
import os

from oslo.config import cfg
from oslo_config import cfg

from seedbox.tasks import base

Expand Down
2 changes: 1 addition & 1 deletion seedbox/tasks/filesync.py
Expand Up @@ -5,7 +5,7 @@
import logging
import os

from oslo.config import cfg
from oslo_config import cfg

from seedbox.tasks import base
from seedbox.tasks import subprocessext
Expand Down
2 changes: 1 addition & 1 deletion seedbox/tasks/fileunrar.py
Expand Up @@ -5,7 +5,7 @@
import logging
import os

from oslo.config import cfg
from oslo_config import cfg
import rarfile

from seedbox.tasks import base
Expand Down
2 changes: 1 addition & 1 deletion seedbox/tasks/subprocessext.py
Expand Up @@ -29,7 +29,7 @@
import subprocess
import time

from oslo.config import cfg
from oslo_config import cfg

LOG = logging.getLogger(__name__)

Expand Down
2 changes: 1 addition & 1 deletion seedbox/tests/test.py
Expand Up @@ -19,7 +19,7 @@
import shutil
import tempfile

from oslo.config import fixture as config
from oslo_config import fixture as config
from oslotest import base


Expand Down
2 changes: 1 addition & 1 deletion seedbox/tests/test_options.py
Expand Up @@ -2,7 +2,7 @@
import os

import fixtures
from oslo.config import cfg
from oslo_config import cfg

from seedbox import options
from seedbox.tests import test
Expand Down
6 changes: 3 additions & 3 deletions seedbox/torrent/__init__.py
@@ -1,4 +1,4 @@
from oslo.config import cfg
from oslo_config import cfg

OPTS = [
cfg.StrOpt('torrent_path',
Expand Down Expand Up @@ -36,9 +36,9 @@ def load():


def list_opts():
"""Returns a list of oslo.config options available in the library.
"""Returns a list of oslo_config options available in the library.
The returned list includes all oslo.config options which may be registered
The returned list includes all oslo_config options which may be registered
at runtime by the library.
Each element of the list is a tuple. The first element is the name of the
Expand Down
2 changes: 1 addition & 1 deletion seedbox/torrent/loader.py
Expand Up @@ -7,7 +7,7 @@
import logging
import os

from oslo.config import cfg
from oslo_config import cfg

from seedbox.common import tools
from seedbox import constants
Expand Down

0 comments on commit 2dce3ba

Please sign in to comment.