Bug 156: Option to create partition and mount from REST API
Review Request #296 — Created June 21, 2024 and submitted — Latest diff uploaded
| Information | |
|---|---|
| apoorva.sn | |
| AMP | |
| amp_3_6_0 | |
| 156 | |
| Reviewers | |
| pmurugaiyan, prajesh, shuinvy | |
Problem
Need option to find the free space available and provide the secondary storage information to the users. This is one time option provided to users.
The user can choose ‘primary’ or ‘secondary’ storage locations for storing logs
Solution
Implemented 3 API's
GET /log/location: which will provide details of the current log location
Response:
{
"location": "primary"
}POST/PUT /log/location: which will set the log location to 'primary' or 'secondary'
Request:
{
"location": "secondary"
}
Response:
{
"status": "success"
}- GET /log/storage?type=secondary
Response:
{
"used": 38797312,
"free": 9878424780,
"is_mounted": true,
"is_disk_available": true,
"total": 10522669875,
"disk_name": "/dev/sdb"
}
Tested the above API's through postman and verified the reponse. Also peri also tested from the UI side and it is working fine
