Skip to content

Support for NDFC #152

Open
skaszlik wants to merge 31 commits into
netascode:mainfrom
skaszlik:ndfc-support-v2
Open

Support for NDFC #152
skaszlik wants to merge 31 commits into
netascode:mainfrom
skaszlik:ndfc-support-v2

Conversation

@skaszlik

Copy link
Copy Markdown

Adding support for NDFC with a single fabric and MSD family.

Comment thread nac_collector/cli/main.py Outdated
Comment thread nac_collector/cli/main.py Outdated
Comment thread nac_collector/resources/endpoints/ndfc.yaml Outdated
Comment thread nac_collector/resources/endpoints/ndfc.yaml Outdated
@juburnet

juburnet commented Nov 5, 2025

Copy link
Copy Markdown

@danischm if you can approve the workflow to run on this PR and then check the latest commits by @skaszlik . Thank you!

- Migrate NDFC client to new controller structure using httpx
- Implement MSD fabric detection and topology handling
- Add VPC filtering with embedded interface data
- Update CLI to support NDFC with domain and fabric_name parameters
- Create comprehensive NDFC endpoints configuration
- Maintain compatibility with existing VPC and MSD features
Comment thread docs/NDFC Developer Documentation.md
Comment thread .gitignore Outdated
Comment thread nac_collector/resources/endpoints/ndfc.yaml Outdated
Comment thread nac_collector/resources/endpoints/ndfc.yaml Outdated
Comment thread nac_collector/cli/main.py Outdated
@skaszlik

Copy link
Copy Markdown
Author

Hi @danischm ,

I applied all requested changes. Kindly please take a look and approve the PR if everything good now. Thanks!

FYI: @juburnet

@skaszlik skaszlik requested a review from danischm November 28, 2025 11:55
Comment thread nac_collector/cli/main.py
raise typer.Exit(1)

output_file = output or "nac-collector.zip"
fabric_name = os.getenv("NDFC_FABRIC_NAME")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think that should be in the ndfc code, not in the main

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

agree, @skaszlik can you address this?

Comment thread .gitignore
lib64/
parts/
sdist/
var/

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is there any reason why you remove this from .gitignore? , those standard packaging ignores should be kept ignored

def authenticate(self) -> bool:
"""
Authenticate with NDFC using the credentials provided.
Uses the /logon endpoint for NDFC authentication.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't that be /login ?

processed_count,
)

def _process_serial_interface_children(

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see that being referenced anywhere, looks like this code is never executed

logger.error("Authentication error: %s", str(e))
return False

def collect_data(self, endpoints_file: str) -> dict[str, Any]:

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dead code, I dont see its being executed anywhere, even though NDFC Documentation.md says its EntryPOint

Comment thread nac_collector/cli/main.py
raise typer.Exit(1)

output_file = output or "nac-collector.zip"
fabric_name = os.getenv("NDFC_FABRIC_NAME")

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

agree, @skaszlik can you address this?


elif parent_name == "Discovered_Switches":
self._process_switch_interfaces(parent_endpoint, endpoint_dict)
elif parent_name in self.PORT_CHANNEL_INTERFACE_TYPES:

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this code needs TrunkPort-Channel or AccessPort-Channel but i think those names will never appear cause parent_names looking at ndfc.yaml can be:

MSD_Fabric_Associations, Fabric_Configuration, Discovered_Switches,
VPC_Pairs, Policies, VRF_Configuration, Network_Configuration

so this path is never taken

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants