- 30 11月, 2015 1 次提交
-
-
由 Erik Skultety 提交于
Introduce a new API to get libvirt version. It is worth noting, that libvirt-admin and libvirt share the same version number. Unfortunately, our existing API isn't generic enough to be used with virAdmConnectPtr as well. Also this patch wires up this API to the virt-admin client as a generic cmdVersion command.
-
- 16 6月, 2015 1 次提交
-
-
由 Martin Kletzander 提交于
Since this is just a new option for gendispatch, it looks more like a cleanup. The only differences handled by it are connect pointers, private pointers and API naming customs. Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
- 14 5月, 2015 1 次提交
-
-
由 Martin Kletzander 提交于
We don't allow it in normal code, why would it need to be in the generated one. IT also splits the line in perl code so it's readable. Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
- 26 3月, 2015 1 次提交
-
-
由 Ján Tomko 提交于
While it returns info about multiple threads, the version without the plural is easier to read.
-
- 25 3月, 2015 1 次提交
-
-
由 Jiri Denemark 提交于
Since all APIs are also RPC calls, we automatically get all APIs covered with thread jobs. Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
- 12 3月, 2015 1 次提交
-
-
由 John Ferlan 提交于
Implement the remote plumbing.
-
- 06 3月, 2015 1 次提交
-
-
由 John Ferlan 提交于
Implement the remote plumbing for virDomainGetIOThreadsInfo Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
-
- 03 12月, 2014 1 次提交
-
-
由 John Ferlan 提交于
Modify the various virXXXFree calls to only call virObjectUnref. Calling the public API will reset the last error thus clearing out a pending error.
-
- 24 11月, 2014 1 次提交
-
-
由 Tomoki Sekiyama 提交于
Add daemon and driver code to (de-)serialize virDomainFSInfo. Signed-off-by: NTomoki Sekiyama <tomoki.sekiyama@hds.com>
-
- 07 11月, 2014 1 次提交
-
-
由 Daniel P. Berrange 提交于
Since the secondary drivers are only active when the primary driver is also the remote driver, there is no need to use the different type specific privateData fields.
-
- 26 8月, 2014 1 次提交
-
-
由 Eric Blake 提交于
I noticed a line 'int nparams = 0;;' in remote_dispatch.h, and tracked down where it was generated. While at it, I found a couple of other double semicolons. Additionally, I noticed that commit df0b57a9 left a stale reference to the file name remote_dispatch_bodies.h. * src/conf/numatune_conf.c (virDomainNumatuneNodeParseXML): Drop empty statement. * tests/virdbustest.c (testMessageStruct, testMessageSimple): Likewise. * src/rpc/gendispatch.pl (remote_dispatch_bodies.h): Likewise, and update stale comments. Signed-off-by: NEric Blake <eblake@redhat.com>
-
- 24 6月, 2014 1 次提交
-
-
由 Nehal J Wani 提交于
Implement RPC calls for virNetworkGetDHCPLeases, virNetworkGetDHCPLeasesForMAC daemon/remote.c * Define remoteSerializeNetworkDHCPLeases, remoteDispatchNetworkGetDHCPLeases * Define remoteDispatchNetworkGetDHCPLeasesForMAC * Define helper function remoteSerializeDHCPLease src/remote/remote_driver.c * Define remoteNetworkGetDHCPLeases * Define remoteNetworkGetDHCPLeasesForMAC * Define helper function remoteSerializeDHCPLease src/remote/remote_protocol.x * New RPC procedure: REMOTE_PROC_NETWORK_GET_DHCP_LEASES * Define structs remote_network_dhcp_leases, remote_network_get_dhcp_leases_args, remote_network_get_dhcp_leases_ret * New RPC procedure: REMOTE_PROC_NETWORK_GET_DHCP_LEASES_FOR_MAC * Define structs remote_network_dhcp_leases_for_mac, remote_network_get_dhcp_leases_for_mac_args, remote_network_get_dhcp_leases_for_mac_ret src/remote_protocol-structs * New structs added src/rpc/gendispatch.pl * Add exception (s/Dhcp/DHCP) for auto-generating names of the remote functions in daemon/remote_dispatch.h
-
- 07 5月, 2014 1 次提交
-
-
由 Tomoki Sekiyama 提交于
New rules are added in fixup_name in gendispatch.pl to keep the name FSFreeze and FSThaw. This adds a new ACL permission 'fs_freeze', which is also applied to VIR_DOMAIN_SNAPSHOT_CREATE_QUIESCE flag. Signed-off-by: NTomoki Sekiyama <tomoki.sekiyama@hds.com> Acked-by: NDaniel P. Berrange <berrange@redhat.com> Signed-off-by: NEric Blake <eblake@redhat.com>
-
- 21 3月, 2014 1 次提交
-
-
由 Eric Blake 提交于
These are the first async events in the qemu protocol, so this patch looks rather big compared to most RPC additions. However, a large majority of this patch is just mechanical copy-and-paste from recently-added network events. It didn't help that this is also the first virConnect rather than virDomain prefix associated with a qemu-specific API. * src/remote/qemu_protocol.x (qemu_*_domain_monitor_event_*): New structs and RPC messages. * src/rpc/gendispatch.pl: Adjust naming conventions. * daemon/libvirtd.h (daemonClientPrivate): Track qemu events. * daemon/remote.c (remoteClientFreeFunc): Likewise. (remoteRelayDomainQemuMonitorEvent) (qemuDispatchConnectDomainMonitorEventRegister) (qemuDispatchConnectDomainMonitorEventDeregister): New functions. * src/remote/remote_driver.c (qemuEvents): Handle qemu events. (doRemoteOpen): Register for events. (remoteNetworkBuildEventLifecycle) (remoteConnectDomainQemuMonitorEventRegister) (remoteConnectDomainQemuMonitorEventDeregister): New functions. * src/qemu_protocol-structs: Regenerate. Signed-off-by: NEric Blake <eblake@redhat.com>
-
- 10 8月, 2013 1 次提交
-
-
由 Daniel P. Berrange 提交于
The gendispatch.pl script puts comments at the top of files it creates, saying that it auto-generated them. Also include the name of the source data file which it reads when doing the auto-generation. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 08 8月, 2013 1 次提交
-
-
由 Daniel P. Berrange 提交于
So that app developers / admins know what access control checks are performed for each API, this patch extends the API docs generator to include details of the ACLs for each. The gendispatch.pl script is extended so that it generates a simple XML describing ACL rules, eg. <aclinfo> ... <api name='virConnectNumOfDomains'> <check object='connect' perm='search_domains'/> <filter object='domain' perm='getattr'/> </api> <api name='virDomainAttachDeviceFlags'> <check object='domain' perm='write'/> <check object='domain' perm='save' flags='!VIR_DOMAIN_AFFECT_CONFIG|VIR_DOMAIN_AFFECT_LIVE'/> <check object='domain' perm='save' flags='VIR_DOMAIN_AFFECT_CONFIG'/> </api> ... </aclinfo> The newapi.xsl template loads the XML files containing the ACL rules and generates a short block of HTML for each API describing the parameter checks and return value filters (if any). Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 11 7月, 2013 1 次提交
-
-
由 Daniel P. Berrange 提交于
Convert the type of loop iterators named 'i', 'j', k', 'ii', 'jj', 'kk', to be 'size_t' instead of 'int' or 'unsigned int', also santizing 'ii', 'jj', 'kk' to use the normal 'i', 'j', 'k' naming Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 10 7月, 2013 1 次提交
-
-
由 Michal Privoznik 提交于
-
- 03 7月, 2013 1 次提交
-
-
由 Daniel P. Berrange 提交于
Change the ACL filter functions to use a 'bool' return type instead of a tri-state 'int' return type. The callers of these functions don't want to distinguish 'auth failed' from other errors. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 24 6月, 2013 2 次提交
-
-
由 Daniel P. Berrange 提交于
Extend the 'gendispatch.pl' script to be able to generate three new types of file. - 'aclheader' - defines signatures of helper APIs for doing authorization checks. There is one helper API for each API requiring an auth check. Any @acl annotations result in a method being generated with a suffix of 'EnsureACL'. If the ACL check requires examination of flags, an extra 'flags' param will be present. Some examples extern int virConnectBaselineCPUEnsureACL(void); extern int virConnectDomainEventDeregisterEnsureACL(virDomainDefPtr domain); extern int virDomainAttachDeviceFlagsEnsureACL(virDomainDefPtr domain, unsigned int flags); Any @aclfilter annotations resuilt in a method being generated with a suffix of 'CheckACL'. extern int virConnectListAllDomainsCheckACL(virDomainDefPtr domain); These are used for filtering individual objects from APIs which return a list of objects - 'aclbody' - defines the actual implementation of the methods described above. This calls into the access manager APIs. A complex example: /* Returns: -1 on error (denied==error), 0 on allowed */ int virDomainAttachDeviceFlagsEnsureACL(virConnectPtr conn, virDomainDefPtr domain, unsigned int flags) { virAccessManagerPtr mgr; int rv; if (!(mgr = virAccessManagerGetDefault())) return -1; if ((rv = virAccessManagerCheckDomain(mgr, conn->driver->name, domain, VIR_ACCESS_PERM_DOMAIN_WRITE)) <= 0) { virObjectUnref(mgr); if (rv == 0) virReportError(VIR_ERR_ACCESS_DENIED, NULL); return -1; } if (((flags & (VIR_DOMAIN_AFFECT_CONFIG|VIR_DOMAIN_AFFECT_LIVE)) == 0) && (rv = virAccessManagerCheckDomain(mgr, conn->driver->name, domain, VIR_ACCESS_PERM_DOMAIN_SAVE)) <= 0) { virObjectUnref(mgr); if (rv == 0) virReportError(VIR_ERR_ACCESS_DENIED, NULL); return -1; } if (((flags & (VIR_DOMAIN_AFFECT_CONFIG)) == (VIR_DOMAIN_AFFECT_CONFIG)) && (rv = virAccessManagerCheckDomain(mgr, conn->driver->name, domain, VIR_ACCESS_PERM_DOMAIN_SAVE)) <= 0) { virObjectUnref(mgr); if (rv == 0) virReportError(VIR_ERR_ACCESS_DENIED, NULL); return -1; } virObjectUnref(mgr); return 0; } - 'aclsyms' - generates a linker script to export the APIs to drivers. Some examples virConnectBaselineCPUEnsureACL; virConnectCompareCPUEnsureACL; Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
Introduce annotations to all RPC messages to declare what access control checks are required. There are two new annotations defined: @acl: <object>:<permission> @acl: <object>:<permission>:<flagname> Declare the access control requirements for the API. May be repeated multiple times, if multiple rules are required. <object> is one of 'connect', 'domain', 'network', 'storagepool', 'interface', 'nodedev', 'secret'. <permission> is one of the permissions in access/viraccessperm.h <flagname> indicates the rule only applies if the named flag is set in the API call @aclfilter: <object>:<permission> Declare an access control filter that will be applied to a list of objects being returned by an API. This allows the returned list to be filtered to only show those the user has permissions against Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 23 5月, 2013 1 次提交
-
-
由 Michal Privoznik 提交于
-
- 21 5月, 2013 1 次提交
-
-
由 Eric Blake 提交于
Several files called out COPYING or COPYING.LIB instead of using the normal boilerplate. It's especially important that we don't call out COPYING from an LGPL file, since COPYING is traditionally used for the GPL. A few files were lacking copyright altogether. * src/rpc/gendispatch.pl: Add missing copyright. * Makefile.nonreentrant: Likewise. * src/check-symfile.pl: Likewise. * src/check-symsorting.pl: Likewise. * src/driver.h: Likewise. * src/internal.h: Likewise. * tools/libvirt-guests.sh.in: Likewise. * tools/virt-pki-validate.in: Mention copyright in comment, not just code. * tools/virt-sanlock-cleanup.in: Likewise. * src/rpc/genprotocol.pl: Spell out license terms. * src/xen/xend_internal.h: Likewise. * src/xen/xend_internal.c: Likewise. * Makefile.am: Likewise. * daemon/Makefile.am: Likewise. * docs/Makefile.am: Likewise. * docs/schemas/Makefile.am: Likewise. * examples/apparmor/Makefile.am: Likewise. * examples/domain-events/events-c/Makefile.am: Likewise. * examples/dominfo/Makefile.am: Likewise. * examples/domsuspend/Makefile.am: Likewise. * examples/hellolibvirt/Makefile.am: Likewise. * examples/openauth/Makefile.am: Likewise. * examples/python/Makefile.am: Likewise. * examples/systemtap/Makefile.am: Likewise. * examples/xml/nwfilter/Makefile.am: Likewise. * gnulib/lib/Makefile.am: Likewise. * gnulib/tests/Makefile.am: Likewise. * include/Makefile.am: Likewise. * include/libvirt/Makefile.am: Likewise. * python/Makefile.am: Likewise. * python/tests/Makefile.am: Likewise. * src/Makefile.am: Likewise. * tests/Makefile.am: Likewise. * tools/Makefile.am: Likewise. * configure.ac: Likewise. Signed-off-by: NEric Blake <eblake@redhat.com>
-
- 03 5月, 2013 1 次提交
-
-
由 Daniel P. Berrange 提交于
If an early dispatch check caused a jump to the 'cleanup' branch then virTypeParamsFree() would be called with an uninitialized 'nparams' variable. Fortunately 'params' is initialized to NULL, so the uninitialized 'nparams' variable would not be used. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 24 4月, 2013 4 次提交
-
-
由 Daniel P. Berrange 提交于
Ensure that all drivers implementing public APIs use a naming convention for their implementation that matches the public API name. eg for the public API virDomainCreate make sure QEMU uses qemuDomainCreate and not qemuDomainStart Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
The driver.h struct for node devices used an inconsistent naming scheme 'DeviceMonitor' instead of the more usual 'NodeDeviceDriver'. Fix this everywhere it has leaked out to. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
A number of the remote procedure names did not match the corresponding API names. For example, many lacked the word 'CONNECT', others re-arranged the names. Update the procedures so their names exactly match the API names. Then remove the special case handling of these APIs in the generator Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
There are many declared options in gendispatch.pl that were no longer used. Those which were used were obscure '-b', '-k' and '-d'. Switch to use --mode={debug|client|server}. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 23 4月, 2013 1 次提交
-
-
由 Daniel P. Berrange 提交于
Currently the RPC protocol files can contain annotations after the protocol enum eg REMOTE_PROC_DOMAIN_SNAPSHOT_LIST_CHILDREN_NAMES = 247, /* autogen autogen priority:high */ This is not very extensible as the number of annotations grows. Change it to use /** * @generate: both * @priority: high */ REMOTE_PROC_DOMAIN_SNAPSHOT_LIST_CHILDREN_NAMES = 247, Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 23 2月, 2013 1 次提交
-
-
由 Jiri Denemark 提交于
remoteDeserializeTypedParameters can now be called with either preallocated params array (size of which is announced by nparams) or it can allocate params array according to the number of parameters received from the server.
-
- 12 2月, 2013 1 次提交
-
-
由 Osier Yang 提交于
Like virNodeDeviceCreateXML, virNodeDeviceLookupSCSIHostByWWN has to be treated specially when generating the RPC codes. Also new rules are added in fixup_name to keep the name SCSIHostByWWN.
-
- 18 1月, 2013 1 次提交
-
-
由 Jiri Denemark 提交于
The function is just a renamed public version of former virTypedParameterArrayClear.
-
- 28 11月, 2012 1 次提交
-
-
由 Michal Privoznik 提交于
A new rule to fixup_name() in gendispatch.pl needs to be added, otherwise we are left with remoteDomainFstrim which is not wanted.
-
- 18 9月, 2012 1 次提交
-
-
由 Eric Blake 提交于
Relatively straightforward. Our decision to make block job speed a long keeps haunting us on new API. * src/remote/remote_protocol.x (remote_domain_block_commit_args): New struct. * src/remote/remote_driver.c (remote_driver): Enable it. * src/remote_protocol-structs: Regenerate. * src/rpc/gendispatch.pl (long_legacy): Exempt another bandwidth.
-
- 17 9月, 2012 1 次提交
-
-
由 Osier Yang 提交于
* src/rpc/gendispatch.pl: (virNodeSetMemoryParameters is the the special one which needs a connection object as the first argument, improve the generator to support it). * daemon/remote.c: (Implement the server side handler for virDomainGetMemoryParameters) * src/remote/remote_driver.c: (Implement the client side handler for virDomainGetMemoryParameters) * src/remote/remote_protocol.x: (New RPC procedures for the two new APIs and structs to represent the args and ret for it) * src/remote_protocol-structs: Likewise
-
- 07 8月, 2012 1 次提交
-
-
由 Daniel P. Berrange 提交于
Make all the virNetClient* objects use virObject APIs for reference counting Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 30 7月, 2012 2 次提交
-
-
由 Daniel P. Berrange 提交于
The cfg.mk file rule to check for tab characters was not applied to perl files. Much of our Perl code is full of tabs as a result. Kill them, kill them all !
-
由 Daniel P. Berrange 提交于
Update the gendispatch.pl script to get a little closer to being able to generate code for the LXC monitor, by passing in the struct prefix separately from the procedure prefix. Also allow method names using virCapitalLetters instead of vir_underscore_separator Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 20 7月, 2012 2 次提交
-
-
由 Daniel P. Berrange 提交于
Update the libvirtd dispatch code to use virReportError instead of the virNetError custom macro Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
Update the remote driver to use virReportError instead of the remoteError custom macro Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-