From nobody Fri Apr 26 19:50:49 2024 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.zohomail.com; dkim=fail; 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 1508945570227874.3586237346055; Wed, 25 Oct 2017 08:32:50 -0700 (PDT) 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 436BD272D1; Wed, 25 Oct 2017 15:32:48 +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 EB2D16BF62; Wed, 25 Oct 2017 15:32:47 +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 77FD01804488; Wed, 25 Oct 2017 15:32:47 +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 v9PFWkGq023573 for ; Wed, 25 Oct 2017 11:32:46 -0400 Received: by smtp.corp.redhat.com (Postfix) id 83C6217CE8; Wed, 25 Oct 2017 15:32:46 +0000 (UTC) Received: from mx1.redhat.com (ext-mx04.extmail.prod.ext.phx2.redhat.com [10.5.110.28]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 7B39817CFD for ; Wed, 25 Oct 2017 15:32:41 +0000 (UTC) Received: from mail-wr0-f170.google.com (mail-wr0-f170.google.com [209.85.128.170]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 9EB7E7EAA7 for ; Wed, 25 Oct 2017 15:32:39 +0000 (UTC) Received: by mail-wr0-f170.google.com with SMTP id p96so394627wrb.7 for ; Wed, 25 Oct 2017 08:32:39 -0700 (PDT) Received: from localhost.localdomain (60.166.217.87.dynamic.jazztel.es. [87.217.166.60]) by smtp.gmail.com with ESMTPSA id h21sm3835209wrf.47.2017.10.25.08.32.36 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 25 Oct 2017 08:32:37 -0700 (PDT) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 436BD272D1 Authentication-Results: ext-mx10.extmail.prod.ext.phx2.redhat.com; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ext-mx10.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=libvir-list-bounces@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 436BD272D1 Authentication-Results: mx1.redhat.com; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Mx+r7et9" DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 9EB7E7EAA7 Authentication-Results: ext-mx04.extmail.prod.ext.phx2.redhat.com; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ext-mx04.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=michal.rostecki@gmail.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 9EB7E7EAA7 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=nt5H5H9Jq9qsOXLzTHFSiOftwDXUBLKwW2ETBIaxBpU=; b=Mx+r7et9h4I97lG9ufQJeDkQqVdnTJSab/dq7JuuvEb5HiMNwSWv4Du77bTuRsitkV mEF2NBZCBTwU5kFqpp6tvjfQAdkXiePM69fUiigSHvQFE+3wDM0ZZdsnXrRbhEanx47p OLjhHDH3e+7v1NNIfj/NT3SyQdXt15nTHKWon7G90SEVqpExKHgWVXytMHuRqgeWTz7N eJCFsY45gDPtO/19HbAoNxnL/uqu9cUvU6J1JTNOsxrAroVLFxaw0VVY5DIRWY4IguW2 kntNcevq4SOpjcaroK0yAjaaivOjy/JUvsFoTTet6KJQaY21qmV3LxUIFQBMLVy44VPs 74vw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=nt5H5H9Jq9qsOXLzTHFSiOftwDXUBLKwW2ETBIaxBpU=; b=sfotr5avo4Foazkdy9MmRLDdAZ2264FPpjbEmAoDsCDrvkBTxVZLABgLImUtDN9h3i i2HGund28/Y3s/SoTJARIOT1AAD5PsT+jNX1Z/LYbZdNP8DKLvWouOlsUsTfMSdXsl7i Qrz4tKF0a+Y0T6/fM9GKm6j47zaXhOrO8oU5y73DQOb+k/cwuIaXZTf/FGugklGH1lep +uGKZQuNpLJ4KikGKxMOO9+Wum1GwL1zlkxs4S8WrauN7HAqWtZK8tsq6LKe33ARYUAX 8jzVwKTiWtFz+3kspBafoVeqotLPWbF9EGvpAK9X7dr05m24xrs9+/JkikSyirS+iAEj hh1w== X-Gm-Message-State: AMCzsaX6giEFIOaWmmUtXU5M4ugiMYP0AQYNyhF5cPsviqFoTPRGfPgl 5xHnEsFgdilKBFgQGRxW7DdjXSgD X-Google-Smtp-Source: ABhQp+T4lbvbqzb3jW+tEn7Rf+O9E+HSrxGQEI7QndUngyrq8gSHHeH/kI+FTDdwwitGNmW/GfwFjA== X-Received: by 10.223.197.201 with SMTP id v9mr2521353wrg.82.1508945558131; Wed, 25 Oct 2017 08:32:38 -0700 (PDT) From: Michal Rostecki X-Google-Original-From: Michal Rostecki To: libvir-list@redhat.com Date: Wed, 25 Oct 2017 16:32:32 +0100 Message-Id: <20171025153232.22317-1-michal@kinvolk.io> MIME-Version: 1.0 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Wed, 25 Oct 2017 15:32:40 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Wed, 25 Oct 2017 15:32:40 +0000 (UTC) for IP:'209.85.128.170' DOMAIN:'mail-wr0-f170.google.com' HELO:'mail-wr0-f170.google.com' FROM:'michal.rostecki@gmail.com' RCPT:'' X-RedHat-Spam-Score: -2.41 (DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, RCVD_IN_SORBS_SPAM, SPF_PASS) 209.85.128.170 mail-wr0-f170.google.com 209.85.128.170 mail-wr0-f170.google.com X-Scanned-By: MIMEDefang 2.78 on 10.5.110.28 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com Cc: Ivan Shvedunov , =?UTF-8?q?Miha=20Ple=C5=A1ko?= , Michal Rostecki , Victoria Efimova Subject: [libvirt] [PATCH go-xml] Add support for CPUTune in Domain 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: , Content-Type: text/plain; charset="utf-8" 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.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Wed, 25 Oct 2017 15:32:49 +0000 (UTC) X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 From: Michal Rostecki Signed-off-by: Victoria Efimova Signed-off-by: Ivan Shvedunov Signed-off-by: Miha Ple=C5=A1ko Signed-off-by: Michal Rostecki --- domain.go | 19 +++++++++++++++++++ domain_test.go | 20 ++++++++++++++++++++ 2 files changed, 39 insertions(+) diff --git a/domain.go b/domain.go index bacab11..3efd68c 100644 --- a/domain.go +++ b/domain.go @@ -722,6 +722,24 @@ type DomainFeatureList struct { SMM *DomainFeatureState `xml:"smm"` } =20 +type DomainCPUTuneShares struct { + Value uint `xml:",chardata"` +} + +type DomainCPUTunePeriod struct { + Value uint64 `xml:",chardata"` +} + +type DomainCPUTuneQuota struct { + Value int64 `xml:",chardata"` +} + +type DomainCPUTune struct { + Shares *DomainCPUTuneShares `xml:"shares"` + Period *DomainCPUTunePeriod `xml:"period"` + Quota *DomainCPUTuneQuota `xml:"quota"` +} + type DomainQEMUCommandlineArg struct { Value string `xml:"value,attr"` } @@ -751,6 +769,7 @@ type Domain struct { MemoryBacking *DomainMemoryBacking `xml:"memoryBacking"` VCPU *DomainVCPU `xml:"vcpu"` VCPUs *DomainVCPUs `xml:"vcpus"` + CPUTune *DomainCPUTune `xml:"cputune"` Resource *DomainResource `xml:"resource"` SysInfo *DomainSysInfo `xml:"sysinfo"` OS *DomainOS `xml:"os"` diff --git a/domain_test.go b/domain_test.go index dbebe42..b427b50 100644 --- a/domain_test.go +++ b/domain_test.go @@ -1335,6 +1335,26 @@ var domainTestData =3D []struct { ``, }, }, + { + Object: &Domain{ + Name: "test", + CPUTune: &DomainCPUTune{ + Shares: &DomainCPUTuneShares{Value: 1024}, + Period: &DomainCPUTunePeriod{Value: 500000}, + Quota: &DomainCPUTuneQuota{Value: -1}, + }, + }, + Expected: []string{ + ``, + ` test`, + ` `, + ` 1024`, + ` 500000`, + ` -1`, + ` `, + ``, + }, + }, =20 /* Tests for sub-documents that can be hotplugged */ { --=20 2.13.6 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list