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