Merge "Set a sane default for state_path"

This commit is contained in:
Jenkins 2014-02-12 22:04:35 +00:00 committed by Gerrit Code Review
commit 111d1d97bf
3 changed files with 6 additions and 2 deletions

View File

@ -292,7 +292,7 @@
# Top-level directory for maintaining nova's state (string
# value)
#state_path=$pybasedir
#state_path=/var/lib/nova
#

View File

@ -29,7 +29,7 @@ path_opts = [
default=os.path.join(sys.prefix, 'local', 'bin'),
help='Directory where nova binaries are installed'),
cfg.StrOpt('state_path',
default='$pybasedir',
default='/var/lib/nova',
help="Top-level directory for maintaining nova's state"),
]

View File

@ -14,6 +14,8 @@
# License for the specific language governing permissions and limitations
# under the License.
import os
from oslo.config import cfg
@ -41,6 +43,8 @@ class ConfFixture(config_fixture.Config):
"""Fixture to manage global conf settings."""
def setUp(self):
super(ConfFixture, self).setUp()
self.conf.set_default('state_path', os.path.abspath(
os.path.join(os.path.dirname(__file__), '..', '..')))
self.conf.set_default('api_paste_config',
paths.state_path_def('etc/nova/api-paste.ini'))
self.conf.set_default('host', 'fake-mini')