// presets link in /etc, which doesn't make sense for runtime units
// Related: https://github.com/coreos/ignition/v2/issues/588
10966
func (ut Util) EnableRuntimeUnit(unit types.Unit, target string) error {
	// unless we're running tests locally, we want to affect /run, which will
	// be carried into the pivot, not a directory named /$DestDir/run
	if !distro.BlackboxTesting() {
		ut.DestDir = "/"
	}

	nodePath, err := ut.JoinPath(SystemdRuntimeUnitWantsPath(target), unit.Name)
	if err != nil {
		return err
	}
	targetPath, err := ut.JoinPath("/", SystemdRuntimeUnitsPath(), unit.Name)
	if err != nil {
		return err
	}

	link := types.Link{
		Node: types.Node{
			// XXX(jl): make Wants/Required a parameter
			Path: nodePath,
		},
		LinkEmbedded1: types.LinkEmbedded1{
			Target: targetPath,
		},
	}

	return ut.WriteLink(link)
}
822507
func (s *ClusterStateService) FlatSettings(flatSettings bool) *ClusterStateService {
	s.flatSettings = &flatSettings
	return s
}
23703
func (c *CollectionBinary) Prepend(key string, val []byte, opts *PrependOptions) (mutOut *MutationResult, errOut error) {
	if opts == nil {
		opts = &PrependOptions{}
	}

	span := c.startKvOpTrace(opts.ParentSpanContext, "BinaryPrepend")
	defer span.Finish()

	// Only update ctx if necessary, this means that the original ctx.Done() signal will be triggered as expected
	ctx, cancel := c.context(opts.Context, opts.Timeout)
	if cancel != nil {
		defer cancel()
	}

	res, err := c.prepend(ctx, span.Context(), key, val, *opts)
	if err != nil {
		return nil, err
	}

	return res, nil
}
711189
func (s *PredefinedScalingMetricSpecification) SetPredefinedScalingMetricType(v string) *PredefinedScalingMetricSpecification {
	s.PredefinedScalingMetricType = &v
	return s
}
385932
func (ru *RelationUnit) Settings() (*Settings, error) {
	s, err := readSettings(ru.st.db(), settingsC, ru.key())
	if err != nil {
		return nil, errors.Annotatef(err, "unit %q", ru.unitName)
	}
	return s, nil
}
897962
func (s *Preset) SetSettings(v *PresetSettings) *Preset {
	s.Settings = v
	return s
}
1096189
func (s *AnalyticsAndOperator) SetPrefix(v string) *AnalyticsAndOperator {
	s.Prefix = &v
	return s
}
856857
func (f *framework) RunPrebindPlugins(
	pc *PluginContext, pod *v1.Pod, nodeName string) *Status {
	for _, pl := range f.prebindPlugins {
		status := pl.Prebind(pc, pod, nodeName)
		if !status.IsSuccess() {
			if status.Code() == Unschedulable {
				msg := fmt.Sprintf("rejected by %v at prebind: %v", pl.Name(), status.Message())
				klog.V(4).Infof(msg)
				return NewStatus(status.Code(), msg)
			}
			msg := fmt.Sprintf("error while running %v prebind plugin for pod %v: %v", pl.Name(), pod.Name, status.Message())
			klog.Error(msg)
			return NewStatus(Error, msg)
		}
	}
	return nil
}
107242
func (r Product_Item_Category) GetPresetConfigurations() (resp []datatypes.Product_Package_Preset_Configuration, err error) {
	err = r.Session.DoRequest("SoftLayer_Product_Item_Category", "getPresetConfigurations", nil, &r.Options, &resp)
	return
}
683692
func (p *Playlist) SetAutolinkTracks(l bool) {
	C.sp_playlist_set_autolink_tracks(p.sp_playlist, cbool(l))
}
190736
func (s *ListObjectVersionsInput) SetPrefix(v string) *ListObjectVersionsInput {
	s.Prefix = &v
	return s
}
1168281
func (s *ReplicationRuleFilter) SetPrefix(v string) *ReplicationRuleFilter {
	s.Prefix = &v
	return s
}
352989
func (c *Config) AddFlagsPrefix(fs *flag.FlagSet, prefix string) {
	fs.Var(&c.Level, prefix+"log-level",
		"The logging level. Valid options are: debug, info, warning, error.")
}
248148
func (a *API) UnitsPrepared(args params.Entities) (params.EntitiesResults, error) {
	result, err := a.unitsInState(args, model.UpgradeSeriesPrepareCompleted)
	return result, errors.Trace(err)
}
653477
func (elt TimeMeddler) PreWrite(field interface{}) (saveValue interface{}, err error) {
	switch tgt := field.(type) {
	case time.Time:
		if elt.ZeroIsNull && tgt.IsZero() {
			return nil, nil
		}
		return tgt.UTC(), nil

	case *time.Time:
		if tgt == nil || elt.ZeroIsNull && tgt.IsZero() {
			return nil, nil
		}
		return tgt.UTC(), nil

	default:
		return nil, fmt.Errorf("meddler.TimeMeddler.PreWrite: unknown struct field type: %T", field)
	}
}
460516
func (s *MetricsAndOperator) SetPrefix(v string) *MetricsAndOperator {
	s.Prefix = &v
	return s
}
785521
func (mc CommunicatingPlugin) Prebind(pc *framework.PluginContext, pod *v1.Pod, nodeName string) *framework.Status {
	if pod == nil {
		return framework.NewStatus(framework.Error, "pod cannot be nil")
	}
	pc.RLock()
	defer pc.RUnlock()
	if v, e := pc.Read(framework.ContextKey(pod.Name)); e == nil && v == "never bind" {
		return framework.NewStatus(framework.Unschedulable, "pod is not permitted")
	}
	return nil
}