Skip to content

Commit

Permalink
Only send back the issue ids on eval.
Browse files Browse the repository at this point in the history
  • Loading branch information
Gerrit91 committed Oct 10, 2023
1 parent b7feec1 commit e1bf2de
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 11 deletions.
8 changes: 1 addition & 7 deletions cmd/metal-api/internal/service/machine-service.go
Original file line number Diff line number Diff line change
Expand Up @@ -617,13 +617,7 @@ func (r *machineResource) issues(request *restful.Request, response *restful.Res
for _, issue := range machineWithIssues.Issues {
issue := issue

entry.Issues = append(entry.Issues, v1.MachineIssue{
ID: string(issue.Type),
Severity: string(issue.Severity),
Description: issue.Description,
RefURL: issue.RefURL,
Details: issue.Details,
})
entry.Issues = append(entry.Issues, string(issue.Type))
}

issueResponse = append(issueResponse, entry)
Expand Down
4 changes: 2 additions & 2 deletions cmd/metal-api/internal/service/v1/machine.go
Original file line number Diff line number Diff line change
Expand Up @@ -287,8 +287,8 @@ type MachineVPN struct {
}

type MachineIssueResponse struct {
MachineID string `json:"machineid" description:"the machine id that has the given issues"`
Issues []MachineIssue `json:"issues" description:"the list of issues of this machine"`
MachineID string `json:"machineid" description:"the machine id that has the given issues"`
Issues []string `json:"issues" description:"the list of issues (only issue ids) of this machine"`
}

type MachineIssue struct {
Expand Down
4 changes: 2 additions & 2 deletions spec/metal-api.json
Original file line number Diff line number Diff line change
Expand Up @@ -2770,9 +2770,9 @@
"v1.MachineIssueResponse": {
"properties": {
"issues": {
"description": "the list of issues of this machine",
"description": "the list of issues (only issue ids) of this machine",
"items": {
"$ref": "#/definitions/v1.MachineIssue"
"type": "string"
},
"type": "array"
},
Expand Down

0 comments on commit e1bf2de

Please sign in to comment.