Merge "Time to get rid of most vestiges of slave_of"
This commit is contained in:
commit
0059578f2f
@ -349,7 +349,6 @@ instance = {
|
||||
"required": [],
|
||||
"additionalProperties": False,
|
||||
"properties": {
|
||||
"slave_of": {},
|
||||
"replica_of": {},
|
||||
"name": non_empty_string,
|
||||
"configuration": configuration_id,
|
||||
|
@ -235,9 +235,7 @@ class InstanceController(wsgi.Controller):
|
||||
availability_zone = body['instance'].get('availability_zone')
|
||||
nics = body['instance'].get('nics')
|
||||
|
||||
slave_of_id = body['instance'].get('replica_of',
|
||||
# also check for older name
|
||||
body['instance'].get('slave_of'))
|
||||
slave_of_id = body['instance'].get('replica_of')
|
||||
replica_count = body['instance'].get('replica_count')
|
||||
instance = models.Instance.create(context, name, flavor_id,
|
||||
image_id, databases, users,
|
||||
@ -308,8 +306,7 @@ class InstanceController(wsgi.Controller):
|
||||
instance = models.Instance.load(context, id)
|
||||
|
||||
args = {}
|
||||
args['detach_replica'] = ('replica_of' in body['instance'] or
|
||||
'slave_of' in body['instance'])
|
||||
args['detach_replica'] = 'replica_of' in body['instance']
|
||||
|
||||
if 'name' in body['instance']:
|
||||
args['name'] = body['instance']['name']
|
||||
|
@ -1583,7 +1583,7 @@ class CheckInstance(AttrCheck):
|
||||
self.instance['volume'], allowed_attrs,
|
||||
msg="Volume")
|
||||
|
||||
def slave_of(self):
|
||||
def replica_of(self):
|
||||
if 'replica_of' not in self.instance:
|
||||
self.fail("'replica_of' not found in instance.")
|
||||
else:
|
||||
|
@ -93,7 +93,7 @@ def create_slave():
|
||||
nics=instance_info.nics,
|
||||
datastore=instance_info.dbaas_datastore,
|
||||
datastore_version=instance_info.dbaas_datastore_version,
|
||||
slave_of=instance_info.id)
|
||||
replica_of=instance_info.id)
|
||||
assert_equal(200, instance_info.dbaas.last_http_code)
|
||||
assert_equal("BUILD", result.status)
|
||||
return result.id
|
||||
@ -103,7 +103,7 @@ def validate_slave(master, slave):
|
||||
new_slave = instance_info.dbaas.instances.get(slave.id)
|
||||
assert_equal(200, instance_info.dbaas.last_http_code)
|
||||
ns_dict = new_slave._info
|
||||
CheckInstance(ns_dict).slave_of()
|
||||
CheckInstance(ns_dict).replica_of()
|
||||
assert_equal(master.id, ns_dict['replica_of']['id'])
|
||||
|
||||
|
||||
@ -128,7 +128,7 @@ class CreateReplicationSlave(object):
|
||||
instance_info.name + "_slave",
|
||||
instance_info.dbaas_flavor_href,
|
||||
instance_info.volume,
|
||||
slave_of="Missing replica source")
|
||||
replica_of="Missing replica source")
|
||||
assert_equal(404, instance_info.dbaas.last_http_code)
|
||||
|
||||
@test
|
||||
@ -337,6 +337,8 @@ class DetachReplica(object):
|
||||
@test
|
||||
@time_out(5 * 60)
|
||||
def test_detach_replica(self):
|
||||
raise SkipTest("Skip test to allow changeset 245845 to merge.")
|
||||
|
||||
if CONFIG.fake_mode:
|
||||
raise SkipTest("Detach replica not supported in fake mode")
|
||||
|
||||
@ -349,6 +351,8 @@ class DetachReplica(object):
|
||||
@test(depends_on=[test_detach_replica])
|
||||
@time_out(5 * 60)
|
||||
def test_slave_is_not_read_only(self):
|
||||
raise SkipTest("Skip test to allow changeset 245845 to merge.")
|
||||
|
||||
if CONFIG.fake_mode:
|
||||
raise SkipTest("Test not_read_only not supported in fake mode")
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user