Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 0 additions & 15 deletions modules/tftp/server.rb
Original file line number Diff line number Diff line change
Expand Up @@ -92,21 +92,6 @@ def pxeconfig_file(mac)
end
end
class Pxelinux < Syslinux; end

class Pxegrub < Server
def pxeconfig_dir
"#{path}/grub"
end

def pxe_default
["#{pxeconfig_dir}/menu.lst", "#{pxeconfig_dir}/efidefault"]
end

def pxeconfig_file(mac)
["#{pxeconfig_dir}/menu.lst.01" + mac.delete(':').upcase, "#{pxeconfig_dir}/01-" + dashed_mac(mac).upcase]
end
end

class Pxegrub2 < Server
def bootloader_path(os, release, arch)
[release, "default"].each do |version|
Expand Down
2 changes: 1 addition & 1 deletion modules/tftp/tftp_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class Api < ::Sinatra::Base
helpers ::Proxy::Helpers
authorize_with_trusted_hosts
authorize_with_ssl_client
VARIANTS = ["Syslinux", "Pxelinux", "Pxegrub", "Pxegrub2", "Ztp", "Poap", "Ipxe"].freeze
VARIANTS = ["Syslinux", "Pxelinux", "Pxegrub2", "Ztp", "Poap", "Ipxe"].freeze

helpers do
def instantiate(variant, mac = nil)
Expand Down
5 changes: 0 additions & 5 deletions test/tftp/tftp_api_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,6 @@ def test_instantiate_pxelinux
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
end

def test_instantiate_pxegrub2
obj = app.helpers.instantiate "pxegrub2", "AA:BB:CC:DD:EE:FF"
assert_equal "Proxy::TFTP::Pxegrub2", obj.class.name
Expand Down
10 changes: 0 additions & 10 deletions test/tftp/tftp_server_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -102,16 +102,6 @@ def setup_paths
end
end

class TftpPxegrubServerTest < Test::Unit::TestCase
include TftpGenericServerSuite

def setup_paths
@subject = Proxy::TFTP::Pxegrub.new
@pxe_config_files = ["grub/menu.lst.01AABBCCDDEEFF", "grub/01-AA-BB-CC-DD-EE-FF"]
@pxe_default_files = ["grub/menu.lst", "grub/efidefault"]
end
end

class TftpPxegrub2ServerTest < Test::Unit::TestCase
include TftpGenericServerSuite

Expand Down