Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Opi api changes #17

Merged
merged 3 commits into from
Oct 29, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading