remote: New APIs for ThrottleGroup lifecycle management

Defined new public APIs:
* virDomainSetThrottleGroup to add or update throttlegroup within specific domain,
  it will be referenced by throttlefilter later in disk to do limits
* virDomainGetThrottleGroup to get throttlegroup info, old-style is discarded
  (APIs to query first for the number of parameters and then give it a
  reasonably-sized pointer), instead, the new approach is adopted that
  API returns allocated array of fields and number of fileds that are in it.
* virDomainDelThrottleGroup to delete throttlegroup, it fails if this throttlegroup
  is still referenced by some throttlefilter

Signed-off-by: Chun Feng Wu <danielwuwy@163.com>

* Reimplement getter API to fetch data from XML.
* Apply suggested coding style changes.
* Update of code documentation comments.
* Update the version to 11.2.0.

Signed-off-by: Harikumar Rajkumar <harirajkumar230@gmail.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
Chun Feng Wu
2025-03-20 17:43:43 +01:00
committed by Peter Krempa
parent 5023d974b1
commit a10b3ffebb
7 changed files with 200 additions and 1 deletions
+14
View File
@@ -8281,4 +8281,18 @@ virDomainGraphicsReload(virDomainPtr domain,
unsigned int type,
unsigned int flags);
int
virDomainSetThrottleGroup(virDomainPtr dom,
const char *group,
virTypedParameterPtr params,
int nparams,
unsigned int flags);
int
virDomainDelThrottleGroup(virDomainPtr dom,
const char *group,
unsigned int flags);
#endif /* LIBVIRT_DOMAIN_H */