def add_user(name, profile='github'):
 client = _get_client(profile)
 organization = client.get_organization(_get_config_value(profile, 'org_name'))
 try:
  github_named_user = client.get_user(name)
 except UnknownObjectException as e:
  log.exception('Resource not found {0}: '.format(str(e)))
  return False
 (headers, data) = organization._requester.requestJsonAndCheck('PUT', ((organization.url + '/memberships/') + github_named_user._identity))
 return (data.get('state') == 'pending')

def add_user ( name , profile = 'github' ) : client = _get_client ( profile ) organization = client . get_organization ( _get_config_value ( profile , 'org_name' ) ) try : github_named_user = client . get_user ( name ) except UnknownObjectException as e : log . exception ( 'Resource not found {0}: ' . format ( str ( e ) ) ) return False ( headers , data ) = organization . _requester . requestJsonAndCheck ( 'PUT' , ( ( organization . url + '/memberships/' ) + github_named_user . _identity ) ) return ( data . get ( 'state' ) == 'pending' )
add a rabbitmq user via rabbitmqctl user_add <user> <password> cli example: .