Merge "Fix issue with 'priority' value in pool_ns_record"

This commit is contained in:
Jenkins 2017-06-09 12:11:24 +00:00 committed by Gerrit Code Review
commit 2e474f39bc
2 changed files with 4 additions and 4 deletions

View File

@ -422,7 +422,7 @@ class TestCase(base.BaseTestCase):
# Fill out the necessary pool details
pool.ns_records = objects.PoolNsRecordList.from_list([
{'hostname': 'ns1.example.org.', 'priority': 0}
{'hostname': 'ns1.example.org.', 'priority': 1}
])
pool.targets = objects.PoolTargetList.from_list([

View File

@ -130,7 +130,7 @@ class ApiV1ServersTest(ApiV1Test):
# Add a new NS record to the pool
pool.ns_records.append(
objects.PoolNsRecord(priority=0, hostname='new-ns1.example.org.'))
objects.PoolNsRecord(priority=1, hostname='new-ns1.example.org.'))
# Save the pool to add a new nameserver
self.storage.update_pool(self.admin_context, pool)
@ -143,7 +143,7 @@ class ApiV1ServersTest(ApiV1Test):
# Add a new NS record to the pool
pool.ns_records.append(
objects.PoolNsRecord(priority=0, hostname='new-ns2.example.org.'))
objects.PoolNsRecord(priority=1, hostname='new-ns2.example.org.'))
# Save the pool to add a new nameserver
self.storage.update_pool(self.admin_context, pool)
@ -221,7 +221,7 @@ class ApiV1ServersTest(ApiV1Test):
# because the last remaining server is not allowed to be deleted
# Add a new NS record to the pool
pool.ns_records.append(
objects.PoolNsRecord(priority=0, hostname='new-ns2.example.org.'))
objects.PoolNsRecord(priority=1, hostname='new-ns2.example.org.'))
# Save the pool to add a new nameserver
self.storage.update_pool(self.admin_context, pool)