From nobody Wed May 14 06:07:06 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.zohomail.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 1525881010882634.0288070292055; Wed, 9 May 2018 08:50:10 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.25]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id DDB3830B79FF; Wed, 9 May 2018 15:50:08 +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 0C0A22010D09; Wed, 9 May 2018 15:50:08 +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 9364F4CAA1; Wed, 9 May 2018 15:50:06 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w49Fo4Nv013953 for ; Wed, 9 May 2018 11:50:04 -0400 Received: by smtp.corp.redhat.com (Postfix) id 4592264458; Wed, 9 May 2018 15:50:04 +0000 (UTC) Received: from mx1.redhat.com (ext-mx18.extmail.prod.ext.phx2.redhat.com [10.5.110.47]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 3B8A364452 for ; Wed, 9 May 2018 15:50:00 +0000 (UTC) Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 0F4F43002389 for ; Wed, 9 May 2018 15:49:59 +0000 (UTC) Received: from pps.filterd (m0098399.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w49FnDxm057104 for ; Wed, 9 May 2018 11:49:58 -0400 Received: from e06smtp15.uk.ibm.com (e06smtp15.uk.ibm.com [195.75.94.111]) by mx0a-001b2d01.pphosted.com with ESMTP id 2hv14csvfa-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 09 May 2018 11:49:58 -0400 Received: from localhost by e06smtp15.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 9 May 2018 16:49:56 +0100 Received: from b06cxnps4076.portsmouth.uk.ibm.com (9.149.109.198) by e06smtp15.uk.ibm.com (192.168.101.145) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Wed, 9 May 2018 16:49:53 +0100 Received: from d06av26.portsmouth.uk.ibm.com (d06av26.portsmouth.uk.ibm.com [9.149.105.62]) by b06cxnps4076.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w49FnqSi7864624 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Wed, 9 May 2018 15:49:52 GMT Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id BB2A8B7232 for ; Wed, 9 May 2018 15:46:34 +0100 (BST) Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 6847EB728C for ; Wed, 9 May 2018 15:46:32 +0100 (BST) Received: from marc-ibm.boeblingen.de.ibm.com (unknown [9.152.224.71]) by d06av26.portsmouth.uk.ibm.com (Postfix) with ESMTP for ; Wed, 9 May 2018 15:46:32 +0100 (BST) From: Marc Hartmayer To: Date: Wed, 9 May 2018 16:56:13 +0200 In-Reply-To: <20180509145622.23049-1-mhartmay@linux.vnet.ibm.com> References: <20180509145622.23049-1-mhartmay@linux.vnet.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 18050915-0020-0000-0000-0000041AD5C1 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18050915-0021-0000-0000-000042B01643 Message-Id: <20180509145622.23049-4-mhartmay@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2018-05-09_06:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=4 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1805090148 X-Greylist: Sender passed SPF test, Sender IP whitelisted by DNSRBL, ACL 207 matched, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.47]); Wed, 09 May 2018 15:49:59 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.47]); Wed, 09 May 2018 15:49:59 +0000 (UTC) for IP:'148.163.156.1' DOMAIN:'mx0a-001b2d01.pphosted.com' HELO:'mx0a-001b2d01.pphosted.com' FROM:'mhartmay@linux.vnet.ibm.com' RCPT:'' X-RedHat-Spam-Score: -0.7 (RCVD_IN_DNSWL_LOW) 148.163.156.1 mx0a-001b2d01.pphosted.com 148.163.156.1 mx0a-001b2d01.pphosted.com X-Scanned-By: MIMEDefang 2.84 on 10.5.110.47 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 03/12] remote: Add support for virDomainCreateWithParams 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.84 on 10.5.11.25 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.43]); Wed, 09 May 2018 15:50:09 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Add support for virDomainCreateWithParams to the remote driver. Signed-off-by: Marc Hartmayer Reviewed-by: Boris Fiuczynski Reviewed-by: Stefan Zimmermann --- src/remote/remote_driver.c | 1 + src/remote/remote_protocol.x | 22 +++++++++++++++++++++- src/remote_protocol-structs | 12 ++++++++++++ src/rpc/gendispatch.pl | 18 ++++++++++++------ 4 files changed, 46 insertions(+), 7 deletions(-) diff --git a/src/remote/remote_driver.c b/src/remote/remote_driver.c index 95437b43657e..1bbf42c1e1b2 100644 --- a/src/remote/remote_driver.c +++ b/src/remote/remote_driver.c @@ -8297,6 +8297,7 @@ static virHypervisorDriver hypervisor_driver =3D { .connectListDefinedDomains =3D remoteConnectListDefinedDomains, /* 0.3= .0 */ .connectNumOfDefinedDomains =3D remoteConnectNumOfDefinedDomains, /* 0= .3.0 */ .domainCreate =3D remoteDomainCreate, /* 0.3.0 */ + .domainCreateWithParams =3D remoteDomainCreateWithParams, /* 4.4.0 */ .domainCreateWithFlags =3D remoteDomainCreateWithFlags, /* 0.8.2 */ .domainCreateWithFiles =3D remoteDomainCreateWithFiles, /* 1.1.1 */ .domainDefineXML =3D remoteDomainDefineXML, /* 0.3.0 */ diff --git a/src/remote/remote_protocol.x b/src/remote/remote_protocol.x index 296a0871813a..d22299879429 100644 --- a/src/remote/remote_protocol.x +++ b/src/remote/remote_protocol.x @@ -73,6 +73,9 @@ const REMOTE_IOTHREAD_INFO_MAX =3D 16384; /* Upper limit on migrate cookie. */ const REMOTE_MIGRATE_COOKIE_MAX =3D 4194304; =20 +/* Upper limit on create params. */ +const REMOTE_CREATE_PARAMS_MAX =3D 4; + /* Upper limit on lists of networks. */ const REMOTE_NETWORK_LIST_MAX =3D 16384; =20 @@ -1054,6 +1057,16 @@ struct remote_domain_create_args { remote_nonnull_domain dom; }; =20 +struct remote_domain_create_with_params_args { + remote_nonnull_domain dom; + remote_typed_param params; + unsigned int flags; +}; + +struct remote_domain_create_with_params_ret { + remote_nonnull_domain dom; +}; + struct remote_domain_create_with_flags_args { remote_nonnull_domain dom; unsigned int flags; @@ -6135,5 +6148,12 @@ enum remote_procedure { * @priority: high * @acl: storage_pool:getattr */ - REMOTE_PROC_STORAGE_POOL_LOOKUP_BY_TARGET_PATH =3D 391 + REMOTE_PROC_STORAGE_POOL_LOOKUP_BY_TARGET_PATH =3D 391, + + /** + * @generate: both + * @acl: domain:start + * @acl: domain:write + */ + REMOTE_PROC_DOMAIN_CREATE_WITH_PARAMS =3D 392 }; diff --git a/src/remote_protocol-structs b/src/remote_protocol-structs index fe163db73f88..49ef88f07e62 100644 --- a/src/remote_protocol-structs +++ b/src/remote_protocol-structs @@ -684,6 +684,17 @@ struct remote_connect_num_of_defined_domains_ret { struct remote_domain_create_args { remote_nonnull_domain dom; }; +struct remote_domain_create_with_params_args { + remote_nonnull_domain dom; + struct { + u_int params_len; + remote_typed_param * params_val; + } params; + u_int flags; +}; +struct remote_domain_create_with_params_ret { + remote_nonnull_domain dom; +}; struct remote_domain_create_with_flags_args { remote_nonnull_domain dom; u_int flags; @@ -3269,4 +3280,5 @@ enum remote_procedure { REMOTE_PROC_DOMAIN_MANAGED_SAVE_DEFINE_XML =3D 389, REMOTE_PROC_DOMAIN_SET_LIFECYCLE_ACTION =3D 390, REMOTE_PROC_STORAGE_POOL_LOOKUP_BY_TARGET_PATH =3D 391, + REMOTE_PROC_DOMAIN_CREATE_WITH_PARAMS =3D 392, }; diff --git a/src/rpc/gendispatch.pl b/src/rpc/gendispatch.pl index b8b83b6b40d3..1e32c10e7b7a 100755 --- a/src/rpc/gendispatch.pl +++ b/src/rpc/gendispatch.pl @@ -783,9 +783,12 @@ elsif ($mode eq "server") { } elsif ($ret_member =3D~ m/^remote_nonnull_(domain|networ= k|storage_pool|storage_vol|interface|node_device|secret|nwfilter|domain_sna= pshot) (\S+);/) { my $type_name =3D name_to_TypeName($1); =20 - if ($call->{ProcName} eq "DomainCreateWithFlags") { - # SPECIAL: virDomainCreateWithFlags updates the gi= ven - # domain object instead of returning a ne= w one + if ($call->{ProcName} eq "DomainCreateWithFlags" || + $call->{ProcName} eq "DomainCreateWithParams") { + # SPECIAL: virDomainCreateWithFlags, + # virDomainCreateWithParams, + # updates the given domain object instead of + # returning a new one push(@ret_list, "make_nonnull_$1(&ret->$2, $2);"); $single_ret_var =3D undef; $single_ret_by_ref =3D 1; @@ -1576,9 +1579,12 @@ elsif ($mode eq "client") { my $arg_name =3D $2; my $type_name =3D name_to_TypeName($name); =20 - if ($call->{ProcName} eq "DomainCreateWithFlags") { - # SPECIAL: virDomainCreateWithFlags updates the gi= ven - # domain object instead of returning a ne= w one + if ($call->{ProcName} eq "DomainCreateWithFlags" || + $call->{ProcName} eq "DomainCreateWithParams") { + # SPECIAL: virDomainCreateWithFlags, + # virDomainCreateWithParams + # updates the given domain object instead of + # returning a new one push(@ret_list, "dom->id =3D ret.dom.id;"); push(@ret_list, "xdr_free((xdrproc_t)xdr_$call->{r= et}, (char *)&ret);"); push(@ret_list, "rv =3D 0;"); --=20 2.13.4 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list