Re: mdevctl: A shoestring mediated device management and persistence utility

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

 



On Fri, 28 Jun 2019 11:05:46 -0600
Alex Williamson <alex.williamson@xxxxxxxxxx> wrote:

> On Fri, 28 Jun 2019 11:06:48 +0200
> Cornelia Huck <cohuck@xxxxxxxxxx> wrote:

> > What do you think of a way to specify JSON for the attributes directly
> > on the command line? Or would it be better to just edit the config
> > files directly?  
> 
> Supplying json on the command like seems difficult, even doing so with
> with jq requires escaping quotes.  It's not a very friendly
> experience.  Maybe something more like how virsh allows snippets of xml
> to be included, we could use jq to validate a json snippet provided
> as a file and add it to the attributes... of course if we need to allow
> libvirt to modify the json config files directly, the user could do
> that as well.  Is there a use case you're thinking of?  Maybe we could
> augment the 'list' command to take a --uuid and --dumpjson option and
> the 'define' command to accept a --jsonfile.  Maybe the 'start' command
> could accept the same, so a transient device could define attributes
> w/o excessive command line options.  Thanks,
> 
> Alex

I was mostly thinking about complex configurations where writing a JSON
config would be simpler than adding a lot of command line options.
Something like dumping a JSON file and allowing to refer to a JSON file
as you suggested could be useful; but then, those very complex use
cases are probably already covered by editing the config file directly.
Not sure if it is worth the effort; maybe just leave it as it is for
now.



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux