Commit f4cdd081 authored by Boris Glimcher's avatar Boris Glimcher Committed by Tomasz Zawadzki
Browse files

python/rpc: deprecate rpc modules



individual rpc modules provides very simple wrappers
around existing client functions.

This can be easily replaced by setattr based dynamic functions.

Csutomers we know of are using client object directly.

There is no translation happens inside RPC modules.

As discusssed on community call, deprecating all of those now.
They will stay for the next release, and removed only in the next LTS one.
Giving enough time for customers to raise objections.

Change-Id: I832857eb269f898af27e8217119a7b12b5aea4e0
Signed-off-by: default avatarBoris Glimcher <Boris.Glimcher@emc.com>
Reviewed-on: https://review.spdk.io/c/spdk/spdk/+/26423


Reviewed-by: default avatarJim Harris <jim.harris@nvidia.com>
Reviewed-by: default avatarKonrad Sztyber <ksztyber@nvidia.com>
Tested-by: default avatarSPDK Automated Test System <spdkbot@gmail.com>
parent 78e035e7
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -19,6 +19,18 @@ The tags can be matched with the level 4 headers below.

## Deprecation Notices

### python

#### `rpc`

Deprecated all modules under python/spdk/rpc providing wrappers around RPC methods.

Will be removed in the 26.01 release.

Individual rpc modules provides very simple wrappers around existing client functions.
There is no translations or useful abstractions happen inside those RPC modules.
This can be easily replaced by setattr based dynamic functions on the JSONRPCClient.

### util/net

#### `spdk_net_getaddr`
+7 −0
Original line number Diff line number Diff line
@@ -36,28 +36,34 @@ from . import iobuf
from . import dpdk_cryptodev
from . import mlx5
from . import client as rpc_client
from .helpers import deprecated_method


@deprecated_method
def framework_start_init(client):
    """Start initialization of subsystems"""
    return client.call('framework_start_init')


@deprecated_method
def framework_wait_init(client):
    """Block until subsystems have been initialized"""
    return client.call('framework_wait_init')


@deprecated_method
def framework_disable_cpumask_locks(client):
    """ Disable CPU core lock files."""
    return client.call('framework_disable_cpumask_locks')


@deprecated_method
def framework_enable_cpumask_locks(client):
    """ Enable CPU core lock files."""
    return client.call('framework_enable_cpumask_locks')


@deprecated_method
def rpc_get_methods(client, current=None, include_aliases=None):
    """Get list of supported RPC methods.
    Args:
@@ -74,6 +80,7 @@ def rpc_get_methods(client, current=None, include_aliases=None):
    return client.call('rpc_get_methods', params)


@deprecated_method
def spdk_get_version(client):
    """Get SPDK version"""
    return client.call('spdk_get_version')
+11 −1
Original line number Diff line number Diff line
@@ -3,9 +3,10 @@
#  All rights reserved.
#

from spdk.rpc.helpers import deprecated_alias
from spdk.rpc.helpers import deprecated_alias, deprecated_method


@deprecated_method
def accel_get_opc_assignments(client):
    """Get list of opcode name to module assignments.
    """
@@ -13,12 +14,14 @@ def accel_get_opc_assignments(client):


@deprecated_alias('accel_get_engine_info')
@deprecated_method
def accel_get_module_info(client):
    """Get list of valid module names and their operations.
    """
    return client.call('accel_get_module_info')


@deprecated_method
def accel_assign_opc(client, opname, module):
    """Manually assign an operation to a module.

@@ -34,6 +37,7 @@ def accel_assign_opc(client, opname, module):
    return client.call('accel_assign_opc', params)


@deprecated_method
def accel_crypto_key_create(client, cipher, key, key2, tweak_mode, name):
    """Create Data Encryption Key Identifier.

@@ -57,6 +61,7 @@ def accel_crypto_key_create(client, cipher, key, key2, tweak_mode, name):
    return client.call('accel_crypto_key_create', params)


@deprecated_method
def accel_crypto_key_destroy(client, key_name):
    """Destroy Data Encryption Key.

@@ -70,6 +75,7 @@ def accel_crypto_key_destroy(client, key_name):
    return client.call('accel_crypto_key_destroy', params)


@deprecated_method
def accel_crypto_keys_get(client, key_name):
    """Get a list of the crypto keys.

@@ -84,6 +90,7 @@ def accel_crypto_keys_get(client, key_name):
    return client.call('accel_crypto_keys_get', params)


@deprecated_method
def accel_set_driver(client, name):
    """Select accel platform driver to execute operation chains.

@@ -93,6 +100,7 @@ def accel_set_driver(client, name):
    return client.call('accel_set_driver', {'name': name})


@deprecated_method
def accel_set_options(client, small_cache_size, large_cache_size,
                      task_count, sequence_count, buf_count):
    """Set accel framework's options."""
@@ -112,12 +120,14 @@ def accel_set_options(client, small_cache_size, large_cache_size,
    return client.call('accel_set_options', params)


@deprecated_method
def accel_get_stats(client):
    """Get accel framework's statistics"""

    return client.call('accel_get_stats')


@deprecated_method
def accel_error_inject_error(client, opcode, type, count=None, interval=None, errcode=None):
    """Inject an error to processing accel operation"""
    params = {}
+14 −0
Original line number Diff line number Diff line
@@ -2,7 +2,10 @@
#  Copyright (C) 2017 Intel Corporation.
#  All rights reserved.

from spdk.rpc.helpers import deprecated_method


@deprecated_method
def spdk_kill_instance(client, sig_name):
    """Send a signal to the SPDK process.

@@ -13,6 +16,7 @@ def spdk_kill_instance(client, sig_name):
    return client.call('spdk_kill_instance', params)


@deprecated_method
def framework_monitor_context_switch(client, enabled=None):
    """Query or set state of context switch monitoring.

@@ -28,6 +32,7 @@ def framework_monitor_context_switch(client, enabled=None):
    return client.call('framework_monitor_context_switch', params)


@deprecated_method
def framework_get_reactors(client):
    """Query list of all reactors.

@@ -37,6 +42,7 @@ def framework_get_reactors(client):
    return client.call('framework_get_reactors')


@deprecated_method
def framework_set_scheduler(client, name, period=None, load_limit=None, core_limit=None,
                            core_busy=None, mappings=None):
    """Select threads scheduler that will be activated and its period.
@@ -61,6 +67,7 @@ def framework_set_scheduler(client, name, period=None, load_limit=None, core_lim
    return client.call('framework_set_scheduler', params)


@deprecated_method
def framework_get_scheduler(client):
    """Query currently set scheduler.

@@ -70,6 +77,7 @@ def framework_get_scheduler(client):
    return client.call('framework_get_scheduler')


@deprecated_method
def framework_get_governor(client):
    """Query current governor data.

@@ -79,6 +87,7 @@ def framework_get_governor(client):
    return client.call('framework_get_governor')


@deprecated_method
def scheduler_set_options(client, scheduling_core=None, isolated_core_mask=None):
    params = {}
    if isolated_core_mask is not None:
@@ -88,6 +97,7 @@ def scheduler_set_options(client, scheduling_core=None, isolated_core_mask=None)
    return client.call('scheduler_set_options', params)


@deprecated_method
def thread_get_stats(client):
    """Query threads statistics.

@@ -97,6 +107,7 @@ def thread_get_stats(client):
    return client.call('thread_get_stats')


@deprecated_method
def thread_set_cpumask(client, id, cpumask):
    """Set the cpumask of the thread whose ID matches to the specified value.

@@ -111,6 +122,7 @@ def thread_set_cpumask(client, id, cpumask):
    return client.call('thread_set_cpumask', params)


@deprecated_method
def log_enable_timestamps(client, enabled):
    """Enable or disable timestamps.

@@ -124,6 +136,7 @@ def log_enable_timestamps(client, enabled):
    return client.call('log_enable_timestamps', params)


@deprecated_method
def thread_get_pollers(client):
    """Query current pollers.

@@ -133,6 +146,7 @@ def thread_get_pollers(client):
    return client.call('thread_get_pollers')


@deprecated_method
def thread_get_io_channels(client):
    """Query current IO channels.

+101 −0

File changed.

Preview size limit exceeded, changes collapsed.

Loading