[et-mgmt-tools] [PATCH] Port utility functions to Solaris
Daniel P. Berrange
berrange at redhat.com
Thu Dec 4 12:06:09 UTC 2008
On Wed, Dec 03, 2008 at 08:31:07PM -0800, john.levon at sun.com wrote:
> # HG changeset patch
> # User john.levon at sun.com
> # Date 1228365030 28800
> # Node ID 9e299e5ee2b46b8c3b737d5394498a855f553bae
> # Parent d9898b68352ad1c2491a3c9697d4b34af6630fc7
> Port utility functions to Solaris
>
> Port various utils to Solaris, and remove some unused ones that don't
> work.
This default NIC identification won't work when virt-install is running
remotely from the virt host, but I guess the user can easily specify
an explicit device in this case.
> @@ -100,6 +125,9 @@ def default_connection():
> return None
>
> def get_cpu_flags():
> + if platform.system() == 'SunOS':
> + raise OSError("CPU flags not available")
> +
Should make a note to kill this function entirely - libvirt capabilities
XML provides this data.
> -def is_kvm_capable():
> - return os.path.exists("/dev/kvm")
> + if not conn:
> + conn = libvirt.open('')
> + return "pae" in conn.getCapabilities()
Yep, this is good.
ACK to this patch
Daniel
--
|: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :|
|: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :|
|: http://autobuild.org -o- http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|
More information about the et-mgmt-tools
mailing list