netbox-cesnet-services-plugin 6.2.0__tar.gz → 6.3.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {netbox_cesnet_services_plugin-6.2.0/netbox_cesnet_services_plugin.egg-info → netbox_cesnet_services_plugin-6.3.0}/PKG-INFO +4 -2
- {netbox_cesnet_services_plugin-6.2.0 → netbox_cesnet_services_plugin-6.3.0}/README.md +3 -1
- {netbox_cesnet_services_plugin-6.2.0 → netbox_cesnet_services_plugin-6.3.0}/netbox_cesnet_services_plugin/__init__.py +1 -1
- {netbox_cesnet_services_plugin-6.2.0 → netbox_cesnet_services_plugin-6.3.0}/netbox_cesnet_services_plugin/api/serializers.py +27 -1
- {netbox_cesnet_services_plugin-6.2.0 → netbox_cesnet_services_plugin-6.3.0}/netbox_cesnet_services_plugin/api/urls.py +1 -0
- {netbox_cesnet_services_plugin-6.2.0 → netbox_cesnet_services_plugin-6.3.0}/netbox_cesnet_services_plugin/api/views.py +13 -0
- {netbox_cesnet_services_plugin-6.2.0 → netbox_cesnet_services_plugin-6.3.0}/netbox_cesnet_services_plugin/filtersets/__init__.py +2 -0
- {netbox_cesnet_services_plugin-6.2.0 → netbox_cesnet_services_plugin-6.3.0}/netbox_cesnet_services_plugin/filtersets/service_endpoint.py +13 -1
- {netbox_cesnet_services_plugin-6.2.0 → netbox_cesnet_services_plugin-6.3.0}/netbox_cesnet_services_plugin/filtersets/service_ip.py +11 -2
- netbox_cesnet_services_plugin-6.3.0/netbox_cesnet_services_plugin/filtersets/service_pni.py +87 -0
- {netbox_cesnet_services_plugin-6.2.0 → netbox_cesnet_services_plugin-6.3.0}/netbox_cesnet_services_plugin/forms/__init__.py +4 -0
- {netbox_cesnet_services_plugin-6.2.0 → netbox_cesnet_services_plugin-6.3.0}/netbox_cesnet_services_plugin/forms/service_endpoint.py +11 -3
- {netbox_cesnet_services_plugin-6.2.0 → netbox_cesnet_services_plugin-6.3.0}/netbox_cesnet_services_plugin/forms/service_ip.py +16 -8
- netbox_cesnet_services_plugin-6.3.0/netbox_cesnet_services_plugin/forms/service_pni.py +127 -0
- {netbox_cesnet_services_plugin-6.2.0 → netbox_cesnet_services_plugin-6.3.0}/netbox_cesnet_services_plugin/graphql/filters.py +13 -0
- {netbox_cesnet_services_plugin-6.2.0 → netbox_cesnet_services_plugin-6.3.0}/netbox_cesnet_services_plugin/graphql/schema.py +4 -0
- {netbox_cesnet_services_plugin-6.2.0 → netbox_cesnet_services_plugin-6.3.0}/netbox_cesnet_services_plugin/graphql/types.py +25 -0
- netbox_cesnet_services_plugin-6.3.0/netbox_cesnet_services_plugin/migrations/0025_servicepni_tcp_ao.py +55 -0
- {netbox_cesnet_services_plugin-6.2.0 → netbox_cesnet_services_plugin-6.3.0}/netbox_cesnet_services_plugin/models/__init__.py +1 -0
- {netbox_cesnet_services_plugin-6.2.0 → netbox_cesnet_services_plugin-6.3.0}/netbox_cesnet_services_plugin/models/service_endpoint.py +1 -1
- {netbox_cesnet_services_plugin-6.2.0 → netbox_cesnet_services_plugin-6.3.0}/netbox_cesnet_services_plugin/models/service_ip.py +23 -4
- netbox_cesnet_services_plugin-6.3.0/netbox_cesnet_services_plugin/models/service_pni.py +111 -0
- {netbox_cesnet_services_plugin-6.2.0 → netbox_cesnet_services_plugin-6.3.0}/netbox_cesnet_services_plugin/navigation.py +5 -0
- {netbox_cesnet_services_plugin-6.2.0 → netbox_cesnet_services_plugin-6.3.0}/netbox_cesnet_services_plugin/tables/__init__.py +2 -0
- {netbox_cesnet_services_plugin-6.2.0 → netbox_cesnet_services_plugin-6.3.0}/netbox_cesnet_services_plugin/tables/service_ip.py +2 -1
- netbox_cesnet_services_plugin-6.3.0/netbox_cesnet_services_plugin/tables/service_pni.py +34 -0
- {netbox_cesnet_services_plugin-6.2.0 → netbox_cesnet_services_plugin-6.3.0}/netbox_cesnet_services_plugin/template_content.py +9 -1
- {netbox_cesnet_services_plugin-6.2.0 → netbox_cesnet_services_plugin-6.3.0}/netbox_cesnet_services_plugin/templates/netbox_cesnet_services_plugin/serviceipbgpsession/serviceipbgpsession.html +5 -1
- netbox_cesnet_services_plugin-6.3.0/netbox_cesnet_services_plugin/templates/netbox_cesnet_services_plugin/servicepni/servicepni.html +130 -0
- netbox_cesnet_services_plugin-6.3.0/netbox_cesnet_services_plugin/templates/netbox_cesnet_services_plugin/servicepni.html +2 -0
- {netbox_cesnet_services_plugin-6.2.0 → netbox_cesnet_services_plugin-6.3.0}/netbox_cesnet_services_plugin/tests/test_related_objects.py +16 -7
- netbox_cesnet_services_plugin-6.3.0/netbox_cesnet_services_plugin/tests/test_service_pni.py +372 -0
- {netbox_cesnet_services_plugin-6.2.0 → netbox_cesnet_services_plugin-6.3.0}/netbox_cesnet_services_plugin/urls.py +2 -0
- {netbox_cesnet_services_plugin-6.2.0 → netbox_cesnet_services_plugin-6.3.0}/netbox_cesnet_services_plugin/views/__init__.py +15 -0
- {netbox_cesnet_services_plugin-6.2.0 → netbox_cesnet_services_plugin-6.3.0}/netbox_cesnet_services_plugin/views/service_endpoint.py +2 -2
- netbox_cesnet_services_plugin-6.3.0/netbox_cesnet_services_plugin/views/service_pni.py +68 -0
- {netbox_cesnet_services_plugin-6.2.0 → netbox_cesnet_services_plugin-6.3.0/netbox_cesnet_services_plugin.egg-info}/PKG-INFO +4 -2
- {netbox_cesnet_services_plugin-6.2.0 → netbox_cesnet_services_plugin-6.3.0}/netbox_cesnet_services_plugin.egg-info/SOURCES.txt +9 -0
- {netbox_cesnet_services_plugin-6.2.0 → netbox_cesnet_services_plugin-6.3.0}/CONTRIBUTING.md +0 -0
- {netbox_cesnet_services_plugin-6.2.0 → netbox_cesnet_services_plugin-6.3.0}/LICENSE +0 -0
- {netbox_cesnet_services_plugin-6.2.0 → netbox_cesnet_services_plugin-6.3.0}/MANIFEST.in +0 -0
- {netbox_cesnet_services_plugin-6.2.0 → netbox_cesnet_services_plugin-6.3.0}/netbox_cesnet_services_plugin/api/__init__.py +0 -0
- {netbox_cesnet_services_plugin-6.2.0 → netbox_cesnet_services_plugin-6.3.0}/netbox_cesnet_services_plugin/choices.py +0 -0
- {netbox_cesnet_services_plugin-6.2.0 → netbox_cesnet_services_plugin-6.3.0}/netbox_cesnet_services_plugin/filtersets/bgpconnection.py +0 -0
- {netbox_cesnet_services_plugin-6.2.0 → netbox_cesnet_services_plugin-6.3.0}/netbox_cesnet_services_plugin/filtersets/bgpconnection_aggregation.py +0 -0
- {netbox_cesnet_services_plugin-6.2.0 → netbox_cesnet_services_plugin-6.3.0}/netbox_cesnet_services_plugin/filtersets/lldpneighbor.py +0 -0
- {netbox_cesnet_services_plugin-6.2.0 → netbox_cesnet_services_plugin-6.3.0}/netbox_cesnet_services_plugin/filtersets/lldpneighborleaf.py +0 -0
- {netbox_cesnet_services_plugin-6.2.0 → netbox_cesnet_services_plugin-6.3.0}/netbox_cesnet_services_plugin/filtersets/service_core_link.py +0 -0
- {netbox_cesnet_services_plugin-6.2.0 → netbox_cesnet_services_plugin-6.3.0}/netbox_cesnet_services_plugin/filtersets/service_core_trunk.py +0 -0
- {netbox_cesnet_services_plugin-6.2.0 → netbox_cesnet_services_plugin-6.3.0}/netbox_cesnet_services_plugin/filtersets/service_l2vpn.py +0 -0
- {netbox_cesnet_services_plugin-6.2.0 → netbox_cesnet_services_plugin-6.3.0}/netbox_cesnet_services_plugin/filtersets/service_nni.py +0 -0
- {netbox_cesnet_services_plugin-6.2.0 → netbox_cesnet_services_plugin-6.3.0}/netbox_cesnet_services_plugin/filtersets/utils.py +0 -0
- {netbox_cesnet_services_plugin-6.2.0 → netbox_cesnet_services_plugin-6.3.0}/netbox_cesnet_services_plugin/forms/bgpconnection.py +0 -0
- {netbox_cesnet_services_plugin-6.2.0 → netbox_cesnet_services_plugin-6.3.0}/netbox_cesnet_services_plugin/forms/bgpconnection_aggregation.py +0 -0
- {netbox_cesnet_services_plugin-6.2.0 → netbox_cesnet_services_plugin-6.3.0}/netbox_cesnet_services_plugin/forms/lldpneighbor.py +0 -0
- {netbox_cesnet_services_plugin-6.2.0 → netbox_cesnet_services_plugin-6.3.0}/netbox_cesnet_services_plugin/forms/lldpneighborleaf.py +0 -0
- {netbox_cesnet_services_plugin-6.2.0 → netbox_cesnet_services_plugin-6.3.0}/netbox_cesnet_services_plugin/forms/ports.py +0 -0
- {netbox_cesnet_services_plugin-6.2.0 → netbox_cesnet_services_plugin-6.3.0}/netbox_cesnet_services_plugin/forms/service_core_link.py +0 -0
- {netbox_cesnet_services_plugin-6.2.0 → netbox_cesnet_services_plugin-6.3.0}/netbox_cesnet_services_plugin/forms/service_core_trunk.py +0 -0
- {netbox_cesnet_services_plugin-6.2.0 → netbox_cesnet_services_plugin-6.3.0}/netbox_cesnet_services_plugin/forms/service_l2vpn.py +0 -0
- {netbox_cesnet_services_plugin-6.2.0 → netbox_cesnet_services_plugin-6.3.0}/netbox_cesnet_services_plugin/forms/service_nni.py +0 -0
- {netbox_cesnet_services_plugin-6.2.0 → netbox_cesnet_services_plugin-6.3.0}/netbox_cesnet_services_plugin/graphql/__init__.py +0 -0
- {netbox_cesnet_services_plugin-6.2.0 → netbox_cesnet_services_plugin-6.3.0}/netbox_cesnet_services_plugin/migrations/0001_initial.py +0 -0
- {netbox_cesnet_services_plugin-6.2.0 → netbox_cesnet_services_plugin-6.3.0}/netbox_cesnet_services_plugin/migrations/0002_bgpconnection_comments.py +0 -0
- {netbox_cesnet_services_plugin-6.2.0 → netbox_cesnet_services_plugin-6.3.0}/netbox_cesnet_services_plugin/migrations/0003_alter_bgpconnection_options_bgpconnection_device.py +0 -0
- {netbox_cesnet_services_plugin-6.2.0 → netbox_cesnet_services_plugin-6.3.0}/netbox_cesnet_services_plugin/migrations/0004_alter_bgpconnection_options_bgpconnection_raw_vrf_and_more.py +0 -0
- {netbox_cesnet_services_plugin-6.2.0 → netbox_cesnet_services_plugin-6.3.0}/netbox_cesnet_services_plugin/migrations/0005_alter_bgpconnection_role.py +0 -0
- {netbox_cesnet_services_plugin-6.2.0 → netbox_cesnet_services_plugin-6.3.0}/netbox_cesnet_services_plugin/migrations/0006_lldpneighbor.py +0 -0
- {netbox_cesnet_services_plugin-6.2.0 → netbox_cesnet_services_plugin-6.3.0}/netbox_cesnet_services_plugin/migrations/0007_lldpneighbor_comments.py +0 -0
- {netbox_cesnet_services_plugin-6.2.0 → netbox_cesnet_services_plugin-6.3.0}/netbox_cesnet_services_plugin/migrations/0008_alter_lldpneighbor_device_a_and_more.py +0 -0
- {netbox_cesnet_services_plugin-6.2.0 → netbox_cesnet_services_plugin-6.3.0}/netbox_cesnet_services_plugin/migrations/0009_lldpneighbor_status_lldpneighborleaf_status.py +0 -0
- {netbox_cesnet_services_plugin-6.2.0 → netbox_cesnet_services_plugin-6.3.0}/netbox_cesnet_services_plugin/migrations/0010_alter_bgpconnection_raw_vrf_and_more.py +0 -0
- {netbox_cesnet_services_plugin-6.2.0 → netbox_cesnet_services_plugin-6.3.0}/netbox_cesnet_services_plugin/migrations/0011_lldpneighbor_last_seen_lldpneighbor_status_detail.py +0 -0
- {netbox_cesnet_services_plugin-6.2.0 → netbox_cesnet_services_plugin-6.3.0}/netbox_cesnet_services_plugin/migrations/0012_alter_lldpneighbor_last_seen.py +0 -0
- {netbox_cesnet_services_plugin-6.2.0 → netbox_cesnet_services_plugin-6.3.0}/netbox_cesnet_services_plugin/migrations/0013_bgpconnection_last_seen.py +0 -0
- {netbox_cesnet_services_plugin-6.2.0 → netbox_cesnet_services_plugin-6.3.0}/netbox_cesnet_services_plugin/migrations/0014_servicecoretrunk_servicecorelink_serviceip.py +0 -0
- {netbox_cesnet_services_plugin-6.2.0 → netbox_cesnet_services_plugin-6.3.0}/netbox_cesnet_services_plugin/migrations/0015_alter_service_status_to_circuit_choices.py +0 -0
- {netbox_cesnet_services_plugin-6.2.0 → netbox_cesnet_services_plugin-6.3.0}/netbox_cesnet_services_plugin/migrations/0016_serviceip_physical_device_and_more.py +0 -0
- {netbox_cesnet_services_plugin-6.2.0 → netbox_cesnet_services_plugin-6.3.0}/netbox_cesnet_services_plugin/migrations/0017_serviceip_vrf.py +0 -0
- {netbox_cesnet_services_plugin-6.2.0 → netbox_cesnet_services_plugin-6.3.0}/netbox_cesnet_services_plugin/migrations/0018_serviceip_encapsulation_vlan_fks.py +0 -0
- {netbox_cesnet_services_plugin-6.2.0 → netbox_cesnet_services_plugin-6.3.0}/netbox_cesnet_services_plugin/migrations/0019_serviceip_endpoints_bgp_sessions.py +0 -0
- {netbox_cesnet_services_plugin-6.2.0 → netbox_cesnet_services_plugin-6.3.0}/netbox_cesnet_services_plugin/migrations/0020_servicenni_trunk_port_constraints.py +0 -0
- {netbox_cesnet_services_plugin-6.2.0 → netbox_cesnet_services_plugin-6.3.0}/netbox_cesnet_services_plugin/migrations/0021_serviceendpoint.py +0 -0
- {netbox_cesnet_services_plugin-6.2.0 → netbox_cesnet_services_plugin-6.3.0}/netbox_cesnet_services_plugin/migrations/0022_release_ports_of_decommissioned.py +0 -0
- {netbox_cesnet_services_plugin-6.2.0 → netbox_cesnet_services_plugin-6.3.0}/netbox_cesnet_services_plugin/migrations/0023_serviceipbgpsession_advertisement_interval_and_more.py +0 -0
- {netbox_cesnet_services_plugin-6.2.0 → netbox_cesnet_services_plugin-6.3.0}/netbox_cesnet_services_plugin/migrations/0024_servicel2vpn.py +0 -0
- {netbox_cesnet_services_plugin-6.2.0 → netbox_cesnet_services_plugin-6.3.0}/netbox_cesnet_services_plugin/migrations/__init__.py +0 -0
- {netbox_cesnet_services_plugin-6.2.0 → netbox_cesnet_services_plugin-6.3.0}/netbox_cesnet_services_plugin/models/bgpconnection.py +0 -0
- {netbox_cesnet_services_plugin-6.2.0 → netbox_cesnet_services_plugin-6.3.0}/netbox_cesnet_services_plugin/models/cesnet_service_base.py +0 -0
- {netbox_cesnet_services_plugin-6.2.0 → netbox_cesnet_services_plugin-6.3.0}/netbox_cesnet_services_plugin/models/lldpneighbor.py +0 -0
- {netbox_cesnet_services_plugin-6.2.0 → netbox_cesnet_services_plugin-6.3.0}/netbox_cesnet_services_plugin/models/lldpneighborleaf.py +0 -0
- {netbox_cesnet_services_plugin-6.2.0 → netbox_cesnet_services_plugin-6.3.0}/netbox_cesnet_services_plugin/models/ports.py +0 -0
- {netbox_cesnet_services_plugin-6.2.0 → netbox_cesnet_services_plugin-6.3.0}/netbox_cesnet_services_plugin/models/service_core_link.py +0 -0
- {netbox_cesnet_services_plugin-6.2.0 → netbox_cesnet_services_plugin-6.3.0}/netbox_cesnet_services_plugin/models/service_core_trunk.py +0 -0
- {netbox_cesnet_services_plugin-6.2.0 → netbox_cesnet_services_plugin-6.3.0}/netbox_cesnet_services_plugin/models/service_l2vpn.py +0 -0
- {netbox_cesnet_services_plugin-6.2.0 → netbox_cesnet_services_plugin-6.3.0}/netbox_cesnet_services_plugin/models/service_nni.py +0 -0
- {netbox_cesnet_services_plugin-6.2.0 → netbox_cesnet_services_plugin-6.3.0}/netbox_cesnet_services_plugin/tables/bgpconnection.py +0 -0
- {netbox_cesnet_services_plugin-6.2.0 → netbox_cesnet_services_plugin-6.3.0}/netbox_cesnet_services_plugin/tables/bgpconnection_aggregation.py +0 -0
- {netbox_cesnet_services_plugin-6.2.0 → netbox_cesnet_services_plugin-6.3.0}/netbox_cesnet_services_plugin/tables/lldpneighbor.py +0 -0
- {netbox_cesnet_services_plugin-6.2.0 → netbox_cesnet_services_plugin-6.3.0}/netbox_cesnet_services_plugin/tables/lldpneighborleaf.py +0 -0
- {netbox_cesnet_services_plugin-6.2.0 → netbox_cesnet_services_plugin-6.3.0}/netbox_cesnet_services_plugin/tables/service_core_link.py +0 -0
- {netbox_cesnet_services_plugin-6.2.0 → netbox_cesnet_services_plugin-6.3.0}/netbox_cesnet_services_plugin/tables/service_core_trunk.py +0 -0
- {netbox_cesnet_services_plugin-6.2.0 → netbox_cesnet_services_plugin-6.3.0}/netbox_cesnet_services_plugin/tables/service_endpoint.py +0 -0
- {netbox_cesnet_services_plugin-6.2.0 → netbox_cesnet_services_plugin-6.3.0}/netbox_cesnet_services_plugin/tables/service_l2vpn.py +0 -0
- {netbox_cesnet_services_plugin-6.2.0 → netbox_cesnet_services_plugin-6.3.0}/netbox_cesnet_services_plugin/tables/service_nni.py +0 -0
- {netbox_cesnet_services_plugin-6.2.0 → netbox_cesnet_services_plugin-6.3.0}/netbox_cesnet_services_plugin/templates/netbox_cesnet_services_plugin/bgpconnection/bgpconnection.html +0 -0
- {netbox_cesnet_services_plugin-6.2.0 → netbox_cesnet_services_plugin-6.3.0}/netbox_cesnet_services_plugin/templates/netbox_cesnet_services_plugin/bgpconnection/bgpconnection_aggregation_list.html +0 -0
- {netbox_cesnet_services_plugin-6.2.0 → netbox_cesnet_services_plugin-6.3.0}/netbox_cesnet_services_plugin/templates/netbox_cesnet_services_plugin/bgpconnection.html +0 -0
- {netbox_cesnet_services_plugin-6.2.0 → netbox_cesnet_services_plugin-6.3.0}/netbox_cesnet_services_plugin/templates/netbox_cesnet_services_plugin/details/connection_endpoints.html +0 -0
- {netbox_cesnet_services_plugin-6.2.0 → netbox_cesnet_services_plugin-6.3.0}/netbox_cesnet_services_plugin/templates/netbox_cesnet_services_plugin/details/detail_interface_inc.html +0 -0
- {netbox_cesnet_services_plugin-6.2.0 → netbox_cesnet_services_plugin-6.3.0}/netbox_cesnet_services_plugin/templates/netbox_cesnet_services_plugin/details/multiple_children.html +0 -0
- {netbox_cesnet_services_plugin-6.2.0 → netbox_cesnet_services_plugin-6.3.0}/netbox_cesnet_services_plugin/templates/netbox_cesnet_services_plugin/details/related_tables_tab.html +0 -0
- {netbox_cesnet_services_plugin-6.2.0 → netbox_cesnet_services_plugin-6.3.0}/netbox_cesnet_services_plugin/templates/netbox_cesnet_services_plugin/inc/related_cards.html +0 -0
- {netbox_cesnet_services_plugin-6.2.0 → netbox_cesnet_services_plugin-6.3.0}/netbox_cesnet_services_plugin/templates/netbox_cesnet_services_plugin/lldpneighbor/lldpneighbor.html +0 -0
- {netbox_cesnet_services_plugin-6.2.0 → netbox_cesnet_services_plugin-6.3.0}/netbox_cesnet_services_plugin/templates/netbox_cesnet_services_plugin/lldpneighbor.html +0 -0
- {netbox_cesnet_services_plugin-6.2.0 → netbox_cesnet_services_plugin-6.3.0}/netbox_cesnet_services_plugin/templates/netbox_cesnet_services_plugin/lldpneighborleaf/lldpneighborleaf.html +0 -0
- {netbox_cesnet_services_plugin-6.2.0 → netbox_cesnet_services_plugin-6.3.0}/netbox_cesnet_services_plugin/templates/netbox_cesnet_services_plugin/lldpneighborleaf/lldpneighborleaf_include.html +0 -0
- {netbox_cesnet_services_plugin-6.2.0 → netbox_cesnet_services_plugin-6.3.0}/netbox_cesnet_services_plugin/templates/netbox_cesnet_services_plugin/lldpneighborleaf.html +0 -0
- {netbox_cesnet_services_plugin-6.2.0 → netbox_cesnet_services_plugin-6.3.0}/netbox_cesnet_services_plugin/templates/netbox_cesnet_services_plugin/servicecorelink/servicecorelink.html +0 -0
- {netbox_cesnet_services_plugin-6.2.0 → netbox_cesnet_services_plugin-6.3.0}/netbox_cesnet_services_plugin/templates/netbox_cesnet_services_plugin/servicecorelink.html +0 -0
- {netbox_cesnet_services_plugin-6.2.0 → netbox_cesnet_services_plugin-6.3.0}/netbox_cesnet_services_plugin/templates/netbox_cesnet_services_plugin/servicecoretrunk/servicecoretrunk.html +0 -0
- {netbox_cesnet_services_plugin-6.2.0 → netbox_cesnet_services_plugin-6.3.0}/netbox_cesnet_services_plugin/templates/netbox_cesnet_services_plugin/servicecoretrunk.html +0 -0
- {netbox_cesnet_services_plugin-6.2.0 → netbox_cesnet_services_plugin-6.3.0}/netbox_cesnet_services_plugin/templates/netbox_cesnet_services_plugin/serviceendpoint/serviceendpoint.html +0 -0
- {netbox_cesnet_services_plugin-6.2.0 → netbox_cesnet_services_plugin-6.3.0}/netbox_cesnet_services_plugin/templates/netbox_cesnet_services_plugin/serviceendpoint.html +0 -0
- {netbox_cesnet_services_plugin-6.2.0 → netbox_cesnet_services_plugin-6.3.0}/netbox_cesnet_services_plugin/templates/netbox_cesnet_services_plugin/serviceip/serviceip.html +0 -0
- {netbox_cesnet_services_plugin-6.2.0 → netbox_cesnet_services_plugin-6.3.0}/netbox_cesnet_services_plugin/templates/netbox_cesnet_services_plugin/serviceip.html +0 -0
- {netbox_cesnet_services_plugin-6.2.0 → netbox_cesnet_services_plugin-6.3.0}/netbox_cesnet_services_plugin/templates/netbox_cesnet_services_plugin/serviceipbgpsession.html +0 -0
- {netbox_cesnet_services_plugin-6.2.0 → netbox_cesnet_services_plugin-6.3.0}/netbox_cesnet_services_plugin/templates/netbox_cesnet_services_plugin/servicel2vpn/servicel2vpn.html +0 -0
- {netbox_cesnet_services_plugin-6.2.0 → netbox_cesnet_services_plugin-6.3.0}/netbox_cesnet_services_plugin/templates/netbox_cesnet_services_plugin/servicel2vpn.html +0 -0
- {netbox_cesnet_services_plugin-6.2.0 → netbox_cesnet_services_plugin-6.3.0}/netbox_cesnet_services_plugin/templates/netbox_cesnet_services_plugin/servicenni/servicenni.html +0 -0
- {netbox_cesnet_services_plugin-6.2.0 → netbox_cesnet_services_plugin-6.3.0}/netbox_cesnet_services_plugin/templates/netbox_cesnet_services_plugin/servicenni.html +0 -0
- {netbox_cesnet_services_plugin-6.2.0 → netbox_cesnet_services_plugin-6.3.0}/netbox_cesnet_services_plugin/tests/__init__.py +0 -0
- {netbox_cesnet_services_plugin-6.2.0 → netbox_cesnet_services_plugin-6.3.0}/netbox_cesnet_services_plugin/tests/test_service_core_link.py +0 -0
- {netbox_cesnet_services_plugin-6.2.0 → netbox_cesnet_services_plugin-6.3.0}/netbox_cesnet_services_plugin/tests/test_service_core_trunk.py +0 -0
- {netbox_cesnet_services_plugin-6.2.0 → netbox_cesnet_services_plugin-6.3.0}/netbox_cesnet_services_plugin/tests/test_service_endpoint.py +0 -0
- {netbox_cesnet_services_plugin-6.2.0 → netbox_cesnet_services_plugin-6.3.0}/netbox_cesnet_services_plugin/tests/test_service_ip.py +0 -0
- {netbox_cesnet_services_plugin-6.2.0 → netbox_cesnet_services_plugin-6.3.0}/netbox_cesnet_services_plugin/tests/test_service_l2vpn.py +0 -0
- {netbox_cesnet_services_plugin-6.2.0 → netbox_cesnet_services_plugin-6.3.0}/netbox_cesnet_services_plugin/tests/test_service_nni.py +0 -0
- {netbox_cesnet_services_plugin-6.2.0 → netbox_cesnet_services_plugin-6.3.0}/netbox_cesnet_services_plugin/views/bgpconnection.py +0 -0
- {netbox_cesnet_services_plugin-6.2.0 → netbox_cesnet_services_plugin-6.3.0}/netbox_cesnet_services_plugin/views/bgpconnection_aggregation.py +0 -0
- {netbox_cesnet_services_plugin-6.2.0 → netbox_cesnet_services_plugin-6.3.0}/netbox_cesnet_services_plugin/views/lldpneighbor.py +0 -0
- {netbox_cesnet_services_plugin-6.2.0 → netbox_cesnet_services_plugin-6.3.0}/netbox_cesnet_services_plugin/views/lldpneighborleaf.py +0 -0
- {netbox_cesnet_services_plugin-6.2.0 → netbox_cesnet_services_plugin-6.3.0}/netbox_cesnet_services_plugin/views/service_core_link.py +0 -0
- {netbox_cesnet_services_plugin-6.2.0 → netbox_cesnet_services_plugin-6.3.0}/netbox_cesnet_services_plugin/views/service_core_trunk.py +0 -0
- {netbox_cesnet_services_plugin-6.2.0 → netbox_cesnet_services_plugin-6.3.0}/netbox_cesnet_services_plugin/views/service_ip.py +0 -0
- {netbox_cesnet_services_plugin-6.2.0 → netbox_cesnet_services_plugin-6.3.0}/netbox_cesnet_services_plugin/views/service_l2vpn.py +0 -0
- {netbox_cesnet_services_plugin-6.2.0 → netbox_cesnet_services_plugin-6.3.0}/netbox_cesnet_services_plugin/views/service_nni.py +0 -0
- {netbox_cesnet_services_plugin-6.2.0 → netbox_cesnet_services_plugin-6.3.0}/netbox_cesnet_services_plugin.egg-info/dependency_links.txt +0 -0
- {netbox_cesnet_services_plugin-6.2.0 → netbox_cesnet_services_plugin-6.3.0}/netbox_cesnet_services_plugin.egg-info/entry_points.txt +0 -0
- {netbox_cesnet_services_plugin-6.2.0 → netbox_cesnet_services_plugin-6.3.0}/netbox_cesnet_services_plugin.egg-info/requires.txt +0 -0
- {netbox_cesnet_services_plugin-6.2.0 → netbox_cesnet_services_plugin-6.3.0}/netbox_cesnet_services_plugin.egg-info/top_level.txt +0 -0
- {netbox_cesnet_services_plugin-6.2.0 → netbox_cesnet_services_plugin-6.3.0}/pyproject.toml +0 -0
- {netbox_cesnet_services_plugin-6.2.0 → netbox_cesnet_services_plugin-6.3.0}/setup.cfg +0 -0
- {netbox_cesnet_services_plugin-6.2.0 → netbox_cesnet_services_plugin-6.3.0}/tests/__init__.py +0 -0
- {netbox_cesnet_services_plugin-6.2.0 → netbox_cesnet_services_plugin-6.3.0}/tests/test_netbox_cesnet_services_plugin.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: netbox_cesnet_services_plugin
|
|
3
|
-
Version: 6.
|
|
3
|
+
Version: 6.3.0
|
|
4
4
|
Summary: NetBox plugin for CESNET services.
|
|
5
5
|
Author-email: Jan Krupa <jan.krupa@cesnet.cz>, Jiri Vrany <jiri.vrany@cesnet.cz>
|
|
6
6
|
License: Apache-2.0
|
|
@@ -50,14 +50,16 @@ Enables CESNET services in NetBox:
|
|
|
50
50
|
- **ServiceCoreLink** — L3 link between two core routers: its sides A and B are **ServiceEndpoints**; LLDP, Flowspec, IS-IS/OSPF routing; belongs to one or more CoreTrunks
|
|
51
51
|
- **ServiceIP** — IP service (Static or BGP) with VRF (null = Global), customer prefixes and BGP peer AS; its attachments are **ServiceEndpoints** (Static: exactly one, BGP: 1..N, mixed connection types)
|
|
52
52
|
- **ServiceL2VPN** — L2VPN service (VPWS, EVPN-VPWS, VPLS, EVPN-ELAN) on a NetBox `vpn.L2VPN`, which carries the type and the identifier (PW-ID or EVI, unique per pseudowire / EVPN family); MTU, xconnect / bridge group and p2p / bridge-domain names, EVPN-VPWS service number, bridge-domain storm control. Its attachments are **ServiceEndpoints** without L3 (port / dot1q / QinQ, VLAN rewrite): point-to-point exactly two, multipoint two or more
|
|
53
|
+
- **ServicePNI** — private network interconnect: a BGP peering with a partner ISP (the tenant) through which CESNET hands over customers via the partner's network. Always BGP, one VRF (null = Global), the partner's peer AS (required; every BGP session must use it as remote AS) and `routing_prefixes`, the prefixes the peer may announce (the content of the PNI's single prefix-set, filled by the orchestrator from the IP PNI services riding on it). Its 1..N attachments are **ServiceEndpoints** with the rules of a BGP ServiceIP; all of them share the PNI's route-policies and prefix-set. Policy / prefix-set names are not stored
|
|
53
54
|
- **ServiceEndpoint** — one attachment of any service to the network (generic owner: `service_type` + `service_id`): role (A / B / hub / spoke / root / leaf), connection type (Direct / Indirect Local / Indirect L2), physical device & interface (port or LAG, optionally the port of an NNI), MTU, encapsulation (none / port / dot1q / QinQ with S-VLAN & C-VLAN as `ipam.VLAN` links, VLAN rewrite), service device & interface (the port or sub-interface with the service configuration), IPv4/IPv6 P2P addresses, static next hops. Each service declares its endpoint rules (count, L3, encapsulations, next hops, roles)
|
|
54
55
|
- **Port holders** — a port or LAG is held exclusively by a Core Trunk / NNI side or an untagged endpoint (none / port); tagged endpoints (dot1q / QinQ) ride on trunk ports and share a port, but never with the same VLAN tags. A LAG and its members block each other. The `available-ports` API lists the free ports for a given use
|
|
55
|
-
- **ServiceIPBGPSession** — links a [netbox-bgp](https://github.com/netbox-community/netbox-bgp) `BGPSession` (one per address family) to a BGP endpoint and carries the announce-P2P / default-originate / next-hop-self flags
|
|
56
|
+
- **ServiceIPBGPSession** — links a [netbox-bgp](https://github.com/netbox-community/netbox-bgp) `BGPSession` (one per address family) to a BGP endpoint and carries the announce-P2P / default-originate / next-hop-self flags and the neighbor options; serves BGP ServiceIP and ServicePNI endpoints. Optional TCP-AO key chain (`tcp_ao_keychain`), exclusive with the password
|
|
56
57
|
|
|
57
58
|
## Compatibility
|
|
58
59
|
|
|
59
60
|
| NetBox Version | Plugin Version | Notes |
|
|
60
61
|
|-----------------|----------------|-------|
|
|
62
|
+
| 4.7.0 – 4.7.99 | 6.3.0 | ServicePNI with endpoints and BGP sessions; `service-pni` API; TCP-AO key chain on ServiceIPBGPSession |
|
|
61
63
|
| 4.7.0 – 4.7.99 | 6.2.0 | ServiceL2VPN (VPWS, EVPN-VPWS, VPLS, EVPN-ELAN) on `vpn.L2VPN`, with endpoints; `service-l2vpn` API |
|
|
62
64
|
| 4.7.0 – 4.7.99 | 6.1.0 | BGP neighbor options on ServiceIPBGPSession |
|
|
63
65
|
| 4.7.0 – 4.7.99 | 6.0.0 | **Breaking**: ServiceIPEndpoint → generic ServiceEndpoint (`service-endpoints` API, `routed_*` → `service_*`); Core Link sides become endpoints; port-holder rule with `available-ports` API (replaces `available-trunk-ports`) |
|
|
@@ -17,14 +17,16 @@ Enables CESNET services in NetBox:
|
|
|
17
17
|
- **ServiceCoreLink** — L3 link between two core routers: its sides A and B are **ServiceEndpoints**; LLDP, Flowspec, IS-IS/OSPF routing; belongs to one or more CoreTrunks
|
|
18
18
|
- **ServiceIP** — IP service (Static or BGP) with VRF (null = Global), customer prefixes and BGP peer AS; its attachments are **ServiceEndpoints** (Static: exactly one, BGP: 1..N, mixed connection types)
|
|
19
19
|
- **ServiceL2VPN** — L2VPN service (VPWS, EVPN-VPWS, VPLS, EVPN-ELAN) on a NetBox `vpn.L2VPN`, which carries the type and the identifier (PW-ID or EVI, unique per pseudowire / EVPN family); MTU, xconnect / bridge group and p2p / bridge-domain names, EVPN-VPWS service number, bridge-domain storm control. Its attachments are **ServiceEndpoints** without L3 (port / dot1q / QinQ, VLAN rewrite): point-to-point exactly two, multipoint two or more
|
|
20
|
+
- **ServicePNI** — private network interconnect: a BGP peering with a partner ISP (the tenant) through which CESNET hands over customers via the partner's network. Always BGP, one VRF (null = Global), the partner's peer AS (required; every BGP session must use it as remote AS) and `routing_prefixes`, the prefixes the peer may announce (the content of the PNI's single prefix-set, filled by the orchestrator from the IP PNI services riding on it). Its 1..N attachments are **ServiceEndpoints** with the rules of a BGP ServiceIP; all of them share the PNI's route-policies and prefix-set. Policy / prefix-set names are not stored
|
|
20
21
|
- **ServiceEndpoint** — one attachment of any service to the network (generic owner: `service_type` + `service_id`): role (A / B / hub / spoke / root / leaf), connection type (Direct / Indirect Local / Indirect L2), physical device & interface (port or LAG, optionally the port of an NNI), MTU, encapsulation (none / port / dot1q / QinQ with S-VLAN & C-VLAN as `ipam.VLAN` links, VLAN rewrite), service device & interface (the port or sub-interface with the service configuration), IPv4/IPv6 P2P addresses, static next hops. Each service declares its endpoint rules (count, L3, encapsulations, next hops, roles)
|
|
21
22
|
- **Port holders** — a port or LAG is held exclusively by a Core Trunk / NNI side or an untagged endpoint (none / port); tagged endpoints (dot1q / QinQ) ride on trunk ports and share a port, but never with the same VLAN tags. A LAG and its members block each other. The `available-ports` API lists the free ports for a given use
|
|
22
|
-
- **ServiceIPBGPSession** — links a [netbox-bgp](https://github.com/netbox-community/netbox-bgp) `BGPSession` (one per address family) to a BGP endpoint and carries the announce-P2P / default-originate / next-hop-self flags
|
|
23
|
+
- **ServiceIPBGPSession** — links a [netbox-bgp](https://github.com/netbox-community/netbox-bgp) `BGPSession` (one per address family) to a BGP endpoint and carries the announce-P2P / default-originate / next-hop-self flags and the neighbor options; serves BGP ServiceIP and ServicePNI endpoints. Optional TCP-AO key chain (`tcp_ao_keychain`), exclusive with the password
|
|
23
24
|
|
|
24
25
|
## Compatibility
|
|
25
26
|
|
|
26
27
|
| NetBox Version | Plugin Version | Notes |
|
|
27
28
|
|-----------------|----------------|-------|
|
|
29
|
+
| 4.7.0 – 4.7.99 | 6.3.0 | ServicePNI with endpoints and BGP sessions; `service-pni` API; TCP-AO key chain on ServiceIPBGPSession |
|
|
28
30
|
| 4.7.0 – 4.7.99 | 6.2.0 | ServiceL2VPN (VPWS, EVPN-VPWS, VPLS, EVPN-ELAN) on `vpn.L2VPN`, with endpoints; `service-l2vpn` API |
|
|
29
31
|
| 4.7.0 – 4.7.99 | 6.1.0 | BGP neighbor options on ServiceIPBGPSession |
|
|
30
32
|
| 4.7.0 – 4.7.99 | 6.0.0 | **Breaking**: ServiceIPEndpoint → generic ServiceEndpoint (`service-endpoints` API, `routed_*` → `service_*`); Core Link sides become endpoints; port-holder rule with `available-ports` API (replaces `available-trunk-ports`) |
|
|
@@ -22,6 +22,7 @@ from netbox_cesnet_services_plugin.models import (
|
|
|
22
22
|
ServiceIPBGPSession,
|
|
23
23
|
ServiceEndpoint,
|
|
24
24
|
ServiceL2VPN,
|
|
25
|
+
ServicePNI,
|
|
25
26
|
)
|
|
26
27
|
|
|
27
28
|
|
|
@@ -161,7 +162,7 @@ class ServiceIPBGPSessionSerializer(NetBoxModelSerializer):
|
|
|
161
162
|
"id", "display", "url",
|
|
162
163
|
"endpoint", "session", "family",
|
|
163
164
|
"announce_p2p", "default_originate", "next_hop_self",
|
|
164
|
-
"bfd", "bfd_interval_ms", "bfd_multiplier", "ttl_security", "password_set",
|
|
165
|
+
"bfd", "bfd_interval_ms", "bfd_multiplier", "ttl_security", "password_set", "tcp_ao_keychain",
|
|
165
166
|
"keepalive", "hold_time", "advertisement_interval", "max_prefix_threshold", "max_prefix_restart",
|
|
166
167
|
"tags", "comments", "custom_fields", "created", "last_updated",
|
|
167
168
|
)
|
|
@@ -277,6 +278,31 @@ class ServiceIPSerializer(NetBoxModelSerializer):
|
|
|
277
278
|
)
|
|
278
279
|
|
|
279
280
|
|
|
281
|
+
class ServicePNISerializer(NetBoxModelSerializer):
|
|
282
|
+
url = serializers.HyperlinkedIdentityField(
|
|
283
|
+
view_name="plugins-api:netbox_cesnet_services_plugin-api:servicepni-detail"
|
|
284
|
+
)
|
|
285
|
+
tenant = TenantSerializer(nested=True, allow_null=True, required=False)
|
|
286
|
+
vrf = VRFSerializer(nested=True, allow_null=True, required=False)
|
|
287
|
+
bgp_peer_as = ASNSerializer(nested=True, allow_null=True, required=False)
|
|
288
|
+
endpoints = ServiceEndpointSerializer(nested=True, many=True, read_only=True)
|
|
289
|
+
|
|
290
|
+
class Meta:
|
|
291
|
+
model = ServicePNI
|
|
292
|
+
fields = (
|
|
293
|
+
"id", "display", "url",
|
|
294
|
+
"name", "status", "active", "tenant",
|
|
295
|
+
"service_start", "service_end", "rt", "monitored",
|
|
296
|
+
"vrf", "routing_prefixes",
|
|
297
|
+
"bgp_peer_as", "bgp_password_set",
|
|
298
|
+
"endpoints",
|
|
299
|
+
"tags", "comments", "custom_fields", "created", "last_updated",
|
|
300
|
+
)
|
|
301
|
+
brief_fields = (
|
|
302
|
+
"id", "url", "display", "name", "status", "tenant", "bgp_peer_as",
|
|
303
|
+
)
|
|
304
|
+
|
|
305
|
+
|
|
280
306
|
class ServiceL2VPNSerializer(NetBoxModelSerializer):
|
|
281
307
|
url = serializers.HyperlinkedIdentityField(
|
|
282
308
|
view_name="plugins-api:netbox_cesnet_services_plugin-api:servicel2vpn-detail"
|
|
@@ -12,6 +12,7 @@ router.register("service-core-links", views.ServiceCoreLinkViewSet)
|
|
|
12
12
|
router.register("service-nni", views.ServiceNNIViewSet)
|
|
13
13
|
router.register("service-ip", views.ServiceIPViewSet)
|
|
14
14
|
router.register("service-l2vpn", views.ServiceL2VPNViewSet)
|
|
15
|
+
router.register("service-pni", views.ServicePNIViewSet)
|
|
15
16
|
router.register("service-endpoints", views.ServiceEndpointViewSet)
|
|
16
17
|
router.register("service-ip-bgp-session", views.ServiceIPBGPSessionViewSet)
|
|
17
18
|
router.register("available-ports", views.AvailablePortViewSet, basename="available-port")
|
|
@@ -20,6 +20,7 @@ from .serializers import (
|
|
|
20
20
|
ServiceEndpointSerializer,
|
|
21
21
|
ServiceIPBGPSessionSerializer,
|
|
22
22
|
ServiceL2VPNSerializer,
|
|
23
|
+
ServicePNISerializer,
|
|
23
24
|
)
|
|
24
25
|
|
|
25
26
|
|
|
@@ -151,6 +152,18 @@ class ServiceL2VPNViewSet(NetBoxModelViewSet):
|
|
|
151
152
|
filterset_class = filtersets.ServiceL2VPNFilterSet
|
|
152
153
|
|
|
153
154
|
|
|
155
|
+
class ServicePNIViewSet(NetBoxModelViewSet):
|
|
156
|
+
metadata_class = ContentTypeMetadata
|
|
157
|
+
queryset = models.ServicePNI.objects.select_related(
|
|
158
|
+
"tenant", "vrf", "bgp_peer_as",
|
|
159
|
+
).prefetch_related(
|
|
160
|
+
"routing_prefixes",
|
|
161
|
+
*ENDPOINT_PREFETCH,
|
|
162
|
+
)
|
|
163
|
+
serializer_class = ServicePNISerializer
|
|
164
|
+
filterset_class = filtersets.ServicePNIFilterSet
|
|
165
|
+
|
|
166
|
+
|
|
154
167
|
class ServiceEndpointViewSet(NetBoxModelViewSet):
|
|
155
168
|
metadata_class = ContentTypeMetadata
|
|
156
169
|
queryset = models.ServiceEndpoint.objects.select_related(
|
|
@@ -8,6 +8,7 @@ from .service_nni import ServiceNNIFilterSet
|
|
|
8
8
|
from .service_endpoint import ServiceEndpointFilterSet
|
|
9
9
|
from .service_ip import ServiceIPBGPSessionFilterSet, ServiceIPFilterSet
|
|
10
10
|
from .service_l2vpn import ServiceL2VPNFilterSet
|
|
11
|
+
from .service_pni import ServicePNIFilterSet
|
|
11
12
|
|
|
12
13
|
__all__ = [
|
|
13
14
|
"BGPConnectionFilterSet",
|
|
@@ -21,4 +22,5 @@ __all__ = [
|
|
|
21
22
|
"ServiceEndpointFilterSet",
|
|
22
23
|
"ServiceIPBGPSessionFilterSet",
|
|
23
24
|
"ServiceL2VPNFilterSet",
|
|
25
|
+
"ServicePNIFilterSet",
|
|
24
26
|
]
|
|
@@ -15,7 +15,7 @@ from netbox_cesnet_services_plugin.choices import (
|
|
|
15
15
|
VlanRewriteChoices,
|
|
16
16
|
)
|
|
17
17
|
from netbox_cesnet_services_plugin.filtersets.utils import any_of_filter
|
|
18
|
-
from netbox_cesnet_services_plugin.models import ServiceCoreLink, ServiceEndpoint, ServiceIP, ServiceL2VPN, ServiceNNI
|
|
18
|
+
from netbox_cesnet_services_plugin.models import ServiceCoreLink, ServiceEndpoint, ServiceIP, ServiceL2VPN, ServiceNNI, ServicePNI
|
|
19
19
|
from netbox_cesnet_services_plugin.models.ports import released_endpoints
|
|
20
20
|
|
|
21
21
|
|
|
@@ -35,9 +35,11 @@ class ServiceEndpointFilterSet(NetBoxModelFilterSet):
|
|
|
35
35
|
service_ip_id = _model_filter("service_ip", ServiceIP.objects.all(), "Service IP (ID)")
|
|
36
36
|
core_link_id = _model_filter("core_link", ServiceCoreLink.objects.all(), "Core Link (ID)")
|
|
37
37
|
service_l2vpn_id = _model_filter("service_l2vpn", ServiceL2VPN.objects.all(), "Service L2VPN (ID)")
|
|
38
|
+
service_pni_id = _model_filter("service_pni", ServicePNI.objects.all(), "Service PNI (ID)")
|
|
38
39
|
routing_type = django_filters.MultipleChoiceFilter(
|
|
39
40
|
field_name="service_ip__routing_type", choices=RoutingTypeChoices, label="Routing Type (Service IP)"
|
|
40
41
|
)
|
|
42
|
+
bgp = django_filters.BooleanFilter(method="filter_bgp", label="BGP (endpoint of a BGP Service IP or a PNI)")
|
|
41
43
|
role = django_filters.MultipleChoiceFilter(choices=EndpointRoleChoices)
|
|
42
44
|
|
|
43
45
|
# attachment
|
|
@@ -90,7 +92,17 @@ class ServiceEndpointFilterSet(NetBoxModelFilterSet):
|
|
|
90
92
|
| Q(service_ip__name__icontains=value)
|
|
91
93
|
| Q(core_link__name__icontains=value)
|
|
92
94
|
| Q(service_l2vpn__name__icontains=value)
|
|
95
|
+
| Q(service_pni__name__icontains=value)
|
|
93
96
|
| Q(service_interface__name__icontains=value)
|
|
94
97
|
| Q(physical_interface__name__icontains=value)
|
|
95
98
|
| Q(comments__icontains=value)
|
|
96
99
|
).distinct()
|
|
100
|
+
|
|
101
|
+
def filter_bgp(self, queryset, name, value):
|
|
102
|
+
"""Endpoints that take BGP sessions: those of a BGP Service IP or of a Service PNI."""
|
|
103
|
+
if value is None:
|
|
104
|
+
return queryset
|
|
105
|
+
bgp_ids = ServiceEndpoint.objects.filter(
|
|
106
|
+
Q(service_ip__routing_type=RoutingTypeChoices.TYPE_BGP) | Q(service_pni__isnull=False)
|
|
107
|
+
).values("pk")
|
|
108
|
+
return queryset.filter(pk__in=bgp_ids) if value else queryset.exclude(pk__in=bgp_ids)
|
|
@@ -18,6 +18,7 @@ from netbox_cesnet_services_plugin.models import (
|
|
|
18
18
|
ServiceEndpoint,
|
|
19
19
|
ServiceIP,
|
|
20
20
|
ServiceIPBGPSession,
|
|
21
|
+
ServicePNI,
|
|
21
22
|
)
|
|
22
23
|
|
|
23
24
|
|
|
@@ -102,7 +103,8 @@ class ServiceIPBGPSessionFilterSet(NetBoxModelFilterSet):
|
|
|
102
103
|
q = django_filters.CharFilter(method="search", label="Search")
|
|
103
104
|
|
|
104
105
|
endpoint_id = _model_filter("endpoint__id", ServiceEndpoint.objects.all(), "Endpoint (ID)")
|
|
105
|
-
service_id = _model_filter("endpoint__service_ip__id", ServiceIP.objects.all(), "Service (ID)")
|
|
106
|
+
service_id = _model_filter("endpoint__service_ip__id", ServiceIP.objects.all(), "Service IP (ID)")
|
|
107
|
+
service_pni_id = _model_filter("endpoint__service_pni__id", ServicePNI.objects.all(), "Service PNI (ID)")
|
|
106
108
|
session_id = _model_filter("session__id", BGPSession.objects.all(), "BGP Session (ID)")
|
|
107
109
|
device_id = _model_filter("session__device__id", Device.objects.all(), "Device (ID)")
|
|
108
110
|
announce_p2p = django_filters.BooleanFilter()
|
|
@@ -111,6 +113,7 @@ class ServiceIPBGPSessionFilterSet(NetBoxModelFilterSet):
|
|
|
111
113
|
bfd = django_filters.BooleanFilter()
|
|
112
114
|
ttl_security = django_filters.BooleanFilter()
|
|
113
115
|
password_set = django_filters.BooleanFilter()
|
|
116
|
+
tcp_ao = django_filters.BooleanFilter(method="filter_tcp_ao", label="TCP-AO (a key chain is set)")
|
|
114
117
|
|
|
115
118
|
tag = TagFilter()
|
|
116
119
|
|
|
@@ -118,7 +121,7 @@ class ServiceIPBGPSessionFilterSet(NetBoxModelFilterSet):
|
|
|
118
121
|
model = ServiceIPBGPSession
|
|
119
122
|
fields = [
|
|
120
123
|
"announce_p2p", "default_originate", "next_hop_self", "bfd", "ttl_security", "password_set",
|
|
121
|
-
"bfd_interval_ms", "bfd_multiplier", "keepalive", "hold_time", "advertisement_interval",
|
|
124
|
+
"tcp_ao_keychain", "bfd_interval_ms", "bfd_multiplier", "keepalive", "hold_time", "advertisement_interval",
|
|
122
125
|
"max_prefix_threshold", "max_prefix_restart", "tag",
|
|
123
126
|
]
|
|
124
127
|
|
|
@@ -128,7 +131,13 @@ class ServiceIPBGPSessionFilterSet(NetBoxModelFilterSet):
|
|
|
128
131
|
return queryset.filter(
|
|
129
132
|
Q(endpoint__name__icontains=value)
|
|
130
133
|
| Q(endpoint__service_ip__name__icontains=value)
|
|
134
|
+
| Q(endpoint__service_pni__name__icontains=value)
|
|
131
135
|
| Q(session__name__icontains=value)
|
|
132
136
|
| Q(session__description__icontains=value)
|
|
133
137
|
| Q(comments__icontains=value)
|
|
134
138
|
)
|
|
139
|
+
|
|
140
|
+
def filter_tcp_ao(self, queryset, name, value):
|
|
141
|
+
if value is None:
|
|
142
|
+
return queryset
|
|
143
|
+
return queryset.exclude(tcp_ao_keychain="") if value else queryset.filter(tcp_ao_keychain="")
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import django_filters
|
|
2
|
+
from circuits.choices import CircuitStatusChoices
|
|
3
|
+
from dcim.models import Device, Interface, Site
|
|
4
|
+
from django.db.models import Q
|
|
5
|
+
from extras.filters import TagFilter
|
|
6
|
+
from ipam.models import ASN, VRF, Prefix
|
|
7
|
+
from netbox.filtersets import NetBoxModelFilterSet
|
|
8
|
+
from tenancy.models import Tenant
|
|
9
|
+
from utilities.filtersets import register_filterset
|
|
10
|
+
|
|
11
|
+
from netbox_cesnet_services_plugin.choices import ConnectionTypeChoices
|
|
12
|
+
from netbox_cesnet_services_plugin.filtersets.utils import any_of_filter, tenant_tree_filter
|
|
13
|
+
from netbox_cesnet_services_plugin.models import ServicePNI
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
def _model_filter(field_name, queryset, label):
|
|
17
|
+
return django_filters.ModelMultipleChoiceFilter(
|
|
18
|
+
field_name=field_name, queryset=queryset, to_field_name="id", label=label
|
|
19
|
+
)
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
@register_filterset
|
|
23
|
+
class ServicePNIFilterSet(NetBoxModelFilterSet):
|
|
24
|
+
q = django_filters.CharFilter(method="search", label="Search")
|
|
25
|
+
|
|
26
|
+
status = django_filters.MultipleChoiceFilter(choices=CircuitStatusChoices)
|
|
27
|
+
active = django_filters.BooleanFilter()
|
|
28
|
+
monitored = django_filters.BooleanFilter()
|
|
29
|
+
|
|
30
|
+
tenant_id = _model_filter("tenant__id", Tenant.objects.all(), "Tenant (ID)")
|
|
31
|
+
tenant = django_filters.ModelMultipleChoiceFilter(
|
|
32
|
+
field_name="tenant__slug",
|
|
33
|
+
queryset=Tenant.objects.all(),
|
|
34
|
+
to_field_name="slug",
|
|
35
|
+
label="Tenant (slug)",
|
|
36
|
+
)
|
|
37
|
+
tenant_tree_id = tenant_tree_filter()
|
|
38
|
+
vrf_id = _model_filter("vrf__id", VRF.objects.all(), "VRF (ID)")
|
|
39
|
+
routing_prefix_id = _model_filter("routing_prefixes__id", Prefix.objects.all(), "Routing Prefix (ID)")
|
|
40
|
+
bgp_peer_as_id = _model_filter("bgp_peer_as__id", ASN.objects.all(), "BGP Peer AS (ID)")
|
|
41
|
+
bgp_password_set = django_filters.BooleanFilter()
|
|
42
|
+
|
|
43
|
+
# filters across the endpoints of the PNI
|
|
44
|
+
connection_type = django_filters.MultipleChoiceFilter(
|
|
45
|
+
field_name="endpoints__connection_type", choices=ConnectionTypeChoices, label="Connection Type"
|
|
46
|
+
)
|
|
47
|
+
service_interface_id = _model_filter(
|
|
48
|
+
"endpoints__service_interface__id", Interface.objects.all(), "Service Interface (ID)"
|
|
49
|
+
)
|
|
50
|
+
service_device_id = _model_filter("endpoints__service_device__id", Device.objects.all(), "Service Device (ID)")
|
|
51
|
+
physical_interface_id = _model_filter(
|
|
52
|
+
"endpoints__physical_interface__id", Interface.objects.all(), "Physical Interface (ID)"
|
|
53
|
+
)
|
|
54
|
+
physical_device_id = _model_filter(
|
|
55
|
+
"endpoints__physical_device__id", Device.objects.all(), "Physical Device (ID)"
|
|
56
|
+
)
|
|
57
|
+
device_id = any_of_filter(
|
|
58
|
+
Device.objects.all(), "Device (ID)", "endpoints__service_device", "endpoints__physical_device"
|
|
59
|
+
)
|
|
60
|
+
interface_id = any_of_filter(
|
|
61
|
+
Interface.objects.all(), "Interface (ID)", "endpoints__service_interface", "endpoints__physical_interface"
|
|
62
|
+
)
|
|
63
|
+
site_id = any_of_filter(
|
|
64
|
+
Site.objects.all(),
|
|
65
|
+
"Site (ID, via devices)",
|
|
66
|
+
"endpoints__service_device__site",
|
|
67
|
+
"endpoints__physical_device__site",
|
|
68
|
+
)
|
|
69
|
+
asn_id = _model_filter("bgp_peer_as__id", ASN.objects.all(), "ASN (ID)")
|
|
70
|
+
|
|
71
|
+
tag = TagFilter()
|
|
72
|
+
|
|
73
|
+
class Meta:
|
|
74
|
+
model = ServicePNI
|
|
75
|
+
fields = ["name", "status", "active", "monitored", "tenant", "bgp_password_set", "tag"]
|
|
76
|
+
|
|
77
|
+
def search(self, queryset, name, value):
|
|
78
|
+
if not value.strip():
|
|
79
|
+
return queryset
|
|
80
|
+
return queryset.filter(
|
|
81
|
+
Q(name__icontains=value)
|
|
82
|
+
| Q(tenant__name__icontains=value)
|
|
83
|
+
| Q(rt__icontains=value)
|
|
84
|
+
| Q(comments__icontains=value)
|
|
85
|
+
| Q(endpoints__name__icontains=value)
|
|
86
|
+
| Q(endpoints__service_interface__name__icontains=value)
|
|
87
|
+
).distinct()
|
|
@@ -43,6 +43,7 @@ from .service_ip import (
|
|
|
43
43
|
ServiceIPBGPSessionFilterForm,
|
|
44
44
|
ServiceIPBGPSessionBulkEditForm,
|
|
45
45
|
)
|
|
46
|
+
from .service_pni import ServicePNIBulkEditForm, ServicePNIFilterForm, ServicePNIForm
|
|
46
47
|
|
|
47
48
|
__all__ = [
|
|
48
49
|
"BGPConnectionForm",
|
|
@@ -76,4 +77,7 @@ __all__ = [
|
|
|
76
77
|
"ServiceL2VPNForm",
|
|
77
78
|
"ServiceL2VPNFilterForm",
|
|
78
79
|
"ServiceL2VPNBulkEditForm",
|
|
80
|
+
"ServicePNIForm",
|
|
81
|
+
"ServicePNIFilterForm",
|
|
82
|
+
"ServicePNIBulkEditForm",
|
|
79
83
|
]
|
|
@@ -19,7 +19,7 @@ from netbox_cesnet_services_plugin.choices import (
|
|
|
19
19
|
RoutingTypeChoices,
|
|
20
20
|
VlanRewriteChoices,
|
|
21
21
|
)
|
|
22
|
-
from netbox_cesnet_services_plugin.models import ServiceCoreLink, ServiceEndpoint, ServiceIP, ServiceL2VPN, ServiceNNI
|
|
22
|
+
from netbox_cesnet_services_plugin.models import ServiceCoreLink, ServiceEndpoint, ServiceIP, ServiceL2VPN, ServiceNNI, ServicePNI
|
|
23
23
|
|
|
24
24
|
from .ports import PortsFormMixin, port_field
|
|
25
25
|
|
|
@@ -28,6 +28,7 @@ OWNER_FIELDS = {
|
|
|
28
28
|
"service_ip": ServiceIP,
|
|
29
29
|
"core_link": ServiceCoreLink,
|
|
30
30
|
"service_l2vpn": ServiceL2VPN,
|
|
31
|
+
"service_pni": ServicePNI,
|
|
31
32
|
}
|
|
32
33
|
|
|
33
34
|
|
|
@@ -54,6 +55,9 @@ class ServiceEndpointForm(PortsFormMixin, NetBoxModelForm):
|
|
|
54
55
|
service_l2vpn = DynamicModelChoiceField(
|
|
55
56
|
queryset=ServiceL2VPN.objects.all(), required=False, selector=True, label="Service L2VPN"
|
|
56
57
|
)
|
|
58
|
+
service_pni = DynamicModelChoiceField(
|
|
59
|
+
queryset=ServicePNI.objects.all(), required=False, selector=True, label="Service PNI"
|
|
60
|
+
)
|
|
57
61
|
|
|
58
62
|
physical_device = DynamicModelChoiceField(
|
|
59
63
|
queryset=Device.objects.all(),
|
|
@@ -113,6 +117,7 @@ class ServiceEndpointForm(PortsFormMixin, NetBoxModelForm):
|
|
|
113
117
|
FieldSet("service_ip", name="Service IP"),
|
|
114
118
|
FieldSet("core_link", name="Core Link"),
|
|
115
119
|
FieldSet("service_l2vpn", name="L2VPN"),
|
|
120
|
+
FieldSet("service_pni", name="PNI"),
|
|
116
121
|
),
|
|
117
122
|
"name",
|
|
118
123
|
"role",
|
|
@@ -166,7 +171,7 @@ class ServiceEndpointForm(PortsFormMixin, NetBoxModelForm):
|
|
|
166
171
|
super().clean()
|
|
167
172
|
owners = [field for field in OWNER_FIELDS if self.cleaned_data.get(field)]
|
|
168
173
|
if len(owners) != 1:
|
|
169
|
-
raise ValidationError("Select exactly one service (Service IP, Core Link or
|
|
174
|
+
raise ValidationError("Select exactly one service (Service IP, Core Link, L2VPN or PNI).")
|
|
170
175
|
self._owner_field = owners[0]
|
|
171
176
|
self.instance.service = self.cleaned_data[owners[0]]
|
|
172
177
|
return self.cleaned_data
|
|
@@ -191,6 +196,9 @@ class ServiceEndpointFilterForm(NetBoxModelFilterSetForm):
|
|
|
191
196
|
service_l2vpn_id = DynamicModelMultipleChoiceField(
|
|
192
197
|
queryset=ServiceL2VPN.objects.all(), required=False, label="Service L2VPN"
|
|
193
198
|
)
|
|
199
|
+
service_pni_id = DynamicModelMultipleChoiceField(
|
|
200
|
+
queryset=ServicePNI.objects.all(), required=False, label="Service PNI"
|
|
201
|
+
)
|
|
194
202
|
routing_type = forms.MultipleChoiceField(choices=RoutingTypeChoices, required=False)
|
|
195
203
|
role = forms.MultipleChoiceField(choices=EndpointRoleChoices, required=False)
|
|
196
204
|
connection_type = forms.MultipleChoiceField(choices=ConnectionTypeChoices, required=False)
|
|
@@ -222,7 +230,7 @@ class ServiceEndpointFilterForm(NetBoxModelFilterSetForm):
|
|
|
222
230
|
|
|
223
231
|
fieldsets = (
|
|
224
232
|
FieldSet("filter_id", "q"),
|
|
225
|
-
FieldSet("service_ip_id", "core_link_id", "service_l2vpn_id", "routing_type", "role", "connection_type", name="Endpoint"),
|
|
233
|
+
FieldSet("service_ip_id", "core_link_id", "service_l2vpn_id", "service_pni_id", "routing_type", "role", "connection_type", name="Endpoint"),
|
|
226
234
|
FieldSet(
|
|
227
235
|
"device_id",
|
|
228
236
|
"physical_device_id",
|
|
@@ -27,6 +27,7 @@ from netbox_cesnet_services_plugin.models import (
|
|
|
27
27
|
ServiceEndpoint,
|
|
28
28
|
ServiceIP,
|
|
29
29
|
ServiceIPBGPSession,
|
|
30
|
+
ServicePNI,
|
|
30
31
|
)
|
|
31
32
|
|
|
32
33
|
|
|
@@ -173,7 +174,8 @@ class ServiceIPBGPSessionForm(NetBoxModelForm):
|
|
|
173
174
|
queryset=ServiceEndpoint.objects.all(),
|
|
174
175
|
selector=True,
|
|
175
176
|
label="Endpoint",
|
|
176
|
-
query_params={"
|
|
177
|
+
query_params={"bgp": "true"},
|
|
178
|
+
help_text="Endpoint of a BGP Service IP or a Service PNI",
|
|
177
179
|
)
|
|
178
180
|
session = DynamicModelChoiceField(
|
|
179
181
|
queryset=BGPSession.objects.all(),
|
|
@@ -187,7 +189,7 @@ class ServiceIPBGPSessionForm(NetBoxModelForm):
|
|
|
187
189
|
FieldSet("endpoint", "session", name="Session"),
|
|
188
190
|
FieldSet("announce_p2p", "default_originate", "next_hop_self", name="Options"),
|
|
189
191
|
FieldSet(
|
|
190
|
-
"bfd", "bfd_interval_ms", "bfd_multiplier", "ttl_security", "password_set",
|
|
192
|
+
"bfd", "bfd_interval_ms", "bfd_multiplier", "ttl_security", "password_set", "tcp_ao_keychain",
|
|
191
193
|
"keepalive", "hold_time", "advertisement_interval", "max_prefix_threshold", "max_prefix_restart",
|
|
192
194
|
name="Neighbor Options",
|
|
193
195
|
),
|
|
@@ -207,6 +209,7 @@ class ServiceIPBGPSessionForm(NetBoxModelForm):
|
|
|
207
209
|
"bfd_multiplier",
|
|
208
210
|
"ttl_security",
|
|
209
211
|
"password_set",
|
|
212
|
+
"tcp_ao_keychain",
|
|
210
213
|
"keepalive",
|
|
211
214
|
"hold_time",
|
|
212
215
|
"advertisement_interval",
|
|
@@ -220,12 +223,15 @@ class ServiceIPBGPSessionForm(NetBoxModelForm):
|
|
|
220
223
|
class ServiceIPBGPSessionFilterForm(NetBoxModelFilterSetForm):
|
|
221
224
|
model = ServiceIPBGPSession
|
|
222
225
|
|
|
223
|
-
service_id = DynamicModelMultipleChoiceField(queryset=ServiceIP.objects.all(), required=False, label="Service")
|
|
226
|
+
service_id = DynamicModelMultipleChoiceField(queryset=ServiceIP.objects.all(), required=False, label="Service IP")
|
|
227
|
+
service_pni_id = DynamicModelMultipleChoiceField(
|
|
228
|
+
queryset=ServicePNI.objects.all(), required=False, label="Service PNI"
|
|
229
|
+
)
|
|
224
230
|
endpoint_id = DynamicModelMultipleChoiceField(
|
|
225
231
|
queryset=ServiceEndpoint.objects.all(),
|
|
226
232
|
required=False,
|
|
227
233
|
label="Endpoint",
|
|
228
|
-
query_params={"service_ip_id": "$service_id"},
|
|
234
|
+
query_params={"bgp": "true", "service_ip_id": "$service_id", "service_pni_id": "$service_pni_id"},
|
|
229
235
|
)
|
|
230
236
|
device_id = DynamicModelMultipleChoiceField(queryset=Device.objects.all(), required=False, label="Device")
|
|
231
237
|
announce_p2p = _yes_no_select()
|
|
@@ -234,13 +240,14 @@ class ServiceIPBGPSessionFilterForm(NetBoxModelFilterSetForm):
|
|
|
234
240
|
bfd = _yes_no_select()
|
|
235
241
|
ttl_security = _yes_no_select()
|
|
236
242
|
password_set = _yes_no_select()
|
|
243
|
+
tcp_ao = _yes_no_select()
|
|
237
244
|
tag = TagFilterField(model)
|
|
238
245
|
|
|
239
246
|
fieldsets = (
|
|
240
247
|
FieldSet("filter_id", "q"),
|
|
241
|
-
FieldSet("service_id", "endpoint_id", "device_id", name="Session"),
|
|
248
|
+
FieldSet("service_id", "service_pni_id", "endpoint_id", "device_id", name="Session"),
|
|
242
249
|
FieldSet("announce_p2p", "default_originate", "next_hop_self", name="Options"),
|
|
243
|
-
FieldSet("bfd", "ttl_security", "password_set", name="Neighbor Options"),
|
|
250
|
+
FieldSet("bfd", "ttl_security", "password_set", "tcp_ao", name="Neighbor Options"),
|
|
244
251
|
FieldSet("tag", name="Misc"),
|
|
245
252
|
)
|
|
246
253
|
|
|
@@ -256,6 +263,7 @@ class ServiceIPBGPSessionBulkEditForm(NetBoxModelBulkEditForm):
|
|
|
256
263
|
bfd_multiplier = forms.IntegerField(required=False, min_value=2, max_value=50, label="BFD Multiplier")
|
|
257
264
|
ttl_security = _yes_no_select()
|
|
258
265
|
password_set = _yes_no_select()
|
|
266
|
+
tcp_ao_keychain = forms.CharField(required=False, max_length=100, label="TCP-AO Key Chain")
|
|
259
267
|
keepalive = forms.IntegerField(required=False, min_value=0, max_value=65535, label="Keepalive (s)")
|
|
260
268
|
hold_time = forms.IntegerField(required=False, min_value=0, max_value=65535, label="Hold Time (s)")
|
|
261
269
|
advertisement_interval = forms.IntegerField(
|
|
@@ -267,9 +275,9 @@ class ServiceIPBGPSessionBulkEditForm(NetBoxModelBulkEditForm):
|
|
|
267
275
|
fieldsets = (
|
|
268
276
|
FieldSet("announce_p2p", "default_originate", "next_hop_self", name="Options"),
|
|
269
277
|
FieldSet(
|
|
270
|
-
"bfd", "bfd_interval_ms", "bfd_multiplier", "ttl_security", "password_set",
|
|
278
|
+
"bfd", "bfd_interval_ms", "bfd_multiplier", "ttl_security", "password_set", "tcp_ao_keychain",
|
|
271
279
|
"keepalive", "hold_time", "advertisement_interval", "max_prefix_threshold", "max_prefix_restart",
|
|
272
280
|
name="Neighbor Options",
|
|
273
281
|
),
|
|
274
282
|
)
|
|
275
|
-
nullable_fields = ()
|
|
283
|
+
nullable_fields = ("tcp_ao_keychain",)
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
from circuits.choices import CircuitStatusChoices
|
|
2
|
+
from dcim.models import Device, Interface
|
|
3
|
+
from django import forms
|
|
4
|
+
from ipam.models import ASN, VRF, Prefix
|
|
5
|
+
from netbox.forms import (
|
|
6
|
+
NetBoxModelBulkEditForm,
|
|
7
|
+
NetBoxModelFilterSetForm,
|
|
8
|
+
NetBoxModelForm,
|
|
9
|
+
)
|
|
10
|
+
from tenancy.models import Tenant
|
|
11
|
+
from utilities.forms import add_blank_choice
|
|
12
|
+
from utilities.forms.fields import (
|
|
13
|
+
CommentField,
|
|
14
|
+
DynamicModelChoiceField,
|
|
15
|
+
DynamicModelMultipleChoiceField,
|
|
16
|
+
TagFilterField,
|
|
17
|
+
)
|
|
18
|
+
from utilities.forms.rendering import FieldSet
|
|
19
|
+
from utilities.forms.widgets import DateTimePicker
|
|
20
|
+
|
|
21
|
+
from netbox_cesnet_services_plugin.choices import ConnectionTypeChoices
|
|
22
|
+
from netbox_cesnet_services_plugin.models import ServicePNI
|
|
23
|
+
|
|
24
|
+
from .service_ip import _yes_no_select
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
class ServicePNIForm(NetBoxModelForm):
|
|
28
|
+
tenant = DynamicModelChoiceField(
|
|
29
|
+
queryset=Tenant.objects.all(), required=False, selector=True, help_text="The partner ISP"
|
|
30
|
+
)
|
|
31
|
+
vrf = DynamicModelChoiceField(
|
|
32
|
+
queryset=VRF.objects.all(),
|
|
33
|
+
required=False,
|
|
34
|
+
selector=True,
|
|
35
|
+
label="VRF",
|
|
36
|
+
help_text="VRF the PNI belongs to; leave blank for Global",
|
|
37
|
+
)
|
|
38
|
+
routing_prefixes = DynamicModelMultipleChoiceField(
|
|
39
|
+
queryset=Prefix.objects.all(), required=False, label="Routing Prefixes"
|
|
40
|
+
)
|
|
41
|
+
bgp_peer_as = DynamicModelChoiceField(queryset=ASN.objects.all(), selector=True, label="BGP Peer AS")
|
|
42
|
+
service_start = forms.DateTimeField(required=False, widget=DateTimePicker())
|
|
43
|
+
service_end = forms.DateTimeField(required=False, widget=DateTimePicker())
|
|
44
|
+
comments = CommentField(required=False)
|
|
45
|
+
|
|
46
|
+
fieldsets = (
|
|
47
|
+
FieldSet("name", "status", "active", "tenant", "monitored", name="Service"),
|
|
48
|
+
FieldSet("service_start", "service_end", "rt", name="Lifecycle"),
|
|
49
|
+
FieldSet("vrf", "routing_prefixes", name="Routing"),
|
|
50
|
+
FieldSet("bgp_peer_as", "bgp_password_set", name="BGP"),
|
|
51
|
+
FieldSet("tags", name="Misc"),
|
|
52
|
+
)
|
|
53
|
+
|
|
54
|
+
class Meta:
|
|
55
|
+
model = ServicePNI
|
|
56
|
+
fields = (
|
|
57
|
+
"name",
|
|
58
|
+
"status",
|
|
59
|
+
"active",
|
|
60
|
+
"tenant",
|
|
61
|
+
"monitored",
|
|
62
|
+
"service_start",
|
|
63
|
+
"service_end",
|
|
64
|
+
"rt",
|
|
65
|
+
"vrf",
|
|
66
|
+
"routing_prefixes",
|
|
67
|
+
"bgp_peer_as",
|
|
68
|
+
"bgp_password_set",
|
|
69
|
+
"tags",
|
|
70
|
+
"comments",
|
|
71
|
+
)
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
class ServicePNIFilterForm(NetBoxModelFilterSetForm):
|
|
75
|
+
model = ServicePNI
|
|
76
|
+
|
|
77
|
+
status = forms.MultipleChoiceField(choices=CircuitStatusChoices, required=False)
|
|
78
|
+
active = _yes_no_select()
|
|
79
|
+
monitored = _yes_no_select()
|
|
80
|
+
tenant_id = DynamicModelMultipleChoiceField(queryset=Tenant.objects.all(), required=False, label="Tenant")
|
|
81
|
+
vrf_id = DynamicModelMultipleChoiceField(queryset=VRF.objects.all(), required=False, label="VRF")
|
|
82
|
+
bgp_peer_as_id = DynamicModelMultipleChoiceField(
|
|
83
|
+
queryset=ASN.objects.all(), required=False, label="BGP Peer AS"
|
|
84
|
+
)
|
|
85
|
+
routing_prefix_id = DynamicModelMultipleChoiceField(
|
|
86
|
+
queryset=Prefix.objects.all(), required=False, label="Routing Prefix"
|
|
87
|
+
)
|
|
88
|
+
connection_type = forms.MultipleChoiceField(choices=ConnectionTypeChoices, required=False)
|
|
89
|
+
device_id = DynamicModelMultipleChoiceField(queryset=Device.objects.all(), required=False, label="Device")
|
|
90
|
+
interface_id = DynamicModelMultipleChoiceField(
|
|
91
|
+
queryset=Interface.objects.all(),
|
|
92
|
+
required=False,
|
|
93
|
+
label="Interface",
|
|
94
|
+
query_params={"device_id": "$device_id"},
|
|
95
|
+
)
|
|
96
|
+
tag = TagFilterField(model)
|
|
97
|
+
|
|
98
|
+
fieldsets = (
|
|
99
|
+
FieldSet("filter_id", "q"),
|
|
100
|
+
FieldSet("status", "active", "monitored", "tenant_id", name="Service"),
|
|
101
|
+
FieldSet("vrf_id", "bgp_peer_as_id", "routing_prefix_id", name="Routing"),
|
|
102
|
+
FieldSet("connection_type", "device_id", "interface_id", name="Endpoints"),
|
|
103
|
+
FieldSet("tag", name="Misc"),
|
|
104
|
+
)
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
class ServicePNIBulkEditForm(NetBoxModelBulkEditForm):
|
|
108
|
+
model = ServicePNI
|
|
109
|
+
|
|
110
|
+
status = forms.ChoiceField(choices=add_blank_choice(CircuitStatusChoices), required=False)
|
|
111
|
+
active = _yes_no_select()
|
|
112
|
+
tenant = DynamicModelChoiceField(queryset=Tenant.objects.all(), required=False)
|
|
113
|
+
monitored = _yes_no_select()
|
|
114
|
+
service_start = forms.DateTimeField(required=False, widget=DateTimePicker())
|
|
115
|
+
service_end = forms.DateTimeField(required=False, widget=DateTimePicker())
|
|
116
|
+
rt = forms.CharField(required=False, label="RT Tickets")
|
|
117
|
+
vrf = DynamicModelChoiceField(queryset=VRF.objects.all(), required=False, label="VRF")
|
|
118
|
+
bgp_peer_as = DynamicModelChoiceField(queryset=ASN.objects.all(), required=False, label="BGP Peer AS")
|
|
119
|
+
bgp_password_set = _yes_no_select()
|
|
120
|
+
|
|
121
|
+
fieldsets = (
|
|
122
|
+
FieldSet("status", "active", "tenant", "monitored", name="Service"),
|
|
123
|
+
FieldSet("service_start", "service_end", "rt", name="Lifecycle"),
|
|
124
|
+
FieldSet("vrf", "bgp_peer_as", "bgp_password_set", name="Routing"),
|
|
125
|
+
)
|
|
126
|
+
# the peer AS is required, so it cannot be cleared in bulk
|
|
127
|
+
nullable_fields = ("tenant", "service_start", "service_end", "rt", "vrf")
|