Initial commit of asset key tag security check
This commit is contained in:
@@ -87,6 +87,7 @@ func (config *nodeYaml) FindAllNodes() ([]NodeInfo, error) {
|
||||
n.SystemOverlay.Set(node.SystemOverlay)
|
||||
n.RuntimeOverlay.Set(node.RuntimeOverlay)
|
||||
n.Root.Set(node.Root)
|
||||
n.AssetKey.Set(node.AssetKey)
|
||||
|
||||
n.Discoverable.SetB(node.Discoverable)
|
||||
|
||||
@@ -142,11 +143,11 @@ func (config *nodeYaml) FindAllNodes() ([]NodeInfo, error) {
|
||||
n.IpmiInterface.SetAlt(config.NodeProfiles[p].IpmiInterface, p)
|
||||
n.SystemOverlay.SetAlt(config.NodeProfiles[p].SystemOverlay, p)
|
||||
n.RuntimeOverlay.SetAlt(config.NodeProfiles[p].RuntimeOverlay, p)
|
||||
n.Root.SetAlt(config.NodeProfiles[p].Root, p)
|
||||
n.AssetKey.SetAlt(config.NodeProfiles[p].AssetKey, p)
|
||||
|
||||
n.Discoverable.SetAltB(config.NodeProfiles[p].Discoverable, p)
|
||||
|
||||
n.Root.SetAlt(config.NodeProfiles[p].Root, p)
|
||||
|
||||
for devname, netdev := range config.NodeProfiles[p].NetDevs {
|
||||
if _, ok := n.NetDevs[devname]; !ok {
|
||||
var netdev NetDevEntry
|
||||
@@ -216,6 +217,7 @@ func (config *nodeYaml) FindAllProfiles() ([]NodeInfo, error) {
|
||||
p.RuntimeOverlay.Set(profile.RuntimeOverlay)
|
||||
p.SystemOverlay.Set(profile.SystemOverlay)
|
||||
p.Root.Set(profile.Root)
|
||||
p.AssetKey.Set(profile.AssetKey)
|
||||
|
||||
p.Discoverable.SetB(profile.Discoverable)
|
||||
|
||||
|
||||
@@ -32,6 +32,7 @@ type NodeConf struct {
|
||||
SystemOverlay string `yaml:"system overlay,omitempty"`
|
||||
Init string `yaml:"init,omitempty"`
|
||||
Root string `yaml:"root,omitempty"`
|
||||
AssetKey string `yaml:"asset key,omitempty"`
|
||||
Discoverable bool `yaml:"discoverable,omitempty"`
|
||||
Profiles []string `yaml:"profiles,omitempty"`
|
||||
NetDevs map[string]*NetDevs `yaml:"network devices,omitempty"`
|
||||
@@ -85,6 +86,7 @@ type NodeInfo struct {
|
||||
Root Entry
|
||||
Discoverable Entry
|
||||
Init Entry //TODO: Finish adding this...
|
||||
AssetKey Entry
|
||||
Profiles []string
|
||||
GroupProfiles []string
|
||||
NetDevs map[string]*NetDevEntry
|
||||
|
||||
@@ -72,6 +72,7 @@ func (config *nodeYaml) NodeUpdate(node NodeInfo) error {
|
||||
config.Nodes[nodeID].RuntimeOverlay = node.RuntimeOverlay.GetReal()
|
||||
config.Nodes[nodeID].SystemOverlay = node.SystemOverlay.GetReal()
|
||||
config.Nodes[nodeID].Root = node.Root.GetReal()
|
||||
config.Nodes[nodeID].AssetKey = node.AssetKey.GetReal()
|
||||
|
||||
config.Nodes[nodeID].Discoverable = node.Discoverable.GetRealB()
|
||||
|
||||
@@ -159,6 +160,7 @@ func (config *nodeYaml) ProfileUpdate(profile NodeInfo) error {
|
||||
config.NodeProfiles[profileID].RuntimeOverlay = profile.RuntimeOverlay.GetReal()
|
||||
config.NodeProfiles[profileID].SystemOverlay = profile.SystemOverlay.GetReal()
|
||||
config.NodeProfiles[profileID].Root = profile.Root.GetReal()
|
||||
config.NodeProfiles[profileID].AssetKey = profile.AssetKey.GetReal()
|
||||
|
||||
config.NodeProfiles[profileID].Discoverable = profile.Discoverable.GetRealB()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user