On Mon, Oct 28, 2013 at 12:11:24PM -0400, Cole Robinson wrote: > On 10/21/2013 10:56 AM, Martin Kletzander wrote: > > With LXC domain, the 'current' attribute of 'vcpu' element is not > > always present, but the code is still depending on it. > > > > Signed-off-by: Martin Kletzander <mkletzan@xxxxxxxxxx> > > --- > > > > Notes: > > TBH, I haven;t gone through all the code to realize what _exactly_ > > 'self._startup_vcpus' means, but this is my best guess. > > > > startup_vcpus was for handling back compat with old libvirt versions that > didn't have a concept of max vcpus vs. current vcpus, so we use 'vcpus at > guest startup' to mean 'maxvcpus'. > > > virtManager/domain.py | 5 ++++- > > 1 file changed, 4 insertions(+), 1 deletion(-) > > > > diff --git a/virtManager/domain.py b/virtManager/domain.py > > index 4ff156e..d099176 100644 > > --- a/virtManager/domain.py > > +++ b/virtManager/domain.py > > @@ -1036,7 +1036,10 @@ class vmmDomain(vmmLibvirtObject): > > return int(self.get_xmlobj().maxmemory) > > > > def vcpu_count(self): > > - return int(self.get_xmlobj().curvcpus) > > + guest = self.get_xmlobj() > > + return int(guest.curvcpus or > > + self._startup_vcpus or > > + guest.vcpus) > > def vcpu_max_count(self): > > guest = self.get_xmlobj() > > has_xml_max = (guest.curvcpus != guest.vcpus) > > > > ACK > Thanks, pushed. Martin
Attachment:
signature.asc
Description: Digital signature
_______________________________________________ virt-tools-list mailing list virt-tools-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/virt-tools-list