-
Story
-
Resolution: Done
-
Medium
-
None
-
None
-
None
-
RICP_T1 Sprint C.P1
- This is a new Generic API to update (list) of E2M Parameters through the REST API. See AID link in the Epic.
- Currently the only Element is the Key = "enableRic" while the value are Boolean (is the value True / False are case insensitive? please check)
- The E2M is not "forward compatible" - each parameter (key) should be known, from the list of allowed Keys (Currently - only one). Else - HTTP 400 Bad Request with error code 401.
- Each parameter (Value) should be one of the allowed syntax. Else - HTTP 400 Bad Request with error code 401.
- If OK - set the parameter (In the cache) with the allowed value. Write it to Redis (regardless if there was a change).
- Return 200 OK with the list (only one...) parameter is succeed to write to Redis. Return 500 Internal Server Error with Error Code 500 RNIB error.
The DB should be initialized before deployment.
Therefore, in Restart we are just reading it. If missing - Error to Console and suicide.
Test Plan
Given no Set Parameters request
When install e2mgr
Then general table should contain default value {"enableRic" : true}
Given general table: {"enableRic" : true}
When client send Set Parameters {"enableRic" : false}
Then general table: {"enableRic" : false} and return 200 with body: {"enableRic" : false}
Given general table: {"enableRic" : false}
When client send Set Parameters {"enableRic" : true}
Then general table: {"enableRic" : true} and return 200 with body: {"enableRic" : true}
Given general table: {"enableRic" : false}
When client send Set Parameters {"enableRic" : true, "someValue": true}
Then general table: {"enableRic" : false} and return 400 Bad Request with error code 401
Given rnib is down
When client send Set Parameters {"enableRic" : true}
Then return 500 Internal Server Error with Error Code 500 RNIB error
1.
|
Add General Parameters to rnib reader | Done | Irina Rotem |
|
|||||||||
2.
|
Swagger | Done | Irina Rotem |
|
|||||||||
3.
|
Add General Parameters to e2mgr | Done | Irina Rotem |
|
|||||||||
4.
|
DevOps: create script for default general params | Done | Areli Fuss | ||||||||||
5.
|
Automation | Done | Irina Rotem |
|
|||||||||
6.
|
Code review | Done | Irina Rotem | ||||||||||
7.
|
Unit tests and coverage | Done | Irina Rotem |
|