Skip to content

Commit

Permalink
Merge pull request #33 from dell/bug_fix_tenant_changes
Browse files Browse the repository at this point in the history
Bug/KRV-1495: Invalid tenant name doesn't fail node registration
  • Loading branch information
prasar6 committed Nov 17, 2021
2 parents 3dd023b + 4681e9c commit c6d9539
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions service/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -1762,12 +1762,16 @@ func (s *service) addNewNodeToArray(ctx context.Context, array *StorageArrayConf
}
}

host, err := hostAPI.CreateHost(ctx, s.opts.LongNodeName, tenantID)
var hostContent types.HostContent
if tenantName != "" && tenantID == "" {
return status.Error(codes.Internal, utils.GetMessageWithRunID(rid, "Please enter Valid tenant Name : %s", tenantName))

}
host, err := hostAPI.CreateHost(ctx, s.opts.LongNodeName, tenantID)
if err != nil {
return err
}
hostContent := host.HostContent
hostContent = host.HostContent
log.Debugf("New Host Id: %s", hostContent.ID)

//Create Host Ip Port
Expand Down

0 comments on commit c6d9539

Please sign in to comment.