2014-08-27 11:17:06 -04:00
|
|
|
from __future__ import unicode_literals
|
2013-08-07 20:32:29 -04:00
|
|
|
import random
|
|
|
|
import string
|
|
|
|
|
|
|
|
|
|
|
|
def random_job_id(size=13):
|
|
|
|
chars = range(10) + list(string.uppercase)
|
|
|
|
job_tag = ''.join(unicode(random.choice(chars)) for x in range(size))
|
2013-10-03 20:34:13 -04:00
|
|
|
return 'j-{0}'.format(job_tag)
|
2013-08-07 20:32:29 -04:00
|
|
|
|
|
|
|
|
|
|
|
def random_instance_group_id(size=13):
|
|
|
|
chars = range(10) + list(string.uppercase)
|
|
|
|
job_tag = ''.join(unicode(random.choice(chars)) for x in range(size))
|
2013-10-03 20:34:13 -04:00
|
|
|
return 'i-{0}'.format(job_tag)
|