paths need to be visibale for marshalling
Signed-off-by: Christian Goll <cgoll@suse.de>
This commit is contained in:
@@ -32,6 +32,7 @@ type TemplateStruct struct {
|
||||
Nfs warewulfconf.NfsConf
|
||||
Warewulf warewulfconf.WarewulfConf
|
||||
Tftp warewulfconf.TftpConf
|
||||
Paths warewulfconf.BuildConfig
|
||||
AllNodes []node.NodeInfo
|
||||
node.NodeConf
|
||||
// backward compatiblity
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
package warewulfconf
|
||||
|
||||
type BuildConfig struct {
|
||||
bindir string `default:"@BINDIR@"`
|
||||
sysconfdir string `default:"@SYSCONFDIR@"`
|
||||
datadir string `default:"@DATADIR@"`
|
||||
localstatedir string `default:"@LOCALSTATEDIR@"`
|
||||
srvdir string `default:"@SRVDIR@"`
|
||||
tftpdir string `default:"@TFTPDIR@"`
|
||||
firewallddir string `default:"@FIREWALLDDIR@"`
|
||||
systemddir string `default:"@SYSTEMDDIR@"`
|
||||
wwoverlaydir string `default:"@WWOVERLAYDIR@"`
|
||||
wwchrootdir string `default:"@WWCHROOTDIR@"`
|
||||
wwprovisiondir string `default:"@WWPROVISIONDIR@"`
|
||||
version string `default:"@VERSION@"`
|
||||
release string `default:"@RELEASE@"`
|
||||
wwclientdir string `default:"@WWCLIENTDIR@"`
|
||||
Bindir string `default:"@BINDIR@"`
|
||||
Sysconfdir string `default:"@SYSCONFDIR@"`
|
||||
Datadir string `default:"@DATADIR@"`
|
||||
Localstatedir string `default:"@LOCALSTATEDIR@"`
|
||||
Srvdir string `default:"@SRVDIR@"`
|
||||
Tftpdir string `default:"@TFTPDIR@"`
|
||||
Firewallddir string `default:"@FIREWALLDDIR@"`
|
||||
Systemddir string `default:"@SYSTEMDDIR@"`
|
||||
Wwoverlaydir string `default:"@WWOVERLAYDIR@"`
|
||||
Wwchrootdir string `default:"@WWCHROOTDIR@"`
|
||||
Wwprovisiondir string `default:"@WWPROVISIONDIR@"`
|
||||
Version string `default:"@VERSION@"`
|
||||
Release string `default:"@RELEASE@"`
|
||||
Wwclientdir string `default:"@WWCLIENTDIR@"`
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@ type ControllerConf struct {
|
||||
Tftp *TftpConf `yaml:"tftp"`
|
||||
Nfs *NfsConf `yaml:"nfs"`
|
||||
MountsContainer []*MountEntry `yaml:"container mounts" default:"[{\"source\": \"/etc/resolv.conf\", \"dest\": \"/etc/resolv.conf\"}]"`
|
||||
Paths *BuildConfig `yaml:"mypaths"`
|
||||
Paths *BuildConfig `yaml:"paths"`
|
||||
current bool
|
||||
}
|
||||
|
||||
|
||||
@@ -3,71 +3,71 @@ package warewulfconf
|
||||
import "github.com/hpcng/warewulf/internal/pkg/wwlog"
|
||||
|
||||
func (conf *ControllerConf) BINDIR() string {
|
||||
wwlog.Debug("BINDIR = '%s'", conf.Paths.bindir)
|
||||
return conf.Paths.bindir
|
||||
wwlog.Debug("BINDIR = '%s'", conf.Paths.Bindir)
|
||||
return conf.Paths.Bindir
|
||||
}
|
||||
|
||||
func (conf *ControllerConf) DATADIR() string {
|
||||
wwlog.Debug("DATADIR = '%s'", conf.Paths.datadir)
|
||||
return conf.Paths.datadir
|
||||
wwlog.Debug("DATADIR = '%s'", conf.Paths.Datadir)
|
||||
return conf.Paths.Datadir
|
||||
}
|
||||
|
||||
func (conf *ControllerConf) SYSCONFDIR() string {
|
||||
wwlog.Debug("SYSCONFDIR = '%s'", conf.Paths.sysconfdir)
|
||||
return conf.Paths.sysconfdir
|
||||
wwlog.Debug("SYSCONFDIR = '%s'", conf.Paths.Sysconfdir)
|
||||
return conf.Paths.Sysconfdir
|
||||
}
|
||||
|
||||
func (conf *ControllerConf) LOCALSTATEDIR() string {
|
||||
wwlog.Debug("LOCALSTATEDIR = '%s'", conf.Paths.localstatedir)
|
||||
return conf.Paths.localstatedir
|
||||
wwlog.Debug("LOCALSTATEDIR = '%s'", conf.Paths.Localstatedir)
|
||||
return conf.Paths.Localstatedir
|
||||
}
|
||||
|
||||
func (conf *ControllerConf) SRVDIR() string {
|
||||
wwlog.Debug("SRVDIR = '%s'", conf.Paths.srvdir)
|
||||
return conf.Paths.srvdir
|
||||
wwlog.Debug("SRVDIR = '%s'", conf.Paths.Srvdir)
|
||||
return conf.Paths.Srvdir
|
||||
}
|
||||
|
||||
func (conf *ControllerConf) TFTPDIR() string {
|
||||
wwlog.Debug("TFTPDIR = '%s'", conf.Paths.tftpdir)
|
||||
return conf.Paths.tftpdir
|
||||
wwlog.Debug("TFTPDIR = '%s'", conf.Paths.Tftpdir)
|
||||
return conf.Paths.Tftpdir
|
||||
}
|
||||
|
||||
func (conf *ControllerConf) FIREWALLDDIR() string {
|
||||
wwlog.Debug("FIREWALLDDIR = '%s'", conf.Paths.firewallddir)
|
||||
return conf.Paths.firewallddir
|
||||
wwlog.Debug("FIREWALLDDIR = '%s'", conf.Paths.Firewallddir)
|
||||
return conf.Paths.Firewallddir
|
||||
}
|
||||
|
||||
func (conf *ControllerConf) SYSTEMDDIR() string {
|
||||
wwlog.Debug("SYSTEMDDIR = '%s'", conf.Paths.systemddir)
|
||||
return conf.Paths.systemddir
|
||||
wwlog.Debug("SYSTEMDDIR = '%s'", conf.Paths.Systemddir)
|
||||
return conf.Paths.Systemddir
|
||||
}
|
||||
|
||||
func (conf *ControllerConf) WWOVERLAYDIR() string {
|
||||
wwlog.Debug("WWOVERLAYDIR = '%s'", conf.Paths.wwoverlaydir)
|
||||
return conf.Paths.wwoverlaydir
|
||||
wwlog.Debug("WWOVERLAYDIR = '%s'", conf.Paths.Wwoverlaydir)
|
||||
return conf.Paths.Wwoverlaydir
|
||||
}
|
||||
|
||||
func (conf *ControllerConf) WWCHROOTDIR() string {
|
||||
wwlog.Debug("WWCHROOTDIR = '%s'", conf.Paths.wwchrootdir)
|
||||
return conf.Paths.wwchrootdir
|
||||
wwlog.Debug("WWCHROOTDIR = '%s'", conf.Paths.Wwchrootdir)
|
||||
return conf.Paths.Wwchrootdir
|
||||
}
|
||||
|
||||
func (conf *ControllerConf) WWPROVISIONDIR() string {
|
||||
wwlog.Debug("WWPROVISIONDIR = '%s'", conf.Paths.wwprovisiondir)
|
||||
return conf.Paths.wwprovisiondir
|
||||
wwlog.Debug("WWPROVISIONDIR = '%s'", conf.Paths.Wwprovisiondir)
|
||||
return conf.Paths.Wwprovisiondir
|
||||
}
|
||||
|
||||
func (conf *ControllerConf) VERSION() string {
|
||||
wwlog.Debug("VERSION = '%s'", conf.Paths.version)
|
||||
return conf.Paths.version
|
||||
wwlog.Debug("VERSION = '%s'", conf.Paths.Version)
|
||||
return conf.Paths.Version
|
||||
}
|
||||
|
||||
func (conf *ControllerConf) RELEASE() string {
|
||||
wwlog.Debug("RELEASE = '%s'", conf.Paths.release)
|
||||
return conf.Paths.release
|
||||
wwlog.Debug("RELEASE = '%s'", conf.Paths.Release)
|
||||
return conf.Paths.Release
|
||||
}
|
||||
|
||||
func (conf *ControllerConf) WWCLIENTDIR() string {
|
||||
wwlog.Debug("WWCLIENTDIR = '%s'", conf.Paths.wwclientdir)
|
||||
return conf.Paths.wwclientdir
|
||||
wwlog.Debug("WWCLIENTDIR = '%s'", conf.Paths.Wwclientdir)
|
||||
return conf.Paths.Wwclientdir
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user