diff options
author | Daniel P. Berrange <berrange@redhat.com> | 2013-02-08 16:59:32 +0000 |
---|---|---|
committer | Daniel P. Berrange <berrange@redhat.com> | 2013-02-13 11:14:57 +0000 |
commit | 99ddc0d2ad7f2f9c27deaac08559eb794845afc3 (patch) | |
tree | aca6302f4c82f126b42242d625b861b96b40efbb /nova/exception.py | |
parent | d980805880c681881504e269e03130e4452630ab (diff) | |
download | nova-99ddc0d2ad7f2f9c27deaac08559eb794845afc3.tar.gz nova-99ddc0d2ad7f2f9c27deaac08559eb794845afc3.tar.xz nova-99ddc0d2ad7f2f9c27deaac08559eb794845afc3.zip |
Allow VIF model to be chosen per image
This allows for an image in glance to be annotated with a
property describing the required VIF model
eg
# glance image-update \
--property vif_model=e1000 \
f16-x86_64-openstack-sda
Valid model values vary per the libvirt_type setting:
qemu/kvm: 'virtio', 'ne2k_pci', 'pcnet', 'rtl8139', 'e1000'
xen: 'netfront', 'ne2k_pci', 'pcnet', 'rtl8139', 'e1000'
Requesting an unsupported VIF model will cause the guest
instance to fail to launch.
DocImpact
Blueprint: libvirt-custom-hardware
Change-Id: Idbee0c61cffdb43db5668fb88869a5d30278593f
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Diffstat (limited to 'nova/exception.py')
-rw-r--r-- | nova/exception.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/nova/exception.py b/nova/exception.py index 9063d1068..9e9e5182b 100644 --- a/nova/exception.py +++ b/nova/exception.py @@ -1120,3 +1120,13 @@ class ServiceGroupUnavailable(NovaException): class DBNotAllowed(NovaException): message = _('%(binary)s attempted direct database access which is ' 'not allowed by policy') + + +class UnsupportedVirtType(Invalid): + message = _("Virtualization type '%(virt)s' is not supported by " + "this compute driver") + + +class UnsupportedHardware(Invalid): + message = _("Requested hardware '%(model)s' is not supported by " + "the '%(virt)s' virt driver") |