On Mon, Sep 05, 2016 at 08:44:26PM +0530, Ashijeet Acharya wrote:
> On Mon, Sep 5, 2016 at 8:06 PM, Daniel P. Berrange <berra...@redhat.com> 
> wrote:
> > On Mon, Sep 05, 2016 at 07:56:26PM +0530, Ashijeet Acharya wrote:

> >> diff --git a/qapi-schema.json b/qapi-schema.json
> >> index 5658723..250eac5 100644
> >> --- a/qapi-schema.json
> >> +++ b/qapi-schema.json
> >> @@ -637,12 +637,18 @@
> >>  #                hostname must be provided so that the server's x509
> >>  #                certificate identity can be validated. (Since 2.7)
> >>  #
> >> +# @max-bandwidth: to set maximum speed for migration. A value lesser than
> >> +#                 zero will be automatically round upto zero. Since 2.8)
> >
> > Document the units for this ? eg is it bits-per-second, kb-per-second,
> > mb-per-second, etc
> >
> 
> Should I document it the way it is for old-commands? Like this;
> 
> # @migrate_set_speed
> #
> # Set maximum speed for migration.
> #
> # @value: maximum speed in bytes.
> #
> # Returns: nothing on success
> #
> # Notes: A value lesser than zero will be automatically round up to zero.
> #
> # Since: 0.14.0
> ##

No, that syntax isn't appropriate for documenting parameters. You hjust
have to put it all together.

@max-bandwidth: set maximum speed for migration in bytes-per-second. A
                value lesser than zero will be automatically round upto
                zero. Since 2.8)

Oh and IMHO we should reject values less than zero as invalid, with an
error message, not silently interpret them as meaning zero.

Regards,
Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|

Reply via email to