Skip to content

When no vrfs are present on a device, the get_network_instances function fails #2232

@slater-as

Description

@slater-as

| 2025-06-04 08:41:06,181 - nornir.core.task - ERROR - Host 'LAB-HOST-01': task 'NAPALM Validate LAB-HOST-01 with LAB-HOST-01_validate.yaml' failed with traceback:
| Traceback (most recent call last):
| File "/app/venv/lib/python3.12/site-packages/nornir/core/task.py", line 98, in start
| r = self.task(self, **self.params)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| File "/app/venv/lib/python3.12/site-packages/nornir_napalm/plugins/tasks/napalm_validate.py", line 30, in napalm_validate
| r = device.compliance_report(
| ^^^^^^^^^^^^^^^^^^^^^^^^^
| File "/app/venv/lib/python3.12/site-packages/napalm/base/base.py", line 1797, in compliance_report
| return validate.compliance_report(
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
| File "/app/venv/lib/python3.12/site-packages/napalm/base/validate.py", line 271, in compliance_report
| actual_results = getattr(cls, getter)(**kwargs)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| File "/app/venv/lib/python3.12/site-packages/napalm/ios/ios.py", line 3608, in get_network_instances
| vrf_name, RD = re.match(r"^VRF (\S+).RD (.);", first_part).groups()
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| AttributeError: 'NoneType' object has no attribute 'groups'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions