Fix missing default for hard_delete and bump rpc version
Change-Id: Ic80228697374c67a0c16fd3574fc0cd0f52dc680
This commit is contained in:
parent
a9cf887da1
commit
d10c20a580
@ -36,15 +36,16 @@ class WorkerAPI(object):
|
|||||||
|
|
||||||
1.0 - Initial version
|
1.0 - Initial version
|
||||||
1.1 - Added perform_zone_xfr and get_serial_number
|
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):
|
def __init__(self, topic=None):
|
||||||
self.topic = topic if topic else cfg.CONF['service:worker'].topic
|
self.topic = topic if topic else cfg.CONF['service:worker'].topic
|
||||||
|
|
||||||
target = messaging.Target(topic=self.topic,
|
target = messaging.Target(topic=self.topic,
|
||||||
version=self.RPC_API_VERSION)
|
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
|
@classmethod
|
||||||
def get_instance(cls):
|
def get_instance(cls):
|
||||||
@ -68,7 +69,7 @@ class WorkerAPI(object):
|
|||||||
return self.client.cast(
|
return self.client.cast(
|
||||||
context, 'update_zone', zone=zone)
|
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(
|
return self.client.cast(
|
||||||
context, 'delete_zone', zone=zone, hard_delete=hard_delete)
|
context, 'delete_zone', zone=zone, hard_delete=hard_delete)
|
||||||
|
|
||||||
|
@ -42,7 +42,7 @@ class AlsoNotifyTask(object):
|
|||||||
|
|
||||||
|
|
||||||
class Service(service.RPCService):
|
class Service(service.RPCService):
|
||||||
RPC_API_VERSION = '1.1'
|
RPC_API_VERSION = '1.2'
|
||||||
|
|
||||||
target = messaging.Target(version=RPC_API_VERSION)
|
target = messaging.Target(version=RPC_API_VERSION)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user