List
List the behaviors this binary has.
An internal behavior has no API or CLI of its own. Only other behaviors use it.
osapi dsl behavior list
Examples
osapi dsl behavior list
osapi dsl behavior list --json
Result
The command prints:
$ osapi dsl behavior list Behaviors (8): NAME UNDER OF METHODS DESCRIPTION INTERNAL hostname get, update The hostname of the host managedfile get, update, delete The files that osapi writes and tracks yes dns get, update, delete The DNS resolvers of an interface source log list The sources that write to the systemd journal sysctl list, get, create, update, delete Kernel parameters, written to sysctl.d files and applied user list, get, create, update, delete The users of the host sshkey user list, create, delete The authorized SSH keys of a user password user update The password of a user
With --json, the command prints:
{
"items": [
{
"name": "hostname",
"methods": ["get", "update"],
"doc": "The hostname of the host"
},
{
"name": "managedfile",
"methods": ["get", "update", "delete"],
"doc": "The files that osapi writes and tracks",
"internal": true
},
{
"name": "dns",
"methods": ["get", "update", "delete"],
"doc": "The DNS resolvers of an interface"
},
{
"name": "source",
"under": "log",
"methods": ["list"],
"doc": "The sources that write to the systemd journal"
},
{
"name": "sysctl",
"methods": ["list", "get", "create", "update", "delete"],
"doc": "Kernel parameters, written to sysctl.d files and applied"
},
{
"name": "user",
"methods": ["list", "get", "create", "update", "delete"],
"doc": "The users of the host"
},
{
"name": "sshkey",
"of": "user",
"methods": ["list", "create", "delete"],
"doc": "The authorized SSH keys of a user"
},
{
"name": "password",
"of": "user",
"methods": ["update"],
"doc": "The password of a user"
}
]
}
Global flags
| Flag | Description | Default |
|---|---|---|
-d, --debug | Enable or disable debug mode | |
-j, --json | Enable JSON output | |
-f, --osapi-file | Path to config file; without one at the default path, osapi runs on the defaults | /etc/osapi/osapi.yaml |
Output tells how the result is printed, and what --json
gives.