support use of id or name when referring to resource in rally scenario args
Currently rally scenario arguments only accept uuid for resources. For this feature we will add a preprocessor phase to the scenario lifecycle which can be used to transform scenario arguments. The initial use case for transformations will be to allow users to pass names instead of uuids for resources.
For example, the json blobs below show arguments to the NovaServers.
*** pre-transform
{
"NovaServer
{
"args": {
},
...
}
*** post-transform
{
"NovaServer
{
"args": {
},
...
}
Step 1: Add new decorator for benchmark scenario (in benchmark.process module):
def arg(func) # it is similar to validators
Step 2: Add two function for processing arguments
def flavor_
def transformer(**kw):
return kw
return transformer
def flavor(src, dest):
return arg(flavor_
Step 3: Add to all benchmarks, that accept smart args (flavor, image)
@process.
Step 4: Run all processing function 1by1 after context & before running benchmark
Step 5: Partial fix for validation method (they should use by hand transformers) It will be in future changed.
Blueprint information
- Status:
- Complete
- Approver:
- Boris Pavlovic
- Priority:
- High
- Drafter:
- Marco Morais
- Direction:
- Approved
- Assignee:
- Marco Morais
- Definition:
- Approved
- Series goal:
- None
- Implementation:
- Implemented
- Milestone target:
- None
- Started by
- Boris Pavlovic
- Completed by
- Boris Pavlovic
Related branches
Related bugs
Sprints
Whiteboard
Gerrit topic: https:/
Addressed by: https:/
[WIP] pass id or name when referring to resources in scenario config
Work Items
Dependency tree
* Blueprints in grey have been implemented.