BGP Models API Package¶
nautobot_bgp_models.api
¶
REST API module for nautobot_bgp_models app.
filter_backends
¶
Filter Backends in use by BGP models app.
IncludeInheritedFilterBackend
¶
Bases: NautobotFilterBackend
Used by views that work with inheritance (PeerGroupViewSet, PeerEndpointViewSet).
Recognizes that "include_inherited" is not a filterset parameter but rather a view parameter (see InheritableFieldsViewSetMixin)
Source code in nautobot_bgp_models/api/filter_backends.py
get_filterset_kwargs(request, queryset, view)
¶
Pop include_inherited as it is not a valid filter field.
Source code in nautobot_bgp_models/api/filter_backends.py
serializers
¶
REST API serializers for nautobot_bgp_models models.
AddressFamilySerializer
¶
Bases: NautobotModelSerializer
, ExtraAttributesSerializerMixin
REST API serializer for AddressFamily records.
Source code in nautobot_bgp_models/api/serializers.py
AutonomousSystemRangeSerializer
¶
Bases: NautobotModelSerializer
, TaggedModelSerializerMixin
REST API serializer for AutonomousSystemRange records.
Source code in nautobot_bgp_models/api/serializers.py
AutonomousSystemSerializer
¶
Bases: NautobotModelSerializer
, TaggedModelSerializerMixin
REST API serializer for AutonomousSystem records.
Source code in nautobot_bgp_models/api/serializers.py
BGPRoutingInstanceSerializer
¶
Bases: NautobotModelSerializer
, TaggedModelSerializerMixin
, ExtraAttributesSerializerMixin
REST API serializer for Peering records.
Source code in nautobot_bgp_models/api/serializers.py
ExtraAttributesSerializerMixin
¶
Bases: Serializer
Common mixin for BGP Extra Attributes.
Source code in nautobot_bgp_models/api/serializers.py
to_representation(instance)
¶
Render the model instance to a Python dict.
If include_inherited
is specified as a request parameter, include object's get_extra_attributes().
Source code in nautobot_bgp_models/api/serializers.py
InheritableFieldsSerializerMixin
¶
Common mixin for Serializers that support an additional include_inherited
query parameter.
Source code in nautobot_bgp_models/api/serializers.py
to_representation(instance)
¶
Render the model instance to a Python dict.
If include_inherited
is specified as a request parameter, include inherited field values as appropriate.
Source code in nautobot_bgp_models/api/serializers.py
PeerEndpointAddressFamilySerializer
¶
Bases: NautobotModelSerializer
, ExtraAttributesSerializerMixin
REST API serializer for PeerEndpointAddressFamily records.
Source code in nautobot_bgp_models/api/serializers.py
PeerEndpointSerializer
¶
Bases: InheritableFieldsSerializerMixin
, TaggedModelSerializerMixin
, NautobotModelSerializer
, ExtraAttributesSerializerMixin
REST API serializer for PeerEndpoint records.
Source code in nautobot_bgp_models/api/serializers.py
create(validated_data)
¶
Create a new PeerEndpoint and update the peer on both sides.
update(instance, validated_data)
¶
When updating an existing PeerEndpoint, ensure peer is properly setup on both side.
Source code in nautobot_bgp_models/api/serializers.py
PeerGroupAddressFamilySerializer
¶
Bases: NautobotModelSerializer
, ExtraAttributesSerializerMixin
REST API serializer for PeerGroupAddressFamily records.
Source code in nautobot_bgp_models/api/serializers.py
PeerGroupSerializer
¶
Bases: InheritableFieldsSerializerMixin
, TaggedModelSerializerMixin
, NautobotModelSerializer
, ExtraAttributesSerializerMixin
REST API serializer for PeerGroup records.
Source code in nautobot_bgp_models/api/serializers.py
validate(data)
¶
Custom validation logic to handle unique-together with a nullable field.
Source code in nautobot_bgp_models/api/serializers.py
PeerGroupTemplateSerializer
¶
Bases: NautobotModelSerializer
, ExtraAttributesSerializerMixin
REST API serializer for PeerGroup records.
Source code in nautobot_bgp_models/api/serializers.py
PeeringSerializer
¶
urls
¶
REST API URL registration for nautobot_bgp_models.
views
¶
REST API viewsets for nautobot_bgp_models.
AddressFamilyViewSet
¶
Bases: InheritableFieldsViewSetMixin
, NautobotModelViewSet
REST API viewset for AddressFamily records.
Source code in nautobot_bgp_models/api/views.py
AutonomousSystemRangeViewSet
¶
Bases: NautobotModelViewSet
REST API viewset for AutonomousSystemRange records.
Source code in nautobot_bgp_models/api/views.py
AutonomousSystemViewSet
¶
Bases: NautobotModelViewSet
REST API viewset for AutonomousSystem records.
Source code in nautobot_bgp_models/api/views.py
BGPRoutingInstanceViewSet
¶
Bases: NautobotModelViewSet
REST API viewset for BGPRoutingInstance records.
Source code in nautobot_bgp_models/api/views.py
InheritableFieldsViewSetMixin
¶
Common mixin for ViewSets that support an additional include_inherited
query parameter.
Source code in nautobot_bgp_models/api/views.py
list(request)
¶
PeerEndpointAddressFamilyViewSet
¶
Bases: InheritableFieldsViewSetMixin
, NautobotModelViewSet
REST API viewset for PeerEndpointAddressFamily records.
Source code in nautobot_bgp_models/api/views.py
PeerEndpointViewSet
¶
Bases: InheritableFieldsViewSetMixin
, NautobotModelViewSet
REST API viewset for PeerEndpoint records.
Source code in nautobot_bgp_models/api/views.py
PeerGroupAddressFamilyViewSet
¶
Bases: InheritableFieldsViewSetMixin
, NautobotModelViewSet
REST API viewset for PeerGroupAddressFamily records.
Source code in nautobot_bgp_models/api/views.py
PeerGroupTemplateViewSet
¶
Bases: InheritableFieldsViewSetMixin
, NautobotModelViewSet
REST API viewset for PeerGroupTemplate records.
Source code in nautobot_bgp_models/api/views.py
PeerGroupViewSet
¶
Bases: InheritableFieldsViewSetMixin
, NautobotModelViewSet
REST API viewset for PeerGroup records.
Source code in nautobot_bgp_models/api/views.py
PeeringViewSet
¶
Bases: NautobotModelViewSet
REST API viewset for Peering records.