@@ -354,7 +354,9 @@ class NicCollector(InBandDataCollector[NicDataModel, NicCollectorArgs]):
354354 CMD_NICCLI_QOS_TEMPLATE_LEGACY ,
355355 ]
356356 # New (> v233): double-dash options and qos --ets --show
357- CMD_NICCLI_SUPPORT_RDMA_TEMPLATE_NEW = "niccli --dev {device_num} nvm --getoption support_rdma"
357+ CMD_NICCLI_SUPPORT_RDMA_TEMPLATE_NEW = (
358+ "niccli --dev {device_num} nvm --getoption support_rdma --scope 0"
359+ )
358360 CMD_NICCLI_PERFORMANCE_PROFILE_TEMPLATE_NEW = (
359361 "niccli --dev {device_num} nvm --getoption performance_profile"
360362 )
@@ -471,6 +473,19 @@ def collect_data(
471473 card_ids = [c .id for c in legacy_cards ]
472474 card_list_from_text = [c .model_dump () for c in legacy_cards ]
473475
476+ if custom_commands is None and not device_nums and not card_ids :
477+ self ._log_event (
478+ category = EventCategory .NETWORK ,
479+ description = "No Broadcom (niccli) or Pensando (nicctl) NIC hardware detected" ,
480+ priority = EventPriority .INFO ,
481+ )
482+ self .result .status = ExecutionStatus .NOT_RAN
483+ self .result .message = (
484+ "No Broadcom (niccli) or Pensando (nicctl) NIC hardware detected; "
485+ "NIC collection skipped"
486+ )
487+ return self .result , None
488+
474489 # Build full command list (expand placeholders)
475490 if custom_commands is not None :
476491 commands_to_run : List [str ] = []
@@ -486,18 +501,19 @@ def collect_data(
486501 else :
487502 commands_to_run = []
488503 # niccli list already stored
489- per_device_templates = _get_niccli_per_device_templates (niccli_version )
490- for tpl in per_device_templates :
491- for d in device_nums :
492- commands_to_run .append (tpl .format (device_num = d ))
493- # nicctl global (card discovery already done via CMD_NICCTL_CARD_TEXT)
494- for c in NicCollector .CMD_NICCTL_GLOBAL :
495- commands_to_run .append (c )
496- for tpl in NicCollector .CMD_NICCTL_PER_CARD :
497- for cid in card_ids :
498- commands_to_run .append (tpl .format (card_id = cid ))
499- for cmd in NicCollector .CMD_NICCTL_LEGACY_TEXT :
500- commands_to_run .append (cmd )
504+ if device_nums :
505+ per_device_templates = _get_niccli_per_device_templates (niccli_version )
506+ for tpl in per_device_templates :
507+ for d in device_nums :
508+ commands_to_run .append (tpl .format (device_num = d ))
509+ if card_ids :
510+ for c in NicCollector .CMD_NICCTL_GLOBAL :
511+ commands_to_run .append (c )
512+ for tpl in NicCollector .CMD_NICCTL_PER_CARD :
513+ for cid in card_ids :
514+ commands_to_run .append (tpl .format (card_id = cid ))
515+ for cmd in NicCollector .CMD_NICCTL_LEGACY_TEXT :
516+ commands_to_run .append (cmd )
501517
502518 # Run each command and store (artifact-only commands are not added to results / data model).
503519 for cmd in commands_to_run :
0 commit comments