@@ -74,9 +74,10 @@ $ docker run --rm -it -v /var/tmp/:/var/tmp/ -p 50051:50051 -p 8082:8082 ghcr.io
74
74
2023/09/12 20:29:05 HTTP Server listening at 8082
75
75
```
76
76
77
- on X86 management VM run
77
+ on X86 management VM run either gRPC or HTTP requests
78
78
79
79
``` bash
80
+ # gRPC requests
80
81
docker run --network=host --rm -it namely/grpc-cli ls --json_input --json_output 10.10.10.10:50051 -l
81
82
docker run --network=host --rm -it namely/grpc-cli call --json_input --json_output 10.10.10.10:50051 CreateNvmeSubsystem " {nvme_subsystem : {spec : {nqn: 'nqn.2022-09.io.spdk:opitest2', serial_number: 'myserial2', model_number: 'mymodel2', max_namespaces: 11} }, nvme_subsystem_id : 'subsystem2' }"
82
83
docker run --network=host --rm -it namely/grpc-cli call --json_input --json_output 10.10.10.10:50051 ListNvmeSubsystems " {}"
@@ -111,6 +112,45 @@ docker run --network=host --rm -it namely/grpc-cli call --json_input --json_outp
111
112
docker run --network=host --rm -it namely/grpc-cli call --json_input --json_output 10.10.10.10:50051 DeleteNvmeSubsystem " {name : 'subsystems/subsystem3'}"
112
113
```
113
114
115
+ ``` bash
116
+ # HTTP requests
117
+ # create
118
+ curl -X POST -f http://10.10.10.10:8082/v1/nvmeRemoteControllers? nvme_remote_controller_id=nvmetcp12 -d ' {"multipath": "NVME_MULTIPATH_MULTIPATH"}'
119
+ curl -X POST -f http://10.10.10.10:8082/v1/nvmeRemoteControllers/nvmetcp12/nvmePaths? nvme_path_id=nvmetcp12path0 -d ' {"traddr":"11.11.11.2", "trtype":"NVME_TRANSPORT_TYPE_TCP", "fabrics":{"subnqn":"nqn.2016-06.com.opi.spdk.target0", "trsvcid":"4444", "adrfam":"NVME_ADDRESS_FAMILY_IPV4", "hostnqn":"nqn.2014-08.org.nvmexpress:uuid:feb98abe-d51f-40c8-b348-2753f3571d3c"}}'
120
+ curl -X POST -f http://10.10.10.10:8082/v1/nvmeSubsystems? nvme_subsystem_id=subsys0 -d ' {"spec": {"nqn": "nqn.2022-09.io.spdk:opitest1"}}'
121
+ curl -X POST -f http://10.10.10.10:8082/v1/nvmeSubsystems/subsys0/nvmeNamespaces? nvme_namespace_id=namespace0 -d ' {"spec": {"volume_name_ref": "Malloc0", "host_nsid": 10}}'
122
+ curl -X POST -f http://10.10.10.10:8082/v1/nvmeSubsystems/subsys0/nvmeControllers? nvme_controller_id=ctrl0 -d ' {"spec": {"trtype": "NVME_TRANSPORT_TYPE_TCP", "fabrics_id":{"traddr": "127.0.0.1", "trsvcid": "4421", "adrfam": "NVME_ADDRESS_FAMILY_IPV4"}}}'
123
+ # get
124
+ curl -X GET -f http://10.10.10.10:8082/v1/nvmeRemoteControllers/nvmetcp12
125
+ curl -X GET -f http://10.10.10.10:8082/v1/nvmeRemoteControllers/nvmetcp12/nvmePaths/nvmetcp12path0
126
+ curl -X GET -f http://10.10.10.10:8082/v1/nvmeSubsystems/subsys0
127
+ curl -X GET -f http://10.10.10.10:8082/v1/nvmeSubsystems/subsys0/nvmeNamespaces/namespace0
128
+ curl -X GET -f http://10.10.10.10:8082/v1/nvmeSubsystems/subsys0/nvmeControllers/ctrl0
129
+ # list
130
+ curl -X GET -f http://10.10.10.10:8082/v1/nvmeRemoteControllers
131
+ curl -X GET -f http://10.10.10.10:8082/v1/nvmeRemoteControllers/nvmetcp12/nvmePaths
132
+ curl -X GET -f http://10.10.10.10:8082/v1/nvmeSubsystems
133
+ curl -X GET -f http://10.10.10.10:8082/v1/nvmeSubsystems/subsys0/nvmeNamespaces
134
+ curl -X GET -f http://10.10.10.10:8082/v1/nvmeSubsystems/subsys0/nvmeControllers
135
+ # stats
136
+ curl -X GET -f http://10.10.10.10:8082/v1/nvmeRemoteControllers/nvmetcp12:stats
137
+ curl -X GET -f http://10.10.10.10:8082/v1/nvmeRemoteControllers/nvmetcp12/nvmePaths/nvmetcp12path0:stats
138
+ curl -X GET -f http://10.10.10.10:8082/v1/nvmeSubsystems/subsys0:stats
139
+ curl -X GET -f http://10.10.10.10:8082/v1/nvmeSubsystems/subsys0/nvmeNamespaces/namespace0:stats
140
+ curl -X GET -f http://10.10.10.10:8082/v1/nvmeSubsystems/subsys0/nvmeControllers/ctrl0:stats
141
+ # update
142
+ curl -X PATCH -f http://10.10.10.10:8082/v1/nvmeRemoteControllers/nvmetcp12 -d ' {"multipath": "NVME_MULTIPATH_MULTIPATH"}'
143
+ curl -X PATCH -f http://10.10.10.10:8082/v1/nvmeRemoteControllers/nvmetcp12/nvmePaths/nvmetcp12path0 -d ' {"traddr":"11.11.11.2", "trtype":"NVME_TRANSPORT_TYPE_TCP", "fabrics":{"subnqn":"nqn.2016-06.com.opi.spdk.target0", "trsvcid":"4444", "adrfam":"NVME_ADDRESS_FAMILY_IPV4", "hostnqn":"nqn.2014-08.org.nvmexpress:uuid:feb98abe-d51f-40c8-b348-2753f3571d3c"}}'
144
+ curl -X PATCH -k http://127.0.0.1:8082/v1/nvmeSubsystems/subsys0/nvmeNamespaces/namespace0 -d ' {"spec": {"volume_name_ref": "Malloc1", "host_nsid": 10}}'
145
+ curl -X PATCH -k http://127.0.0.1:8082/v1/nvmeSubsystems/subsys0/nvmeControllers/ctrl0 -d ' {"spec": {"trtype": "NVME_TRANSPORT_TYPE_TCP", "fabrics_id":{"traddr": "127.0.0.1", "trsvcid": "4421", "adrfam": "NVME_ADDRESS_FAMILY_IPV4"}}}'
146
+ # delete
147
+ curl -X DELETE -f http://10.10.10.10:8082/v1/nvmeSubsystems/subsys0/nvmeControllers/ctrl0
148
+ curl -X DELETE -f http://10.10.10.10:8082/v1/nvmeSubsystems/subsys0/nvmeNamespaces/namespace0
149
+ curl -X DELETE -f http://10.10.10.10:8082/v1/nvmeSubsystems/subsys0
150
+ curl -X DELETE -f http://10.10.10.10:8082/v1/nvmeRemoteControllers/nvmetcp12/nvmePaths/nvmetcp12path0
151
+ curl -X DELETE -f http://10.10.10.10:8082/v1/nvmeRemoteControllers/nvmetcp12
152
+ ```
153
+
114
154
## Test SPDK is up
115
155
116
156
``` bash
0 commit comments