Skip to content

Commit

Permalink
fix README with new examples
Browse files Browse the repository at this point in the history
Signed-off-by: Vipin Jain <[email protected]>
  • Loading branch information
jainvipin committed Oct 28, 2022
1 parent 8e0ed71 commit ef23ab0
Showing 1 changed file with 113 additions and 18 deletions.
131 changes: 113 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,60 +65,155 @@ $ docker run --rm -it -v /var/tmp/:/var/tmp/ -p 50051:50051 ghcr.io/opiproject/o
on X86 management VM run

```bash
$ docker run --network=host --rm -it namely/grpc-cli call --json_input --json_output 10.10.10.1:50051 NVMeSubsystemCreate "{'subsystem' : {'nqn' : 'nqn.2022-09.io.spdk:opi1'} }"
connecting to 10.10.10.1:50051
# subsystem apis
$ docker run --network=host --rm -it namely/grpc-cli call --json_input --json_output localhost:50051 NVMeSubsystemCreate "{'subsystem' : {'id' : {'value' : 'subsystem1'}, nqn: 'nqn.2022-09.io.spdk:opitest1'} }"
connecting to localhost:50051
{}
Rpc succeeded with OK status

$ docker run --network=host --rm -it namely/grpc-cli call --json_input --json_output 10.10.10.1:50051 NVMeSubsystemList "{}"
connecting to 10.10.10.1:50051
$ docker run --network=host --rm -it namely/grpc-cli call --json_input --json_output localhost:50051 NVMeSubsystemList "{}"
connecting to localhost:50051
{
"subsystem": [
{
"nqn": "nqn.2014-08.org.nvmexpress.discovery"
},
{
"nqn": "nqn.2022-09.io.spdk:opi2"
},
{
"nqn": "nqn.2016-06.io.spdk:cnode1"
},
{
"nqn": "nqn.2022-09.io.spdk:opi1"
"nqn": "nqn.2022-09.io.spdk:opitest1"
}
]
}
Rpc succeeded with OK status

$ docker run --network=host --rm -it namely/grpc-cli call --json_input --json_output 10.10.10.1:50051 NVMeControllerCreate "{'controller' : {'name' : 'Opi2' , 'subsystem_id' : '1'} }"
connecting to 10.10.10.1:50051
$ docker run --network=host --rm -it namely/grpc-cli call --json_input --json_output localhost:50051 NVMeSubsystemGet "{'subsystem_id' : {'value' : 'subsystem1'} }"
connecting to localhost:50051
{
"subsystem": {
"nqn": "nqn.2022-09.io.spdk:opitest1"
}
}
Rpc succeeded with OK status

$ docker run --network=host --rm -it namely/grpc-cli call --json_input --json_output localhost:50051 NVMeSubsystemDelete "{'subsystem_id' : {'value' : 'subsystem1'} }"
connecting to localhost:50051
{}
Rpc succeeded with OK status

$ docker run --network=host --rm -it namely/grpc-cli call --json_input --json_output 10.10.10.1:50051 NVMeControllerList "{'subsystem_id' : '1'}"
connecting to 10.10.10.1:50051
# controller apis
$ docker run --network=host --rm -it namely/grpc-cli call --json_input --json_output localhost:50051 NVMeSubsystemCreate "{'subsystem' : {'id' : {'value' : 'subsystem2'}, nqn: 'nqn.2022-09.io.spdk:opitest2'} }"
connecting to localhost:50051
{}
Rpc succeeded with OK status

$ docker run --network=host --rm -it namely/grpc-cli call --json_input --json_output localhost:50051 NVMeControllerCreate "{'controller' : {'id' : {'value' : 'controller1'}, 'subsystem_id' : { 'value' : 'subsystem2' } } }"
connecting to localhost:50051
{}
Rpc succeeded with OK status
$ docker run --network=host --rm -it namely/grpc-cli call --json_input --json_output localhost:50051 NVMeControllerList "{}"
connecting to localhost:50051
{
"controller": [
{},
{},
{}
{
"id": {
"value": "controller1"
},
"subsystemId": {
"value": "subsystem2"
}
}
]
}
Rpc succeeded with OK status

$ docker run --network=host --rm -it namely/grpc-cli call --json_input --json_output 10.10.10.1:50051 NVMeNamespaceCreate "{'namespace' : {'subsystem_id' : 'nqn.2016-06.io.spdk:cnode1' , 'bdev' : 'Malloc1' } }"
connecting to 10.10.10.1:50051
$ docker run --network=host --rm -it namely/grpc-cli call --json_input --json_output localhost:50051 NVMeControllerGet "{'controller_id' : {'value' : 'controller1'} }"
connecting to localhost:50051
{
"controller": {
"id": {
"value": "controller1"
},
"subsystemId": {
"value": "subsystem2"
}
}
}
Rpc succeeded with OK status
$ docker run --network=host --rm -it namely/grpc-cli call --json_input --json_output localhost:50051 NVMeControllerDelete "{'controller_id' : {'value' : 'controller1'} }"
connecting to localhost:50051
{}
Rpc succeeded with OK status
$ docker run --network=host --rm -it namely/grpc-cli call --json_input --json_output localhost:50051 NVMeSubsystemDelete "{'subsystem_id' : {'value' : 'subsystem2'} }"
connecting to localhost:50051
{}
Rpc succeeded with OK status

$ docker run --network=host --rm -it namely/grpc-cli call --json_input --json_output 10.10.10.1:50051 NVMeNamespaceList "{'subsystem_id' : '1'}"
connecting to 10.10.10.1:50051
# namespace apis
$ docker run --network=host --rm -it namely/grpc-cli call --json_input --json_output localhost:50051 NVMeSubsystemCreate "{'subsystem' : {'id' : {'value' : 'subsystem3'}, nqn: 'nqn.2022-09.io.spdk:opitest3'} }"
connecting to localhost:50051
{}
Rpc succeeded with OK status
$ docker run --network=host --rm -it namely/grpc-cli call --json_input --json_output localhost:50051 NVMeControllerCreate "{'controller' : {'id' : {'value' : 'controller2'}, 'subsystem_id' : { 'value' : 'subsystem3' } } }"
connecting to localhost:50051
{}
Rpc succeeded with OK status
$ docker run --network=host --rm -it namely/grpc-cli call --json_input --json_output localhost:50051 NVMeNamespaceCreate "{'namespace' : {'id' : {'value' : 'namespace1'}, 'subsystem_id' : { 'value' : 'subsystem3' }, 'controller_id' : { 'value' : 'controller2' }, 'host_nsid' : '1' } }"
connecting to localhost:50051
{}
$ docker run --network=host --rm -it namely/grpc-cli call --json_input --json_output localhost:50051 NVMeNamespaceList "{}"
connecting to localhost:50051
{
"namespace": [
{
"hostNsid": 1
}
]
}
Rpc succeeded with OK status
$ docker run --network=host --rm -it namely/grpc-cli call --json_input --json_output localhost:50051 NVMeNamespaceList "{'subsystem_id' : { 'value' : 'subsystem3' } }"
connecting to localhost:50051
{
"namespace": [
{
"name": "Malloc1",
"nsid": "1"
"hostNsid": 1
}
]
}
Rpc succeeded with OK status
$ docker run --network=host --rm -it namely/grpc-cli call --json_input --json_output localhost:50051 NVMeNamespaceGet "{'namespace_id' : {'value' : 'namespace1'} }"
connecting to localhost:50051
{
"namespace": {
"id": {
"value": "namespace1"
},
"subsystemId": {
"value": "subsystem3"
},
"controllerId": {
"value": "controller2"
},
"hostNsid": 1
}
}
Rpc succeeded with OK status
$ docker run --network=host --rm -it namely/grpc-cli call --json_input --json_output localhost:50051 NVMeNamespaceDelete "{'namespace_id' : {'value' : 'namespace1'} }"
connecting to localhost:50051
{}
Rpc succeeded with OK status
$ docker run --network=host --rm -it namely/grpc-cli call --json_input --json_output localhost:50051 NVMeControllerDelete "{'controller_id' : {'value' : 'controller2'} }"
connecting to localhost:50051
{}
Rpc succeeded with OK status
$ docker run --network=host --rm -it namely/grpc-cli call --json_input --json_output localhost:50051 NVMeSubsystemDelete "{'subsystem_id' : {'value' : 'subsystem3'} }"
connecting to localhost:50051
{}
Rpc succeeded with OK status
```

and netwok-facing APIs:
Expand Down

0 comments on commit ef23ab0

Please sign in to comment.