From 0f054b35949364edbbfd58a0417a41346a0ab9cc Mon Sep 17 00:00:00 2001
From: Erik Olof Gunnar Andersson <eandersson@blizzard.com>
Date: Sun, 4 Jun 2023 21:57:50 -0700
Subject: [PATCH] Update notification handler sample

Change-Id: I82ee4da4ec2f2f1227c25d828fd61c435270e036
---
 .../notification_handler/sample.py                         | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/contrib/designate-ext-samplehandler/designate_ext_samplehandler/notification_handler/sample.py b/contrib/designate-ext-samplehandler/designate_ext_samplehandler/notification_handler/sample.py
index 814e8e23d..c40c20263 100644
--- a/contrib/designate-ext-samplehandler/designate_ext_samplehandler/notification_handler/sample.py
+++ b/contrib/designate-ext-samplehandler/designate_ext_samplehandler/notification_handler/sample.py
@@ -18,7 +18,6 @@ from oslo_log import log as logging
 
 from designate.context import DesignateContext
 from designate.notification_handler.base import NotificationHandler
-from designate.objects import Record
 
 
 LOG = logging.getLogger(__name__)
@@ -78,6 +77,8 @@ class SampleHandler(NotificationHandler):
                 'data': fixed_ip['address'],
             }
 
-            self._create_or_update_recordset(
-                context, [Record(**record_values)], **recordset_values
+            self.central_api.create_managed_records(
+                context, zone_id,
+                records_values=[record_values],
+                recordset_values=recordset_values,
             )