Skip to content

Device Lifecycle Management API Package

nautobot_device_lifecycle_mgmt.api

REST API module for nautobot_device_lifecycle_mgmt app.

serializers

API serializers implementation for the LifeCycle Management app.

CVELCMSerializer

Bases: NautobotModelSerializer

REST API serializer for CVELCM records.

Source code in nautobot_device_lifecycle_mgmt/api/serializers.py
class CVELCMSerializer(NautobotModelSerializer):  # pylint: disable=abstract-method,too-few-public-methods
    """REST API serializer for CVELCM records."""

    class Meta:
        """Meta attributes."""

        model = CVELCM
        fields = "__all__"
Meta

Meta attributes.

Source code in nautobot_device_lifecycle_mgmt/api/serializers.py
class Meta:
    """Meta attributes."""

    model = CVELCM
    fields = "__all__"

ContactLCMSerializer

Bases: NautobotModelSerializer

API serializer.

Source code in nautobot_device_lifecycle_mgmt/api/serializers.py
class ContactLCMSerializer(NautobotModelSerializer):  # pylint: disable=R0901,too-few-public-methods
    """API serializer."""

    class Meta:
        """Meta attributes."""

        model = ContactLCM
        fields = "__all__"
Meta

Meta attributes.

Source code in nautobot_device_lifecycle_mgmt/api/serializers.py
class Meta:
    """Meta attributes."""

    model = ContactLCM
    fields = "__all__"

ContractLCMSerializer

Bases: NautobotModelSerializer

API serializer.

Source code in nautobot_device_lifecycle_mgmt/api/serializers.py
class ContractLCMSerializer(NautobotModelSerializer):  # pylint: disable=R0901,too-few-public-methods
    """API serializer."""

    class Meta:
        """Meta attributes."""

        model = ContractLCM
        fields = "__all__"
Meta

Meta attributes.

Source code in nautobot_device_lifecycle_mgmt/api/serializers.py
class Meta:
    """Meta attributes."""

    model = ContractLCM
    fields = "__all__"

DeviceSoftwareValidationResultSerializer

Bases: NautobotModelSerializer

REST API serializer for DeviceSoftwareValidationResult records.

Source code in nautobot_device_lifecycle_mgmt/api/serializers.py
class DeviceSoftwareValidationResultSerializer(NautobotModelSerializer):
    """REST API serializer for DeviceSoftwareValidationResult records."""

    class Meta:
        """Meta attributes."""

        model = DeviceSoftwareValidationResult
        fields = "__all__"
Meta

Meta attributes.

Source code in nautobot_device_lifecycle_mgmt/api/serializers.py
class Meta:
    """Meta attributes."""

    model = DeviceSoftwareValidationResult
    fields = "__all__"

HardwareLCMSerializer

Bases: NautobotModelSerializer

API serializer.

Source code in nautobot_device_lifecycle_mgmt/api/serializers.py
class HardwareLCMSerializer(NautobotModelSerializer):  # pylint: disable=R0901,too-few-public-methods
    """API serializer."""

    class Meta:
        """Meta attributes."""

        model = HardwareLCM
        fields = "__all__"
Meta

Meta attributes.

Source code in nautobot_device_lifecycle_mgmt/api/serializers.py
class Meta:
    """Meta attributes."""

    model = HardwareLCM
    fields = "__all__"

InventoryItemSoftwareValidationResultSerializer

Bases: NautobotModelSerializer

REST API serializer for InventoryItemSoftwareValidationResult records.

Source code in nautobot_device_lifecycle_mgmt/api/serializers.py
class InventoryItemSoftwareValidationResultSerializer(NautobotModelSerializer):
    """REST API serializer for InventoryItemSoftwareValidationResult records."""

    class Meta:
        """Meta attributes."""

        model = InventoryItemSoftwareValidationResult
        fields = "__all__"
Meta

Meta attributes.

Source code in nautobot_device_lifecycle_mgmt/api/serializers.py
class Meta:
    """Meta attributes."""

    model = InventoryItemSoftwareValidationResult
    fields = "__all__"

ProviderLCMSerializer

Bases: NautobotModelSerializer

API serializer.

Source code in nautobot_device_lifecycle_mgmt/api/serializers.py
class ProviderLCMSerializer(NautobotModelSerializer):  # pylint: disable=R0901,too-few-public-methods
    """API serializer."""

    class Meta:
        """Meta attributes."""

        model = ProviderLCM
        fields = "__all__"
Meta

Meta attributes.

Source code in nautobot_device_lifecycle_mgmt/api/serializers.py
class Meta:
    """Meta attributes."""

    model = ProviderLCM
    fields = "__all__"

SoftwareImageLCMSerializer

Bases: NautobotModelSerializer

REST API serializer for SoftwareImageLCM records.

Source code in nautobot_device_lifecycle_mgmt/api/serializers.py
class SoftwareImageLCMSerializer(NautobotModelSerializer):
    """REST API serializer for SoftwareImageLCM records."""

    class Meta:
        """Meta attributes."""

        model = SoftwareImageLCM
        fields = "__all__"
Meta

Meta attributes.

Source code in nautobot_device_lifecycle_mgmt/api/serializers.py
class Meta:
    """Meta attributes."""

    model = SoftwareImageLCM
    fields = "__all__"

SoftwareLCMSerializer

Bases: NautobotModelSerializer

REST API serializer for SoftwareLCM records.

Source code in nautobot_device_lifecycle_mgmt/api/serializers.py
class SoftwareLCMSerializer(NautobotModelSerializer):
    """REST API serializer for SoftwareLCM records."""

    class Meta:
        """Meta attributes."""

        model = SoftwareLCM
        fields = "__all__"
Meta

Meta attributes.

Source code in nautobot_device_lifecycle_mgmt/api/serializers.py
class Meta:
    """Meta attributes."""

    model = SoftwareLCM
    fields = "__all__"

ValidatedSoftwareLCMSerializer

Bases: NautobotModelSerializer

REST API serializer for ValidatedSoftwareLCM records.

Source code in nautobot_device_lifecycle_mgmt/api/serializers.py
class ValidatedSoftwareLCMSerializer(NautobotModelSerializer):
    """REST API serializer for ValidatedSoftwareLCM records."""

    class Meta:
        """Meta attributes."""

        model = ValidatedSoftwareLCM
        fields = "__all__"
Meta

Meta attributes.

Source code in nautobot_device_lifecycle_mgmt/api/serializers.py
class Meta:
    """Meta attributes."""

    model = ValidatedSoftwareLCM
    fields = "__all__"

VulnerabilityLCMSerializer

Bases: NautobotModelSerializer

REST API serializer for VulnerabilityLCM records.

Source code in nautobot_device_lifecycle_mgmt/api/serializers.py
class VulnerabilityLCMSerializer(NautobotModelSerializer):  # pylint: disable=abstract-method,too-few-public-methods
    """REST API serializer for VulnerabilityLCM records."""

    class Meta:
        """Meta attributes."""

        model = VulnerabilityLCM
        fields = "__all__"
        read_only_fields = [
            "id",
            "display",
            "url",
            "cve",
            "software",
            "device",
            "inventory_item",
        ]
Meta

Meta attributes.

Source code in nautobot_device_lifecycle_mgmt/api/serializers.py
class Meta:
    """Meta attributes."""

    model = VulnerabilityLCM
    fields = "__all__"
    read_only_fields = [
        "id",
        "display",
        "url",
        "cve",
        "software",
        "device",
        "inventory_item",
    ]

urls

API URLs for the Lifecycle Management app.

views

API Views implementation for the Lifecycle Management app.

CVELCMViewSet

Bases: NautobotModelViewSet

REST API viewset for CVELCM records.

Source code in nautobot_device_lifecycle_mgmt/api/views.py
class CVELCMViewSet(NautobotModelViewSet):
    """REST API viewset for CVELCM records."""

    queryset = CVELCM.objects.all()
    serializer_class = CVELCMSerializer
    filterset_class = CVELCMFilterSet

ContactLCMView

Bases: NautobotModelViewSet

CRUD operations set for the Contact Lifecycle Management view.

Source code in nautobot_device_lifecycle_mgmt/api/views.py
class ContactLCMView(NautobotModelViewSet):
    """CRUD operations set for the Contact Lifecycle Management view."""

    queryset = ContactLCM.objects.all()
    filterset_class = ContactLCMFilterSet
    serializer_class = ContactLCMSerializer

ContractLCMView

Bases: NautobotModelViewSet

CRUD operations set for the Contract Lifecycle Management view.

Source code in nautobot_device_lifecycle_mgmt/api/views.py
class ContractLCMView(NautobotModelViewSet):
    """CRUD operations set for the Contract Lifecycle Management view."""

    queryset = ContractLCM.objects.all()
    filterset_class = ContractLCMFilterSet
    serializer_class = ContractLCMSerializer

DeviceSoftwareValidationResultListViewSet

Bases: NautobotModelViewSet

REST API viewset for DeviceSoftwareValidationResult records.

Source code in nautobot_device_lifecycle_mgmt/api/views.py
class DeviceSoftwareValidationResultListViewSet(NautobotModelViewSet):
    """REST API viewset for DeviceSoftwareValidationResult records."""

    queryset = DeviceSoftwareValidationResult.objects.all()
    serializer_class = DeviceSoftwareValidationResultSerializer
    filterset_class = DeviceSoftwareValidationResultFilterSet

    # Disabling POST as these should only be created via Job.
    http_method_names = ["get", "head", "options"]

HardwareLCMView

Bases: NautobotModelViewSet

CRUD operations set for the Hardware Lifecycle Management view.

Source code in nautobot_device_lifecycle_mgmt/api/views.py
class HardwareLCMView(NautobotModelViewSet):
    """CRUD operations set for the Hardware Lifecycle Management view."""

    queryset = HardwareLCM.objects.all()
    filterset_class = HardwareLCMFilterSet
    serializer_class = HardwareLCMSerializer

InventoryItemSoftwareValidationResultListViewSet

Bases: NautobotModelViewSet

REST API viewset for DeviceSoftwareValidationResult records.

Source code in nautobot_device_lifecycle_mgmt/api/views.py
class InventoryItemSoftwareValidationResultListViewSet(NautobotModelViewSet):
    """REST API viewset for DeviceSoftwareValidationResult records."""

    queryset = InventoryItemSoftwareValidationResult.objects.all()
    serializer_class = InventoryItemSoftwareValidationResultSerializer
    filterset_class = InventoryItemSoftwareValidationResultFilterSet

    # Disabling POST as these should only be created via Job.
    http_method_names = ["get", "head", "options"]

ProviderLCMView

Bases: NautobotModelViewSet

CRUD operations set for the Contract Provider Lifecycle Management view.

Source code in nautobot_device_lifecycle_mgmt/api/views.py
class ProviderLCMView(NautobotModelViewSet):
    """CRUD operations set for the Contract Provider Lifecycle Management view."""

    queryset = ProviderLCM.objects.all()
    filterset_class = ProviderLCMFilterSet
    serializer_class = ProviderLCMSerializer

SoftwareImageLCMViewSet

Bases: NautobotModelViewSet

REST API viewset for SoftwareImageLCM records.

Source code in nautobot_device_lifecycle_mgmt/api/views.py
class SoftwareImageLCMViewSet(NautobotModelViewSet):
    """REST API viewset for SoftwareImageLCM records."""

    queryset = SoftwareImageLCM.objects.prefetch_related("software")
    serializer_class = SoftwareImageLCMSerializer
    filterset_class = SoftwareImageLCMFilterSet

SoftwareLCMViewSet

Bases: NautobotModelViewSet

REST API viewset for SoftwareLCM records.

Source code in nautobot_device_lifecycle_mgmt/api/views.py
class SoftwareLCMViewSet(NautobotModelViewSet):
    """REST API viewset for SoftwareLCM records."""

    queryset = SoftwareLCM.objects.prefetch_related("software_images")
    serializer_class = SoftwareLCMSerializer
    filterset_class = SoftwareLCMFilterSet

ValidatedSoftwareLCMViewSet

Bases: NautobotModelViewSet

REST API viewset for ValidatedSoftwareLCM records.

Source code in nautobot_device_lifecycle_mgmt/api/views.py
class ValidatedSoftwareLCMViewSet(NautobotModelViewSet):
    """REST API viewset for ValidatedSoftwareLCM records."""

    queryset = ValidatedSoftwareLCM.objects.all()
    serializer_class = ValidatedSoftwareLCMSerializer
    filterset_class = ValidatedSoftwareLCMFilterSet

VulnerabilityLCMViewSet

Bases: NautobotModelViewSet

REST API viewset for VulnerabilityLCM records.

Source code in nautobot_device_lifecycle_mgmt/api/views.py
class VulnerabilityLCMViewSet(NautobotModelViewSet):
    """REST API viewset for VulnerabilityLCM records."""

    queryset = VulnerabilityLCM.objects.all()
    serializer_class = VulnerabilityLCMSerializer
    filterset_class = VulnerabilityLCMFilterSet

    # Disabling POST as these should only be created via Job.
    http_method_names = ["get", "put", "patch", "delete", "head", "options"]