// ToSimpleIOStat is a simple version of a DeviceUtilizationReport
437897
func (d DeviceUtilizationReport) ToSimpleIOStat() (SimpleIOStat, error) {
	if d.Device == "" {
		return SimpleIOStat{}, ErrIOStatNoDevice
	}
	return SimpleIOStat{
		Device: d.Device,
		RPS:    d.RPS,
		WPS:    d.WPS,
		Await:  d.Await,
	}, nil
}
1303626
func GetLastIOStat() map[string]iostat.DeviceUtilizationReport {
	lastIOStat.RLock()
	defer lastIOStat.RUnlock()
	return lastIOStat.Data
}
847752
func (service *VboxPortType) IVirtualSystemDescriptiongetCount(request *IVirtualSystemDescriptiongetCount) (*IVirtualSystemDescriptiongetCountResponse, error) {
	response := new(IVirtualSystemDescriptiongetCountResponse)
	err := service.client.Call("", request, response)
	if err != nil {
		return nil, err
	}

	return response, nil
}
1142486
func (t *osCinderCSITranslator) TranslateCSIPVToInTree(pv *v1.PersistentVolume) (*v1.PersistentVolume, error) {
	if pv == nil || pv.Spec.CSI == nil {
		return nil, fmt.Errorf("pv is nil or CSI source not defined on pv")
	}

	csiSource := pv.Spec.CSI

	cinderSource := &v1.CinderPersistentVolumeSource{
		VolumeID: csiSource.VolumeHandle,
		FSType:   csiSource.FSType,
		ReadOnly: csiSource.ReadOnly,
	}

	pv.Spec.CSI = nil
	pv.Spec.Cinder = cinderSource
	return pv, nil
}
673813
func (service *VboxPortType) IGuestFileStateChangedEventgetStatus(request *IGuestFileStateChangedEventgetStatus) (*IGuestFileStateChangedEventgetStatusResponse, error) {
	response := new(IGuestFileStateChangedEventgetStatusResponse)
	err := service.client.Call("", request, response)
	if err != nil {
		return nil, err
	}

	return response, nil
}
649215
func (service *VboxPortType) IGuestsetStatisticsUpdateInterval(request *IGuestsetStatisticsUpdateInterval) (*IGuestsetStatisticsUpdateIntervalResponse, error) {
	response := new(IGuestsetStatisticsUpdateIntervalResponse)
	err := service.client.Call("", request, response)
	if err != nil {
		return nil, err
	}

	return response, nil
}
151316
func (e simpleFSError) ToStatus() keybase1.Status {
	return keybase1.Status{
		Name: e.reason,
		Code: int(keybase1.StatusCode_SCGeneric),
		Desc: e.Error(),
	}
}
557183
func ConvertUsersSimple(request *goa.RequestData, identityIDs []interface{}) []*app.GenericData {
	var ops []*app.GenericData
	for _, identityID := range identityIDs {
		ops = append(ops, ConvertUserSimple(request, identityID))
	}
	return ops
}
1054118
func (i *instanceManager) DeviceStats(d *structs.AllocatedDeviceResource) *device.DeviceGroupStats {
	i.deviceStatsLock.RLock()
	defer i.deviceStatsLock.RUnlock()

	// Find the device in question and then gather the instance statistics we
	// are interested in
	for _, group := range i.deviceStats {
		if group.Vendor != d.Vendor || group.Type != d.Type || group.Name != d.Name {
			continue
		}

		// We found the group we want so now grab the instance stats
		out := &device.DeviceGroupStats{
			Vendor:        d.Vendor,
			Type:          d.Type,
			Name:          d.Name,
			InstanceStats: make(map[string]*device.DeviceStats, len(d.DeviceIDs)),
		}

		for _, id := range d.DeviceIDs {
			out.InstanceStats[id] = group.InstanceStats[id]
		}

		return out
	}

	return nil
}
1240082
func (_m *DBClient) GetDeviceReportById(id string) (models.DeviceReport, error) {
	ret := _m.Called(id)

	var r0 models.DeviceReport
	if rf, ok := ret.Get(0).(func(string) models.DeviceReport); ok {
		r0 = rf(id)
	} else {
		r0 = ret.Get(0).(models.DeviceReport)
	}

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

	return r0, r1
}
618112
func NewDurationRatioStat() *DurationRatioStat {
	return &DurationRatioStat{
		startedAt: make(map[interface{}]time.Time),
		m:         &sync.Mutex{},
	}
}
704555
func Convert_image_ImageImportStatus_To_v1_ImageImportStatus(in *image.ImageImportStatus, out *v1.ImageImportStatus, s conversion.Scope) error {
	return autoConvert_image_ImageImportStatus_To_v1_ImageImportStatus(in, out, s)
}
465691
func (service *VboxPortType) IMachinediscardSettings(request *IMachinediscardSettings) (*IMachinediscardSettingsResponse, error) {
	response := new(IMachinediscardSettingsResponse)
	err := service.client.Call("", request, response)
	if err != nil {
		return nil, err
	}

	return response, nil
}
658317
func (service *VboxPortType) IConsolediscardSavedState(request *IConsolediscardSavedState) (*IConsolediscardSavedStateResponse, error) {
	response := new(IConsolediscardSavedStateResponse)
	err := service.client.Call("", request, response)
	if err != nil {
		return nil, err
	}

	return response, nil
}
902255
func IsAPIServiceConditionTrue(apiService *APIService, conditionType APIServiceConditionType) bool {
	condition := GetAPIServiceConditionByType(apiService, conditionType)
	return condition != nil && condition.Status == ConditionTrue
}
55398
func (service *VboxPortType) IAppliancegetDisks(request *IAppliancegetDisks) (*IAppliancegetDisksResponse, error) {
	response := new(IAppliancegetDisksResponse)
	err := service.client.Call("", request, response)
	if err != nil {
		return nil, err
	}

	return response, nil
}
585288
func (service *VboxPortType) IVirtualBoxgetSettingsFilePath(request *IVirtualBoxgetSettingsFilePath) (*IVirtualBoxgetSettingsFilePathResponse, error) {
	response := new(IVirtualBoxgetSettingsFilePathResponse)
	err := service.client.Call("", request, response)
	if err != nil {
		return nil, err
	}

	return response, nil
}