Skip to content

Add NetworkConfig app for RESTCONF and NETCONF device management#146

Open
bernarmn-mnb wants to merge 1 commit intoelastic:mainfrom
bernarmn-mnb:main
Open

Add NetworkConfig app for RESTCONF and NETCONF device management#146
bernarmn-mnb wants to merge 1 commit intoelastic:mainfrom
bernarmn-mnb:main

Conversation

@bernarmn-mnb
Copy link
Copy Markdown
Collaborator

Summary

  • Adds a new NetworkConfig Django app providing a sidebar tab for managing network devices via RESTCONF and NETCONF, following the same patterns as the existing SNMP module
  • Implements Device, Credential (Fernet-encrypted secrets), and Profile models with full CRUD
  • Includes a live Test Connection endpoint that attempts a RESTCONF GET or NETCONF hello against the device and updates its status badge in real time

Details

  • Models: Device (vendor, hostname, REST/NETCONF ports, last status), Credential (Basic, Bearer Token, API Key — secrets encrypted at rest), Profile (JSON blob of YANG paths / REST endpoints)
  • API: paginated GetDevices with search/sort/filter, full CRUD for all three models, TestDeviceConnection supporting RESTCONF and NETCONF
  • UI: Devices, Credentials, and Profiles pages with slide-in modals, live status badges, and action menus — consistent with the SNMP UI
  • Sidebar: "Network Config" collapsible section added between SNMP and Utilities
  • Migration: 0001_initial included

Test plan

  • Run python manage.py migrate — should apply NetworkConfig.0001_initial cleanly
  • Navigate to /NetworkConfig/Devices/ — empty state shown, "Add Device" opens modal
  • Add a credential, then add a device referencing it
  • Click Test on a device — status badge updates to Reachable/Unreachable
  • Add a profile with valid JSON — saved and listed in the Profiles tab
  • Edit and delete each entity type
  • Confirm sidebar "Network Config" section highlights correctly on each sub-page

Dependencies

To enable NETCONF testing, add to requirements.txt:

ncclient==0.6.15

RESTCONF testing works out of the box via the existing requests library.

🤖 Generated with Claude Code

Scaffolds a new Django app providing a UI tab for managing network
devices via RESTful/RESTCONF APIs and NETCONF (ncclient), following
the same patterns as the existing SNMP module.

- Models: Device, Credential (Fernet-encrypted secrets), Profile
- Full CRUD API (netconfig_crud.py) with pagination, search, and sort
- TestDeviceConnection endpoint: live RESTCONF GET or NETCONF hello
- Templates: Devices, Credentials, Profiles pages with slide-in modals
- JS: table with status badges, test button, action menus
- Sidebar navigation entry between SNMP and Utilities
- Initial migration applied (0001_initial)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@cla-checker-service
Copy link
Copy Markdown

❌ Author of the following commits did not sign a Contributor Agreement:
7583b53

Please, read and sign the above mentioned agreement if you want to contribute to this project

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.

1 participant