Example #1
0
 def upgrade_template(template_name, title_postfix=None, **kwargs):
     """Return updated template json with random title by template name"""
     obj_title = append_random_string(template_name)
     if title_postfix is not None:
         obj_title += title_postfix
     return TemplateProvider.get_template_as_dict(template_name,
                                                  title=obj_title,
                                                  **kwargs)
Example #2
0
 def _generate_title(cls, ca_type):
     """Generate title according to CustomAttribute type."""
     special_chars = string_utils.SPECIAL
     return append_random_string("{}_{}_".format(
         ca_type, random_string(size=len(special_chars),
                                chars=special_chars)))