Skip to content

Commit

Permalink
DO NOT MERGE
Browse files Browse the repository at this point in the history
Signed-off-by: Boris Glimcher <[email protected]>
  • Loading branch information
glimchb committed Oct 3, 2023
1 parent a099e46 commit df4bcc0
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions pkg/frontend/nvme_subsystem.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit df4bcc0

Please sign in to comment.