Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion linode_api4/objects/linode.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import copy
import string
import sys
import warnings
from dataclasses import dataclass, field
from datetime import datetime
from enum import Enum
Expand Down Expand Up @@ -217,7 +218,7 @@ def resize(self, new_size):
class Kernel(Base):
"""
The primary component of every Linux system. The kernel interfaces
with the system’s hardware and it controls the operating system’s core functionality.
with the system’s hardware, and it controls the operating system’s core functionality.

Your Compute Instance is capable of running one of three kinds of kernels:

Expand All @@ -237,6 +238,10 @@ class Kernel(Base):
to compile the kernel from source than to download it from your package manager. For more
information on custom compiled kernels, review our guides for Debian, Ubuntu, and CentOS.

.. note::
The ``xen`` property is deprecated and is no longer returned by the API.
It is maintained for backward compatibility only.

API Documentation: https://techdocs.akamai.com/linode-api/reference/get-kernel
"""

Expand All @@ -256,6 +261,16 @@ class Kernel(Base):
"pvops": Property(),
}

def __getattribute__(self, name: str) -> object:
if name == "xen":
warnings.warn(
"The 'xen' property of Kernel is deprecated and is no longer "
"returned by the API. It is maintained for backward compatibility only.",
DeprecationWarning,
stacklevel=2,
)
return super().__getattribute__(name)


class Type(Base):
"""
Expand Down