Bug #19476

Smart proxy features list should be returned from #refresh API call

Added by Dominic Cleal 12 months ago. Updated 11 months ago.

Status:Closed
Priority:Normal
Assigned To:Dominic Cleal
Category:API
Target version:-
Difficulty: Bugzilla link:
Found in release: Pull request:https://github.com/theforeman/foreman/pull/4511
Story points-
Velocity based estimate-
Release1.16.0Release relationshipAuto

Description

When issuing PUT /api/smart_proxies/:id/refresh to Api::V2::SmartProxiesController#refresh, the API response does not contain the feature list:

[ INFO 2017-05-08T15:56:04 API] Server: http://localhost:3000/
[ INFO 2017-05-08T15:56:04 API] PUT /api/smart_proxies/6/refresh
[DEBUG 2017-05-08T15:56:04 API] Params: {}
[DEBUG 2017-05-08T15:56:04 API] Headers: {}
[DEBUG 2017-05-08T15:56:04 API] Using authenticator: HammerCLIForeman::Api::InteractiveBasicAuth
[DEBUG 2017-05-08T15:56:04 API] Response: {
              "id" => 6,
            "name" => "cobalt",
             "url" => "http://cobalt:8443",
      "created_at" => "2013-10-07T10:27:13.104Z",
      "updated_at" => "2017-05-08T14:55:36.698Z",
    "expired_logs" => "1469699580" 
}

The response should match the GET request with a full list of features:

[ INFO 2017-05-08T15:57:47 API] Server: http://localhost:3000/
[ INFO 2017-05-08T15:57:47 API] GET /api/smart_proxies/6
[DEBUG 2017-05-08T15:57:47 API] Params: {}
[DEBUG 2017-05-08T15:57:47 API] Headers: {
    :params => {}
}
[DEBUG 2017-05-08T15:57:47 API] Using authenticator: HammerCLIForeman::Api::InteractiveBasicAuth
[DEBUG 2017-05-08T15:57:47 API] Response: {
    "created_at" => "2013-10-07 10:27:13 UTC",
    "updated_at" => "2017-05-08 14:55:36 UTC",
          "name" => "cobalt",
            "id" => 6,
           "url" => "http://cobalt:8443",
      "features" => [
        [0] {
            "name" => "TFTP",
              "id" => 1
        },
        [1] {
            "name" => "DNS",
              "id" => 2
        },
        [2] {
            "name" => "BMC",
              "id" => 6
        },
        [3] {
            "name" => "Logs",
              "id" => 13
        }
    ]
}

This will allow for the refreshed features to be validated.

Associated revisions

Revision 7bc914eb
Added by Dominic Cleal 12 months ago

fixes #19476 - list features in smart proxy refresh API response

History

#1 Updated by The Foreman Bot 12 months ago

  • Status changed from Assigned to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/4511 added

#2 Updated by Dominic Cleal 12 months ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100

#3 Updated by Marek Hulán 11 months ago

  • Release set to 1.16.0

Also available in: Atom PDF