Time to get rid of any last vestiges of slave_of
The controller (apischema and instance controller) have long understood that slave_of is going away and has supported replica_of. Getting rid of the slave_of in the client is now one part of this final 'cleansing'. Look for a corresponding commit on the controller side which will clean up the rest of it. That commit is I87c8a14c06fa5df60ea3ed6b09412dc32fafcec7 and the URL for that review is https://review.openstack.org/#/c/245845/ Change-Id: I9b905716b704ea9ec9332b48b05c49cccbd04c8b Partial-Bug: #1461196 Depends-On: I87c8a14c06fa5df60ea3ed6b09412dc32fafcec7
This commit is contained in:
parent
e1f3b1cb48
commit
a5234f0a07
|
@ -47,11 +47,10 @@ class Instances(base.ManagerWithFind):
|
|||
"""Manage :class:`Instance` resources."""
|
||||
resource_class = Instance
|
||||
|
||||
# TODO(SlickNik): Remove slave_of param after updating tests to replica_of
|
||||
def create(self, name, flavor_id, volume=None, databases=None, users=None,
|
||||
restorePoint=None, availability_zone=None, datastore=None,
|
||||
datastore_version=None, nics=None, configuration=None,
|
||||
replica_of=None, slave_of=None, replica_count=None):
|
||||
replica_of=None, replica_count=None):
|
||||
"""Create (boot) a new instance."""
|
||||
|
||||
body = {"instance": {
|
||||
|
@ -79,8 +78,8 @@ class Instances(base.ManagerWithFind):
|
|||
body["instance"]["nics"] = nics
|
||||
if configuration:
|
||||
body["instance"]["configuration"] = configuration
|
||||
if replica_of or slave_of:
|
||||
body["instance"]["replica_of"] = base.getid(replica_of) or slave_of
|
||||
if replica_of:
|
||||
body["instance"]["replica_of"] = base.getid(replica_of)
|
||||
if replica_count:
|
||||
body["instance"]["replica_count"] = replica_count
|
||||
|
||||
|
@ -113,9 +112,6 @@ class Instances(base.ManagerWithFind):
|
|||
if name is not None:
|
||||
body["instance"]["name"] = name
|
||||
if detach_replica_source:
|
||||
# TODO(glucas): Remove slave_of after updating trove
|
||||
# (see trove.instance.service.InstanceController#edit)
|
||||
body["instance"]["slave_of"] = None
|
||||
body["instance"]["replica_of"] = None
|
||||
|
||||
url = "/instances/%s" % base.getid(instance)
|
||||
|
|
Loading…
Reference in New Issue