From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EF6F9C0650E for ; Mon, 1 Jul 2019 14:40:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id CBF882175B for ; Mon, 1 Jul 2019 14:40:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728179AbfGAOk5 (ORCPT ); Mon, 1 Jul 2019 10:40:57 -0400 Received: from mx1.redhat.com ([209.132.183.28]:55584 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726840AbfGAOk4 (ORCPT ); Mon, 1 Jul 2019 10:40:56 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 8A61759464; Mon, 1 Jul 2019 14:40:56 +0000 (UTC) Received: from x1.home (ovpn-116-83.phx2.redhat.com [10.3.116.83]) by smtp.corp.redhat.com (Postfix) with ESMTP id 689D217AB6; Mon, 1 Jul 2019 14:40:51 +0000 (UTC) Date: Mon, 1 Jul 2019 08:40:51 -0600 From: Alex Williamson To: Cornelia Huck Cc: Matthew Rosato , "kvm@vger.kernel.org" , Libvirt Devel , Kirti Wankhede , Erik Skultety , Pavel Hrdina , "Daniel P. =?UTF-8?B?QmVycmFuZ8Op?=" , Sylvain Bauza , Christophe de Dinechin , Tony Krowiak Subject: Re: mdevctl: A shoestring mediated device management and persistence utility Message-ID: <20190701084051.7f2bbc24@x1.home> In-Reply-To: <20190701102043.61afa0da.cohuck@redhat.com> References: <20190523172001.41f386d8@x1.home> <20190625165251.609f6266@x1.home> <20190626115806.3435c45c.cohuck@redhat.com> <20190626083720.42a2b5d4@x1.home> <20190626195350.2e9c81d3@x1.home> <20190627142626.415138da.cohuck@redhat.com> <06114b39-69c2-3fa0-d0b3-aa96a44ae2ce@linux.ibm.com> <20190627093832.064a346f@x1.home> <20190627151502.2ae5314f@x1.home> <20190627195704.66be88c8@x1.home> <20190628110648.40e0607d.cohuck@redhat.com> <20190628110546.4d3ce595@x1.home> <20190701102043.61afa0da.cohuck@redhat.com> Organization: Red Hat MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Mon, 01 Jul 2019 14:40:56 +0000 (UTC) Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org On Mon, 1 Jul 2019 10:20:43 +0200 Cornelia Huck wrote: > On Fri, 28 Jun 2019 11:05:46 -0600 > Alex Williamson wrote: > > > On Fri, 28 Jun 2019 11:06:48 +0200 > > Cornelia Huck 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. Well, I already did it. It seems useful for creating transient devices with attribute specifications. If it's too ugly we can drop it. Thanks, Alex