This is a request for improving data handling in solum service and invovles updating both python-solumclient and also solum service.
1. As per current implementation, sample app create request data looks like below(if parameters file was not provided)
{
"repo_token": "",
"name": "cherrypy",
"languagepack": "python",
"source": {
"repository": "https://github.com/rackspace-solum-samples/solum-python-sample-app.git",
"revision": "master"
},
"version": 1,
"trigger_actions": ["unittest", "build", "deploy"],
"workflow_config": {
"test_cmd": "./unit_tests.sh",
"run_cmd": "python app.py"
},
"ports": [80],
"description": "python web app"
}
2. If parameters file (--param-file) was provided, app create request data looks similar to below (notice 'parameters' in the request data dictionary)
{
"parameters": {
"test_params": {
"api_key": "xxxxxx",
"user_name": "<email address hidden>"
},
"user_params": {
"user_name": "testuser",
"user_password": "testpass"
}
},
"repo_token": "",
"name": "cherrypy",
"languagepack": "python",
"source": {
"repository": "https://github.com/rackspace-solum-samples/solum-python-sample-app.git",
"revision": "master"
},
"version": 1,
"trigger_actions": ["unittest", "build", "deploy"],
"workflow_config": {
"test_cmd": "./unit_tests.sh",
"run_cmd": "python app.py"
},
"ports": [80],
"description": "python web app"
}
3. Proposed suggestion is to send request data in following format when parameters file is provided on the app create, so that 'appdata' and 'parameters' are clearly separated in the request data dictionary.
{
"parameters": {
"test_params": {
"api_key": "xxxxxx",
"user_name": "<email address hidden>"
},
"user_params": {
"user_name": "testuser",
"user_password": "testpass"
}
},
"appdata": {
"repo_token": "",
"name": "cherrypy",
"languagepack": "python",
"source": {
"repository": "https://github.com/rackspace-solum-samples/solum-python-sample-app.git",
"revision": "master"
},
"version": 1,
"trigger_actions": ["unittest", "build", "deploy"],
"workflow_config": {
"test_cmd": "./unit_tests.sh",
"run_cmd": "python app.py"
},
"ports": [80],
"description": "python web app"
}
}
If parameters file is not provided, request data should look like below;
{
"appdata": {
"repo_token": "",
"name": "cherrypy",
"languagepack": "python",
"source": {
"repository": "https://github.com/rackspace-solum-samples/solum-python-sample-app.git",
"revision": "master"
},
"version": 1,
"trigger_actions": ["unittest", "build", "deploy"],
"workflow_config": {
"test_cmd": "./unit_tests.sh",
"run_cmd": "python app.py"
},
"ports": [80],
"description": "python web app"
}
}
Hey Vijendar. You've been inactive on this bug since January 07. Can I assign it to me and fix it?