Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fixes #15864 - Pxelinux alias variant for Syslinux
  • Loading branch information
lzap authored and domcleal committed Jul 29, 2016
1 parent 7bd71b5 commit 056e0c4
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions modules/tftp/server.rb
Expand Up @@ -74,6 +74,7 @@ def pxeconfig_file mac
["#{pxeconfig_dir}/01-"+mac.gsub(/:/,"-").downcase]
end
end
class Pxelinux < Syslinux; end

class Pxegrub < Server
def pxeconfig_dir
Expand Down
2 changes: 1 addition & 1 deletion modules/tftp/tftp_api.rb
Expand Up @@ -8,7 +8,7 @@ class Api < ::Sinatra::Base
helpers ::Proxy::Helpers
authorize_with_trusted_hosts
authorize_with_ssl_client
VARIANTS = ["Syslinux", "Pxegrub", "Pxegrub2", "Ztp", "Poap"].freeze
VARIANTS = ["Syslinux", "Pxelinux", "Pxegrub", "Pxegrub2", "Ztp", "Poap"].freeze

helpers do
def instantiate variant, mac=nil
Expand Down
5 changes: 5 additions & 0 deletions test/tftp/tftp_api_test.rb
Expand Up @@ -25,6 +25,11 @@ def test_instantiate_syslinux
assert_equal "Proxy::TFTP::Syslinux", obj.class.name
end

def test_instantiate_pxelinux
obj = app.helpers.instantiate "pxelinux", "AA:BB:CC:DD:EE:FF"
assert_equal "Proxy::TFTP::Pxelinux", obj.class.name
end

def test_instantiate_pxegrub
obj = app.helpers.instantiate "pxegrub", "AA:BB:CC:DD:EE:FF"
assert_equal "Proxy::TFTP::Pxegrub", obj.class.name
Expand Down

0 comments on commit 056e0c4

Please sign in to comment.