Rename pkg/warewulfconf to pkg/config
Signed-off-by: Jonathon Anderson <janderson@ciq.co>
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -25,10 +25,11 @@
|
||||
/etc/bash_completion.d/
|
||||
warewulf.spec
|
||||
internal/pkg/buildconfig/setconfigs.go
|
||||
internal/pkg/warewulfconf/buildconfig.go
|
||||
internal/pkg/config/buildconfig.go
|
||||
include/systemd/warewulfd.service
|
||||
_dist/
|
||||
config
|
||||
!internal/pkg/config
|
||||
warewulf-*.tar.gz
|
||||
Defaults.mk
|
||||
/etc/wwapid.config
|
||||
|
||||
8
Makefile
8
Makefile
@@ -151,7 +151,7 @@ vet:
|
||||
go vet ./...
|
||||
|
||||
test-it:
|
||||
go test -v ./... -ldflags="-X 'github.com/hpcng/warewulf/internal/pkg/warewulfconf.ConfigFile=$(shell pwd)/etc/warewulf.conf'"
|
||||
go test -v ./... -ldflags="-X 'github.com/hpcng/warewulf/internal/pkg/config.ConfigFile=$(shell pwd)/etc/warewulf.conf'"
|
||||
|
||||
# Generate test coverage
|
||||
test-cover: ## Run test coverage and generate html report
|
||||
@@ -219,13 +219,13 @@ init:
|
||||
wwctl: $(WWCTL_DEPS)
|
||||
@echo Building "$@"
|
||||
@cd cmd/wwctl; GOOS=linux go build -mod vendor -tags "$(WW_GO_BUILD_TAGS)" \
|
||||
-ldflags "-X 'github.com/hpcng/warewulf/internal/pkg/warewulfconf.ConfigFile=$(SYSCONFDIR)/warewulf/warewulf.conf'" \
|
||||
-ldflags "-X 'github.com/hpcng/warewulf/internal/pkg/config.ConfigFile=$(SYSCONFDIR)/warewulf/warewulf.conf'" \
|
||||
-o ../../wwctl
|
||||
|
||||
wwclient: $(WWCLIENT_DEPS)
|
||||
@echo Building "$@"
|
||||
@cd cmd/wwclient; CGO_ENABLED=0 GOOS=linux go build -mod vendor -a -ldflags "-extldflags -static \
|
||||
-X 'github.com/hpcng/warewulf/internal/pkg/warewulfconf.ConfigFile=/etc/warewulf/warewulf.conf'" -o ../../wwclient
|
||||
-X 'github.com/hpcng/warewulf/internal/pkg/config.ConfigFile=/etc/warewulf/warewulf.conf'" -o ../../wwclient
|
||||
|
||||
man_pages: wwctl
|
||||
@install -d man_pages
|
||||
@@ -235,7 +235,7 @@ man_pages: wwctl
|
||||
@cd man_pages; for i in wwctl*1 *.5; do gzip --force $$i; echo -n "$$i "; done; echo
|
||||
|
||||
update_configuration: vendor cmd/update_configuration/update_configuration.go
|
||||
cd cmd/update_configuration && go build -ldflags="-X 'github.com/hpcng/warewulf/internal/pkg/warewulfconf.ConfigFile=./etc/warewulf.conf'\
|
||||
cd cmd/update_configuration && go build -ldflags="-X 'github.com/hpcng/warewulf/internal/pkg/config.ConfigFile=./etc/warewulf.conf'\
|
||||
-X 'github.com/hpcng/warewulf/internal/pkg/node.ConfigFile=./etc/nodes.conf'"\
|
||||
-mod vendor -tags "$(WW_GO_BUILD_TAGS)" -o ../../update_configuration
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ import (
|
||||
|
||||
"github.com/hpcng/warewulf/internal/pkg/api/apiconfig"
|
||||
"github.com/hpcng/warewulf/internal/pkg/api/routes/wwapiv1"
|
||||
"github.com/hpcng/warewulf/internal/pkg/warewulfconf"
|
||||
warewulfconf "github.com/hpcng/warewulf/internal/pkg/config"
|
||||
|
||||
"google.golang.org/grpc"
|
||||
"google.golang.org/grpc/credentials"
|
||||
|
||||
@@ -16,7 +16,7 @@ import (
|
||||
apinode "github.com/hpcng/warewulf/internal/pkg/api/node"
|
||||
"github.com/hpcng/warewulf/internal/pkg/api/routes/wwapiv1"
|
||||
"github.com/hpcng/warewulf/internal/pkg/version"
|
||||
"github.com/hpcng/warewulf/internal/pkg/warewulfconf"
|
||||
"github.com/hpcng/warewulf/internal/pkg/config"
|
||||
"google.golang.org/grpc"
|
||||
"google.golang.org/grpc/codes"
|
||||
"google.golang.org/grpc/credentials"
|
||||
@@ -34,7 +34,7 @@ var apiVersion string
|
||||
func main() {
|
||||
log.Println("Server running")
|
||||
|
||||
conf := warewulfconf.New()
|
||||
conf := config.New()
|
||||
// Read the config file.
|
||||
config, err := apiconfig.NewServer(path.Join(conf.Paths.Sysconfdir, "warewulf/wwapid.conf"))
|
||||
if err != nil {
|
||||
|
||||
@@ -18,7 +18,7 @@ import (
|
||||
"google.golang.org/grpc/credentials/insecure"
|
||||
|
||||
"github.com/hpcng/warewulf/internal/pkg/api/apiconfig"
|
||||
"github.com/hpcng/warewulf/internal/pkg/warewulfconf"
|
||||
warewulfconf "github.com/hpcng/warewulf/internal/pkg/config"
|
||||
|
||||
gw "github.com/hpcng/warewulf/internal/pkg/api/routes/wwapiv1"
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ import (
|
||||
"github.com/coreos/go-systemd/daemon"
|
||||
"github.com/google/uuid"
|
||||
"github.com/hpcng/warewulf/internal/pkg/pidfile"
|
||||
"github.com/hpcng/warewulf/internal/pkg/warewulfconf"
|
||||
warewulfconf "github.com/hpcng/warewulf/internal/pkg/config"
|
||||
"github.com/hpcng/warewulf/internal/pkg/wwlog"
|
||||
"github.com/spf13/cobra"
|
||||
"github.com/talos-systems/go-smbios/smbios"
|
||||
|
||||
@@ -15,7 +15,7 @@ import (
|
||||
"github.com/hpcng/warewulf/internal/pkg/node"
|
||||
"github.com/hpcng/warewulf/internal/pkg/overlay"
|
||||
"github.com/hpcng/warewulf/internal/pkg/util"
|
||||
"github.com/hpcng/warewulf/internal/pkg/warewulfconf"
|
||||
warewulfconf "github.com/hpcng/warewulf/internal/pkg/config"
|
||||
"github.com/hpcng/warewulf/internal/pkg/wwlog"
|
||||
"github.com/pkg/errors"
|
||||
"github.com/spf13/cobra"
|
||||
|
||||
@@ -10,7 +10,7 @@ import (
|
||||
|
||||
"github.com/hpcng/warewulf/internal/pkg/api/routes/wwapiv1"
|
||||
"github.com/hpcng/warewulf/internal/pkg/node"
|
||||
"github.com/hpcng/warewulf/internal/pkg/warewulfconf"
|
||||
warewulfconf "github.com/hpcng/warewulf/internal/pkg/config"
|
||||
"github.com/hpcng/warewulf/internal/pkg/warewulfd"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
@@ -3,7 +3,7 @@ package print
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/hpcng/warewulf/internal/pkg/warewulfconf"
|
||||
warewulfconf "github.com/hpcng/warewulf/internal/pkg/config"
|
||||
"github.com/spf13/cobra"
|
||||
"gopkg.in/yaml.v2"
|
||||
)
|
||||
|
||||
@@ -6,7 +6,7 @@ import (
|
||||
"testing"
|
||||
|
||||
"github.com/hpcng/warewulf/internal/pkg/node"
|
||||
"github.com/hpcng/warewulf/internal/pkg/warewulfconf"
|
||||
warewulfconf "github.com/hpcng/warewulf/internal/pkg/config"
|
||||
"github.com/hpcng/warewulf/internal/pkg/warewulfd"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
@@ -7,7 +7,7 @@ import (
|
||||
"testing"
|
||||
|
||||
"github.com/hpcng/warewulf/internal/pkg/node"
|
||||
"github.com/hpcng/warewulf/internal/pkg/warewulfconf"
|
||||
warewulfconf "github.com/hpcng/warewulf/internal/pkg/config"
|
||||
"github.com/hpcng/warewulf/internal/pkg/warewulfd"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
@@ -9,7 +9,7 @@ import (
|
||||
"github.com/fatih/color"
|
||||
apinode "github.com/hpcng/warewulf/internal/pkg/api/node"
|
||||
"github.com/hpcng/warewulf/internal/pkg/api/routes/wwapiv1"
|
||||
"github.com/hpcng/warewulf/internal/pkg/warewulfconf"
|
||||
warewulfconf "github.com/hpcng/warewulf/internal/pkg/config"
|
||||
"github.com/hpcng/warewulf/internal/pkg/wwlog"
|
||||
"github.com/hpcng/warewulf/pkg/hostlist"
|
||||
"github.com/spf13/cobra"
|
||||
|
||||
@@ -7,7 +7,7 @@ import (
|
||||
|
||||
"github.com/hpcng/warewulf/internal/pkg/node"
|
||||
"github.com/hpcng/warewulf/internal/pkg/overlay"
|
||||
"github.com/hpcng/warewulf/internal/pkg/warewulfconf"
|
||||
warewulfconf "github.com/hpcng/warewulf/internal/pkg/config"
|
||||
"github.com/hpcng/warewulf/internal/pkg/wwlog"
|
||||
"github.com/hpcng/warewulf/pkg/hostlist"
|
||||
"github.com/spf13/cobra"
|
||||
|
||||
@@ -8,7 +8,7 @@ import (
|
||||
"testing"
|
||||
|
||||
"github.com/hpcng/warewulf/internal/pkg/node"
|
||||
"github.com/hpcng/warewulf/internal/pkg/warewulfconf"
|
||||
warewulfconf "github.com/hpcng/warewulf/internal/pkg/config"
|
||||
"github.com/hpcng/warewulf/internal/pkg/warewulfd"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
@@ -15,7 +15,7 @@ import (
|
||||
"github.com/hpcng/warewulf/internal/app/wwctl/ssh"
|
||||
"github.com/hpcng/warewulf/internal/app/wwctl/version"
|
||||
"github.com/hpcng/warewulf/internal/pkg/help"
|
||||
"github.com/hpcng/warewulf/internal/pkg/warewulfconf"
|
||||
warewulfconf "github.com/hpcng/warewulf/internal/pkg/config"
|
||||
"github.com/hpcng/warewulf/internal/pkg/wwlog"
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package start
|
||||
|
||||
import (
|
||||
"github.com/hpcng/warewulf/internal/pkg/warewulfconf"
|
||||
warewulfconf "github.com/hpcng/warewulf/internal/pkg/config"
|
||||
"github.com/hpcng/warewulf/internal/pkg/warewulfd"
|
||||
"github.com/pkg/errors"
|
||||
"github.com/spf13/cobra"
|
||||
|
||||
@@ -10,7 +10,7 @@ import (
|
||||
"github.com/hpcng/warewulf/internal/pkg/api/routes/wwapiv1"
|
||||
"github.com/hpcng/warewulf/internal/pkg/node"
|
||||
"github.com/hpcng/warewulf/internal/pkg/util"
|
||||
"github.com/hpcng/warewulf/internal/pkg/warewulfconf"
|
||||
warewulfconf "github.com/hpcng/warewulf/internal/pkg/config"
|
||||
"github.com/hpcng/warewulf/internal/pkg/wwlog"
|
||||
"github.com/hpcng/warewulf/pkg/hostlist"
|
||||
"github.com/pkg/errors"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package warewulfconf
|
||||
package config
|
||||
|
||||
type BuildConfig struct {
|
||||
Bindir string `default:"@BINDIR@"`
|
||||
@@ -1,4 +1,4 @@
|
||||
package warewulfconf
|
||||
package config
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
@@ -1,4 +1,4 @@
|
||||
package warewulfconf
|
||||
package config
|
||||
|
||||
import (
|
||||
"github.com/creasty/defaults"
|
||||
@@ -1,4 +1,4 @@
|
||||
package warewulfconf
|
||||
package config
|
||||
|
||||
import (
|
||||
"os"
|
||||
@@ -6,7 +6,7 @@ import (
|
||||
|
||||
"github.com/hpcng/warewulf/internal/pkg/overlay"
|
||||
"github.com/hpcng/warewulf/internal/pkg/util"
|
||||
"github.com/hpcng/warewulf/internal/pkg/warewulfconf"
|
||||
warewulfconf "github.com/hpcng/warewulf/internal/pkg/config"
|
||||
"github.com/hpcng/warewulf/internal/pkg/wwlog"
|
||||
"github.com/pkg/errors"
|
||||
)
|
||||
|
||||
@@ -5,7 +5,7 @@ import (
|
||||
|
||||
"github.com/hpcng/warewulf/internal/pkg/overlay"
|
||||
"github.com/hpcng/warewulf/internal/pkg/util"
|
||||
"github.com/hpcng/warewulf/internal/pkg/warewulfconf"
|
||||
warewulfconf "github.com/hpcng/warewulf/internal/pkg/config"
|
||||
"github.com/hpcng/warewulf/internal/pkg/wwlog"
|
||||
"github.com/pkg/errors"
|
||||
)
|
||||
|
||||
@@ -6,7 +6,7 @@ import (
|
||||
"path"
|
||||
|
||||
"github.com/hpcng/warewulf/internal/pkg/util"
|
||||
"github.com/hpcng/warewulf/internal/pkg/warewulfconf"
|
||||
warewulfconf "github.com/hpcng/warewulf/internal/pkg/config"
|
||||
"github.com/hpcng/warewulf/internal/pkg/wwlog"
|
||||
"github.com/pkg/errors"
|
||||
)
|
||||
|
||||
@@ -6,7 +6,7 @@ import (
|
||||
"path"
|
||||
|
||||
"github.com/hpcng/warewulf/internal/pkg/util"
|
||||
"github.com/hpcng/warewulf/internal/pkg/warewulfconf"
|
||||
warewulfconf "github.com/hpcng/warewulf/internal/pkg/config"
|
||||
"github.com/hpcng/warewulf/internal/pkg/wwlog"
|
||||
)
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ package container
|
||||
import (
|
||||
"path"
|
||||
|
||||
"github.com/hpcng/warewulf/internal/pkg/warewulfconf"
|
||||
warewulfconf "github.com/hpcng/warewulf/internal/pkg/config"
|
||||
)
|
||||
|
||||
func SourceParentDir() string {
|
||||
|
||||
@@ -9,7 +9,7 @@ import (
|
||||
"github.com/containers/storage/drivers/copy"
|
||||
"github.com/pkg/errors"
|
||||
|
||||
"github.com/hpcng/warewulf/internal/pkg/warewulfconf"
|
||||
warewulfconf "github.com/hpcng/warewulf/internal/pkg/config"
|
||||
"github.com/hpcng/warewulf/internal/pkg/oci"
|
||||
"github.com/hpcng/warewulf/internal/pkg/util"
|
||||
)
|
||||
|
||||
@@ -3,7 +3,7 @@ package container
|
||||
import (
|
||||
"strings"
|
||||
|
||||
"github.com/hpcng/warewulf/internal/pkg/warewulfconf"
|
||||
warewulfconf "github.com/hpcng/warewulf/internal/pkg/config"
|
||||
"github.com/hpcng/warewulf/internal/pkg/wwlog"
|
||||
)
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ import (
|
||||
"github.com/pkg/errors"
|
||||
|
||||
"github.com/hpcng/warewulf/internal/pkg/util"
|
||||
"github.com/hpcng/warewulf/internal/pkg/warewulfconf"
|
||||
warewulfconf "github.com/hpcng/warewulf/internal/pkg/config"
|
||||
"github.com/hpcng/warewulf/internal/pkg/wwlog"
|
||||
)
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ import (
|
||||
"sort"
|
||||
"strings"
|
||||
|
||||
"github.com/hpcng/warewulf/internal/pkg/warewulfconf"
|
||||
warewulfconf "github.com/hpcng/warewulf/internal/pkg/config"
|
||||
"github.com/hpcng/warewulf/internal/pkg/wwlog"
|
||||
|
||||
"gopkg.in/yaml.v2"
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
package oci
|
||||
|
||||
import "github.com/hpcng/warewulf/internal/pkg/warewulfconf"
|
||||
import "path/filepath"
|
||||
import (
|
||||
warewulfconf "github.com/hpcng/warewulf/internal/pkg/config"
|
||||
"path/filepath"
|
||||
)
|
||||
|
||||
var defaultCachePath = filepath.Join(warewulfconf.DataStore(), "/container-cache/oci/")
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ import (
|
||||
"path"
|
||||
"strings"
|
||||
|
||||
"github.com/hpcng/warewulf/internal/pkg/warewulfconf"
|
||||
warewulfconf "github.com/hpcng/warewulf/internal/pkg/config"
|
||||
)
|
||||
|
||||
func OverlaySourceTopDir() string {
|
||||
|
||||
@@ -7,7 +7,7 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/hpcng/warewulf/internal/pkg/node"
|
||||
"github.com/hpcng/warewulf/internal/pkg/warewulfconf"
|
||||
warewulfconf "github.com/hpcng/warewulf/internal/pkg/config"
|
||||
"github.com/hpcng/warewulf/internal/pkg/wwlog"
|
||||
)
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ import (
|
||||
|
||||
"github.com/hpcng/warewulf/internal/pkg/container"
|
||||
"github.com/hpcng/warewulf/internal/pkg/util"
|
||||
"github.com/hpcng/warewulf/internal/pkg/warewulfconf"
|
||||
warewulfconf "github.com/hpcng/warewulf/internal/pkg/config"
|
||||
"github.com/hpcng/warewulf/internal/pkg/wwlog"
|
||||
)
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ import (
|
||||
"fmt"
|
||||
|
||||
"github.com/hpcng/warewulf/internal/pkg/api/routes/wwapiv1"
|
||||
"github.com/hpcng/warewulf/internal/pkg/warewulfconf"
|
||||
warewulfconf "github.com/hpcng/warewulf/internal/pkg/config"
|
||||
)
|
||||
|
||||
/*
|
||||
|
||||
@@ -11,7 +11,7 @@ import (
|
||||
|
||||
"github.com/hpcng/warewulf/internal/pkg/util"
|
||||
"github.com/hpcng/warewulf/internal/pkg/version"
|
||||
"github.com/hpcng/warewulf/internal/pkg/warewulfconf"
|
||||
warewulfconf "github.com/hpcng/warewulf/internal/pkg/config"
|
||||
"github.com/hpcng/warewulf/internal/pkg/wwlog"
|
||||
"github.com/pkg/errors"
|
||||
)
|
||||
|
||||
@@ -10,7 +10,7 @@ import (
|
||||
"github.com/hpcng/warewulf/internal/pkg/container"
|
||||
"github.com/hpcng/warewulf/internal/pkg/kernel"
|
||||
"github.com/hpcng/warewulf/internal/pkg/util"
|
||||
"github.com/hpcng/warewulf/internal/pkg/warewulfconf"
|
||||
warewulfconf "github.com/hpcng/warewulf/internal/pkg/config"
|
||||
"github.com/hpcng/warewulf/internal/pkg/wwlog"
|
||||
)
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ import (
|
||||
"strconv"
|
||||
"syscall"
|
||||
|
||||
"github.com/hpcng/warewulf/internal/pkg/warewulfconf"
|
||||
warewulfconf "github.com/hpcng/warewulf/internal/pkg/config"
|
||||
"github.com/hpcng/warewulf/internal/pkg/wwlog"
|
||||
"github.com/pkg/errors"
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user