Created
November 7, 2014 23:38
-
-
Save concubidated/cb101a473c5a02ec1988 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
#!/usr/bin/env python | |
import sys | |
import simplejson as json | |
obj=json.load(sys.stdin) | |
epoch = str(obj['monmap']['epoch']) | |
print "dumped monmap epoch "+epoch | |
print "epoch "+epoch | |
print "fsid "+obj['monmap']['fsid'] | |
print "last changed "+obj['monmap']['modified'] | |
print "created "+obj['monmap']['created'] | |
for mons in obj['monmap']['mons']: | |
print str(mons['rank'])+":", | |
print mons['addr'], | |
print "mon."+mons['name'] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment