// GetEvaluatedService returns a service where an evaluation has been executed against all templated properties.
439679
func (f *Facade) GetEvaluatedService(ctx datastore.Context, serviceID string, instanceID int) (*service.Service, error) {
	defer ctx.Metrics().Stop(ctx.Metrics().Start("Facade.GetEvaluatedService"))
	logger := plog.WithFields(log.Fields{
		"serviceID":  serviceID,
		"instanceID": instanceID,
	})
	logger.Debug("Started Facade.GetEvaluatedService")
	defer logger.Debug("Finished Facade.GetEvaluatedService")

	svc, err := f.GetService(ctx, serviceID)
	if err != nil {
		return nil, err
	}

	if err := f.evaluateService(ctx, svc, instanceID); err != nil {
		return nil, err
	}
	return svc, nil
}
650730
func (r Hardware_Router) GetServiceProvider() (resp datatypes.Service_Provider, err error) {
	err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getServiceProvider", nil, &r.Options, &resp)
	return
}
886473
func getService(req *api.GenerateServiceRequest, id api.ServiceID) *api.Service {
	return req.Services[id]
}
1012519
func (_m *State) GetServices() []types.Service {
	ret := _m.Called()

	var r0 []types.Service
	if rf, ok := ret.Get(0).(func() []types.Service); ok {
		r0 = rf()
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]types.Service)
		}
	}

	return r0
}
616064
func (ep *EtcdClient) GetService(name string) ([]ServiceInfo, error) {
	keyName := "/contiv.io/service/" + name + "/"

	_, srvcList, err := ep.getServiceState(keyName)
	return srvcList, err
}
420749
func (d *Debugger) EvalVariableInScope(scope api.EvalScope, symbol string, cfg proc.LoadConfig) (*api.Variable, error) {
	d.processMutex.Lock()
	defer d.processMutex.Unlock()

	s, err := proc.ConvertEvalScope(d.target, scope.GoroutineID, scope.Frame, scope.DeferredCall)
	if err != nil {
		return nil, err
	}
	v, err := s.EvalVariable(symbol, cfg)
	if err != nil {
		return nil, err
	}
	return api.ConvertVar(v), err
}
200663
func NewEvaluator(
	scanner scanner.Scanner,
	interpreters Interpreters) Evaluator {
	return NewEvaluatorWithOptions(scanner, interpreters, Options{})
}
1191948
func (client *Client) GetService() (*GetServiceResp, error) {
	bucket := client.Bucket("")

	r, err := bucket.Get("")
	if err != nil {
		return nil, err
	}

	// Parse the XML response.
	var resp GetServiceResp
	if err = xml.Unmarshal(r, &resp); err != nil {
		return nil, err
	}

	return &resp, nil
}
1165460
func (this *ControlPlaneDao) GetService(id string, myService *service.Service) error {
	svc, err := this.facade.GetService(datastore.Get(), id)
	if svc != nil {
		*myService = *svc
	}
	return err
}
982148
func (service *Service) EvaluatePrereqsTemplate(gs GetService, fc FindChildService, instanceID int) (err error) {
	log.WithFields(log.Fields{
		"servicename": service.Name,
		"serviceid": service.ID,
		"instanceid": instanceID,
	}).Debug("Evaluating Prereq scripts")

	for i, prereq := range service.Prereqs {
		err, result := service.evaluateTemplate(gs, fc, instanceID, prereq.Script)
		if err != nil {
			return err
		}
		if result != "" {
			prereq.Script = result
			service.Prereqs[i] = prereq
		}
	}
	return
}
906175
func (s *Server) GetService(serviceID string, svc *service.Service) error {
	sv, err := s.f.GetService(s.context(), serviceID)
	if err != nil {
		return err
	}
	*svc = *sv
	return nil
}
1327425
func GetServiceVersion(c context.Context, defaultVer string) string {
	if md, ok := metadata.FromIncomingContext(c); ok {
		values := md[VersionMetadataKey]
		if len(values) != 0 {
			return values[0]
		}
	}
	return defaultVer
}
561967
func (c *Client) GetServices() ([]*models.Service, error) {
	resp, err := c.Service.GetService(nil)
	if err != nil {
		return nil, Hint(err)
	}
	return resp.Payload, nil
}
851929
func (s *Server) GetServiceTemplates(unused struct{}, response *map[string]servicetemplate.ServiceTemplate) error  {
	templates, err := s.f.GetServiceTemplates(s.context())
	if err != nil {
		return err
	}
	*response = templates
	return nil
}
1031779
func (service *Service) EvaluateHealthCheckTemplate(gs GetService, fc FindChildService, instanceID int) (err error) {
	log.WithFields(log.Fields{
		"servicename": service.Name,
		"serviceid": service.ID,
		"instanceid": instanceID,
	}).Debug("Evaluating HealthCheck scripts")

	for key, healthcheck := range service.HealthChecks {
		err, result := service.evaluateTemplate(gs, fc, instanceID, healthcheck.Script)
		if err != nil {
			return err
		}
		if result != "" {
			healthcheck.Script = result
			service.HealthChecks[key] = healthcheck
		}
	}
	return
}
578711
func (c *ConfigurationData) GetCheServiceURL() string {
	if c.IsPostgresDeveloperModeEnabled() {
		return devModeCheServiceURL
	}
	return c.v.GetString(varCheServiceURL)
}
587486
func (_m *ClientInterface) GetServiceTemplates() (map[string]servicetemplate.ServiceTemplate, error) {
	ret := _m.Called()

	var r0 map[string]servicetemplate.ServiceTemplate
	if rf, ok := ret.Get(0).(func() map[string]servicetemplate.ServiceTemplate); ok {
		r0 = rf()
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(map[string]servicetemplate.ServiceTemplate)
		}
	}

	var r1 error
	if rf, ok := ret.Get(1).(func() error); ok {
		r1 = rf()
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}