List
List each behavior in a chain: what it calls, and what calls it.
**Chain** is the tree of the behaviors that a behavior calls, down to the
last one. A building block, with Internal, is in the list for the behaviors
that call it.
osapi dsl chain list
Examples
osapi dsl chain list
osapi dsl chain list --json
Result
The command prints:
$ osapi dsl chain list Behaviors in a chain (3): BEHAVIOR INTERNAL CHAIN CALLS USED BY dns dns → netplan → managedfile netplan none netplan yes netplan → managedfile managedfile route, dns, interface managedfile yes managedfile none certificate, file, netplan
With --json, the command prints:
{
"items": [
{
"behavior": "dns",
"chain": "dns → netplan → managedfile",
"calls": ["netplan"],
"used_by": []
},
{
"behavior": "netplan",
"internal": true,
"chain": "netplan → managedfile",
"calls": ["managedfile"],
"used_by": ["route", "dns", "interface"]
},
{
"behavior": "managedfile",
"internal": true,
"chain": "managedfile",
"calls": [],
"used_by": ["certificate", "file", "netplan"]
}
]
}
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.