Merge "Remove unused read-only cell code"

This commit is contained in:
Jenkins 2015-10-01 19:16:22 +00:00 committed by Gerrit Code Review
commit b0dd56d14e
2 changed files with 0 additions and 16 deletions

View File

@ -310,11 +310,6 @@ class API(base.Base):
self._cell_type = cells_opts.get_cell_type()
return self._cell_type
def _cell_read_only(self, cell_name):
"""Is the target cell in a read-only mode?"""
# FIXME(comstud): Add support for this.
return False
def _validate_cell(self, instance, method):
if self.cell_type != 'api':
return
@ -322,12 +317,6 @@ class API(base.Base):
if not cell_name:
raise exception.InstanceUnknownCell(
instance_uuid=instance.uuid)
if self._cell_read_only(cell_name):
raise exception.InstanceInvalidState(
attr="vm_state",
instance_uuid=instance.uuid,
state="temporary_readonly",
method=method)
def _record_action_start(self, context, instance, action):
objects.InstanceAction.action_start(context, instance.uuid,

View File

@ -109,9 +109,6 @@ class CellsComputeAPITestCase(test_compute.ComputeAPITestCase):
ORIG_COMPUTE_API = self.compute_api
self.flags(enable=True, group='cells')
def _fake_cell_read_only(*args, **kwargs):
return False
def _fake_validate_cell(*args, **kwargs):
return
@ -119,8 +116,6 @@ class CellsComputeAPITestCase(test_compute.ComputeAPITestCase):
return instance
self.compute_api = compute_cells_api.ComputeCellsAPI()
self.stubs.Set(self.compute_api, '_cell_read_only',
_fake_cell_read_only)
self.stubs.Set(self.compute_api, '_validate_cell',
_fake_validate_cell)