From 09e797014e6ec2cd734e4f77619d4a150cbf175c Mon Sep 17 00:00:00 2001 From: Drew Thorstensen Date: Mon, 2 May 2016 07:49:39 -0400 Subject: [PATCH] Allow compute driver to load correctly In certain environments the load order can be confused between nova and nova_powervm (now that nova_powervm has a nova/ source path). This can cause boot issues where 'No module named cmd.compute' can be thrown because the python code is looking in nova-powervm/nova for that driver. This change extends the declare_namespace code to allow for the other projects to properly load. This was affecting the PowerVM CI system and not allowing the systems to properly load. Change-Id: I4695814ad9ded96a6bb731b2a47f7050fedd8d85 --- nova/__init__.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/nova/__init__.py b/nova/__init__.py index e69de29b..671e539d 100644 --- a/nova/__init__.py +++ b/nova/__init__.py @@ -0,0 +1,18 @@ +# Copyright 2016 IBM Corp. +# +# All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. + +# Required to play nicely with namespace composition (PEP420). +__import__('pkg_resources').declare_namespace(__name__)