From nobody Sun Feb 8 19:56:41 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 205.139.110.120 as permitted sender) client-ip=205.139.110.120; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1587562226; cv=none; d=zohomail.com; s=zohoarc; b=gRYG9u634MUcagaRivLz+LuC2nDeZhDu1aTqWGk6lP51j5qXzvn0HYB/edXCUKi+zm0o/QRlv8kba0h8T5PFiyfqG5nmw2wQV5jg7zoAdHObtBEUT5pyzZo0w+PXOlZSP+uRtLzvtYwdAHa181vHEdmC6rEnC3f7DEkZ/3NoWlM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1587562226; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=88byBFmXN+q/8WyutAaAmvucyO3i7LFO1BYE0c/TK7g=; b=J8icIPSTEWReCb6bTf8/I0ppjiZkftLadpnZ/NEKACZpJiLo5DLLp8/VBJWinV6Jum3OYhXB1oRFD1Lt2MNyD5rJIzx2PuwZ/F0zG38VAVu8ZlI//UwBPbgsyDKx+lQZQSeKSdlYLncuBD0/fBGoT+eO4DkNKzRedJlEhS8Ny18= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) by mx.zohomail.com with SMTPS id 1587562226820372.1428803959993; Wed, 22 Apr 2020 06:30:26 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-131-_6Fvc3SHMRSJMMQY3t1XBg-1; Wed, 22 Apr 2020 09:29:04 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id E9EE8DB21; Wed, 22 Apr 2020 13:28:57 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id BA8805C557; Wed, 22 Apr 2020 13:28:57 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 675E71809543; Wed, 22 Apr 2020 13:28:57 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 03MDSnkS005896 for ; Wed, 22 Apr 2020 09:28:49 -0400 Received: by smtp.corp.redhat.com (Postfix) id 4D538608E0; Wed, 22 Apr 2020 13:28:49 +0000 (UTC) Received: from sturgeon.redhat.com (unknown [10.40.192.155]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8A6BB6084A; Wed, 22 Apr 2020 13:28:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1587562224; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=88byBFmXN+q/8WyutAaAmvucyO3i7LFO1BYE0c/TK7g=; b=D2+bu1Os0i1EYLwT3mPQhsvRF0UPCwGohA2hdvjaCW0Sux64TP4c4VMBYdER5h+gUxV9IE X3qP/1wCJqK/IOOb6c2SgXbCMVSk5ESCdqY7kOfOJd2e2+7HLMsjoazWyivBShUC/VteZc SAuo+tplATccaHvvlm/+j0LTLR44hKg= X-MC-Unique: _6Fvc3SHMRSJMMQY3t1XBg-1 From: Erik Skultety To: libvir-list@redhat.com Subject: [libvirt-ci PATCH 12/13] lcitool: Use the config install options rather than install facts Date: Wed, 22 Apr 2020 15:28:30 +0200 Message-Id: <91ff9ee09dbe7314c235eeb275f76083bd885f2c.1587562058.git.eskultet@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com Cc: Erik Skultety X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Now that we have the corresponding options available in the config, let's start using them. Signed-off-by: Erik Skultety --- guests/lcitool | 30 +++++++++++------------------- 1 file changed, 11 insertions(+), 19 deletions(-) diff --git a/guests/lcitool b/guests/lcitool index 36320ab..9a9256f 100755 --- a/guests/lcitool +++ b/guests/lcitool @@ -565,25 +565,17 @@ class Application: =20 def _action_install(self, args): base =3D Util.get_base() - - flavor =3D self._config.dict["install"]["flavor"] + cfg =3D self._config.dict["install"] =20 for host in self._inventory.expand_pattern(args.hosts): facts =3D self._inventory.get_facts(host) =20 - # Both memory size and disk size are stored as GiB in the - # inventory, but virt-install expects the disk size in GiB - # and the memory size in *MiB*, so perform conversion here - memory_arg =3D str(int(facts["install_memory_size"]) * 1024) - - vcpus_arg =3D str(facts["install_vcpus"]) - disk_arg =3D "size=3D{},pool=3D{},bus=3Dvirtio".format( - facts["install_disk_size"], - facts["install_storage_pool"], + cfg["disk_size"], + cfg["storage_pool"], ) network_arg =3D "network=3D{},model=3Dvirtio".format( - facts["install_network"], + cfg["network"], ) =20 # Different operating systems require different configuration @@ -643,12 +635,12 @@ class Application: virt_install, "--name", host, "--location", facts["install_url"], - "--virt-type", facts["install_virt_type"], - "--arch", facts["install_arch"], - "--machine", facts["install_machine"], - "--cpu", facts["install_cpu_model"], - "--vcpus", vcpus_arg, - "--memory", memory_arg, + "--virt-type", cfg["virt_type"], + "--arch", cfg["arch"], + "--machine", cfg["machine"], + "--cpu", cfg["cpu_model"], + "--vcpus", str(cfg["vcpus"]), + "--memory", str(cfg["memory_size"] * 1024), "--disk", disk_arg, "--network", network_arg, "--graphics", "none", @@ -663,7 +655,7 @@ class Application: cmd.append("--noautoconsole") =20 # Only configure autostart for the guest for the jenkins flavor - if flavor =3D=3D "jenkins": + if cfg["flavor"] =3D=3D "jenkins": cmd +=3D ["--autostart"] =20 try: --=20 2.25.3