Skip to content

Instantly share code, notes, and snippets.

@zhyu
Created January 12, 2015 10:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zhyu/360f78140a679317ac62 to your computer and use it in GitHub Desktop.
Save zhyu/360f78140a679317ac62 to your computer and use it in GitHub Desktop.
keys = [
'status',
'temperature',
'power_up',
'glist',
'uncorrected_read',
'uncorrected_write',
]
mappings = {key: deepcopy(mapping) for key in keys}
device = data.plugin_instance
tags['device'] = device
for idx, key in enumerate(keys):
mappings[key][device] = values[idx]
redis_payload = [dict(key='hardware.storage.{0}:{1}'.format(
key, host), mapping=mappings[key]) for key in keys]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment