mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
DNS Locations: Rename ipalocationweight to ipaserviceweight
Service weight explains better meaning of attribute than location weight, because location itself have no weight only services have. https://fedorahosted.org/freeipa/ticket/2008 Reviewed-By: Petr Spacek <pspacek@redhat.com>
This commit is contained in:
@@ -177,11 +177,11 @@ class TestLocationsServer(XMLRPC_test):
|
||||
server.update(
|
||||
dict(
|
||||
ipalocation_location=location.idnsname_obj,
|
||||
ipalocationweight=200,
|
||||
ipaserviceweight=200,
|
||||
),
|
||||
expected_updates=dict(
|
||||
ipalocation_location=[location.idnsname_obj],
|
||||
ipalocationweight=[u'200'],
|
||||
ipaserviceweight=[u'200'],
|
||||
)
|
||||
)
|
||||
# remove invalid data from the previous test
|
||||
@@ -195,6 +195,6 @@ class TestLocationsServer(XMLRPC_test):
|
||||
location.remove_server_from_location(server.server_name)
|
||||
location.retrieve()
|
||||
|
||||
def test_remove_location_weight_from_server(self, location, server):
|
||||
server.update(dict(ipalocationweight=None))
|
||||
def test_remove_service_weight_from_server(self, location, server):
|
||||
server.update(dict(ipaserviceweight=None))
|
||||
location.retrieve()
|
||||
|
||||
@@ -132,8 +132,8 @@ class LocationTracker(Tracker):
|
||||
self.attrs.setdefault('servers_server', []).append(server_name)
|
||||
self.servers[server_name] = {
|
||||
'cn': [server_name],
|
||||
'ipalocationweight': [unicode(weight)],
|
||||
'location_relative_weight': [relative_weight]
|
||||
'ipaserviceweight': [unicode(weight)],
|
||||
'service_relative_weight': [relative_weight]
|
||||
}
|
||||
|
||||
def remove_server_from_location(self, server_name):
|
||||
|
||||
@@ -13,18 +13,18 @@ class ServerTracker(Tracker):
|
||||
retrieve_keys = {
|
||||
'cn', 'dn', 'ipamaxdomainlevel', 'ipamindomainlevel',
|
||||
'iparepltopomanagedsuffix_topologysuffix', 'ipalocation_location',
|
||||
'ipalocationweight',
|
||||
'ipaserviceweight',
|
||||
}
|
||||
retrieve_all_keys = retrieve_keys | {'objectclass'}
|
||||
create_keys = retrieve_keys | {'objectclass'}
|
||||
find_keys = {
|
||||
'cn', 'dn', 'ipamaxdomainlevel', 'ipamindomainlevel',
|
||||
'ipalocationweight',
|
||||
'ipaserviceweight',
|
||||
}
|
||||
find_all_keys = retrieve_all_keys
|
||||
update_keys = {
|
||||
'cn', 'ipamaxdomainlevel', 'ipamindomainlevel',
|
||||
'ipalocation_location', 'ipalocationweight',
|
||||
'ipalocation_location', 'ipaserviceweight',
|
||||
}
|
||||
|
||||
def __init__(self, name):
|
||||
|
||||
Reference in New Issue
Block a user