Skip to content

Commit 42f3c64

Browse files
committed
Add knife_version as constant in Pedant::Config, read that in request.rb
Signed-off-by: neha-p6 <neha.pansare@progress.com>
1 parent 4ad2c31 commit 42f3c64

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

oc-chef-pedant/lib/pedant/request.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,7 @@ def server_api_version
3636

3737
# Grab the the version of Chef / Knife that's on the box in order
3838
# to properly set the X-Chef-Version header
39-
KNIFE_VERSION = "18.8.46" # This version should be updated manually to point to valid chef release.
40-
# FYI, this must be a valid, shipping version of Chef, or the server will reject requests.
39+
KNIFE_VERSION = Pedant::Config.knife_version
4140

4241
# Headers that are added to all requests
4342
def standard_headers

omnibus/files/server-ctl-cookbooks/infra-server/templates/default/pedant_config.rb.erb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,3 +204,6 @@ role "<%= @role %>"
204204

205205
include_version_in_status <%= node['private_chef']['opscode-erchef']['include_version_in_status'] %>
206206
include_x_ops_api_info <%= node['private_chef']['opscode-erchef']['include_x_ops_api_info'] %>
207+
208+
# Chef/knife version number required in request.rb
209+
knife_version "18.8.46" # Bump this as needed

0 commit comments

Comments
 (0)