[virt-tools-list] [PATCH] osxml: detect all pseries machine types

Giuseppe Scrivano gscrivan at redhat.com
Wed Jul 22 13:21:03 UTC 2015


Pavel Hrdina <phrdina at redhat.com> writes:

> For example the machine type could be "pseries-<host-os-version>".
>
> Signed-off-by: Pavel Hrdina <phrdina at redhat.com>
> ---
>  virtinst/osxml.py | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/virtinst/osxml.py b/virtinst/osxml.py
> index f195f19..9569f65 100644
> --- a/virtinst/osxml.py
> +++ b/virtinst/osxml.py
> @@ -69,7 +69,7 @@ class OSXML(XMLBuilder):
>      def is_ppc64(self):
>          return self.arch == "ppc64" or self.arch == "ppc64le"
>      def is_pseries(self):
> -        return self.is_ppc64() and self.machine == "pseries"
> +        return self.is_ppc64() and str(self.machine).startswith("pseries")
>  
>      def is_s390x(self):
>          return self.arch == "s390x"

ACK & pushed.

Regards,
Giuseppe




More information about the virt-tools-list mailing list