// Status - Get service status
329024
func (linux *systemDRecord) Status() (string, error) {

	if ok, err := checkPrivileges(); !ok {
		return "", err
	}

	if !linux.isInstalled() {
		return "Status could not defined", ErrNotInstalled
	}

	statusAction, _ := linux.checkRunning()

	return statusAction, nil
}
632690
func (adm *AdminClient) ServiceStatus() (ss ServiceStatus, err error) {
	// Request API to GET service status
	resp, err := adm.executeMethod("GET", requestData{relPath: "/v1/service"})
	defer closeResponse(resp)
	if err != nil {
		return ss, err
	}

	// Check response http status code
	if resp.StatusCode != http.StatusOK {
		return ss, httpRespToErrorResponse(resp)
	}

	respBytes, err := ioutil.ReadAll(resp.Body)
	if err != nil {
		return ss, err
	}

	err = json.Unmarshal(respBytes, &ss)
	return ss, err
}
90509
func (r *Relation) Status() (status.StatusInfo, error) {
	rStatus, err := getStatus(r.st.db(), r.globalScope(), "relation")
	if err != nil {
		return rStatus, err
	}
	return rStatus, nil
}
1322658
func Status(serviceName string,
	serviceDescription string,
	redact bool,
	logger *logrus.Logger) error {

	awsSession := spartaAWS.NewSession(logger)
	cfSvc := cloudformation.New(awsSession)

	params := &cloudformation.DescribeStacksInput{
		StackName: aws.String(serviceName),
	}
	describeStacksResponse, describeStacksResponseErr := cfSvc.DescribeStacks(params)

	if describeStacksResponseErr != nil {
		if strings.Contains(describeStacksResponseErr.Error(), "does not exist") {
			logger.WithField("Region", *awsSession.Config.Region).Info("Stack does not exist")
			return nil
		}
		return describeStacksResponseErr
	}
	if len(describeStacksResponse.Stacks) > 1 {
		return errors.Errorf("More than 1 stack returned for %s. Count: %d",
			serviceName,
			len(describeStacksResponse.Stacks))
	}

	// What's the current accountID?
	redactor := func(stringValue string) string {
		return stringValue
	}
	if redact {
		input := &sts.GetCallerIdentityInput{}
		stsSvc := sts.New(awsSession)
		identityResponse, identityResponseErr := stsSvc.GetCallerIdentity(input)
		if identityResponseErr != nil {
			return identityResponseErr
		}
		redactedValue := strings.Repeat("*", len(*identityResponse.Account))
		redactor = func(stringValue string) string {
			return strings.Replace(stringValue,
				*identityResponse.Account,
				redactedValue,
				-1)
		}
	}

	// Report on what's up with the stack...
	logSectionHeader("Stack Summary", dividerLength, logger)
	stackInfo := describeStacksResponse.Stacks[0]
	logger.WithField("Id", redactor(*stackInfo.StackId)).Info("StackId")
	logger.WithField("Description", redactor(*stackInfo.Description)).Info("Description")
	logger.WithField("State", *stackInfo.StackStatus).Info("Status")
	if stackInfo.StackStatusReason != nil {
		logger.WithField("Reason", *stackInfo.StackStatusReason).Info("Reason")
	}
	logger.WithField("Time", stackInfo.CreationTime.UTC().String()).Info("Created")
	if stackInfo.LastUpdatedTime != nil {
		logger.WithField("Time", stackInfo.LastUpdatedTime.UTC().String()).Info("Last Update")
	}
	if stackInfo.DeletionTime != nil {
		logger.WithField("Time", stackInfo.DeletionTime.UTC().String()).Info("Deleted")
	}

	logger.Info()
	if len(stackInfo.Parameters) != 0 {
		logSectionHeader("Parameters", dividerLength, logger)
		for _, eachParam := range stackInfo.Parameters {
			logger.WithField("Value",
				redactor(*eachParam.ParameterValue)).Info(*eachParam.ParameterKey)
		}
		logger.Info()
	}
	if len(stackInfo.Tags) != 0 {
		logSectionHeader("Tags", dividerLength, logger)
		for _, eachTag := range stackInfo.Tags {
			logger.WithField("Value",
				redactor(*eachTag.Value)).Info(*eachTag.Key)
		}
		logger.Info()
	}
	if len(stackInfo.Outputs) != 0 {
		logSectionHeader("Outputs", dividerLength, logger)
		for _, eachOutput := range stackInfo.Outputs {
			statement := logger.WithField("Value",
				redactor(*eachOutput.OutputValue))
			if eachOutput.ExportName != nil {
				statement.WithField("ExportName", *eachOutput.ExportName)
			}
			statement.Info(*eachOutput.OutputKey)
		}
		logger.Info()
	}
	return nil
}
385034
func Status(r *http.Request, status int) {
	*r = *r.WithContext(context.WithValue(r.Context(), StatusCtxKey, status))
}
376981
func (p *PlatformService) Status() (bool, error) {
	raw, err := p.Request(NewRequestWithMethod("platform/status", "GET"))

	if err != nil {
		return false, err
	}
	/*
		// raw is an interface type, but we only care about len & index 0
		s := make([]int, len(raw))
		for i, v := range raw {
			s[i] = v.(int)
		}
	*/
	return len(raw) > 0 && raw[0].(float64) == 1, nil
}
1084561
func (r *Redis) Status() (interface{}, error) {
	if r.Config.Ping {
		if _, err := r.client.Ping().Result(); err != nil {
			return nil, fmt.Errorf("Ping failed: %v", err)
		}
	}

	if r.Config.Set != nil {
		err := r.client.Set(r.Config.Set.Key, r.Config.Set.Value, r.Config.Set.Expiration).Err()
		if err != nil {
			return nil, fmt.Errorf("Unable to complete set: %v", err)
		}
	}

	if r.Config.Get != nil {
		val, err := r.client.Get(r.Config.Get.Key).Result()
		if err != nil {
			if err == redis.Nil {
				if !r.Config.Get.NoErrorMissingKey {
					return nil, fmt.Errorf("Unable to complete get: '%v' not found", r.Config.Get.Key)
				}
			} else {
				return nil, fmt.Errorf("Unable to complete get: %v", err)
			}
		}

		if r.Config.Get.Expect != "" {
			if r.Config.Get.Expect != val {
				return nil, fmt.Errorf("Unable to complete get: returned value '%v' does not match expected value '%v'",
					val, r.Config.Get.Expect)
			}
		}
	}

	return nil, nil
}
389461
func (c *StatusCommand) Status(client auth.ClientI) error {
	clusterNameResource, err := client.GetClusterName()
	if err != nil {
		return trace.Wrap(err)
	}
	clusterName := clusterNameResource.GetClusterName()

	hostCAs, err := client.GetCertAuthorities(services.HostCA, false)
	if err != nil {
		return trace.Wrap(err)
	}

	userCAs, err := client.GetCertAuthorities(services.UserCA, false)
	if err != nil {
		return trace.Wrap(err)
	}

	// Calculate the CA pin for this cluster. The CA pin is used by the client
	// to verify the identity of the Auth Server.
	caPin, err := calculateCAPin(client)
	if err != nil {
		return trace.Wrap(err)
	}

	authorities := append(userCAs, hostCAs...)
	view := func() string {
		table := asciitable.MakeHeadlessTable(2)
		table.AddRow([]string{"Cluster", clusterName})
		for _, ca := range authorities {
			if ca.GetClusterName() != clusterName {
				continue
			}
			info := fmt.Sprintf("%v CA ", strings.Title(string(ca.GetType())))
			rotation := ca.GetRotation()
			if c.config.Debug {
				table.AddRow([]string{info,
					fmt.Sprintf("%v, update_servers: %v, complete: %v",
						rotation.String(),
						rotation.Schedule.UpdateServers.Format(teleport.HumanDateFormatSeconds),
						rotation.Schedule.Standby.Format(teleport.HumanDateFormatSeconds),
					)})
			} else {
				table.AddRow([]string{info, rotation.String()})
			}

		}
		table.AddRow([]string{"CA pin", caPin})
		return table.AsBuffer().String()
	}
	fmt.Printf(view())

	// in debug mode, output mode of remote certificate authorities
	if c.config.Debug {
		view := func() string {
			table := asciitable.MakeHeadlessTable(2)
			for _, ca := range authorities {
				if ca.GetClusterName() == clusterName {
					continue
				}
				info := fmt.Sprintf("Remote %v CA %q", strings.Title(string(ca.GetType())), ca.GetClusterName())
				rotation := ca.GetRotation()
				table.AddRow([]string{info, rotation.String()})
			}
			return "Remote clusters\n\n" + table.AsBuffer().String()
		}
		fmt.Printf(view())
	}
	return nil
}
151966
func (i sigmaInstance) Status(ctx context.ProviderCallContext) instance.Status {
	entityStatus := i.server.Status()
	logger.Tracef("sigmaInstance.Status: %s", entityStatus)
	jujuStatus := status.Pending
	switch entityStatus {
	case gosigma.ServerStarting:
		jujuStatus = status.Allocating
	case gosigma.ServerRunning:
		jujuStatus = status.Running
	case gosigma.ServerStopping, gosigma.ServerStopped:
		jujuStatus = status.Empty
	case gosigma.ServerUnavailable:
		// I am not sure about this one.
		jujuStatus = status.Pending
	default:
		jujuStatus = status.Pending
	}

	return instance.Status{
		Status:  jujuStatus,
		Message: entityStatus,
	}

}
937006
func (d *Driver) Status() [][2]string {
	return [][2]string{
		{"Backing Filesystem", backingFs},
		{"Supports d_type", strconv.FormatBool(d.supportsDType)},
	}
}
307149
func (r *Response) Status() string {
	if r.RawResponse == nil {
		return ""
	}

	return r.RawResponse.Status
}
191570
func (f Future) Status() string {
	if f.pt == nil {
		return ""
	}
	return f.pt.pollingStatus()
}
181953
func (api *DatabaseAPI) Status(id int64) (*sacloud.DatabaseStatus, error) {
	var (
		method = "GET"
		uri    = fmt.Sprintf("%s/%d/status", api.getResourceURL(), id)
	)

	res := &databaseStatusResponse{}
	err := api.baseAPI.request(method, uri, nil, res)
	if err != nil {
		return nil, err
	}
	return res.Appliance.SettingsResponse, nil
}
72893
func (f *RemoteRuntime) Status(ctx context.Context, req *kubeapi.StatusRequest) (*kubeapi.StatusResponse, error) {
	status, err := f.RuntimeService.Status()
	if err != nil {
		return nil, err
	}

	return &kubeapi.StatusResponse{Status: status}, nil
}
143029
func (w *keystoreWallet) Status() (string, error) {
	w.keystore.mu.RLock()
	defer w.keystore.mu.RUnlock()

	if _, ok := w.keystore.unlocked[w.account.Address]; ok {
		return "Unlocked", nil
	}
	return "Locked", nil
}
563869
func (imp *Importer) Status() *Status {
	imp.m.Lock()
	defer imp.m.Unlock()
	if imp.updates == nil {
		return imp.newStatus()
	}
	return <-imp.updates
}
310378
func (d *Driver) Status() [][2]string {
	return [][2]string{
		{"Backing Filesystem", backingFs},
		{"Supports d_type", strconv.FormatBool(d.supportsDType)},
		{"Native Overlay Diff", strconv.FormatBool(!d.useNaiveDiff())},
		{"Using metacopy", strconv.FormatBool(d.usingMetacopy)},
	}
}