Remove unused rpc calls
These RPC calls were only used internally and does not need to be exposed as RPC calls. The following rpc calls were removed. - find_records - find_recordset - update_zone_import Change-Id: I0dd7c77def9a9d41a518b92b9a662a0e1fce1e3e
This commit is contained in:
parent
4a84b9c0c2
commit
f83ebe6a0e
@ -71,8 +71,9 @@ class CentralAPI:
|
||||
6.6 - Add methods for shared zones
|
||||
6.7 - Add increment_zone_serial
|
||||
6.8 - Add managed recordset methods
|
||||
6.9 - Removed unused methods
|
||||
"""
|
||||
RPC_API_VERSION = '6.8'
|
||||
RPC_API_VERSION = '6.9'
|
||||
|
||||
# This allows us to mark some methods as not logged.
|
||||
# This can be for a few reasons - some methods my not actually call over
|
||||
@ -85,7 +86,7 @@ class CentralAPI:
|
||||
|
||||
target = messaging.Target(topic=self.topic,
|
||||
version=self.RPC_API_VERSION)
|
||||
self.client = rpc.get_client(target, version_cap='6.8')
|
||||
self.client = rpc.get_client(target, version_cap='6.9')
|
||||
|
||||
@classmethod
|
||||
def get_instance(cls):
|
||||
@ -230,9 +231,6 @@ class CentralAPI:
|
||||
limit=limit, sort_key=sort_key,
|
||||
sort_dir=sort_dir, force_index=force_index)
|
||||
|
||||
def find_recordset(self, context, criterion=None):
|
||||
return self.client.call(context, 'find_recordset', criterion=criterion)
|
||||
|
||||
def create_managed_records(self, context, zone_id, records_values,
|
||||
recordset_values):
|
||||
return self.client.call(context, 'create_managed_records',
|
||||
@ -259,13 +257,6 @@ class CentralAPI:
|
||||
recordset_id=recordset_id,
|
||||
increment_serial=increment_serial)
|
||||
|
||||
# Record Methods
|
||||
def find_records(self, context, criterion=None, marker=None, limit=None,
|
||||
sort_key=None, sort_dir=None):
|
||||
return self.client.call(context, 'find_records', criterion=criterion,
|
||||
marker=marker, limit=limit, sort_key=sort_key,
|
||||
sort_dir=sort_dir)
|
||||
|
||||
# Misc. Report combining counts for tenants, zones and records
|
||||
def count_report(self, context, criterion=None):
|
||||
return self.client.call(context, 'count_report', criterion=criterion)
|
||||
@ -395,10 +386,6 @@ class CentralAPI:
|
||||
return self.client.call(context, 'get_zone_import',
|
||||
zone_import_id=zone_import_id)
|
||||
|
||||
def update_zone_import(self, context, zone_import):
|
||||
return self.client.call(context, 'update_zone_import',
|
||||
zone_import=zone_import)
|
||||
|
||||
def delete_zone_import(self, context, zone_import_id):
|
||||
return self.client.call(context, 'delete_zone_import',
|
||||
zone_import_id=zone_import_id)
|
||||
|
@ -54,7 +54,7 @@ LOG = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class Service(service.RPCService):
|
||||
RPC_API_VERSION = '6.8'
|
||||
RPC_API_VERSION = '6.9'
|
||||
|
||||
target = messaging.Target(version=RPC_API_VERSION)
|
||||
|
||||
@ -1522,9 +1522,7 @@ class Service(service.RPCService):
|
||||
|
||||
return recordsets
|
||||
|
||||
@rpc.expected_exceptions()
|
||||
def find_recordset(self, context, criterion=None):
|
||||
|
||||
# TODO(johnsom) Fix this to be useful
|
||||
if policy.enforce_new_defaults():
|
||||
target = {constants.RBAC_PROJECT_ID: context.project_id}
|
||||
@ -1767,7 +1765,6 @@ class Service(service.RPCService):
|
||||
return self.storage.count_recordsets(context, criterion)
|
||||
|
||||
# Record Methods
|
||||
@rpc.expected_exceptions()
|
||||
def find_records(self, context, criterion=None, marker=None, limit=None,
|
||||
sort_key=None, sort_dir=None):
|
||||
|
||||
@ -2814,7 +2811,6 @@ class Service(service.RPCService):
|
||||
|
||||
self.update_zone_import(context, zone_import)
|
||||
|
||||
@rpc.expected_exceptions()
|
||||
@notification.notify_type('dns.zone_import.update')
|
||||
def update_zone_import(self, context, zone_import):
|
||||
if policy.enforce_new_defaults():
|
||||
|
11
releasenotes/notes/unused-rpc-calls-7df4dcbcc19c6f60.yaml
Normal file
11
releasenotes/notes/unused-rpc-calls-7df4dcbcc19c6f60.yaml
Normal file
@ -0,0 +1,11 @@
|
||||
---
|
||||
upgrade:
|
||||
- |
|
||||
Removed the following unused central rpc calls. This should not impact
|
||||
normal installations, but if these are used in any custom written backends
|
||||
or plugins that you are using, you will need to update your code before
|
||||
upgrading.
|
||||
|
||||
- ``find_records``
|
||||
- ``find_recordset``
|
||||
- ``update_zone_import``
|
Loading…
Reference in New Issue
Block a user