From nobody Fri May 16 14:21:54 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1494596274626542.2321960190216; Fri, 12 May 2017 06:37:54 -0700 (PDT) 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 mx1.redhat.com (Postfix) with ESMTPS id 1B6E1C04B939; Fri, 12 May 2017 13:37:53 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id AEACD5B80F; Fri, 12 May 2017 13:37:52 +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 B9FA45EC66; Fri, 12 May 2017 13:37:51 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id v4CDbn5Z014923 for ; Fri, 12 May 2017 09:37:50 -0400 Received: by smtp.corp.redhat.com (Postfix) id C5C4758883; Fri, 12 May 2017 13:37:49 +0000 (UTC) Received: from mx1.redhat.com (ext-mx08.extmail.prod.ext.phx2.redhat.com [10.5.110.32]) by smtp.corp.redhat.com (Postfix) with ESMTPS id BB02858894 for ; Fri, 12 May 2017 13:37:47 +0000 (UTC) Received: from relay.sw.ru (mailhub.sw.ru [195.214.232.25]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 334A2C05AA4A for ; Fri, 12 May 2017 13:37:44 +0000 (UTC) Received: from dim-vz7.qa.sw.ru (msk-vpn.virtuozzo.com [195.214.232.6]) by relay.sw.ru (8.13.4/8.13.4) with ESMTP id v4CDbfTi007950; Fri, 12 May 2017 16:37:41 +0300 (MSK) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 1B6E1C04B939 Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; dmarc=fail (p=none dis=none) header.from=virtuozzo.com Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=libvir-list-bounces@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 1B6E1C04B939 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 334A2C05AA4A Authentication-Results: ext-mx08.extmail.prod.ext.phx2.redhat.com; dmarc=pass (p=none dis=none) header.from=virtuozzo.com Authentication-Results: ext-mx08.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=nshirokovskiy@virtuozzo.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 334A2C05AA4A From: Nikolay Shirokovskiy To: libvir-list@redhat.com Date: Fri, 12 May 2017 16:37:27 +0300 Message-Id: <1494596248-446694-12-git-send-email-nshirokovskiy@virtuozzo.com> In-Reply-To: <1494596248-446694-1-git-send-email-nshirokovskiy@virtuozzo.com> References: <1494596248-446694-1-git-send-email-nshirokovskiy@virtuozzo.com> X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Fri, 12 May 2017 13:37:45 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Fri, 12 May 2017 13:37:45 +0000 (UTC) for IP:'195.214.232.25' DOMAIN:'mailhub.sw.ru' HELO:'relay.sw.ru' FROM:'nshirokovskiy@virtuozzo.com' RCPT:'' X-RedHat-Spam-Score: 0.799 (BAYES_50, SPF_PASS) 195.214.232.25 mailhub.sw.ru 195.214.232.25 mailhub.sw.ru X-Scanned-By: MIMEDefang 2.78 on 10.5.110.32 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-loop: libvir-list@redhat.com Cc: Dmitry Mishin Subject: [libvirt] [PATCH v2 RFC 11/12] schema: backup: add schema and its tests 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: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Fri, 12 May 2017 13:37:53 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" --- docs/schemas/domainbackup.rng | 79 ++++++++++++++++++++++= ++++ tests/domainbackupxml/block_target.xml | 5 ++ tests/domainbackupxml/explicit_description.xml | 6 ++ tests/domainbackupxml/explicit_file_type.xml | 5 ++ tests/domainbackupxml/explicit_format.xml | 5 ++ tests/domainbackupxml/explicit_name.xml | 6 ++ tests/domainbackupxml/multi_disk.xml | 8 +++ tests/domainbackupxml/ref_by_path.xml | 5 ++ tests/virschematest.c | 1 + tools/virt-xml-validate.in | 5 +- 10 files changed, 124 insertions(+), 1 deletion(-) create mode 100644 docs/schemas/domainbackup.rng create mode 100644 tests/domainbackupxml/block_target.xml create mode 100644 tests/domainbackupxml/explicit_description.xml create mode 100644 tests/domainbackupxml/explicit_file_type.xml create mode 100644 tests/domainbackupxml/explicit_format.xml create mode 100644 tests/domainbackupxml/explicit_name.xml create mode 100644 tests/domainbackupxml/multi_disk.xml create mode 100644 tests/domainbackupxml/ref_by_path.xml diff --git a/docs/schemas/domainbackup.rng b/docs/schemas/domainbackup.rng new file mode 100644 index 0000000..4a93dfb --- /dev/null +++ b/docs/schemas/domainbackup.rng @@ -0,0 +1,79 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + file + + + + + + + + + + + + + block + + + + + + + + + + diff --git a/tests/domainbackupxml/block_target.xml b/tests/domainbackupxml= /block_target.xml new file mode 100644 index 0000000..a7618d1 --- /dev/null +++ b/tests/domainbackupxml/block_target.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/tests/domainbackupxml/explicit_description.xml b/tests/domainb= ackupxml/explicit_description.xml new file mode 100644 index 0000000..ea378a4 --- /dev/null +++ b/tests/domainbackupxml/explicit_description.xml @@ -0,0 +1,6 @@ + + description + + + + diff --git a/tests/domainbackupxml/explicit_file_type.xml b/tests/domainbac= kupxml/explicit_file_type.xml new file mode 100644 index 0000000..cfc424f --- /dev/null +++ b/tests/domainbackupxml/explicit_file_type.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/tests/domainbackupxml/explicit_format.xml b/tests/domainbackup= xml/explicit_format.xml new file mode 100644 index 0000000..3151f84 --- /dev/null +++ b/tests/domainbackupxml/explicit_format.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/tests/domainbackupxml/explicit_name.xml b/tests/domainbackupxm= l/explicit_name.xml new file mode 100644 index 0000000..61f7731 --- /dev/null +++ b/tests/domainbackupxml/explicit_name.xml @@ -0,0 +1,6 @@ + + name + + + + diff --git a/tests/domainbackupxml/multi_disk.xml b/tests/domainbackupxml/m= ulti_disk.xml new file mode 100644 index 0000000..2d1797f --- /dev/null +++ b/tests/domainbackupxml/multi_disk.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/tests/domainbackupxml/ref_by_path.xml b/tests/domainbackupxml/= ref_by_path.xml new file mode 100644 index 0000000..496fc49 --- /dev/null +++ b/tests/domainbackupxml/ref_by_path.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/tests/virschematest.c b/tests/virschematest.c index ffed217..c1624e6 100644 --- a/tests/virschematest.c +++ b/tests/virschematest.c @@ -226,6 +226,7 @@ mymain(void) DO_TEST_DIR("domaincaps.rng", "domaincapsschemadata"); DO_TEST_DIR("domainsnapshot.rng", "domainsnapshotxml2xmlin", "domainsnapshotxml2xmlout"); + DO_TEST_DIR("domainbackup.rng", "domainbackupxml"); DO_TEST_DIR("interface.rng", "interfaceschemadata"); DO_TEST_DIR("network.rng", "../src/network", "networkxml2xmlin", "networkxml2xmlout", "networkxml2confdata"); diff --git a/tools/virt-xml-validate.in b/tools/virt-xml-validate.in index 81fde4d..b890b22 100644 --- a/tools/virt-xml-validate.in +++ b/tools/virt-xml-validate.in @@ -56,9 +56,12 @@ fi if [ -z "$TYPE" ]; then ROOT=3D`xmllint --stream --debug "$XMLFILE" 2>/dev/null | grep "^0 1 " |= awk '{ print $3 }'` case "$ROOT" in - *domainsnapshot*) # Must come first, since *domain* is a substring + *domainsnapshot*) # Must be above domain, since *domain* is a substri= ng TYPE=3D"domainsnapshot" ;; + *domainbackup*) # Must be above domain, since *domain* is a substring + TYPE=3D"domainbackup" + ;; *domain*) TYPE=3D"domain" ;; --=20 1.8.3.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list