Skip to content

Update confdb tutorial following feedback from Ocado#377

Open
mcw-work wants to merge 2 commits into
canonical:mainfrom
mcw-work:main
Open

Update confdb tutorial following feedback from Ocado#377
mcw-work wants to merge 2 commits into
canonical:mainfrom
mcw-work:main

Conversation

@mcw-work

Copy link
Copy Markdown
Contributor

@mcw-work

Copy link
Copy Markdown
Contributor Author

@st3v3nmw - please review

@st3v3nmw st3v3nmw left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, small nit below.

Comment thread docs/how-to-guides/manage-snaps/configure-snaps-with-confdb.md Outdated
@ndyer ndyer self-assigned this Jun 15, 2026
@mcw-work

mcw-work commented Jun 17, 2026

Copy link
Copy Markdown
Contributor Author

@miguelpires / @ndyer can you please review/accept?

@miguelpires miguelpires left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs a rebase

@mcw-work

Copy link
Copy Markdown
Contributor Author

@miguelpires rebased


Now let’s create some view rules to access confdb.

In our example, we'll use one snap to configure the network and another to access it, which means we need two views: `wifi-admin` and `wifi-state`.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately, the rebase has undone changes that landed in #378.. llike renaming the views to wifi-admin & wifi-state. And now the storage paths start with v1

@miguelpires miguelpires left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems to be reverting several changes made to make the docs consistent with SD247

Comment on lines +111 to +118
request: "{name}.ssid"
storage: "wifi.{name}.ssid"
-
request: "{name}.password"
storage: "v1.wifi.{name}.psk"
request: "{name}.password"
storage: "wifi.{name}.psk"
-
request: "{name}.state"
storage: "v1.wifi.{name}.state"
request: "{name}.state"
storage: "wifi.{name}.state"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is restoring the pre-SD247 paths

Comment on lines +296 to +298
snap connect custodian-snap:configure-wifi
snap connect custodian-snap:access-wifi
snap connect reader-snap:access-wifi

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same

Done ... ... Run hook change-view-configure-wifi of snap "custodian-snap"
Done ... ... Run hook observe-view-access-wifi of snap "test-snap"
Done ... ... Commit changes to confdb (NI7Jstuu8gffcoXr02i1kYt898p6Co0A/network/wifi-setup)
Done ... ... Clears the ongoing confdb transaction from state

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same

Now let’s create some view rules to access confdb.

In our example, we'll use one snap to configure the network and another to access it, which means we need two views: `wifi-admin` and `wifi-state`.
In our example, we'll use one snap as custodian of the two views and allowing changes to the configuration of the network, and another snap to access it. This means we will need two views: `configure-wifi` and `access-wifi`.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The view names here are also the old ones

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants