__init__.py 375 B

12345678910111213141516
  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) for x in range(size)
  12. )