// Update volume
10205
func (v *volumeClient) Set(volumeID string, locator *api.VolumeLocator,
	spec *api.VolumeSpec) error {
	return v.doVolumeSet(
		volumeID,
		&api.VolumeSetRequest{
			Locator: locator,
			Spec:    spec,
		},
	)
}
56494
func (s *service) Update(ctx context.Context, r *taskAPI.UpdateTaskRequest) (*ptypes.Empty, error) {
	return nil, errdefs.ErrNotImplemented
}
1338640
func (c *Container) Update(ctx context.Context, r *task.UpdateTaskRequest) error {
	p, err := c.Process("")
	if err != nil {
		return err
	}
	return p.(*proc.Init).Update(ctx, r.Resources)
}
845763
func (s *Storage) Update(rls *rspb.Release) error {
	s.Log("updating release %q", makeKey(rls.Name, rls.Version))
	return s.Driver.Update(makeKey(rls.Name, rls.Version), rls)
}
727388
func (c *Client) UploadVolume(p *UploadVolumeParameter) (*Volume, error) {
	obj, err := c.Request("uploadVolume", convertParamToMap(p))
	if err != nil {
		return nil, err
	}
	return obj.(*Volume), err
}
886624
func (af *avgFunction) Update(row []types.Datum, groupKey []byte, ctx context.Context) error {
	if af.mode == FinalMode {
		return af.updateAvg(row, groupKey, ctx)
	}
	return af.updateSum(row, groupKey, ctx)
}
81966
func (p *SdkPolicyManager) Update(
	ctx context.Context,
	req *api.SdkOpenStoragePolicyUpdateRequest,
) (*api.SdkOpenStoragePolicyUpdateResponse, error) {
	if req.GetStoragePolicy().GetName() == "" {
		return nil, status.Error(codes.InvalidArgument, "Must supply a Storage Policy Name")
	}

	if req.GetStoragePolicy().GetPolicy() == nil {
		return nil, status.Error(codes.InvalidArgument, "Must supply Volume Specs")
	}

	// Get Existing details to check access
	oldPolicy, err := p.Inspect(ctx,
		&api.SdkOpenStoragePolicyInspectRequest{
			Name: req.GetStoragePolicy().GetName(),
		},
	)
	if err != nil {
		return nil, err
	}
	// update user must have write acess
	if !oldPolicy.GetStoragePolicy().IsPermitted(ctx, api.Ownership_Write) {
		return nil, status.Errorf(codes.PermissionDenied, "Cannot update storage policy")
	}

	m := jsonpb.Marshaler{OrigName: true}
	updateStr, err := m.MarshalToString(req.GetStoragePolicy())
	if err != nil {
		return nil, status.Errorf(codes.Internal, "Json Marshal failed for policy %s: %v", req.GetStoragePolicy().GetName(), err)
	}

	// check ownership update is request
	if req.GetStoragePolicy().GetOwnership() != nil {
		if oldPolicy.StoragePolicy.Ownership == nil {
			oldPolicy.StoragePolicy.Ownership = &api.Ownership{}
		}
		user, _ := auth.NewUserInfoFromContext(ctx)
		// we run through ownership for update to check whether given user
		// is administrator, only admin can update ownership details
		if err := oldPolicy.StoragePolicy.Ownership.Update(req.GetStoragePolicy().GetOwnership(), user); err != nil {
			logrus.Errorf("Error updating ownership: %v", err)
			return nil, err
		}
	}
	_, err = p.kv.Update(prefixWithName(req.GetStoragePolicy().GetName()), updateStr, 0)
	if err == kvdb.ErrNotFound {
		return nil, status.Errorf(codes.NotFound, "Storage Policy %s not found", req.GetStoragePolicy().GetPolicy())
	} else if err != nil {
		return nil, status.Errorf(codes.Internal, "Failed to update storage policy: %v", err)
	}

	logrus.Infof("Storage Policy %v is updated", req.GetStoragePolicy().GetName())
	return &api.SdkOpenStoragePolicyUpdateResponse{}, nil
}
103996
func (c *volumeAttachments) Update(volumeAttachment *v1alpha1.VolumeAttachment) (result *v1alpha1.VolumeAttachment, err error) {
	result = &v1alpha1.VolumeAttachment{}
	err = c.client.Put().
		Resource("volumeattachments").
		Name(volumeAttachment.Name).
		Body(volumeAttachment).
		Do().
		Into(result)
	return
}
218072
func (s *VolumeService) NewUpdateVolumeParams() *UpdateVolumeParams {
	p := &UpdateVolumeParams{}
	p.p = make(map[string]interface{})
	return p
}
276424
func Update(out Output, id, action string) {
	out.WriteProgress(Progress{ID: id, Action: action})
}
410246
func (s *awsService) Update(ctx context.Context, group Elastigroup) error {
	input := &aws.UpdateGroupInput{
		Group: group.Obj().(*aws.Group),
	}

	_, err := s.svc.Update(ctx, input)
	return err

}
659999
func (s *DB) Update(attrs ...interface{}) *DB {
	return s.Updates(toSearchableMap(attrs...), true)
}
201470
func (r *ReleasesService) Update(params interface{}) (release *Release, result *Result) {
	result = r.client.patch(r.URL, params, &release)
	return
}
1253436
func (e *ErrorRate) Update(rate float64) {
	e.QueryTotal++
	e.ErrorTotal += rate
}
899058
func (c *FakePersistentVolumes) Update(persistentVolume *corev1.PersistentVolume) (result *corev1.PersistentVolume, err error) {
	obj, err := c.Fake.
		Invokes(testing.NewRootUpdateAction(persistentvolumesResource, persistentVolume), &corev1.PersistentVolume{})
	if obj == nil {
		return nil, err
	}
	return obj.(*corev1.PersistentVolume), err
}
332721
func update() {
	mu.Lock()
	mixer.Stream(samples)
	mu.Unlock()

	for i := range samples {
		for c := range samples[i] {
			val := samples[i][c]
			if val < -1 {
				val = -1
			}
			if val > +1 {
				val = +1
			}
			valInt16 := int16(val * (1<<15 - 1))
			low := byte(valInt16)
			high := byte(valInt16 >> 8)
			buf[i*4+c*2+0] = low
			buf[i*4+c*2+1] = high
		}
	}

	player.Write(buf)
}
613115
func (su *StatusUpdater) Update(status interface{}) {
	su.Status = status.(string)

	// initialize event ID
	if su.EventID == 0 {
		su.EventID = time.Now().UnixNano()
	}
}