#!/usr/bin/python3

from __future__ import division

from builtins import range
import sys
import csv
import math


first_user = 5000
add_users = 1000
snom_models = ["370", "710", "720", "821"]
#astra_models = ["6731i", "6757i"]
filename = sys.argv[1]


with open("%s" %(filename), 'wb') as csvfile:
    writer = csv.writer(csvfile, delimiter='|')

    for user in range(add_users):
        #if (user / add_users < 0.5):
            model = int(math.floor(user * (len(snom_models) / add_users)))
            writer.writerow([500000000000 + first_user + user, "Snom", snom_models[model], "xivo-snom-8.7.5.35", "showroom"])
        #else:
        #    model = int(math.floor(user * (len(astra_models) / add_users)))
        #    writer.writerow([500000000000 + first_user + user, "aastra", astra_models[model]])
