Rename base.rebuild_server to base.recreate_server

compute.base.rebuild_server is to delete and create
a new server, and the name "rebuild_server" could be
easily taken for servers_client.rebuild_server, so
this is to rename it as recreate_server to distinquish
from servers_client.rebuild_server.

Change-Id: I1589750870dff1a2681192e2f3d151ef18bf4d2a
This commit is contained in:
zhufl 2017-09-13 10:51:07 +08:00
parent f801213ff1
commit ba0e5533b5
4 changed files with 6 additions and 6 deletions

View File

@ -301,7 +301,7 @@ class BaseV2ComputeTest(api_version_utils.BaseMicroversionTest,
return image
@classmethod
def rebuild_server(cls, server_id, validatable=False, **kwargs):
def recreate_server(cls, server_id, validatable=False, **kwargs):
"""Destroy an existing class level server and creates a new one
Some test classes use a test server that can be used by multiple

View File

@ -52,7 +52,7 @@ class ImagesOneServerNegativeTestJSON(base.BaseV2ComputeTest):
self._reset_server()
def _reset_server(self):
self.__class__.server_id = self.rebuild_server(self.server_id)
self.__class__.server_id = self.recreate_server(self.server_id)
@classmethod
def skip_checks(cls):

View File

@ -55,7 +55,7 @@ class ServerActionsTestJSON(base.BaseV2ComputeTest):
self.__class__.server_id = server['id']
except Exception:
# Rebuild server if something happened to it during a test
self.__class__.server_id = self.rebuild_server(
self.__class__.server_id = self.recreate_server(
self.server_id, validatable=True)
def tearDown(self):
@ -75,7 +75,7 @@ class ServerActionsTestJSON(base.BaseV2ComputeTest):
@classmethod
def resource_setup(cls):
super(ServerActionsTestJSON, cls).resource_setup()
cls.server_id = cls.rebuild_server(None, validatable=True)
cls.server_id = cls.recreate_server(None, validatable=True)
@decorators.idempotent_id('6158df09-4b82-4ab3-af6d-29cf36af858d')
@testtools.skipUnless(CONF.compute_feature_enabled.change_password,

View File

@ -37,7 +37,7 @@ class ServersNegativeTestJSON(base.BaseV2ComputeTest):
waiters.wait_for_server_status(self.client, self.server_id,
'ACTIVE')
except Exception:
self.__class__.server_id = self.rebuild_server(self.server_id)
self.__class__.server_id = self.recreate_server(self.server_id)
def tearDown(self):
self.server_check_teardown()
@ -551,7 +551,7 @@ class ServersNegativeTestMultiTenantJSON(base.BaseV2ComputeTest):
waiters.wait_for_server_status(self.servers_client, self.server_id,
'ACTIVE')
except Exception:
self.__class__.server_id = self.rebuild_server(self.server_id)
self.__class__.server_id = self.recreate_server(self.server_id)
@classmethod
def setup_clients(cls):