// AddOutputEdges links the build config to its output image node.
779936
func AddOutputEdges(g osgraph.MutableUniqueGraph, node *buildgraph.BuildConfigNode) {
	if node.BuildConfig.Spec.Output.To == nil {
		return
	}
	out := imageRefNode(g, node.BuildConfig.Spec.Output.To, node.BuildConfig)
	g.AddEdge(node, out, BuildOutputEdgeKind)
}
386416
func (a *completionsMixin) addHintActionBuiltin(action HintAction) {
	a.builtinHintActions = append(a.builtinHintActions, action)
}
695264
func (s *RedisDeviceStore) AddBuiltinAttribute(attr ...string) {
	s.builtinAttibutes = append(s.builtinAttibutes, attr...)
	sort.Strings(s.builtinAttibutes)
}
1171130
func addVxGWRoutes(netPlugin *plugin.NetPlugin, gwIP string) {
	readNet := &mastercfg.CfgNetworkState{}
	readNet.StateDriver = netPlugin.StateDriver
	netCfgs, err := readNet.ReadAll()
	if err != nil {
		log.Errorf("Error reading netCfgs: %v", err)
		return
	}
	for _, netCfg := range netCfgs {
		net := netCfg.(*mastercfg.CfgNetworkState)
		if net.NwType != "infra" && net.PktTagType == "vxlan" {
			route := fmt.Sprintf("%s/%d", net.SubnetIP, net.SubnetLen)
			err = netutils.AddIPRoute(route, gwIP)
			if err != nil {
				log.Errorf("Adding route %s --> %s: err: %v",
					route, gwIP, err)
			}
		}
	}

	// route add cluster-ip
	clusterNet := k8splugin.GetK8sClusterIPRange()
	log.Infof("configuring cluster-ip route [%s]", clusterNet)
	if len(clusterNet) > 0 {
		if err = netutils.AddIPRoute(clusterNet, gwIP); err != nil {
			log.Errorf("Adding route [%s] --> %s: err: %v",
				clusterNet, gwIP, err)
		}
	}
}
90526
func (bc *BuildController) imageStreamAdded(obj interface{}) {
	stream := obj.(*imagev1.ImageStream)
	for _, buildKey := range bc.imageStreamQueue.Pop(resourceName(stream.Namespace, stream.Name)) {
		bc.buildQueue.Add(buildKey)
	}
}
1185013
func (b *RWSetBuilder) AddToReadSet(ns string, key string, version *version.Height) {
	nsPubRwBuilder := b.getOrCreateNsPubRwBuilder(ns)
	nsPubRwBuilder.readMap[key] = NewKVRead(key, version)
}
995735
func (f *Field) AddRemoteAvailableShards(b *roaring.Bitmap) error {
	f.mergeRemoteAvailableShards(b)
	// Save the updated bitmap to the data store.
	return f.saveAvailableShards()
}
726686
func AddResources(fileName, resourceName string, keys []string, c *cli.Context) error {
	OutStoreFormat = getStoreFormatFromFileName(fileName)
	config := util.Config{
		IgnoreList:        c.GlobalStringSlice("exclude-attr"),
		Timeout:           int(c.Duration("timeout") / time.Millisecond),
		AllowInsecure:     c.Bool("insecure"),
		NoFollowRedirects: c.Bool("no-follow-redirects"),
		Server:            c.String("server"),
		Username:          c.String("username"),
		Password:          c.String("password"),
	}

	var gossConfig GossConfig
	if _, err := os.Stat(fileName); err == nil {
		gossConfig = ReadJSON(fileName)
	} else {
		gossConfig = *NewGossConfig()
	}

	sys := system.New(c)

	for _, key := range keys {
		if err := AddResource(fileName, gossConfig, resourceName, key, c, config, sys); err != nil {
			return err
		}
	}
	WriteJSON(fileName, gossConfig)

	return nil
}
1326950
func (s *JobData) SetOutputArtifacts(v []*Artifact) *JobData {
	s.OutputArtifacts = v
	return s
}
337918
func (r *ImageRef) BuildTriggers() []buildv1.BuildTriggerPolicy {
	if r.Stream == nil && !r.AsImageStream {
		return nil
	}
	return []buildv1.BuildTriggerPolicy{
		{
			Type:        buildv1.ImageChangeBuildTriggerType,
			ImageChange: &buildv1.ImageChangeTrigger{},
		},
	}
}
1136188
func (n *UnCompiledNode) prependOutput(outputPrefix interface{}) {
	for arcIdx := 0; arcIdx < n.NumArcs; arcIdx++ {
		n.Arcs[arcIdx].output = n.owner.fst.outputs.Add(outputPrefix, n.Arcs[arcIdx].output)
	}

	if n.IsFinal {
		n.output = n.owner.fst.outputs.Add(outputPrefix, n.output)
	}
}
683664
func (c *CommitStats) GetAdditions() int {
	if c == nil || c.Additions == nil {
		return 0
	}
	return *c.Additions
}
618357
func (d *Delta) AddPreconditions(fns ...PreconditionFunc) {
	d.preconditions = append(d.preconditions, fns...)
}
1174133
func BuildByBuildConfigIndexFunc(obj interface{}) ([]string, error) {
	build, ok := obj.(*buildv1.Build)
	if !ok {
		return nil, fmt.Errorf("not a build: %v", build)
	}
	config := build.Status.Config
	if config == nil {
		return []string{"orphan"}, nil
	}
	return []string{config.Namespace + "/" + config.Name}, nil
}
610596
func (c *Gcd) AddEnvironmentVars(vars []string) {
	c.env = append(c.env, vars...)
}
466699
func (r *SourceRepository) AddBuildConfigMaps(configMaps []string) error {
	injections := s2iapi.VolumeList{}
	r.configMaps = []buildv1.ConfigMapBuildSource{}
	for _, in := range configMaps {
		if err := injections.Set(in); err != nil {
			return err
		}
	}
	configMapExists := func(name string) bool {
		for _, c := range r.configMaps {
			if c.ConfigMap.Name == name {
				return true
			}
		}
		return false
	}
	for _, in := range injections {
		if r.GetStrategy() == newapp.StrategyDocker && filepath.IsAbs(in.Destination) {
			return fmt.Errorf("for the docker strategy, the configMap destination directory %q must be a relative path", in.Destination)
		}
		if len(validation.ValidateConfigMapName(in.Source, false)) != 0 {
			return fmt.Errorf("the %q must be a valid configMap name", in.Source)
		}
		if configMapExists(in.Source) {
			return fmt.Errorf("the %q configMap can be used just once", in.Source)
		}
		r.configMaps = append(r.configMaps, buildv1.ConfigMapBuildSource{
			ConfigMap:      corev1.LocalObjectReference{Name: in.Source},
			DestinationDir: in.Destination,
		})
	}
	return nil
}
1092882
func (s *Statement) AddOutputGraph(g string) {
	s.outputGraphNames = append(s.outputGraphNames, g)
}