[openstack-dev] [magnum] How to document 'labels'

Cammann, Tom tom.cammann at hpe.com
Thu May 12 18:05:08 UTC 2016


The canonical place for the help/documentation must be the online documentation. We must provide information in the docs first, additional content should be added to the CLI help. The labels field contains arbitrary metadata which can be consumed and used by the COE/bay, it has no set structure of format. Having an exhaustive list of possible metadata values should not be an aim of the command line help. Prior art in this area includes glance image properties[1] in which the CLI provides no reference to the values that can be passed, nova scheduler hints[2] which also provides no information on the values that can be passed.

There is a middle ground we should be treading. Users should not be using the CLI as a referencing for working out what label keys and values should be passed in to elicit a certain response from the bay, that should found in the docs. I am in favor of adding a short list of commonly used labels to the CLI help to jog the memory of the user.

I’m all for an additional man page which lists labels documentation, however this change is specifically about CLI “ --help”.

[1] https://github.com/openstack/python-glanceclient/blob/master/glanceclient/v1/shell.py#L218
[2] https://github.com/openstack/python-novaclient/blob/master/novaclient/v2/shell.py#L526

Tom

From: Tim Bell [mailto:Tim.Bell at cern.ch]
Sent: 12 May 2016 17:58
To: OpenStack Development Mailing List (not for usage questions)
Cc: Qun XK Wang
Subject: Re: [openstack-dev] [magnum] How to document 'labels'

I’d be in favor of 1.

At the end of the man page or full help text, a URL could be useful for more information but since most people using the CLI will have to do a context change to access the docs, it is not a simple click but a copy/paste/find the browser window which is not so friendly.

Tim

From: Jamie Hannaford <jamie.hannaford at rackspace.com<mailto:jamie.hannaford at rackspace.com>>
Reply-To: "OpenStack Development Mailing List (not for usage questions)" <openstack-dev at lists.openstack.org<mailto:openstack-dev at lists.openstack.org>>
Date: Thursday 12 May 2016 at 16:04
To: "OpenStack Development Mailing List (not for usage questions)" <openstack-dev at lists.openstack.org<mailto:openstack-dev at lists.openstack.org>>
Cc: Qun XK Wang <bjwqun at cn.ibm.com<mailto:bjwqun at cn.ibm.com>>
Subject: Re: [openstack-dev] [magnum] How to document 'labels'


+1 for 1 and 3.



I'm not sure maintainability should discourage us from exposing information to the user through the client - we'll face the same maintenance burden as we currently do, and IMO it's our job as a team to ensure our docs are up-to-date. Any kind of input which touches the API should also live in the API docs, because that's in line with every other OpenStack service.



I don't think I've seen documentation exposed via the API before (#2). I think it's a lot of work too, and I don't see what benefit it provides.



Jamie



________________________________
From: Hongbin Lu <hongbin.lu at huawei.com<mailto:hongbin.lu at huawei.com>>
Sent: 11 May 2016 21:52
To: OpenStack Development Mailing List (not for usage questions)
Cc: Qun XK Wang
Subject: [openstack-dev] [magnum] How to document 'labels'

Hi all,

This is a continued discussion from the last team meeting. For recap, ‘labels’ is a property in baymodel and is used by users to input additional key-pair pairs to configure the bay. In the last team meeting, we discussed what is the best way to document ‘labels’. In general, I heard three options:

1.       Place the documentation in Magnum CLI as help text (as Wangqun proposed [1][2]).

2.       Place the documentation in Magnum server and expose them via the REST API. Then, have the CLI to load help text of individual properties from Magnum server.

3.       Place the documentation in a documentation server (like developer.openstack.org/…), and add the doc link to the CLI help text.
For option #1, I think an advantage is that it is close to end-users, thus providing a better user experience. In contrast, Tom Cammann pointed out a disadvantage that the CLI help text might be easier to become out of date. For option #2, it should work but incurs a lot of extra work. For option #3, the disadvantage is the user experience (since user need to click the link to see the documents) but it makes us easier to maintain. I am thinking if it is possible to have a combination of #1 and #3. Thoughts?

[1] https://review.openstack.org/#/c/307631/
[2] https://review.openstack.org/#/c/307642/

Best regards,
Hongbin

________________________________
Rackspace International GmbH a company registered in the Canton of Zurich, Switzerland (company identification number CH-020.4.047.077-1) whose registered office is at Pfingstweidstrasse 60, 8005 Zurich, Switzerland. Rackspace International GmbH privacy policy can be viewed at www.rackspace.co.uk/legal/swiss-privacy-policy<http://www.rackspace.co.uk/legal/swiss-privacy-policy> - This e-mail message may contain confidential or privileged information intended for the recipient. Any dissemination, distribution or copying of the enclosed material is prohibited. If you receive this transmission in error, please notify us immediately by e-mail at abuse at rackspace.com<mailto:abuse at rackspace.com> and delete the original message. Your cooperation is appreciated.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20160512/c115cc3a/attachment.html>


More information about the OpenStack-dev mailing list