We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sometimes is needed to convert one list into other, usually this is done with map function that convert each list item into different one.
For example constructing port field for all the ethernet interfaces:
Cature ethernet-ifaces: interfaces.type==ethernet
ethernet-ifaces: interfaces.type==ethernet
DesiredState
without JSON
port: "{{ capture.ethernet-ifaces.interfaces -> .name }}"
with JSON (it allos to add more fields to the returned item
port: "{{ capture.ethernet-ifaces.interfaces -> { "name": .name } }}"
This should convert the list of interfaces into a list of bridge/bond ports, if more than one attribute is needed json can be used.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Sometimes is needed to convert one list into other, usually this is done with map function that convert each list item into different one.
For example constructing port field for all the ethernet interfaces:
Cature
ethernet-ifaces: interfaces.type==ethernet
DesiredState
without JSON
port: "{{ capture.ethernet-ifaces.interfaces -> .name }}"
with JSON (it allos to add more fields to the returned item
port: "{{ capture.ethernet-ifaces.interfaces -> { "name": .name } }}"
This should convert the list of interfaces into a list of bridge/bond ports, if more than one attribute is needed json can be used.
The text was updated successfully, but these errors were encountered: