The confdb interface

The confdb interface enables snaps to access to specific confdb views.

There are two fields that together identify the view being accessed: account and view. There is also an optional role field which may only take the value of “custodian”, if the snap is a custodian for the confdb-schema being accessed.

See the Confdb configuration mechanism for implementation details, and Configure snaps with confdb to use confdb with your own snaps.

[...]
 read-sensor-params:
  interface: confdb
  account: acme
  view: sensors/read-sensor1-parameters

See Interface management and Supported interfaces for further details on how interfaces are used.

:information_source: Confdb is currently considered an Experimental feature and implementation details may change as development progresses.


Developer details

Auto-connect: no, but plugs are auto-connected if the confdb’s account is the same as the snap’s publisher.

Code examples

The test code can be found in the snapd repository:
snapd/interfaces/builtin/confdb_test.go at master · canonical/snapd · GitHub

The source code for the interface is in the snapd repository:
snapd/interfaces/builtin/confdb.go at master · canonical/snapd · GitHub

Hi,

This should be confdb’s account.

The links also changed after the rename:

Test code:

Source:

thank you! I’ve just updated the doc.

Requesting if we could update the links at the bottom as well. The links changed after the renaming from registries to confdb:

1 Like

Yes, of course! Thanks for letting me know. I’ve updated the doc.