Confdb functionality is currently under development. The confdb
interface will be used by snaps that require 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.
[...]
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.
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,
degville:
registry’s account
This should be confdb’s account .
The links also changed after the rename:
Test code:
// -*- Mode: Go; indent-tabs-mode: t -*-
/*
* Copyright (C) 2024 Canonical Ltd
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 3 as
* published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
package builtin_test
This file has been truncated. show original
Source:
// -*- Mode: Go; indent-tabs-mode: t -*-
/*
* Copyright (C) 2024 Canonical Ltd
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 3 as
* published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
package builtin
This file has been truncated. show original
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.