1netplan-dbus(8)                                                netplan-dbus(8)
2
3
4

NAME

6       netplan-dbus - daemon to access netplan's functionality via a DBus API
7

SYNOPSIS

9       netplan-dbus
10

DESCRIPTION

12       netplan-dbus is a DBus daemon, providing io.netplan.Netplan on the sys‐
13       tem bus.  The /io/netplan/Netplan object provides an io.netplan.Netplan
14       interface, offering the following methods:
15
16       • Apply()  ->  b:  calls netplan apply and returns a success or failure
17         status.
18
19       • Generate() -> b: calls netplan generate  and  returns  a  success  or
20         failure status.
21
22       • Info() -> a(sv): returns a dict "Features -> as", containing an array
23         of all available feature flags.
24
25       • Config() -> o: prepares  a  new  config  object  as  /io/netplan/Net‐
26         plan/config/<ID>,    by    copying    the    current    state    from
27         /{etc,run,lib}/netplan/*.yaml
28
29       The /io/netplan/Netplan/config/<ID> objects provide  a  io.netplan.Net‐
30       plan.Config interface, offering the following methods:
31
32       • Get()  ->  s: calls netplan get --root-dir=/run/netplan/config-ID all
33         and returns the merged YAML config of the the given  config  object's
34         state
35
36       • Set(s:CONFIG_DELTA,  s:ORIGIN_HINT)  ->  b: calls netplan set --root-
37         dir=/run/netplan/config-ID --origin-hint=ORIGIN_HINT CONFIG_DELTA
38
39         CONFIG_DELTA can be something like: network.ethernets.eth0.dhcp4=true
40         and  ORIGIN_HINT  can be something like: 70-snapd (it will then write
41         the config to 70-snapd.yaml).  Once Set() is called on a  config  ob‐
42         ject,  all  other current and future config objects are being invali‐
43         dated and cannot Set() or Try()/Apply() anymore, due to this  pending
44         dirty state.  After the dirty config object is rejected via Cancel(),
45         the other config objects are valid again.  If the dirty config object
46         is  accepted via Apply(), newly created config objects will be valid,
47         while the older states will stay invalid.
48
49       • Try(u:TIMEOUT_SEC) -> b: replaces the main netplan configuration with
50         this  config  object's  state  and  calls netplan try --timeout=TIME‐
51         OUT_SEC
52
53       • Cancel() -> b: rejects a currently running Try() attempt on this con‐
54         fig object and/or discards the config object
55
56       • Apply()  -> b: replaces the main netplan configuration with this con‐
57         fig object's state and calls netplan apply
58
59       For information about the Apply()/Try()/Get()/Set() functionality,  see
60       netplan-apply(8)/netplan-try(8)/netplan-get(8)/netplan-set(8)   accord‐
61       ingly.  For details of the configuration file format, see netplan(5).
62

SEE ALSO

64       netplan(5), netplan-apply(8), netplan-try(8), netplan-get(8),  netplan-
65       set(8)
66

AUTHORS

68       Lukas Märdian (<lukas.maerdian@canonical.com>).
69
70
71
72                                                               netplan-dbus(8)
Impressum