[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] ocaml libxl bindings and KeyedUnion



On Fri, Mar 20, Ian Campbell wrote:

> On Fri, 2015-03-20 at 17:44 +0100, Olaf Hering wrote:
> > +         ("dev", Struct(None, [("m", libxl_vscsi_hctl)])),
> > +         ("wwn", Struct(None, [("m", string)])),
> > +         ("hctl", Struct(None, [("m", libxl_vscsi_hctl)])),
> 
> > > Aside: What is the difference between dev and hctl in this context?
> > 
> > Its supposed to represent either "/dev/something" and "h:ct:l".
> 
> So shouldn't dev by a string then?

No, the result will be written to the "p-dev" property.

> >  The
> > result in the "p-dev" property, which is used by the backend, is the
> > same.  But translating "p-dev" back into the config string for the
> > scsi-list command needs some way to represent that. I'm not fully happy
> > with the current way. Perhaps the code should just reuse the "p-devname"
> > property to tell what was in the config file.
> 
> Perhaps the list command should just list the canonical name for the
> device (i.e p-dev? a h:c:t:l tuple) and not worry about matching the
> config file?

I will think about this suggestion. Right now the scsilist command does
just what xm did.

> I'd even go as far as suggesting that the libxl API ought only to deal
> with the canonical name and that the toolstack can parse whatever forms
> it likes into that (perhaps using a helper from libxlu). That would make
> the libxl interface a lot simpler, wouldn't it?

Olaf

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.