diff mbox series

[27/29] nbd: Deprecate nbd-server-add/remove

Message ID 20200907182011.521007-28-kwolf@redhat.com (mailing list archive)
State New, archived
Headers show
Series block/export: Add infrastructure and QAPI for block exports | expand

Commit Message

Kevin Wolf Sept. 7, 2020, 6:20 p.m. UTC
These QMP commands are replaced by block-export-add/del.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
 qapi/block-export.json     | 11 +++++++++--
 docs/system/deprecated.rst |  8 ++++++++
 2 files changed, 17 insertions(+), 2 deletions(-)

Comments

Max Reitz Sept. 10, 2020, 3:34 p.m. UTC | #1
On 07.09.20 20:20, Kevin Wolf wrote:
> These QMP commands are replaced by block-export-add/del.
> 
> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
> ---
>  qapi/block-export.json     | 11 +++++++++--
>  docs/system/deprecated.rst |  8 ++++++++
>  2 files changed, 17 insertions(+), 2 deletions(-)

OK, but:

> diff --git a/docs/system/deprecated.rst b/docs/system/deprecated.rst
> index 851dbdeb8a..9a2e083f00 100644
> --- a/docs/system/deprecated.rst
> +++ b/docs/system/deprecated.rst
> @@ -303,6 +303,14 @@ chardev client socket with ``wait`` option (since 4.0)
>  Character devices creating sockets in client mode should not specify
>  the 'wait' field, which is only applicable to sockets in server mode
>  
> +``nbd-server-add`` and ``nbd-server-remove`` (since 5.2)
> +''''''''''''''''''''''''''''''''''''''''''''''''''''''''
> +
> +Use the more generic commands ``block-export-add`` and ``block-export-del``
> +instead.
> +
> +Use argument value ``null`` instead.

I don’t understand this sentence.

Max
Kevin Wolf Sept. 23, 2020, 4:19 p.m. UTC | #2
Am 10.09.2020 um 17:34 hat Max Reitz geschrieben:
> On 07.09.20 20:20, Kevin Wolf wrote:
> > These QMP commands are replaced by block-export-add/del.
> > 
> > Signed-off-by: Kevin Wolf <kwolf@redhat.com>
> > ---
> >  qapi/block-export.json     | 11 +++++++++--
> >  docs/system/deprecated.rst |  8 ++++++++
> >  2 files changed, 17 insertions(+), 2 deletions(-)
> 
> OK, but:
> 
> > diff --git a/docs/system/deprecated.rst b/docs/system/deprecated.rst
> > index 851dbdeb8a..9a2e083f00 100644
> > --- a/docs/system/deprecated.rst
> > +++ b/docs/system/deprecated.rst
> > @@ -303,6 +303,14 @@ chardev client socket with ``wait`` option (since 4.0)
> >  Character devices creating sockets in client mode should not specify
> >  the 'wait' field, which is only applicable to sockets in server mode
> >  
> > +``nbd-server-add`` and ``nbd-server-remove`` (since 5.2)
> > +''''''''''''''''''''''''''''''''''''''''''''''''''''''''
> > +
> > +Use the more generic commands ``block-export-add`` and ``block-export-del``
> > +instead.
> > +
> > +Use argument value ``null`` instead.
> 
> I don’t understand this sentence.

Me neither, it's wrong. Looks like a copy from a few lines further up...
I'll just remove this sentence.

Kevin
diff mbox series

Patch

diff --git a/qapi/block-export.json b/qapi/block-export.json
index ebdfa978e0..ace0d66e17 100644
--- a/qapi/block-export.json
+++ b/qapi/block-export.json
@@ -108,13 +108,16 @@ 
 #
 # The export name will be used as the id for the resulting block export.
 #
+# Features:
+# @deprecated: This command is deprecated. Use @block-export-add instead.
+#
 # Returns: error if the server is not running, or export with the same name
 #          already exists.
 #
 # Since: 1.3.0
 ##
 { 'command': 'nbd-server-add',
-  'data': 'NbdServerAddOptions', 'boxed': true }
+  'data': 'NbdServerAddOptions', 'boxed': true, 'features': ['deprecated'] }
 
 ##
 # @BlockExportRemoveMode:
@@ -147,6 +150,9 @@ 
 # @mode: Mode of command operation. See @BlockExportRemoveMode description.
 #        Default is 'safe'.
 #
+# Features:
+# @deprecated: This command is deprecated. Use @block-export-del instead.
+#
 # Returns: error if
 #            - the server is not running
 #            - export is not found
@@ -155,7 +161,8 @@ 
 # Since: 2.12
 ##
 { 'command': 'nbd-server-remove',
-  'data': {'name': 'str', '*mode': 'BlockExportRemoveMode'} }
+  'data': {'name': 'str', '*mode': 'BlockExportRemoveMode'},
+  'features': ['deprecated'] }
 
 ##
 # @nbd-server-stop:
diff --git a/docs/system/deprecated.rst b/docs/system/deprecated.rst
index 851dbdeb8a..9a2e083f00 100644
--- a/docs/system/deprecated.rst
+++ b/docs/system/deprecated.rst
@@ -303,6 +303,14 @@  chardev client socket with ``wait`` option (since 4.0)
 Character devices creating sockets in client mode should not specify
 the 'wait' field, which is only applicable to sockets in server mode
 
+``nbd-server-add`` and ``nbd-server-remove`` (since 5.2)
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+
+Use the more generic commands ``block-export-add`` and ``block-export-del``
+instead.
+
+Use argument value ``null`` instead.
+
 Human Monitor Protocol (HMP) commands
 -------------------------------------