// GetModel returns the LabelArray as a string array with fully-qualified labels.
// The output is parseable by ParseLabelArrayFromArray
160144
func (ls LabelArray) GetModel() []string {
	res := []string{}
	for l := range ls {
		res = append(res, ls[l].String())
	}
	return res
}
1078696
func GetModeLinux(pathname string) (os.FileMode, error) {
	info, err := os.Stat(pathname)
	if err != nil {
		return 0, err
	}
	return info.Mode(), nil
}
605980
func (db *DB) GetModel(obj interface{}) (*Model, error) {
	return db.getModel(reflect.TypeOf(obj))
}
911784
func (i *IssueRequest) GetLabels() []string {
	if i == nil || i.Labels == nil {
		return nil
	}
	return *i.Labels
}
220485
func (p *Proxy) GetStatusModel() *models.ProxyStatus {
	p.mutex.RLock()
	defer p.mutex.RUnlock()

	return &models.ProxyStatus{
		IP:        node.GetInternalIPv4().String(),
		PortRange: fmt.Sprintf("%d-%d", p.rangeMin, p.rangeMax),
	}
}
741792
func (env *Environment) GetArray(key string, overrideDefault *[]string) ([]string, error) {
	var oD *string
	if overrideDefault != nil {
		if len(*overrideDefault) > 0 {
			ovr := (*overrideDefault)[0]
			oD = &ovr
		}
	}
	v, e := env.Get(key, oD)
	arr := []string{v}

	if env.supportArrays {
		if strings.Contains(v, ",") {
			arr = strings.Split(v, ",")
		}
	}

	if len(v) > 0 {
		return arr, e
	}
	return []string{}, e
}
795175
func getLabelOfRepoByName(e Engine, repoID int64, labelName string) (*Label, error) {
	if len(labelName) <= 0 {
		return nil, ErrLabelNotExist{0, repoID}
	}

	l := &Label{
		Name:   labelName,
		RepoID: repoID,
	}
	has, err := x.Get(l)
	if err != nil {
		return nil, err
	} else if !has {
		return nil, ErrLabelNotExist{0, l.RepoID}
	}
	return l, nil
}
365678
func (_class SMClass) GetByNameLabel(sessionID SessionRef, label string) (_retval []SMRef, _err error) {
	_method := "SM.get_by_name_label"
	_sessionIDArg, _err := convertSessionRefToXen(fmt.Sprintf("%s(%s)", _method, "session_id"), sessionID)
	if _err != nil {
		return
	}
	_labelArg, _err := convertStringToXen(fmt.Sprintf("%s(%s)", _method, "label"), label)
	if _err != nil {
		return
	}
	_result, _err := _class.client.APICall(_method, _sessionIDArg, _labelArg)
	if _err != nil {
		return
	}
	_retval, _err = convertSMRefSetToGo(_method + " -> ", _result.Value)
	return
}
557507
func (n Name) Model() string {
	x := strings.Split(string(n), "/")
	for i, s := range x {
		x[i] = Camelize(Singularize(s))
	}

	return strings.Join(x, "")
}
934377
func parseModelPrefixName(key string) (string, string, bool) {
	for _, prefix := range modelPrefixes {
		if strings.HasPrefix(key, prefix) {
			return prefix, key[len(prefix):], true
		}
	}
	return "", "", false
}
895425
func (d *domainClient) GetBoxModel(ctx context.Context, args *GetBoxModelArgs) (reply *GetBoxModelReply, err error) {
	reply = new(GetBoxModelReply)
	if args != nil {
		err = rpcc.Invoke(ctx, "DOM.getBoxModel", args, reply, d.conn)
	} else {
		err = rpcc.Invoke(ctx, "DOM.getBoxModel", nil, reply, d.conn)
	}
	if err != nil {
		err = &internal.OpError{Domain: "DOM", Op: "GetBoxModel", Err: err}
	}
	return
}
378275
func (e *Endpoint) GetOpLabels() []string {
	e.UnconditionalRLock()
	defer e.RUnlock()
	return e.OpLabels.IdentityLabels().GetModel()
}
92801
func (_class VMClass) GetByNameLabel(sessionID SessionRef, label string) (_retval []VMRef, _err error) {
	_method := "VM.get_by_name_label"
	_sessionIDArg, _err := convertSessionRefToXen(fmt.Sprintf("%s(%s)", _method, "session_id"), sessionID)
	if _err != nil {
		return
	}
	_labelArg, _err := convertStringToXen(fmt.Sprintf("%s(%s)", _method, "label"), label)
	if _err != nil {
		return
	}
	_result, _err := _class.client.APICall(_method, _sessionIDArg, _labelArg)
	if _err != nil {
		return
	}
	_retval, _err = convertVMRefSetToGo(_method + " -> ", _result.Value)
	return
}
1344482
func (_class VMPPClass) GetByNameLabel(sessionID SessionRef, label string) (_retval []VMPPRef, _err error) {
	_method := "VMPP.get_by_name_label"
	_sessionIDArg, _err := convertSessionRefToXen(fmt.Sprintf("%s(%s)", _method, "session_id"), sessionID)
	if _err != nil {
		return
	}
	_labelArg, _err := convertStringToXen(fmt.Sprintf("%s(%s)", _method, "label"), label)
	if _err != nil {
		return
	}
	_result, _err := _class.client.APICall(_method, _sessionIDArg, _labelArg)
	if _err != nil {
		return
	}
	_retval, _err = convertVMPPRefSetToGo(_method + " -> ", _result.Value)
	return
}
720688
func GetVM(structPtr interface{}) *ViewModel {
	vm, ok := vMap[structPtr]
	if !ok {
		panic("GetVM: Vue not registerd yet")
	}
	return vm
}
383282
func (api *API) GetBaremetalModel(bm_id string) (*BaremetalModel, error) {
	res := new(BaremetalModel)
	url := createUrl(api, serverPathSegment, baremetalSegment, bm_id)
	err := api.Client.Get(url, &res, http.StatusOK)
	if err != nil {
		return nil, err
	}
	//	res.api = api
	return res, nil
}
1104956
func (s *ServiceAntiAffinity) getNodeClassificationByLabels(nodes []*v1.Node) (map[string]string, []string) {
	labeledNodes := map[string]string{}
	nonLabeledNodes := []string{}
	for _, node := range nodes {
		if labels.Set(node.Labels).Has(s.label) {
			label := labels.Set(node.Labels).Get(s.label)
			labeledNodes[node.Name] = label
		} else {
			nonLabeledNodes = append(nonLabeledNodes, node.Name)
		}
	}
	return labeledNodes, nonLabeledNodes
}