Commit b7fce0a3 authored by Seth Howell's avatar Seth Howell Committed by Jim Harris
Browse files

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: default avatarSeth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/469324


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Reviewed-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
parent 6b6dfea6
Loading
Loading
Loading
Loading
+0 −72
Original line number Diff line number Diff line
@@ -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.
+0 −19
Original line number Diff line number Diff line
@@ -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,