System Grab Bag

View all man pages from Ubuntu (or from all projects)

Name

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

Synopsis

\f[B]netplan-dbus\f[R]

Description

\f[B]netplan-dbus\f[R] is a DBus daemon, providing \f[V]io.netplan.Netplan\f[R] on the system bus. The \f[V]/io/netplan/Netplan\f[R] object provides an \f[V]io.netplan.Netplan\f[R] interface, offering the following methods:

\f[V]Apply() -> b\f[R]: calls \f[B]netplan apply\f[R] and returns a success or failure status.

\f[V]Generate() -> b\f[R]: calls \f[B]netplan generate\f[R] and returns a success or failure status.

\f[V]Info() -> a(sv)\f[R]: returns a dict "Features -> as", containing an array of all available feature flags.

\f[V]Config() -> o\f[R]: prepares a new config object as \f[V]/io/netplan/Netplan/config/<ID>\f[R], by copying the current state from \f[V]/{etc,run,lib}/netplan/*.yaml\f[R]

The \f[V]/io/netplan/Netplan/config/<ID>\f[R] objects provide a \f[V]io.netplan.Netplan.Config\f[R] interface, offering the following methods:

\f[V]Get() -> s\f[R]: calls \f[B]netplan get --root-dir=/run/netplan/config-ID all\f[R] and returns the merged YAML config of the the given config object's state

\f[V]Set(s:CONFIG_DELTA, s:ORIGIN_HINT) -> b\f[R]: calls \f[B]netplan set --root-dir=/run/netplan/config-ID --origin-hint=ORIGIN_HINT CONFIG_DELTA\f[R]

CONFIG_DELTA can be something like: \f[V]network.ethernets.eth0.dhcp4=true\f[R] and ORIGIN_HINT can be something like: \f[V]70-snapd\f[R] (it will then write the config to \f[V]70-snapd.yaml\f[R]). Once \f[V]Set()\f[R] is called on a config object, all other current and future config objects are being invalidated and cannot \f[V]Set()\f[R] or \f[V]Try()/Apply()\f[R] anymore, due to this pending dirty state. After the dirty config object is rejected via \f[V]Cancel()\f[R], the other config objects are valid again. If the dirty config object is accepted via \f[V]Apply()\f[R], newly created config objects will be valid, while the older states will stay invalid.

\f[V]Try(u:TIMEOUT_SEC) -> b\f[R]: replaces the main netplan configuration with this config object's state and calls \f[B]netplan try --timeout=TIMEOUT_SEC\f[R]

\f[V]Cancel() -> b\f[R]: rejects a currently running \f[V]Try()\f[R] attempt on this config object and/or discards the config object

\f[V]Apply() -> b\f[R]: replaces the main netplan configuration with this config object's state and calls \f[B]netplan apply\f[R]

For information about the Apply()/Try()/Get()/Set() functionality, see \f[B]netplan-apply\f[R](8)/\f[B]netplan-try\f[R](8)/\f[B]netplan-get\f[R](8)/\f[B]netplan-set\f[R](8) accordingly. For details of the configuration file format, see \f[B]netplan\f[R](5).

See Also

    \f[B]netplan\f[R](5), \f[B]netplan-apply\f[R](8), \f[B]netplan-try\f[R](8), \f[B]netplan-get\f[R](8), \f[B]netplan-set\f[R](8)

Authors

Lukas M\[:a]rdian (<[email protected]>).