2014-08-27 15:17:06 +00:00
|
|
|
from __future__ import unicode_literals
|
2013-08-08 00:32:29 +00: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-04 00:34:13 +00:00
|
|
|
return 'j-{0}'.format(job_tag)
|
2013-08-08 00:32:29 +00: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-04 00:34:13 +00:00
|
|
|
return 'i-{0}'.format(job_tag)
|