From d10c20a580048bb09594bc27a54bfaa848edfa2c Mon Sep 17 00:00:00 2001 From: Erik Olof Gunnar Andersson Date: Wed, 1 Feb 2023 00:44:02 -0800 Subject: [PATCH] Fix missing default for hard_delete and bump rpc version Change-Id: Ic80228697374c67a0c16fd3574fc0cd0f52dc680 --- designate/worker/rpcapi.py | 7 ++++--- designate/worker/service.py | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/designate/worker/rpcapi.py b/designate/worker/rpcapi.py index c5c1bb00f..041f9eb32 100644 --- a/designate/worker/rpcapi.py +++ b/designate/worker/rpcapi.py @@ -36,15 +36,16 @@ class WorkerAPI(object): 1.0 - Initial version 1.1 - Added perform_zone_xfr and get_serial_number + 1.2 - Added hard_delete to delete_zone """ - RPC_API_VERSION = '1.1' + RPC_API_VERSION = '1.2' def __init__(self, topic=None): self.topic = topic if topic else cfg.CONF['service:worker'].topic target = messaging.Target(topic=self.topic, version=self.RPC_API_VERSION) - self.client = rpc.get_client(target, version_cap='1.1') + self.client = rpc.get_client(target, version_cap='1.2') @classmethod def get_instance(cls): @@ -68,7 +69,7 @@ class WorkerAPI(object): return self.client.cast( context, 'update_zone', zone=zone) - def delete_zone(self, context, zone, hard_delete): + def delete_zone(self, context, zone, hard_delete=False): return self.client.cast( context, 'delete_zone', zone=zone, hard_delete=hard_delete) diff --git a/designate/worker/service.py b/designate/worker/service.py index c6f4be253..8eae9069a 100644 --- a/designate/worker/service.py +++ b/designate/worker/service.py @@ -42,7 +42,7 @@ class AlsoNotifyTask(object): class Service(service.RPCService): - RPC_API_VERSION = '1.1' + RPC_API_VERSION = '1.2' target = messaging.Target(version=RPC_API_VERSION)