How get snap set property list / snapd API extension

How to get snap set properties that been set.
Currently, we can specific property with snapctl get

PROBLEM:
We would like to get and validate the list of props that been set before to configure script stared.
That validation exists in core snap (we cannot typo in props name) example snap set core prop1=val1
But there no such mechanism for noncore snaps.

SUGGESTED SOLUTION:
snapd operate change transaction storage to store the active snap sets.

/v2/snaps/[name]/conf has two type of executions

  • no options - returns all snap conf props from persistent storage.
  • request for specific option - returns option from change transaction storage.
  • Add new one to get from change transaction storage.

In snapd source, there are change transaction storage. That would be great to extend API to use Changes function in overlord/configstate/transaction.go func (t *Transaction) Changes() []string {`.
It returns changing keys associated with this transaction.

The same approach in unit testing.
overlord/configstate/transaction_test.go t.Changes(

Hi, are there some formatting problems, missing quoting? the content seems cut up around where it talks about code/func signature and it makes it a bit hard to parse and respond.

I’ve split text to PROBLEM and SUGGESTED SOLUTION