Rename FakeServerMigration to FakeMigration
Server migrations are (confusingly) a different thing returned by a different API. Change-Id: Ib6b7c8f9cc3d1521a993616f832d41651dc46f73 Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
This commit is contained in:
parent
9ed34aac0a
commit
32ae1857d1
@ -1566,12 +1566,12 @@ class FakeRateLimit(object):
|
||||
self.next_available = next_available
|
||||
|
||||
|
||||
class FakeServerMigration(object):
|
||||
"""Fake one or more server migrations."""
|
||||
class FakeMigration(object):
|
||||
"""Fake one or more migrations."""
|
||||
|
||||
@staticmethod
|
||||
def create_one_server_migration(attrs=None, methods=None):
|
||||
"""Create a fake server migration.
|
||||
def create_one_migration(attrs=None, methods=None):
|
||||
"""Create a fake migration.
|
||||
|
||||
:param Dictionary attrs:
|
||||
A dictionary with all attributes
|
||||
@ -1612,22 +1612,22 @@ class FakeServerMigration(object):
|
||||
return migration
|
||||
|
||||
@staticmethod
|
||||
def create_server_migrations(attrs=None, methods=None, count=2):
|
||||
"""Create multiple fake server migrations.
|
||||
def create_migrations(attrs=None, methods=None, count=2):
|
||||
"""Create multiple fake migrations.
|
||||
|
||||
:param Dictionary attrs:
|
||||
A dictionary with all attributes
|
||||
:param Dictionary methods:
|
||||
A dictionary with all methods
|
||||
:param int count:
|
||||
The number of server migrations to fake
|
||||
The number of migrations to fake
|
||||
:return:
|
||||
A list of FakeResource objects faking the server migrations
|
||||
A list of FakeResource objects faking the migrations
|
||||
"""
|
||||
migrations = []
|
||||
for i in range(0, count):
|
||||
migrations.append(
|
||||
FakeServerMigration.create_one_server_migration(
|
||||
FakeMigration.create_one_migration(
|
||||
attrs, methods))
|
||||
|
||||
return migrations
|
||||
@ -1680,7 +1680,7 @@ class FakeVolumeAttachment(object):
|
||||
:param Dictionary methods:
|
||||
A dictionary with all methods
|
||||
:param int count:
|
||||
The number of server migrations to fake
|
||||
The number of volume attachments to fake
|
||||
:return:
|
||||
A list of FakeResource objects faking the volume attachments.
|
||||
"""
|
||||
|
@ -4396,8 +4396,8 @@ class TestListMigration(TestServer):
|
||||
self.server = compute_fakes.FakeServer.create_one_server()
|
||||
self.servers_mock.get.return_value = self.server
|
||||
|
||||
self.migrations = compute_fakes.FakeServerMigration\
|
||||
.create_server_migrations(count=3)
|
||||
self.migrations = compute_fakes.FakeMigration.create_migrations(
|
||||
count=3)
|
||||
self.migrations_mock.list.return_value = self.migrations
|
||||
|
||||
self.data = (common_utils.get_item_properties(
|
||||
|
Loading…
x
Reference in New Issue
Block a user