- Scope:
spec
- Level: Developer Goal
- Actors: Dev-Ops Engineer
- Brief: This use case introduces a enum specification for a part of the dockerd configuration file (daemon.json).
- Precondition: The Dev-Ops Engineer has a working setup for
docker
and the daemondockerd
. - Main success scenario:
- The Dev-Ops Engineer wants to write a specification for the
log level
in thedockerd
configuration. - The configuration key is
log/level
. - The configuration key uses
description
,default
andenum
as metakeys. - The specification strictly defines all enum values
debug
,info
,warn
,error
andfatal
. - The keys are all stored for the
spec
namespace.
- The Dev-Ops Engineer wants to write a specification for the
- Alternative scenario: None.
- Error scenario:
- Wrong metakeys are used (yielded as error to the user).
- Postcondition: The keys are all stored for the
spec
namespace.. - Non-functional Constraints: None.
The log level
configuration for the dockerd
could look like:
[log/level]
meta:/description = Set the logging level
meta:/enum/check = #4
meta:/enum/check/#0 = debug
meta:/enum/check/#1 = info
meta:/enum/check/#2 = warn
meta:/enum/check/#3 = error
meta:/enum/check/#4 = fatal
meta:/default = info
In case the key log/level
does not exist, spec
plugin creates a default
key with value info
in the default namespace.
For the full specification of the dockerd
configuration file see dockerd-spec.