__init__.py 381 B

123456789101112131415
  1. # -*- coding: utf-8 -*-
  2. from __future__ import absolute_import, print_function, unicode_literals
  3. import random
  4. import string
  5. from salt.ext.six.moves import range
  6. def random_name(size=6):
  7. '''
  8. Generates a random cloud instance name
  9. '''
  10. return 'CLOUD-TEST-' + ''.join(
  11. random.choice(string.ascii_uppercase + string.digits)
  12. for x in range(size)
  13. )