[virt-tools-list] [virt-manager PATCH 4/5] domcapabilities: add caching of CPU security features
Daniel P. Berrangé
berrange at redhat.com
Thu Apr 4 09:17:10 UTC 2019
On Wed, Apr 03, 2019 at 03:52:50PM +0200, Pavel Hrdina wrote:
> We will call this function multiple times so it makes sense to cache the
> result so we don't have to call libvirt APIs every time we will check
> what security features are available on the host.
>
> Signed-off-by: Pavel Hrdina <phrdina at redhat.com>
> ---
> virtinst/domcapabilities.py | 11 ++++++++---
> 1 file changed, 8 insertions(+), 3 deletions(-)
Arguably you can cache the entire capabilities API call for virt-install
since it won't change in the lifetime if a short virt-install
invokation and even if it does change you likely want virt-install to
have a consistent view of capabilities throughout its execution.
For virt-manager though being more dynamic is possibly more desirable
given its long life.
Reviewed-by: Daniel P. Berrangé <berrange at redhat.com>
Regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
More information about the virt-tools-list
mailing list