From d8d0936050fd638233b651a8cb9d348eaee09e59 Mon Sep 17 00:00:00 2001 From: Boris Glimcher Date: Tue, 3 Oct 2023 22:25:50 +0300 Subject: [PATCH] DO NOT MERGE Signed-off-by: Boris Glimcher --- pkg/frontend/nvme_subsystem.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pkg/frontend/nvme_subsystem.go b/pkg/frontend/nvme_subsystem.go index b693c7f0..ee663f66 100644 --- a/pkg/frontend/nvme_subsystem.go +++ b/pkg/frontend/nvme_subsystem.go @@ -59,12 +59,12 @@ func (s *Server) CreateNvmeSubsystem(_ context.Context, in *pb.CreateNvmeSubsyst return subsys, nil } // check if another object exists with same NQN, it is not allowed - for _, item := range s.Subsystems { - if in.NvmeSubsystem.Spec.Nqn == item.Spec.Nqn { - msg := fmt.Sprintf("Could not create NQN: %s since object %s with same NQN already exists", in.NvmeSubsystem.Spec.Nqn, item.Name) - return nil, status.Errorf(codes.AlreadyExists, msg) - } - } + // for _, item := range s.Subsystems { + // if in.NvmeSubsystem.Spec.Nqn == item.Spec.Nqn { + // msg := fmt.Sprintf("Could not create NQN: %s since object %s with same NQN already exists", in.NvmeSubsystem.Spec.Nqn, item.Name) + // return nil, status.Errorf(codes.AlreadyExists, msg) + // } + // } // not found, so create a new one params := models.NvdaSubsystemNvmeCreateParams{ Nqn: in.NvmeSubsystem.Spec.Nqn,