Hi,
I'm quite new to Sal and Python and have ran into a slight snag.
I'm trying to create a list plugin in Sal where I'd like to use the string that is being set in Munki's Conditional Items, however, I'm having some trouble retrieving the data.
I've based my plugin on the standard MunkiVersion plugin and I'm trying to use the .values() method to retrieve the data that was set by Munki but for some reason, nothing gets returned.
I've verified that the data is present in Sal under "MSC Conditions" for the specific machine and I can use the .filter() method to get boolean data:
machines.filter(conditions__condition_name='flash_version', conditions__condition_data='22.0.0.209')
When I try to get the value by using something like this, nothing gets returned:
machines.values(conditions__condition_name='flash_version')
While troubleshooting, I ran machines.values() and noticed that not all data is formated the same. It looks like some data uses JSON format wile other uses plist format:
'munki_version': u'2.8.0.2810',
<key>flash_version</key>\n\t\t<string>22.0.0.209</string>\n\t\t
After some trial and error, I found that the .values() method is only possible to use on data that's formated in JSON.
Am I missing something or is Sal simply not designed to be able to do this?
Thanks!