summaryrefslogtreecommitdiffstats
path: root/samples
diff options
context:
space:
mode:
authorLibor Peltan <libor.peltan@nic.cz>2023-06-27 10:56:39 +0200
committerDaniel Salzman <daniel.salzman@nic.cz>2023-06-29 14:19:32 +0200
commit77f11176b8c5234965a21ea08368692a28de00a9 (patch)
tree83da89e06231337379153d2041b161e9dd2c76ba /samples
parentMerge branch 'outdated_master' into 'master' (diff)
downloadknot-77f11176b8c5234965a21ea08368692a28de00a9.tar.xz
knot-77f11176b8c5234965a21ea08368692a28de00a9.zip
dbus: new option keys_updated
Diffstat (limited to 'samples')
-rwxr-xr-xsamples/dbus_client.pl6
-rwxr-xr-xsamples/dbus_client.py5
-rwxr-xr-xsamples/dbus_client.sh3
3 files changed, 14 insertions, 0 deletions
diff --git a/samples/dbus_client.pl b/samples/dbus_client.pl
index 450dc40f2..e4be12868 100755
--- a/samples/dbus_client.pl
+++ b/samples/dbus_client.pl
@@ -39,6 +39,12 @@ $knotd_interface->connect_to_signal('zone_updated', sub
print "Updated zone=$zone to serial=$serial\n";
});
+$knotd_interface->connect_to_signal('keys_updated', sub
+{
+ my ($zone) = @_;
+ print "Keys updated for zone=$zone\n";
+});
+
$knotd_interface->connect_to_signal('zone_ksk_submission', sub
{
my ($zone, $key_tag, $kasp_id) = @_;
diff --git a/samples/dbus_client.py b/samples/dbus_client.py
index 4887474c5..f4c38deb1 100755
--- a/samples/dbus_client.py
+++ b/samples/dbus_client.py
@@ -24,6 +24,10 @@ def sig_updated(*args, **kwargs):
(zone, serial) = args
print("Updated zone=%s to serial=%d" % (zone, serial))
+def sig_keys_upd(*args, **kwargs):
+ (zone) = args
+ print("Keys updated for zone=%s" % (zone))
+
def sig_submission(*args, **kwargs):
(zone, key_tag, kasp_id) = args
print("Ready KSK for zone=%s keytag=%u keyid=%s" % (zone, key_tag, kasp_id))
@@ -50,6 +54,7 @@ if __name__ == '__main__':
events_iface.connect_to_signal("started", sig_started)
events_iface.connect_to_signal("stopped", sig_stopped)
events_iface.connect_to_signal("zone_updated", sig_updated)
+ events_iface.connect_to_signal("keys_updated", sig_keys_upd)
events_iface.connect_to_signal("zone_ksk_submission", sig_submission)
events_iface.connect_to_signal("zone_dnssec_invalid", sig_invalid)
diff --git a/samples/dbus_client.sh b/samples/dbus_client.sh
index 352b36884..457f112a2 100755
--- a/samples/dbus_client.sh
+++ b/samples/dbus_client.sh
@@ -7,6 +7,9 @@ cb() {
zone_ksk_submission)
echo "Ready KSK for zone=${2} keytag=${3} keyid=${4}"
;;
+ keys_updated)
+ echo "Keys updated for zone=${2}"
+ ;;
zone_updated)
echo "Updated zone=${2} to serial=${3}"
;;