func (spec *AdjustmentSpec) IsContainerInScope(container resmgr.Evaluable) bool {
	if len(spec.Scope) == 0 {
		return true
	}
	for _, s := range spec.Scope {
		if s.IsContainerInScope(container) {
			return true
		}
	}
	return false
}
IsContainerInScope tests if the container is within the scope of this spec.
package v1alpha1
import (
	"fmt"
	"strings"
	resmgr "github.com/intel/cri-resource-manager/pkg/apis/resmgr"
	corev1 "k8s.io/api/core/v1"
)
func (a *Adjustment) HasSameVersion(o *Adjustment) bool {
	if a.ResourceVersion != o.ResourceVersion {
		return false
	}
	if a.Generation != o.Generation {
		return false
	}
	return true
}
func (spec *AdjustmentSpec) NodeScope(node string) []AdjustmentScope {
	filtered := []AdjustmentScope{}
	for _, scope := range spec.Scope {
		if scope.IsNodeInScope(node) {
			filtered = append(filtered, scope)
		}
	}
	return filtered
}
func (spec *AdjustmentSpec) GetResourceRequirements() (corev1.ResourceRequirements, bool) {
	if spec.Resources != nil {
		return *spec.Resources, true
	}
	return corev1.ResourceRequirements{}, false
}
func (spec *AdjustmentSpec) GetRDTClass() (string, bool) {
	if spec.Classes == nil || spec.Classes.RDT == nil {
		return "", false
	}
	return *spec.Classes.RDT, true
}
func (spec *AdjustmentSpec) GetBlockIOClass() (string, bool) {
	if spec.Classes == nil || spec.Classes.BlockIO == nil {
		return "", false
	}
	return *spec.Classes.BlockIO, true
}
func (spec *AdjustmentSpec) IsNodeInScope(node string) bool {
	if len(spec.Scope) == 0 {
		return true
	}
	for _, s := range spec.Scope {
		if s.IsNodeInScope(node) {
			return true
		}
	}
	return false
}