-
Notifications
You must be signed in to change notification settings - Fork 12
docs: add command to generate docs #119
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
aafb978
to
abe6e51
Compare
☂️ Python Coverage
Overall Coverage
New Files
Modified FilesNo covered modified files...
|
@jajeffries awesome! I think we're missing the "builtin" matchers here if I'm reading correctly (the ones driven by NetBox unique constraints) -- one idea is to enumerate the model types using
|
If it gets too weird to walk all these types and interrogate for docs, I think would be reasonable to add a method or methods to "matcher" types that generates a standardized info that's useful for documentation. Maybe overkill at this point though, not sure how specialized they are or if there's already enough hanging out that's standard. |
@ltucker committed an update with the builtin matchers. I think it works out everything ok based on the types. |
super helpful. I think one followup to consider here is ordering -- they essentially have a priority that is determined by the order they come back from |
@ltucker after trying a few different wordings I've settled on 'Order of Precedence'. What do you think? |
Looks like there are still a few linter comments to clean up. The |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good overall -- small linting things, feel free to merge after cleanup.
This pull request introduces functionality to generate documentation for object matching criteria in the NetBox Diode Plugin. Key changes include the addition of a new Django management command, updates to the
Makefile
andREADME.md
, and the creation of a documentation file. These changes aim to improve transparency and usability by providing detailed matching criteria for various object types.New functionality for generating documentation:
netbox_diode_plugin/management/commands/generate_matching_docs.py
: Added a Django management command to generate markdown documentation for object matching criteria. This includes analyzing logical matchers, extracting conditions, and generating a structured markdown table.Makefile
: Added new targetsdocker-compose-generate-matching-docs
anddocker-compose-migrate
to facilitate generating documentation and running migrations via Docker.Documentation updates:
README.md
: Added instructions for generating documentation using the newdocker-compose-generate-matching-docs
command.docs/matching-criteria-documentation.md
: Created a comprehensive markdown file describing how the plugin matches objects, including matcher names, fields, conditions, descriptions, and version constraints.Minor structural additions:
netbox_diode_plugin/management/__init__.py
: Added a package-level docstring for the management package.netbox_diode_plugin/management/commands/__init__.py
: Added a module-level docstring for the management commands package.This pull request introduces new functionality for generating documentation related to diode entity matching and updates theMakefile
andREADME.md
accordingly. The changes include adding newMakefile
targets and updating the documentation to guide users on how to use these features.New functionality for documentation generation:
Makefile
: Added two new targets,docker-compose-generate-matching-docs
anddocker-compose-migrate
, to facilitate the generation of matching criteria documentation and database migrations.README.md
: Updated to include instructions for generating matching criteria documentation using the newdocker-compose-generate-matching-docs
target.Example output
NetBox Diode Plugin - Object Matching Criteria
This document describes how the Diode NetBox Plugin matches existing objects when applying changes. The matchers will be applied in the order of their precedence, unttil one of them matches.
Matcher Types
circuits.circuit
circuits.circuitgroup
circuits.circuitgroupassignment
circuits.circuittermination
circuits.circuittype
circuits.provider
circuits.provideraccount
circuits.providernetwork
circuits.virtualcircuit
circuits.virtualcircuittermination
circuits.virtualcircuittype
dcim.cabletermination
dcim.consoleport
dcim.consoleporttemplate
dcim.consoleserverport
dcim.consoleserverporttemplate
dcim.device
dcim.devicebay
dcim.devicebaytemplate
dcim.devicerole
dcim.devicetype
dcim.frontport
dcim.frontporttemplate
dcim.interface
dcim.interfacetemplate
dcim.inventoryitem
dcim.inventoryitemrole
dcim.inventoryitemtemplate
dcim.location
dcim.macaddress
dcim.manufacturer
dcim.module
dcim.modulebay
dcim.modulebaytemplate
dcim.moduletype
dcim.platform
dcim.powerfeed
dcim.poweroutlet
dcim.poweroutlettemplate
dcim.powerpanel
dcim.powerport
dcim.powerporttemplate
dcim.rack
dcim.rackrole
dcim.racktype
dcim.rearport
dcim.rearporttemplate
dcim.region
dcim.site
dcim.sitegroup
dcim.virtualchassis
dcim.virtualdevicecontext
extras.bookmark
extras.configcontext
extras.customfield
extras.customfieldchoiceset
extras.customlink
extras.eventrule
extras.notificationgroup
extras.savedfilter
extras.script
extras.tag
extras.webhook
ipam.aggregate
ipam.asn
ipam.asnrange
ipam.fhrpgroup
ipam.fhrpgroupassignment
ipam.ipaddress
ipam.iprange
ipam.prefix
ipam.rir
ipam.role
ipam.routetarget
ipam.service
ipam.servicetemplate
ipam.vlan
ipam.vlangroup
ipam.vlantranslationpolicy
ipam.vlantranslationrule
ipam.vrf
tenancy.contact
tenancy.contactassignment
tenancy.contactgroup
tenancy.contactrole
tenancy.tenant
tenancy.tenantgroup
virtualization.cluster
virtualization.clustergroup
virtualization.clustertype
virtualization.virtualdisk
virtualization.virtualmachine
virtualization.vminterface
vpn.ikepolicy
vpn.ikeproposal
vpn.ipsecpolicy
vpn.ipsecprofile
vpn.ipsecproposal
vpn.l2vpn
vpn.l2vpntermination
vpn.tunnel
vpn.tunnelgroup
vpn.tunneltermination
wireless.wirelesslan
wireless.wirelesslangroup
wireless.wirelesslink