summaryrefslogtreecommitdiffstats
path: root/nova/log.py
diff options
context:
space:
mode:
authorJustin Santa Barbara <justin@fathomdb.com>2011-02-23 22:50:33 +0000
committerTarmac <>2011-02-23 22:50:33 +0000
commitcd301d67506bcb6d67d921492435e9d7d56aafb1 (patch)
tree77667bd9ef0841c3622670ed97d0a63c18e8e7d6 /nova/log.py
parented9bdfc8b61470bbe3f61ef7bf3f3044f8483b8a (diff)
parent8c007b56b586257d048b6db4ecfbed8f502381fd (diff)
downloadnova-cd301d67506bcb6d67d921492435e9d7d56aafb1.tar.gz
nova-cd301d67506bcb6d67d921492435e9d7d56aafb1.tar.xz
nova-cd301d67506bcb6d67d921492435e9d7d56aafb1.zip
Helper function that supports XPath style selectors to traverse an object tree e.g.
inst = {'fixed_ip': {'floating_ips': [{'address': '1.2.3.4'}], 'address': '192.168.0.3'}, 'hostname': ''} private_ips = get_from_path(inst, 'fixed_ip/address') public_ips = get_from_path(inst, 'fixed_ip/floating_ips/address') Avoids messy [.get() / if / for]* nested code
Diffstat (limited to 'nova/log.py')
0 files changed, 0 insertions, 0 deletions