2020-09-25 08:01:39 |
YuehuiLei |
description |
Update API documentation of partitions (POST) |
An error occurred when using the partitions part of the API documentation
(POST /v1/ihosts/{host_id}/partitions). After analyzing the code,
I found that the URLs set in the code are /v1/partitions.
This is inconsistent with the API documentation,
so update the partitions section of the API documentation.
1.Execute the following URL command
curl -i http://192.168.204.1:6385/v1/ihosts/{host_id}/partitions -X POST -H "Content-Type: application/json" -H "Accept: application/json" -H "X-Auth-Token: ${TOKEN}"
The following results are returned:
HTTP/1.1 404 Not Found
2.Error cause analysis
a.The API docs documentation is incorrect, the URL interface in the api documentation is
v1/ihosts/{host_id}/partitions
https://docs.starlingx.io/api-ref/config/api-ref-sysinv-v1-config.html?expanded=creates-a-ceph-storage-function-on-a-specific-host-detail,creates-a-partition-on-a-specific-disk-of-a-host-detail#volume-groups
b.The url in the code interface in the code is /v1/partitions, which is inconsistent with the api docs
https://github.com/starlingx/config/blob/5d29b9e0d9fbee1733e915275763a2cc46e35407/sysinv/cgts-client/cgts-client/cgtsclient/v1/partition.py#L39 |
|
2020-09-25 09:27:13 |
YuehuiLei |
description |
An error occurred when using the partitions part of the API documentation
(POST /v1/ihosts/{host_id}/partitions). After analyzing the code,
I found that the URLs set in the code are /v1/partitions.
This is inconsistent with the API documentation,
so update the partitions section of the API documentation.
1.Execute the following URL command
curl -i http://192.168.204.1:6385/v1/ihosts/{host_id}/partitions -X POST -H "Content-Type: application/json" -H "Accept: application/json" -H "X-Auth-Token: ${TOKEN}"
The following results are returned:
HTTP/1.1 404 Not Found
2.Error cause analysis
a.The API docs documentation is incorrect, the URL interface in the api documentation is
v1/ihosts/{host_id}/partitions
https://docs.starlingx.io/api-ref/config/api-ref-sysinv-v1-config.html?expanded=creates-a-ceph-storage-function-on-a-specific-host-detail,creates-a-partition-on-a-specific-disk-of-a-host-detail#volume-groups
b.The url in the code interface in the code is /v1/partitions, which is inconsistent with the api docs
https://github.com/starlingx/config/blob/5d29b9e0d9fbee1733e915275763a2cc46e35407/sysinv/cgts-client/cgts-client/cgtsclient/v1/partition.py#L39 |
An error occurred when using the partitions part of the API documentation
(POST /v1/ihosts/{host_id}/partitions). After analyzing the code,
I found that the URLs set in the code are /v1/partitions.
This is inconsistent with the API documentation,
so update the partitions section of the API documentation.
1.Execute the following URL command
curl -i http://192.168.204.1:6385/v1/ihosts/{host_id}/partitions -X POST -H "Content-Type: application/json" -H "Accept: application/json" -H "X-Auth-Token: ${TOKEN}"
The following results are returned:
HTTP/1.1 404 Not Found
2.Error cause analysis
a.The API docs documentation is incorrect, the URL interface in the api documentation is
v1/ihosts/{host_id}/partitions
https://docs.starlingx.io/api-ref/config/api-ref-sysinv-v1-config.html#partitions
b.The url in the code interface in the code is /v1/partitions, which is inconsistent with the api docs
https://github.com/starlingx/config/blob/5d29b9e0d9fbee1733e915275763a2cc46e35407/sysinv/cgts-client/cgts-client/cgtsclient/v1/partition.py#L39 |
|