Merge "Makes _PATH_CELL_SEP a public global variable"
This commit is contained in:
commit
ddc20d70b3
@ -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'])
|
||||
|
||||
|
@ -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):
|
||||
|
@ -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 = '@'
|
||||
|
||||
|
@ -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,
|
||||
|
@ -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]),
|
||||
|
Loading…
Reference in New Issue
Block a user