func (i *Ilo) cmpNetworkIPv4Settings(cfg *cfgresources.Network) (NetworkIPv4, bool, error) {
	var dnsFromDHCP, dhcpEnable, ddnsEnable int
	if cfg.DhcpEnable {
		dhcpEnable = 1
	}
	if cfg.DNSFromDHCP {
		dnsFromDHCP = 1
	}
	if cfg.DDNSEnable {
		ddnsEnable = 1
	}
	currentConfig, err := i.queryNetworkIPv4()
	if err != nil {
		return NetworkIPv4{}, false, fmt.Errorf("Unable to query existing IPv4 network config")
	}
	settingsMatch := func() bool {
		if currentConfig.DhcpEnabled != dhcpEnable {
			return false
		}
		if currentConfig.RegDdnsServer != ddnsEnable {
			return false
		}
		if currentConfig.UseDhcpSuppliedDomainName != dnsFromDHCP {
			return false
		}
		return true
	}
	if settingsMatch() {
		return NetworkIPv4{}, false, nil
	}
	currentConfig.DhcpEnabled = dhcpEnable
	currentConfig.RegDdnsServer = ddnsEnable
	currentConfig.UseDhcpSuppliedDomainName = dnsFromDHCP
	currentConfig.SessionKey = i.sessionKey
	currentConfig.Method = "set_ipv4"
	return currentConfig, true, nil
}
compares the current Network IPv4 config with the given Network configuration
package ilo
import (
	"fmt"
	"github.com/bmc-toolbox/bmclib/cfgresources"
)
func (i *Ilo) cmpPowerSettings(regulatorMode string) (PowerRegulator, bool, error) {
	currentConfig, err := i.queryPowerRegulator()
	if err != nil {
		return PowerRegulator{}, false, fmt.Errorf("Unable to query existing Power regulator config")
	}
	settingsMatch := func() bool {
		return currentConfig.PowerMode == regulatorMode
	}
	if settingsMatch() {
		return currentConfig, false, nil
	}
	return currentConfig, true, nil
}