Do not restart libvirt if n-cpu is disabled
If this service is disable in localrc, libvirt does not installed at all,
and should not be restarted.
Change-Id: Iaf482d4a82a26546c25249b3e32c7e629d862a1b
Closes: bug 1288236
diff --git a/lib/nova b/lib/nova
index 583a592..2f6d04d 100644
--- a/lib/nova
+++ b/lib/nova
@@ -308,7 +308,7 @@
# Rebuild the config file from scratch
create_nova_conf
- if [[ -r $NOVA_PLUGINS/hypervisor-$VIRT_DRIVER ]]; then
+ if is_service_enabled n-cpu && [[ -r $NOVA_PLUGINS/hypervisor-$VIRT_DRIVER ]]; then
# Configure hypervisor plugin
configure_nova_hypervisor
fi