@@ -327,6 +327,7 @@ def get_ly_ctx(self) -> libyang.Context:
327
327
to reject changes.
328
328
"""
329
329
330
+ # pylint: disable=too-many-arguments
330
331
def subscribe_module_change (
331
332
self ,
332
333
module : str ,
@@ -338,6 +339,7 @@ def subscribe_module_change(
338
339
passive : bool = False ,
339
340
done_only : bool = False ,
340
341
enabled : bool = False ,
342
+ update : bool = False ,
341
343
filter_origin : bool = False ,
342
344
private_data : Any = None ,
343
345
asyncio_register : bool = False ,
@@ -372,6 +374,8 @@ def subscribe_module_change(
372
374
:arg enabled:
373
375
The subscriber wants to be notified about the current configuration
374
376
at the moment of subscribing.
377
+ :arg update:
378
+ The subscriber wants to be called before the configuration is applied.
375
379
:arg filter_origin:
376
380
Filter events on the originator side to unburden the subscriber, but
377
381
results in 0 value for filtered-out changes in the subscriber infos.
@@ -410,6 +414,7 @@ def subscribe_module_change(
410
414
passive = passive ,
411
415
done_only = done_only ,
412
416
enabled = enabled ,
417
+ update = update ,
413
418
filter_origin = filter_origin ,
414
419
)
415
420
@@ -464,6 +469,7 @@ def subscribe_module_change_unsafe(
464
469
passive : bool = False ,
465
470
done_only : bool = False ,
466
471
enabled : bool = False ,
472
+ update : bool = False ,
467
473
filter_origin : bool = False ,
468
474
private_data : Any = None ,
469
475
asyncio_register : bool = False ,
@@ -499,6 +505,8 @@ def subscribe_module_change_unsafe(
499
505
:arg enabled:
500
506
The subscriber wants to be notified about the current configuration
501
507
at the moment of subscribing.
508
+ :arg update:
509
+ The subscriber wants to be called before the configuration is applied.
502
510
:arg filter_origin:
503
511
Filter events on the originator side to unburden the subscriber, but
504
512
results in 0 value for filtered-out changes in the subscriber infos.
@@ -531,6 +539,7 @@ def subscribe_module_change_unsafe(
531
539
passive = passive ,
532
540
done_only = done_only ,
533
541
enabled = enabled ,
542
+ update = update ,
534
543
filter_origin = filter_origin ,
535
544
)
536
545
check_call (
@@ -1659,6 +1668,7 @@ def _subscribe_flags(
1659
1668
enabled = False ,
1660
1669
oper_merge = False ,
1661
1670
filter_origin = False ,
1671
+ update = False ,
1662
1672
):
1663
1673
flags = 0
1664
1674
if no_thread :
@@ -1669,6 +1679,8 @@ def _subscribe_flags(
1669
1679
flags |= lib .SR_SUBSCR_DONE_ONLY
1670
1680
if enabled :
1671
1681
flags |= lib .SR_SUBSCR_ENABLED
1682
+ if update :
1683
+ flags |= lib .SR_SUBSCR_UPDATE
1672
1684
if oper_merge :
1673
1685
flags |= lib .SR_SUBSCR_OPER_MERGE
1674
1686
if filter_origin :
0 commit comments