Skip to content

[frontend][nvme][ctrl] UpdateNvmeController: use AllowMissing #886

@han-minhee

Description

@han-minhee

Currently, inside UpdateNvmeController, AllowMissing is not used.

	// fetch object from the database
	ctrlr, ok := s.Nvme.Controllers[in.NvmeController.Name]
	if !ok {
		if in.AllowMissing {
			log.Printf("TODO: in case of AllowMissing, create a new resource, don't return error")
		}
		err := status.Errorf(codes.NotFound, "unable to find key %s", in.NvmeController.Name)
		return nil, err
	}

If AllowMissing is set and if the NvmeController doesn't exist, it should make a new NvmeController.
I'm working on this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions