def member_status():
 ret = {'membership': {}, 'summary': {'Valid': 0, 'Leaving': 0, 'Exiting': 0, 'Joining': 0, 'Down': 0}}
 out = __execute_cmd('riak-admin', 'member-status')['stdout'].splitlines()
 for line in out:
  if line.startswith(('=', '-', 'Status')):
   continue
  if ('/' in line):
   for item in line.split('/'):
    (key, val) = item.split(':')
    ret['summary'][key.strip()] = val.strip()
  if (len(line.split()) == 4):
   (status, ring, pending, node) = line.split()
   ret['membership'][node] = {'Status': status, 'Ring': ring, 'Pending': pending}
 return ret

def member_status ( ) : ret = { 'membership' : { } , 'summary' : { 'Valid' : 0 , 'Leaving' : 0 , 'Exiting' : 0 , 'Joining' : 0 , 'Down' : 0 } } out = __execute_cmd ( 'riak-admin' , 'member-status' ) [ 'stdout' ] . splitlines ( ) for line in out : if line . startswith ( ( '=' , '-' , 'Status' ) ) : continue if ( '/' in line ) : for item in line . split ( '/' ) : ( key , val ) = item . split ( ':' ) ret [ 'summary' ] [ key . strip ( ) ] = val . strip ( ) if ( len ( line . split ( ) ) == 4 ) : ( status , ring , pending , node ) = line . split ( ) ret [ 'membership' ] [ node ] = { 'Status' : status , 'Ring' : ring , 'Pending' : pending } return ret
get cluster member status .