Change Summary:
Added constants file
Review Request #317 — Created July 8, 2024 and submitted
| Information | |
|---|---|
| apoorva.sn | |
| AMP | |
| amp_bug_fixes_base_3_6_0 | |
| 757 | |
| Reviewers | |
| pmurugaiyan, prajesh, shuinvy | |
Problem
Need option to archive or unarchive logs to external(secondary) disk. Extending this functionality to archive or unarchive to Primary storage as well
Solution
Introduced new URL's from REST API to archive and unarhive and list the archived files
POST /log/archive To archive the log files in Primary or Secondary location
POST log/unarchive To UnArchive the log files in Primary or Secondary location
GET archives?location=(primary or secondary) To list the archive files in primary or secondary location
Tested the URL's from REST API
GET https://192.168.162.141:8888/log/archives?location=primary
{
"status": "success",
"file_list": [
"logs_20240705_112441.zip",
"logs_20240705_102133.zip",
"logs_20240705_102715.zip",
"logs_20240705_103751.zip",
"logs_20240705_100501.zip"
]
}POST https://192.168.162.141:8888/log/archive
Request:{
"location": "secondary"
}Response:
{
"status": "Archive logs_20240708_084453.zip was successfully created in secondary storage"
}POST https://192.168.162.141:8888/log/unarchive
Request:
{
"filename": "logs_20240705_112548.zip",
"location": "secondary"
}Response:
{
"status": "logs_20240705_112548.zip is extracted successfully in secondary storage"
}
Added constants file
| branches/amp_bug_fixes_base_3_6_0/src/webui/webui/htdocs/new/src/hive/log_location.py (Diff revision 2) |
|---|
archivefiles => arhive ?
| branches/amp_bug_fixes_base_3_6_0/src/webui/webui/htdocs/new/src/hive/log_location.py (Diff revision 2) |
|---|
can we have only one HTTP method to support a particular API. PUT is generally for update. We can POST here.. same is the case with arhcive,
Addressed review comments
Diff: |
Revision 3 (+241 -33)
|
|---|
Testing Done: |
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Diff: |
Revision 4 (+247 -34)
|
Description: |
|
|---|