these can be useful in the base-declaration in situations where
a slot can be app-provided or implicit both on classic and core
now we have at least one use case like this for upower-observe
as core/system snaps so far provide only slots there is no use
case for adding plug-side plug-snap-type connection constraints
Replace ioutil.WriteFile with os.WriteFile since the former has been
deprecated since go1.16 and simply calls the latter.
Signed-off-by: Miguel Pires <miguel.pires@canonical.com>
* asserts/model: add preseedAuthority field to Model
* seed20: allow authority-id to differ from the brand-id
* fixup! asserts/model: add preseedAuthority field to Model
fix comment wording to PreseedAuthority
* fixup! seed20: allow authority-id to differ from the brand-id
clarify error message as "preseed authority-id"
* fixup! asserts/model: add preseedAuthority field to Model
standardize checkOptionalAuthority() signature and make acceptsAny bool explicit when invoking it
* fixup! seed20: allow authority-id to differ from the brand-id
fix ineffectual assignment to preseedAs2
* fixup! asserts/model: add preseedAuthority field to Model
bump copyright years for files touched by 5593e76312
* fixup! seed20: allow authority-id to differ from the brand-id
bump copyright years for files touched by ce7ba34e0f
* fixup! asserts/model: add preseedAuthority field to Model
asserts/model.go: rename "acceptsAny" to "acceptsWildcard"
Address comments:
- Rename Integrity to SnapIntegrity
- Export SHA3_384 and Size field of SnapIntegrity
- Add What variants for checkDigest and checkUint helpers
* asserts,seed/seedwriter: support for validation sets when writing the image seed.
* seed/seedwriter: simplify writer code
* seed/seedwriter: updatethe docs for Start
* asserts,seed/seedwriter: review feedback
Add unit tests for AtSequence, ensure CheckValidationSets cannot be called unless download step has completed
* seed/seedwriter: review feedback
add unit test for CheckValidationSets to early call, reuse checkStepCompleted in checkSnapsAccessor
* asserts,seed/seedwriter: refactor RefAssertsFetcher into a SeedAssertionFetcher with support for FetchSequence, and its own set of unit tests.
* seed/seedwriter: review feedback
Removed the TODO and updated docs for Writer.Start
* seed/seedwriter: review feedback
remove a line of the docs for SeedAssertionFetcher
* seed/seedwriter: review feedback
add additional case for calling FetchSequence with the default fetcher
* multiple: add code for Fetcher to support the fetching of sequence-forming assertions
* asserts: obviously not a typo as I read it
* asserts: add new SeqFetcher interface
* asserts: add docs to NewSeqFetcher
* asserts: remove ResolveLatest and open another PR
* asserts: cleanup some doc comments, make sure they fit their use-cases. Include Fetcher interface in SequenceFormingFetcher. Rename SeqFetcher to SequenceFormingFetcher and the new function. Do some additional renaming. Reuse some code between FetchSequence and Fetch.
* asserts: add an additional unit test to document current behavior of multiple sequences of same assertion.
* asserts: update docs for NewSequenceFormingFetcher, readd a line I had removed accidently, the sequence number must be set back to 2 after testing with sequence 4
* asserts: add docs for the multiple-sequence behavior, add missing doc line for SequenceFormingFetcher.
* asserts: add unit tests for detecting circular references, clarify some of the terminology around sequences
---------
Co-authored-by: Michael Vogt <mvo@ubuntu.com>
use 'what' methods instead to provide error context when data members are invalid, change certain error messages to align with the rest, and introduce a What variant of checkIntWithDefault
Go 1.19 includes some changes to gofmt which intend to make lists and
heading clearer when rendered (https://go.dev/doc/go1.19). This commit
is the result of running the new gofmt and manually fixing some of it.
This was necessary because the new gofmt assumed lines beginning w/ tabs
to start lists or examples. While this is often true in our codebase,
we occasionally also use tabs to indent the lines after a TODO or FIXME
prefix or in yaml (e.g., excerpts of a snap.yaml). This meant that a lot of the
reformatted comments were broken and had to be fixed manually.
Signed-off-by: Miguel Pires <miguel.pires@canonical.com>