Skip to contentSkip to conversation

nvmetcli: REST API for remote configuration

RFC PATCH Chaitanya Kulkarni 1 participant 2 messages Nov 14, 2023 – Dec 5, 2023 1 message not in the archive NVMe

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw
Quoted 14 lines · Hannes Reinecke

Hi all,

here's an attempt to allow remote configuration via a JSON REST API. It's basically using the configfs paths as the web URI, and using http 'GET', 'PUT', and 'PATCH' to retrieve, create, or modify the nvmet configuration.
I've also included a REST API responder based on flask to handle API calls.
To test it out just do:

# python nvmetapi

and on another console:

Quoted 7 lines
# export NVMET_URI=http://127.0.0.1:5000/
# python ./nvmetcli ls

and you should be seeing the same output as you would when running local (albeit with a 'small' delay as it fetches the data via the network).

As usual, comments and reviews are welcome.

I'm at LPC, I'll give it a try once I'm back.

-ck

#2 lore raw
Quoted 18 lines · Chaitanya Kulkarni
Quoted 17 lines · Hannes Reinecke

Hi all,

here's an attempt to allow remote configuration via a JSON REST API. It's basically using the configfs paths as the web URI, and using http 'GET', 'PUT', and 'PATCH' to retrieve, create, or modify the nvmet configuration.
I've also included a REST API responder based on flask to handle API calls.
To test it out just do:

# python nvmetapi

and on another console:

# export NVMET_URI=http://127.0.0.1:5000/
# python ./nvmetcli ls
Quoted 11 lines
Quoted 4 lines

and you should be seeing the same output as you would when running local (albeit with a 'small' delay as it fetches the data via the network).

As usual, comments and reviews are welcome.

I'm at LPC, I'll give it a try once I'm back.

-ck

I did take a quick look into this series, overall I like this idea of allowing
remote configuration, Sagi/Christoph do you guys have any objections ?

-ck