Skip to content

Commit

Permalink
Final removal of go.universe.tf/netboot:
Browse files Browse the repository at this point in the history
go.universe.tf/netboot is being remove in favor of
github.com/insomniacslk/dhcp

Signed-off-by: Jacob Weinstock <jakobweinstock@gmail.com>
  • Loading branch information
jacobweinstock committed Nov 6, 2021
1 parent cf4ca30 commit d82349b
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 609 deletions.
17 changes: 4 additions & 13 deletions cli/binary.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import (
"sort"
"strconv"

"github.com/insomniacslk/dhcp/iana"
"github.com/jacobweinstock/proxydhcp/proxy"
"github.com/olekukonko/tablewriter"
"github.com/peterbourgon/ff/v3"
Expand Down Expand Up @@ -112,7 +113,7 @@ func jsonOut(w io.Writer) {
Binary: ipxe,
})
}
for arch, ipxe := range proxy.DefaultsHTTP {
for arch, ipxe := range proxy.ArchToBootFile {
output = append(output, spec{
ID: int(arch),
Arch: arch.String(),
Expand All @@ -136,18 +137,8 @@ func table(w io.Writer) {
}
sort.Ints(unsortedDefaults)
for _, elem := range unsortedDefaults {
ipxe := proxy.Defaults[proxy.Architecture(elem)]
table.Append([]string{strconv.Itoa(elem), proxy.Architecture(elem).String(), ipxe})
}

var unsortedDefaultsHTTP []int
for arch := range proxy.DefaultsHTTP {
unsortedDefaultsHTTP = append(unsortedDefaultsHTTP, int(arch))
}
sort.Ints(unsortedDefaultsHTTP)
for _, elem := range unsortedDefaultsHTTP {
ipxe := proxy.DefaultsHTTP[proxy.Architecture(elem)]
table.Append([]string{strconv.Itoa(elem), proxy.Architecture(elem).String(), fmt.Sprintf(ipxe, "<IP>")})
ipxe := proxy.ArchToBootFile[iana.Arch(elem)]
table.Append([]string{strconv.Itoa(elem), iana.Arch(elem).String(), ipxe})
}

table.Render()
Expand Down
3 changes: 1 addition & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ require (
github.com/peterbourgon/ff/v3 v3.1.2
github.com/pkg/errors v0.9.1
go.uber.org/zap v1.19.0
go.universe.tf/netboot v0.0.0-20210617221821-fc2840fa7b05
golang.org/x/net v0.0.0-20210825183410-e898025ed96a
golang.org/x/net v0.0.0-20210825183410-e898025ed96a // indirect
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9
inet.af/netaddr v0.0.0-20210903134321-85fa6c94624e
)
Expand Down
Loading

0 comments on commit d82349b

Please sign in to comment.