Skip to content

Instantly share code, notes, and snippets.

@tmkasun

tmkasun/create_users.py

Last active Jul 26, 2016
Embed
What would you like to do?
Sample user creation tool for WSO2 ES bulk user uploading
HEADER_STRING = "Username,Password,Claims,"
data_line = "{0},{0},http://{1}//claims/emailaddress={0}@{1},{2}\n"
file_string = HEADER_STRING + "\n"
domain = "knnect.com"
role = "http://wso2.org/claims/role=admin"
name_template = "user{}"
users_count = 51
with open(r'usernames.csv','w') as sample_file:
for index in range(1, users_count):
current_name = name_template.format(index)
file_string += data_line.format(current_name, domain, role)
sample_file.write(file_string)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.