Skip to main content

Get

Print how to build a chain, and the building blocks of this binary.

Print what a chain is, how a behavior builds on others and calls them, what happens when a step fails, and each building block of this binary. Read it before a behavior requires another, then check the result with osapi dsl chain validate.

osapi dsl chain spec get

Examples​

osapi dsl chain spec get
osapi dsl chain spec get --json

Result​

The command prints:

$ osapi dsl chain spec get
What a chain is:
  A chain
    The behaviors that a behavior calls, and the ones that they call: dns
    calls netplan, and netplan calls managedfile. The chain has the name of
    the behavior at its top. It is not declared on its own: Requires on each
    behavior makes it.
    Use: osapi dsl chain list shows each chain; osapi dsl chain get --name
    <behavior> shows its tree.

With --json, the command prints:

{
"kinds": [
{
"kind": "chain",
"title": "What a chain is",
"terms": [
{
"kind": "chain",
"name": "A chain",
"does": "The behaviors that a behavior calls, and the ones that they call: dns calls netplan, and netplan calls managedfile. The chain has the name of the behavior at its top. It is not declared on its own: Requires on each behavior makes it.",
"when": "osapi dsl chain list shows each chain; osapi dsl chain get --name \u003cbehavior\u003e shows its tree."
}
]
}
]
}

Global flags​

FlagDescriptionDefault
-d, --debugEnable or disable debug mode
-j, --jsonEnable JSON output
-f, --osapi-filePath 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.