Makes _PATH_CELL_SEP a public global variable

_PATH_CELL_SEP is used outside of cells.utils so it should be not be private

Change-Id: I0b06a223b50f7d90007bb44ec7897174ed836ad4
This commit is contained in:
Zhongyue Luo 2013-07-15 10:34:08 +08:00
parent 77a66a248b
commit 6ca2f03196
5 changed files with 6 additions and 6 deletions

View File

@ -407,7 +407,7 @@ class CellsManager(manager.Manager):
"""Fetch migrations applying the filters."""
target_cell = None
if "cell_name" in filters:
_path_cell_sep = cells_utils._PATH_CELL_SEP
_path_cell_sep = cells_utils.PATH_CELL_SEP
target_cell = '%s%s%s' % (CONF.cells.name, _path_cell_sep,
filters['cell_name'])

View File

@ -66,7 +66,7 @@ LOG = logging.getLogger(__name__)
# Separator used between cell names for the 'full cell name' and routing
# path.
_PATH_CELL_SEP = cells_utils._PATH_CELL_SEP
_PATH_CELL_SEP = cells_utils.PATH_CELL_SEP
def _reverse_path(path):

View File

@ -22,7 +22,7 @@ from nova import db
# Separator used between cell names for the 'full cell name' and routing
# path
_PATH_CELL_SEP = '!'
PATH_CELL_SEP = '!'
# Separator used between cell name and item
_CELL_ITEM_SEP = '@'

View File

@ -20,8 +20,8 @@ from oslo.config import cfg
from nova.cells import driver
from nova.cells import manager as cells_manager
from nova.cells import messaging
from nova.cells import state as cells_state
from nova.cells import utils as cells_utils
import nova.db
from nova.db import base
from nova import exception
@ -127,7 +127,7 @@ def _build_cell_transport_url(cur_db_id):
def _build_cell_stub_info(test_case, our_name, parent_path, children):
cell_db_entries = []
cur_db_id = 1
sep_char = messaging._PATH_CELL_SEP
sep_char = cells_utils.PATH_CELL_SEP
if parent_path:
cell_db_entries.append(
dict(id=cur_db_id,

View File

@ -83,7 +83,7 @@ class CellsUtilsTestCase(test.TestCase):
def test_split_cell_and_item(self):
path = 'australia', 'queensland', 'gold_coast'
cell = cells_utils._PATH_CELL_SEP.join(path)
cell = cells_utils.PATH_CELL_SEP.join(path)
item = 'host_5'
together = cells_utils.cell_with_item(cell, item)
self.assertEqual(cells_utils._CELL_ITEM_SEP.join([cell, item]),