Skip to content
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

NAS-133961 / 25.10 / Introduce v25_10_0 API #15561

Merged
merged 4 commits into from
Feb 4, 2025
Merged
Show file tree
Hide file tree
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
8 changes: 8 additions & 0 deletions docs/source/api/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
API
===

.. toctree::
:maxdepth: 4
:caption: Contents:

new_version.rst
23 changes: 23 additions & 0 deletions docs/source/api/new_version.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
Adding A New API Version
========================

.. contents:: Table of Contents
:depth: 3

When starting to work on a new TrueNAS release, we must generate new stable API version definition.

The first step will be to use the files of the recently released version as a base for the new version:

.. code-block:: bash

cp -R src/middlewared/middlewared/api/v25_04_0 src/middlewared/middlewared/api/v25_10_0

Then we need to remove all `from_previous` and `to_previous` class method declarations in the new version. This needs
to be done manually.

After that, change `src/middlewared/middlewared/api/current.py` to import from the newly added version instead of
importing from the previously used one:

.. code-block:: python

from .v25_04_0 import * # noqa
1 change: 1 addition & 0 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Welcome to TrueNAS developer documentation!

os/index.rst
database/index.rst
api/index.rst
audit/index.rst
middleware/index.rst
services/index.rst
Expand Down
2 changes: 1 addition & 1 deletion src/middlewared/middlewared/api/current.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
"provided traceback and ensure that nothing is imported from `middlewared.api.current`."
)

from .v25_04_0 import * # noqa
from .v25_10_0 import * # noqa
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ class ECCCSRExtensionsModel(BaseModel):

@final
class RSACSRExtensions(BaseModel):
cert_extensions: RSACSRExtensionsModel = RSACertExtensionsModel()
cert_extensions: RSACSRExtensionsModel = RSACSRExtensionsModel()
key_length: int = KEY_LENGTH
key_type: str = RSA
lifetime: int = DEFAULT_LIFETIME_DAYS
Expand All @@ -150,7 +150,7 @@ class RSACSRExtensions(BaseModel):

@final
class ECCCSRExtensions(BaseModel):
cert_extensions: ECCCSRExtensionsModel = ECCCertExtensionsModel()
cert_extensions: ECCCSRExtensionsModel = ECCCSRExtensionsModel()
ec_curve: str = EC_CURVE
key_type: str = EC
lifetime: int = DEFAULT_LIFETIME_DAYS
Expand Down
78 changes: 78 additions & 0 deletions src/middlewared/middlewared/api/v25_10_0/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
from .acl import * # noqa
from .acme_dns_authenticator import * # noqa
from .acme_registration import * # noqa
from .alert import * # noqa
from .alertservice import * # noqa
from .api_key import * # noqa
from .app import * # noqa
from .app_image import * # noqa
from .app_ix_volume import * # noqa
from .app_registry import * # noqa
from .auth import * # noqa
from .boot_environments import * # noqa
from .catalog import * # noqa
from .cloud_backup import * # noqa
from .cloud_sync import * # noqa
from .common import * # noqa
from .config import * # noqa
from .core import * # noqa
from .cronjob import * # noqa
from .crypto_ca_profiles import * # noqa
from .crypto_cert_info import * # noqa
from .crypto_cert_profiles import * # noqa
from .device import * # noqa
from .disk import * # noqa
from .docker import * # noqa
from .docker_network import * # noqa
from .enclosure_label import * # noqa
from .failover_reboot import * # noqa
from .fc import * # noqa
from .fc_host import * # noqa
from .fcport import * # noqa
from .filesystem import * # noqa
from .ftp import * # noqa
from .group import * # noqa
from .initshutdownscript import * # noqa
from .ipmi import * # noqa
from .iscsi_auth import * # noqa
from .iscsi_extent import * # noqa
from .iscsi_global import * # noqa
from .iscsi_initiator import * # noqa
from .iscsi_portal import * # noqa
from .iscsi_target import * # noqa
from .iscsi_target_to_extent import * # noqa
from .keychain import * # noqa
from .k8s_to_docker import * # noqa
from .netdata import * # noqa
from .nfs import * # noqa
from .pool import * # noqa
from .pool_dataset_details import * # noqa
from .pool_resilver import * # noqa
from .pool_scrub import * # noqa
from .pool_snapshot_count import * # noqa
from .pool_snapshottask import * # noqa
from .privilege import * # noqa
from .rdma import * # noqa
from .rdma_interface import * # noqa
from .reporting import * # noqa
from .reporting_exporters import * # noqa
from .smartctl import * # noqa
from .smb import * # noqa
from .snmp import * # noqa
from .static_route import * # noqa
from .system_lifecycle import * # noqa
from .system_ntpserver import * # noqa
from .system_reboot import * # noqa
from .system_security import * # noqa
from .tn_connect import * # noqa
from .truenas import * # noqa
from .user import * # noqa
from .vendor import * # noqa
from .virt_device import * # noqa
from .virt_global import * # noqa
from .virt_instance import * # noqa
from .virt_volume import * # noqa
from .vm import * # noqa
from .vm_device import * # noqa
from .webui_enclosure import * # noqa
from .webui_main_dashboard import * # noqa
Loading
Loading