Ticket #710 (closed enhancement: fixed)
Output multiple variables from a single probe for use with TGenshi
Reported by: | Travis Campbell <[email protected]…> | Owned by: | https://www.google.com/accounts/o8/id?id=AItOawnSjgovXZr-_V3vGkvMSR0pc5LDykRc1Nc |
---|---|---|---|
Priority: | major | Milestone: | Bcfg2 1.2.0 Release |
Component: | bcfg2-client | Version: | 1.0 |
Keywords: | Cc: |
Description
I have a need to output multiple variables from a single probe. Right now, I can output multiple lines which associates multiple values to a single probe key name, but this isn't exactly what I want.
Sol suggested being able to output something in the form of:
{'serial-console-speed':'foo', 'grub-serial-order':'bar'}
from a probe so you can then be able to refer to it as:
${ metadata.Probesprobename?serial-console-speed?}
I'd like to be able to do this in order to colocate similar probed things in one probe script.
Attachments
Change History
comment:1 Changed 14 years ago by Travis Campbell <[email protected]…>
comment:2 Changed 14 years ago by desai
- Status changed from new to accepted
- Milestone changed from Bcfg2 1.0.0 Release to Bcfg2 1.0.1 Release
you could do this by either parsing the value of the probe result in your template, or waiting for 1.0.1, where we want to add in support for dumping structured data out of probes in json format.
comment:3 Changed 14 years ago by solj
- Milestone changed from Bcfg2 1.0.1 Release to Bcfg2 1.1.0 Release
comment:4 Changed 13 years ago by solj
- Milestone changed from Bcfg2 1.1.0 Release to Bcfg2 1.2.0 Release
comment:5 Changed 12 years ago by https://www.google.com/accounts/o8/id?id=AItOawnSjgovXZr-_V3vGkvMSR0pc5LDykRc1Nc
- Owner changed from desai to https://www.google.com/accounts/o8/id?id=AItOawnSjgovXZr-_V3vGkvMSR0pc5LDykRc1Nc
comment:6 Changed 12 years ago by https://www.google.com/accounts/o8/id?id=AItOawnSjgovXZr-_V3vGkvMSR0pc5LDykRc1Nc
- Status changed from accepted to closed
- Resolution set to fixed
You can output XML, JSON, or YAML from a probe, and then access it with the .xdata, .json, or .yaml properties of the probe data now.
https://github.com/solj/bcfg2/commit/ac578f15ca785d9b1fcd0d42bfa3ffd017985e78
Resolving.
erg. that didn't work like I wanted.