onyo unset

Remove KEYs from assets.

Keys that are used in asset names (see the onyo.assets.name-format configuration option) cannot be unset.

The contents of all modified assets are checked for validity before committing. If problems are found, Onyo will error and leave the assets unmodified.

usage: onyo unset [-h] -k KEY [KEY ...] -a ASSET [ASSET ...] [-m MESSAGE]

Named Arguments

-k, --keys

Keys to unset in assets. Multiple keys can be given (e.g. key1 key2 key3). Dictionary subkeys can be addressed using a period (e.g. model.name, model.year, etc.). Note, that unsetting the last child of a dictionary does not remove the parent dictionary itself.

-a, --asset

Assets to unset **KEY**s in.

-m, --message

Use the given MESSAGE as the commit message (rather than the default). If multiple --message options are given, their values are concatenated as separate paragraphs.

Examples

Remove a key from an asset:

$ onyo unset --keys USB_A --path accounting/Bingo\ Bob/laptop_apple_macbook.oiw629

Remove a key from all laptops:

$ onyo get –machine-readable –match type=laptop –keys path
xargs -d “n” onyo –yes unset –keys USB_A –asset