netplan-dbus - Man Page
daemon to access netplan's functionality via a DBus API
Synopsis
netplan-dbus
Description
netplan-dbus is a DBus daemon, providing io.netplan.Netplan
on the system bus. The /io/netplan/Netplan
object provides an io.netplan.Netplan
interface, offering the following methods:
Apply() -> b
: calls netplan apply and returns a success or failure status.Generate() -> b
: calls netplan generate and returns a success or failure status.Info() -> a(sv)
: returns a dict "Features -> as", containing an array of all available feature flags.Config() -> o
: prepares a new config object as/io/netplan/Netplan/config/<ID>
, by copying the current state from/{etc,run,lib}/netplan/*.yaml
The /io/netplan/Netplan/config/<ID>
objects provide a io.netplan.Netplan.Config
interface, offering the following methods:
Get() -> s
: calls netplan get --root-dir=/run/netplan/config-ID all and returns the merged YAML config of the the given config object's stateSet(s:CONFIG_DELTA, s:ORIGIN_HINT) -> b
: calls netplan set --root-dir=/run/netplan/config-ID --origin-hint=ORIGIN_HINT CONFIG_DELTACONFIG_DELTA can be something like:
network.ethernets.eth0.dhcp4=true
and ORIGIN_HINT can be something like:70-snapd
(it will then write the config to70-snapd.yaml
). OnceSet()
is called on a config object, all other current and future config objects are being invalidated and cannotSet()
orTry()/Apply()
anymore, due to this pending dirty state. After the dirty config object is rejected viaCancel()
, the other config objects are valid again. If the dirty config object is accepted viaApply()
, newly created config objects will be valid, while the older states will stay invalid.Try(u:TIMEOUT_SEC) -> b
: replaces the main netplan configuration with this config object's state and calls netplan try --timeout=TIMEOUT_SECCancel() -> b
: rejects a currently runningTry()
attempt on this config object and/or discards the config objectApply() -> b
: replaces the main netplan configuration with this config object's state and calls netplan apply
For information about the Apply()/Try()/Get()/Set() functionality, see netplan-apply(8)/netplan-try(8)/netplan-get(8)/netplan-set(8) accordingly. For details of the configuration file format, see netplan(5).
See Also
netplan(5), netplan-apply(8), netplan-try(8), netplan-get(8), netplan-set(8)
Authors
Lukas Märdian (<lukas.maerdian@canonical.com>).