def joyent_node_state(id_):
 states = {'running': 0, 'stopped': 2, 'stopping': 2, 'provisioning': 3, 'deleted': 2, 'unknown': 4}
 if (id_ not in states):
  id_ = 'unknown'
 return node_state(states[id_])

def joyent_node_state ( id_ ) : states = { 'running' : 0 , 'stopped' : 2 , 'stopping' : 2 , 'provisioning' : 3 , 'deleted' : 2 , 'unknown' : 4 } if ( id_ not in states ) : id_ = 'unknown' return node_state ( states [ id_ ] )
convert joyent returned state to state common to other data center return values for consistency .