From nobody Mon Feb 9 10:27:51 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 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=1615570132; cv=none; d=zohomail.com; s=zohoarc; b=PWfneSR8F8WwlDWIT8/M4cNY04YDeVML2F01Q3vI7Ic/JNsjp11CvqnKbBiG3+kNg0R08OBfjKhwDkuNGrQ6FCqI/ayXCxIIw+R5bCVAiZfBXIJnLMpPLWPfitxzVF5pHKhktt6sA/rGCKBHHA5SHNEod8NjlU5SbXilDwRSXpU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1615570132; h=Content-Type:Content-Transfer-Encoding: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=hTO1Bhlo3izDZ8KZjqC7X2e166DhzTfVf99qEggptCw=; b=F4/H1A4MpfMcTcKHz0SbWaajoBeStuSj8MQjpcm6PF5W3EtAc8KFg7K2yfBF4cVdAuS8Y9u20rJgom9e0ylziPnkb5+7TkWyGuv+wi+rVEltpmG42NviSIVqTD+ylgg/bwutBczJmjeRnCVW9pKJzH8aE4kXHIFoCnMkMe8c40M= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 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-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.zohomail.com with SMTPS id 1615570132288966.0577075280003; Fri, 12 Mar 2021 09:28:52 -0800 (PST) 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-347-qc2ryWSWMzGVoy_Vd2a8Ew-1; Fri, 12 Mar 2021 12:28:47 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 0D3C11015C87; Fri, 12 Mar 2021 17:28:40 +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 D767660657; Fri, 12 Mar 2021 17:28:39 +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 8E51B1800848; Fri, 12 Mar 2021 17:28:39 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 12CHSXxs031340 for ; Fri, 12 Mar 2021 12:28:33 -0500 Received: by smtp.corp.redhat.com (Postfix) id 2D45E5D75F; Fri, 12 Mar 2021 17:28:33 +0000 (UTC) Received: from harajuku.usersys.redhat.com (unknown [10.40.194.186]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 87DBE5D6BA for ; Fri, 12 Mar 2021 17:28:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1615570131; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to: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=hTO1Bhlo3izDZ8KZjqC7X2e166DhzTfVf99qEggptCw=; b=IxeoGPGIDwOx0W8yPKdiXYuToIJZ/gF8anFJuurSkptqGid1+SifrYKqRCVohSNQ9q/ePC gjEk1DgyrjuNqJlrPQW2Qg86qRxnrtc2GbaN6TBxepMwCbEKVkZKhxzPxkegy3C76gVIiD 7AtkUw+gMsOZ6d33/OJELWXXKqxgrck= X-MC-Unique: qc2ryWSWMzGVoy_Vd2a8Ew-1 From: Andrea Bolognani To: libvir-list@redhat.com Subject: [libvirt PATCH v3 03/10] ci: Add helper script Date: Fri, 12 Mar 2021 18:28:15 +0100 Message-Id: <20210312172822.244833-4-abologna@redhat.com> In-Reply-To: <20210312172822.244833-1-abologna@redhat.com> References: <20210312172822.244833-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-loop: libvir-list@redhat.com 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.11 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com 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" This is intended to be perform a number of CI-related operations that are currently implemented in various different scripts written in various different programming languages. Eventually, all existing functionality will be reimplemented in Python and made available through this single entry point; for now, let's start with a very basic skeleton. Signed-off-by: Andrea Bolognani --- ci/helper | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100755 ci/helper diff --git a/ci/helper b/ci/helper new file mode 100755 index 0000000000..2a59b8e5ab --- /dev/null +++ b/ci/helper @@ -0,0 +1,47 @@ +#!/usr/bin/env python3 +# +# Copyright (C) 2021 Red Hat, Inc. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library. If not, see +# . + +import argparse +import pathlib + + +class Parser: + def __init__(self): + # Main parser + self.parser =3D argparse.ArgumentParser() + subparsers =3D self.parser.add_subparsers( + dest=3D"action", + metavar=3D"ACTION", + ) + subparsers.required =3D True + + def parse(self): + return self.parser.parse_args() + + +class Application: + def __init__(self): + self.basedir =3D pathlib.Path(__file__).resolve().parent + self.args =3D Parser().parse() + + def run(self): + self.args.func(self) + + +if __name__ =3D=3D "__main__": + Application().run() --=20 2.26.2