From b7fce0a3d4a9e5674fa6c487a2fa367c18ede336 Mon Sep 17 00:00:00 2001 From: Seth Howell Date: Tue, 24 Sep 2019 16:15:54 -0700 Subject: [PATCH] nvmf/rpc: remove the target rpcs from rpc.py Since the in tree applications don't really support these RPCs, keep them out of rpc.py. We can add them in after the applications have been modified to support that functionality. Change-Id: I7aae2c623b6da48374fe53f8b9471b08e5f0af7a Signed-off-by: Seth Howell Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/469324 Tested-by: SPDK CI Jenkins Reviewed-by: Ben Walker Reviewed-by: Jim Harris Reviewed-by: Shuhei Matsumoto --- doc/jsonrpc.md | 72 -------------------------------------------------- scripts/rpc.py | 19 ------------- 2 files changed, 91 deletions(-) diff --git a/doc/jsonrpc.md b/doc/jsonrpc.md index c0b298ab8..6217edddc 100644 --- a/doc/jsonrpc.md +++ b/doc/jsonrpc.md @@ -3654,78 +3654,6 @@ Example response: # NVMe-oF Target {#jsonrpc_components_nvmf_tgt} -## nvmf_create_target method {#rpc_nvmf_create_target} - -Initialize an NVMe-oF target with the given attributes. - -### Parameters - -Name | Optional | Type | Description ---------------------------- | -------- | ------------| ----------- -name | Required | string | Target name (must be unique to application) -max_subsystems | Optional | number | The maximum number of subsystems. default: 0 (Uses SPDK_NVMF_DEFAULT_MAX_SUBSYSTEMS). - -### Example - -Example request: - -~~~ -{ - "jsonrpc": "2.0", - "method": "nvmf_create_target", - "id": 1, - "params": { - "name": "new_tgt", - "max_subsystems": 1024 - } -} -~~~ - -Example response: - -~~~ -{ - "jsonrpc": "2.0", - "id": 1, - "result": "new_tgt" -} -~~~ - -## nvmf_delete_target method {#rpc_nvmf_delete_target} - -Destroy the given NVMe-oF target. - -### Parameters - -Name | Optional | Type | Description ---------------------------- | -------- | ------------| ----------- -name | Required | string | Target name (must be unique to application) - -### Example - -Example request: - -~~~ -{ - "jsonrpc": "2.0", - "method": "nvmf_delete_target", - "id": 1, - "params": { - "name": "old_tgt", - } -} -~~~ - -Example response: - -~~~ -{ - "jsonrpc": "2.0", - "id": 1, - "result": true -} -~~~ - ## nvmf_create_transport method {#rpc_nvmf_create_transport} Initialize an NVMe-oF transport with the given options. diff --git a/scripts/rpc.py b/scripts/rpc.py index 776354c11..868af3f64 100755 --- a/scripts/rpc.py +++ b/scripts/rpc.py @@ -1566,25 +1566,6 @@ Format: 'user:u1 secret:s1 muser:mu1 msecret:ms1,user:u2 secret:s2 muser:mu2 mse robin manner. 'transport' - Schedule the connection according to the transport characteristics.""") p.set_defaults(func=nvmf_set_config) - def nvmf_create_target(args): - print_dict(rpc.nvmf.nvmf_create_target(args.client, - name=args.name, - max_subsystems=args.max_subsystems)) - - p = subparsers.add_parser('nvmf_create_target', help='Create a new NVMe-oF target') - p.add_argument('-n', '--name', help='Target name (unique to application)', type=str, required=True) - p.add_argument('-s', '--max-subsystems', help='Max number of NVMf subsystems defaults to SPDK_NVMF_DEFAULT_MAX_SUBSYSTEMS', - type=int, required=False) - p.set_defaults(func=nvmf_create_target) - - def nvmf_delete_target(args): - print_dict(rpc.nvmf.nvmf_delete_target(args.client, - name=args.name)) - - p = subparsers.add_parser('nvmf_delete_target', help='Destroy the given NVMe-oF Target') - p.add_argument('-n', '--name', help='Target name (unique to application)', type=str, required=True) - p.set_defaults(func=nvmf_delete_target) - def nvmf_create_transport(args): rpc.nvmf.nvmf_create_transport(args.client, trtype=args.trtype,