.. This work is licensed under a Creative Commons Attribution 3.0 Unported License. http://creativecommons.org/licenses/by/3.0/legalcode ========================= Consistent Resource Names ========================= To facilitate better cleanup of ephemeral resources created by Rally, random resource names need to be consistently used across all scenarios and all plugins. Additionally, to support Rally's use against systems other than OpenStack, plugins need greater control over both the format and the list of characters used in generating resource names. Problem description =================== Currently we use a few different cleanup mechanisms, some of which (Keystone) use resource names, while most others use tenant membership. As a result, if Rally is interrupted before cleanup completes it may not be possible to know which resources were created by Rally (and thus should be cleaned up after the fact). Random names are generated from a fairly limited set of digits and ASCII letters. This should be configurable by each plugin, along with all other parts of the random name, in order to support benchmarking systems other than OpenStack, which may have different naming restrictions. Finally, each Rally task should include some consistent element in its resource names, distinct from other Rally tasks, to support multiple independent Rally runs and cleanup. Proposed change =============== Random names will consist of three components: * A random element derived from the task ID that is the same for all random names in the task; * A random element that should be different for all names in the task; and * Any amount of formatting as determined by the plugin. The format of the random name will be given by a class variable, ``RESOURCE_NAME_FORMAT``, on each scenario and context plugin. This variable is a ``mktemp(1)``-like string that describes the format; the default for scenario plugins will be:: RESOURCE_NAME_FORMAT = "s_rally_XXXXXXXX_XXXXXXXX" And for context plugins:: RESOURCE_NAME_FORMAT = "c_rally_XXXXXXXX_XXXXXXXX" The format must have two separate sets of at least three consecutive 'X's. (That is, they must match: ``^.*(?