// List lists the NMS-servers from the database
List lists the NMS-servers from the database
// List lists the NMS - servers from the database
func (s NmsService) List(ctx context.Context, r api.NmsListRequest) (*api.NmsListResponse, error) {
	s.logger.Debug("Getting NMS-list")
	var nms []api.Nms
	if err := s.db.Preload("Licences").Find(&nms).Error; err != nil {
		s.logger.Error("Cannot get NMS-list", zap.String("exception", err.Error()))
		return nil, err
	}
	s.logger.Debug("Got NMS-list", zap.Int("amount", len(nms)))
	return &api.NmsListResponse{Nms: nms}, nil
}
func ( s NmsService ) List ( ctx context . Context , r api . NmsListRequest ) ( * api . NmsListResponse , error ) { s . logger . Debug ( " " ) var nms [ ] api . Nms if err := s . db . Preload ( " " ) . Find ( & nms ) . Error ; err != nil { s . logger . Error ( " " , zap . String ( " " , err . Error ( ) ) ) return nil , err } s . logger . Debug ( " " , zap . Int ( " " , len ( nms ) ) ) return & api . NmsListResponse { Nms : nms } , nil }
List lists the NMS-servers from the database
List lists the NMS - servers from the database