Skip to content

add persistent-keepalive parameter to wireguard peers#80

Merged
igo95862 merged 2 commits intopython-sdbus:masterfrom
jrester:add-persistent-keepalive-wireguard-peers
Feb 17, 2026
Merged

add persistent-keepalive parameter to wireguard peers#80
igo95862 merged 2 commits intopython-sdbus:masterfrom
jrester:add-persistent-keepalive-wireguard-peers

Conversation

@jrester
Copy link
Copy Markdown

@jrester jrester commented Jan 14, 2026

NetworkManager supports the persistent-keepalive parameter for wireguard peers. This MR adds this parameter for wireguard peers, so that one can read and modify the persistent-keepalive parameter.

@jrester jrester force-pushed the add-persistent-keepalive-wireguard-peers branch from 64879f6 to 34873e6 Compare January 14, 2026 09:33
@igo95862
Copy link
Copy Markdown
Collaborator

Hello @jrester

Did you manually add that field or did you use generator in tools/generate-settings-dataclasses-jinja.py? There is an automated script that will generate all settings dataclasses from NetworkManager metadata.

@jrester
Copy link
Copy Markdown
Author

jrester commented Jan 20, 2026

I generated new settings modules with the generator script, however it did not add the field to WireguardPeers. From my understanding, the generator script only modifies the settings modules but not the datatypes.py module which contains WireguardPeers. So I added the field manually instead.

Should the generator also populate datatypes.py or does it only generate settings modules?

metadata={'dbus_name': 'allowed-ips', 'dbus_type': 'as'},
default=None,
)
persistent_keepalive: Optional[str] = field(
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe the D-Bus type should be u which means the Python type hint should be int not str.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good point; done

@igo95862 igo95862 merged commit adc8179 into python-sdbus:master Feb 17, 2026
@igo95862
Copy link
Copy Markdown
Collaborator

I think I will release the 2.0.1 which will be backwards compatible with existing 2.0.0 version unlike current master branch.

@jrester
Copy link
Copy Markdown
Author

jrester commented Feb 17, 2026

Great, thank you very much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants