Last active
August 29, 2015 14:03
-
-
Save etrepum/0a57470f371d489cf2f3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
INPUT_TEXT="""\ | |
Processor : Intel(R) Xeon(R) CPU E5-2420 v2 @ 2.20GHz (24 cores/threads) | |
Memory : 81877MB | |
Controller Slot : 0 | |
BIOS : 3.0a 11/12/2013 3.1 | |
IPMI FW rev : 2.20 | |
Canister firmware : 2.2.26 | |
Canister firmware date : Feb 5 2013 20:54:00 | |
""" | |
data = {} | |
for line in INPUT_TEXT.splitlines(): | |
key, delimiter, value = line.partition(':') | |
if delimiter: | |
data[key.strip()] = value.strip() | |
info = ['IPMI FW rev','BIOS','Canister firmware','Memory','Controller Slot'] | |
for key in info: | |
print('{0}: {1}'.format(key, data[key])) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment