func HugePageSizeFromMedium(medium v1.StorageMedium) (resource.Quantity, error) {
	if !IsHugePageMedium(medium) {
		return resource.Quantity{}, fmt.Errorf("medium: %s is not a hugepage medium", medium)
	}
	if medium == v1.StorageMediumHugePages {
		return resource.Quantity{}, fmt.Errorf("medium: %s doesn't have size information", medium)
	}
	pageSize := strings.TrimPrefix(string(medium), string(v1.StorageMediumHugePagesPrefix))
	return resource.ParseQuantity(pageSize)
}
// HugePageSizeFromMedium returns the page size for the specified huge page medium.
// If the specified input is not a valid huge page medium an error is returned.
HugePageSizeFromMedium returns the page size for the specified huge page medium.
If the specified input is not a valid huge page medium an error is returned.
// HugePageSizeFromMedium returns the page size for the specified huge page medium . // If the specified input is not a valid huge page medium an error is returned .
func HugePageSizeFromMedium(medium v1.StorageMedium) (resource.Quantity, error) {
	if !IsHugePageMedium(medium) {
		return resource.Quantity{}, fmt.Errorf("medium: %s is not a hugepage medium", medium)
	}
	if medium == v1.StorageMediumHugePages {
		return resource.Quantity{}, fmt.Errorf("medium: %s doesn't have size information", medium)
	}
	pageSize := strings.TrimPrefix(string(medium), string(v1.StorageMediumHugePagesPrefix))
	return resource.ParseQuantity(pageSize)
}
func HugePageSizeFromMedium ( medium v1 . StorageMedium ) ( resource . Quantity , error ) { if ! IsHugePageMedium ( medium ) { return resource . Quantity { } , fmt . Errorf ( " " , medium ) } if medium == v1 . StorageMediumHugePages { return resource . Quantity { } , fmt . Errorf ( " " , medium ) } pageSize := strings . TrimPrefix ( string ( medium ) , string ( v1 . StorageMediumHugePagesPrefix ) ) return resource . ParseQuantity ( pageSize ) }
HugePageSizeFromMedium returns the page size for the specified huge page medium.
HugePageSizeFromMedium returns the page size for the specified huge page medium .