[libvirt] [PATCH 5/7] conf: Introduce storage pool functions into capabilities

Pavel Hrdina phrdina at redhat.com
Thu Jan 31 08:17:36 UTC 2019


On Wed, Jan 30, 2019 at 03:55:05PM +0000, Daniel P. Berrangé wrote:
> On Wed, Jan 30, 2019 at 10:03:43AM -0500, John Ferlan wrote:
> > 
> > 
> > On 1/30/19 3:31 AM, Pavel Hrdina wrote:
> > > On Tue, Jan 15, 2019 at 08:15:47PM -0500, John Ferlan wrote:
> > >> https://bugzilla.redhat.com/show_bug.cgi?id=1581670
> > >>
> > >> Introduce the bare bones functions to processing capability
> > >> data for the storage driver. Currently just looking to store
> > >> and format the storage pool types in output, such as:
> > >>
> > >>   <pool>
> > >>     <type>dir</pool>
> > >>
> > >>   <pool>
> > >>     <type>fs</pool>
> > >>   </pool>
> > >>
> > >> ...
> > >>
> > >>   <pool>
> > >>     <type>iscsi-direct</pool>
> > >>   </pool>
> > > 
> > > This looks weird, if you look into output of domcapabilities we use
> > > different formatting to list type values, so how about this:
> > > 
> > >   <pool>
> > >     <enum name='type'>
> > >       <value>dir</value>
> > >       <value>fs</value>
> > >       ...
> > >     </enum>
> > >   </pool>
> > > 
> > > The name of the enum could be 'backend' as well.
> > > 
> > > Pavel
> > > 
> > 
> > This format is fine by me... Keeping enum is fine as well since it
> > follows other examples
> > 
> > Do you have any opinions on whether listing the API's supported each
> > pool is a worthwhile effort in any form? Building on the above, the
> > output could be API by API:
> > 
> > <pool>
> >   <enum name='type'>
> >     <value>dir</value>
> >     <value>fs</value>
> > ...
> >   </enum>
> >   <pool_api name='virConnectFindStoragePoolSources'>
> >     <value>fs</value>
> >     <value>gluster</value>
> > ...
> >   </pool_api>
> > ... N pool_api's
> >   <vol_api name='virStorageVolUpload'>
> >     <value>disk</value>
> >     <value>fs</value>
> > ...
> >   </vol_api>
> > ... N vol_api's
> 
> I really don't think we should go down that route. Whether a specific
> API works with a specific feature is really something that is practically
> only determined at the time the API is invoked, as whether it works or
> not may depend on the full set of arguments you pass to the API.
> 
> IOW, at most I would list which pool driver backends are present
> in the capabilities.

Agreed, if we start listing supported storage APIs someone will
eventually ask us to list also APIs for hypervisor drivers.  It's
overkill and we should not do that.

Pavel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20190131/bfc3bd7d/attachment-0001.sig>


More information about the libvir-list mailing list