Lists all profiles api'sURL and response inconsistent

Bug #1887209 reported by Xinxin Shen
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
StarlingX
Fix Released
Low
Xinxin Shen

Bug Description

I get an error when using the API interface (/v1/iprofiles and /v1/iprofiles/{profile_id}) in the API documentation.

1.Execute the following URL command
  curl -i http://192.168.204.1:6385/v1/iprofiles -X GET -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
 Content-Type: application/json
 Content-Length: 85
 Date: Sat, 11 Jul 2020 10:21:51 GMT
 {"error_message": "{\"code\": 404, \"description\": \"\", \"title\": \"Not Found\"}"}

2.Error cause analysis
a.The API docs documentation is incorrect, the URL interface in the api documentation is
  v1/iprofiles
https://docs.starlingx.io/api-ref/config/api-ref-sysinv-v1-config.html?expanded=lists-all-profiles-detail#lists-all-profiles
b.The url in the code interface in the code is v1/iprofile, which is inconsistent with the
  api docs
https://github.com/starlingx/config/blob/master/sysinv/cgts-client/cgts-client/cgtsclient/v1/iprofile.py#L20

Tags: stx.config
Xinxin Shen (runsxx)
Changed in starlingx:
assignee: nobody → Xinxin Shen (runsxx)
Xinxin Shen (runsxx)
description: updated
Xinxin Shen (runsxx)
description: updated
Ghada Khalil (gkhalil)
Changed in starlingx:
importance: Undecided → Low
tags: added: stx.config
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to config (master)

Reviewed: https://review.opendev.org/740446
Committed: https://git.openstack.org/cgit/starlingx/config/commit/?id=9c80bd9dfac67841dd9d362bec6fc4442d3ac0be
Submitter: Zuul
Branch: master

commit 9c80bd9dfac67841dd9d362bec6fc4442d3ac0be
Author: XinxinShen <email address hidden>
Date: Fri Jul 10 17:51:23 2020 +0800

    Update API documentation

    An error occurred when using the profile part of the API documentation
    (/v1/iprofiles and /v1/iprofiles/{profile_id}). After analyzing the code,
    I found that the URLs set in the code are /v1/profile and
    /v1/iprofile/{profile_id}. This is inconsistent with the API documentation,
    so update the profile section of the API documentation.

    Closes-Bug: #1887209

    Change-Id: Id1222178ad0364ff712121566481448e873c5245
    Signed-off-by: Xinxin Shen <email address hidden>

Changed in starlingx:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.