Commit 8710b600 authored by Maciej Wawryk's avatar Maciej Wawryk Committed by Jim Harris
Browse files

RPC: rename get_subsystems to framework_get_subsystems



Signed-off-by: default avatarMaciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: Iaeaf20e2a16b41796cb89a92fadd99cb1d341720
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/468670


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Reviewed-by: default avatarPaul Luse <paul.e.luse@intel.com>
parent 7630daa2
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -276,7 +276,7 @@ Example response:
    "bdev_get_bdevs",
    "bdev_get_iostat",
    "get_subsystem_config",
    "get_subsystems",
    "framework_get_subsystems",
    "framework_monitor_context_switch",
    "spdk_kill_instance",
    "ioat_scan_copy_engine",
@@ -317,7 +317,7 @@ Example response:
}
~~~

## get_subsystems {#rpc_get_subsystems}
## framework_get_subsystems {#rpc_framework_get_subsystems}

Get an array of name and dependency relationship of SPDK subsystems in initialization order.

@@ -337,7 +337,7 @@ Example request:
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "get_subsystems"
  "method": "framework_get_subsystems"
}
~~~

+5 −4
Original line number Diff line number Diff line
@@ -38,7 +38,7 @@
#include "spdk/env.h"

static void
spdk_rpc_get_subsystems(struct spdk_jsonrpc_request *request,
spdk_rpc_framework_get_subsystems(struct spdk_jsonrpc_request *request,
				  const struct spdk_json_val *params)
{
	struct spdk_json_write_ctx *w;
@@ -47,7 +47,7 @@ spdk_rpc_get_subsystems(struct spdk_jsonrpc_request *request,

	if (params) {
		spdk_jsonrpc_send_error_response(request, SPDK_JSONRPC_ERROR_INVALID_PARAMS,
						 "'get_subsystems' requires no arguments");
						 "'framework_get_subsystems' requires no arguments");
		return;
	}

@@ -71,7 +71,8 @@ spdk_rpc_get_subsystems(struct spdk_jsonrpc_request *request,
	spdk_jsonrpc_end_result(request, w);
}

SPDK_RPC_REGISTER("get_subsystems", spdk_rpc_get_subsystems, SPDK_RPC_RUNTIME)
SPDK_RPC_REGISTER("framework_get_subsystems", spdk_rpc_framework_get_subsystems, SPDK_RPC_RUNTIME)
SPDK_RPC_REGISTER_ALIAS_DEPRECATED(framework_get_subsystems, get_subsystems)

struct rpc_get_subsystem_config {
	char *name;
+5 −4
Original line number Diff line number Diff line
@@ -1828,12 +1828,13 @@ Format: 'user:u1 secret:s1 muser:mu1 msecret:ms1,user:u2 secret:s2 muser:mu2 mse
    p.set_defaults(func=bdev_pmem_delete_pool)

    # subsystem
    def get_subsystems(args):
        print_dict(rpc.subsystem.get_subsystems(args.client))
    def framework_get_subsystems(args):
        print_dict(rpc.subsystem.framework_get_subsystems(args.client))

    p = subparsers.add_parser('get_subsystems', help="""Print subsystems array in initialization order. Each subsystem
    p = subparsers.add_parser('framework_get_subsystems', aliases=['get_subsystems'],
                              help="""Print subsystems array in initialization order. Each subsystem
    entry contain (unsorted) array of subsystems it depends on.""")
    p.set_defaults(func=get_subsystems)
    p.set_defaults(func=framework_get_subsystems)

    def get_subsystem_config(args):
        print_dict(rpc.subsystem.get_subsystem_config(args.client, args.name))
+1 −1
Original line number Diff line number Diff line
@@ -76,7 +76,7 @@ def save_config(client, fd, indent=2):
        'subsystems': []
    }

    for elem in client.call('get_subsystems'):
    for elem in client.call('framework_get_subsystems'):
        cfg = {
            'subsystem': elem['subsystem'],
            'config': client.call('get_subsystem_config', {"name": elem['subsystem']})
+6 −2
Original line number Diff line number Diff line
def get_subsystems(client):
    return client.call('get_subsystems')
from .helpers import deprecated_alias


@deprecated_alias('get_subsystems')
def framework_get_subsystems(client):
    return client.call('framework_get_subsystems')


def get_subsystem_config(client, name):
Loading