Separate app-data and param-data

Bug #1531609 reported by Vijendar Komalla on 2016-01-06
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Solum
Low
Unassigned
python-solumclient
Low
Unassigned

Bug Description

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"
 }
}

description: updated
Changed in solum:
assignee: nobody → Vijendar Komalla (vijendar-komalla)
affects: solum → python-solumclient
Changed in python-solumclient:
assignee: Vijendar Komalla (vijendar-komalla) → nobody
assignee: nobody → Vijendar Komalla (vijendar-komalla)
Changed in solum:
assignee: nobody → Vijendar Komalla (vijendar-komalla)
Changed in solum:
importance: Undecided → Low
Changed in python-solumclient:
importance: Undecided → Low
Marcellin Fom Tchassem (mf6510) wrote :

Hey Vijendar. You've been inactive on this bug since January 07. Can I assign it to me and fix it?

Changed in python-solumclient:
assignee: Vijendar Komalla (vijendar-komalla) → Marcellin Fom Tchassem (mf6510)
Changed in solum:
assignee: Vijendar Komalla (vijendar-komalla) → Marcellin Fom Tchassem (mf6510)
status: New → In Progress
Changed in python-solumclient:
status: New → In Progress
Changed in solum:
status: In Progress → Confirmed
Changed in solum:
status: Confirmed → New
Changed in python-solumclient:
status: In Progress → New
Changed in python-solumclient:
assignee: Marcellin Fom Tchassem (mf6510) → nobody
Changed in solum:
assignee: Marcellin Fom Tchassem (mf6510) → nobody

Hi Marcellin,

Thanks for looking into this bug. Let us know if you need any help on the bug.

You can find us on Solum IRC channel (#solum) on chat.freenode.net

Changed in solum:
assignee: nobody → Marcellin Fom Tchassem (mf6510)
Changed in python-solumclient:
assignee: nobody → Marcellin Fom Tchassem (mf6510)
description: updated
description: updated
description: updated
Changed in solum:
milestone: none → next-mitaka
Changed in python-solumclient:
milestone: none → next-mitaka
Changed in python-solumclient:
assignee: Marcellin Fom Tchassem (mf6510) → nobody
Changed in solum:
assignee: Marcellin Fom Tchassem (mf6510) → nobody
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers