Modify

Ticket #710 (closed enhancement: fixed)

Opened 12 years ago

Last modified 10 years ago

Output multiple variables from a single probe for use with TGenshi

Reported by: Travis Campbell <hcoyote@…> 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 12 years ago by Travis Campbell <hcoyote@…>

erg. that didn't work like I wanted.

${ metadata.Probes['probename']['serial-console-speed']}

comment:2 Changed 12 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 12 years ago by solj

  • Milestone changed from Bcfg2 1.0.1 Release to Bcfg2 1.1.0 Release

comment:4 Changed 11 years ago by solj

  • Milestone changed from Bcfg2 1.1.0 Release to Bcfg2 1.2.0 Release

comment:5 Changed 10 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 10 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.

WARNING! You need to establish a session before you can create or edit tickets. Otherwise the ticket will get treated as spam.

View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
The resolution will be deleted. Next status will be 'reopened'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.