summaryrefslogtreecommitdiffstats
path: root/nova/cloudpipe
diff options
context:
space:
mode:
authorMark McLoughlin <markmc@redhat.com>2013-01-04 17:36:29 +0000
committerMark McLoughlin <markmc@redhat.com>2013-01-04 17:36:29 +0000
commit1428956919ffdaf75297fd225452abb9649e6c32 (patch)
treef34a42d6ea09a0b1dc342c8f0136fc40d3ba31b8 /nova/cloudpipe
parent2553b4a22175d9a00a36fd9d20f3c646fd3fab1f (diff)
downloadnova-1428956919ffdaf75297fd225452abb9649e6c32.tar.gz
nova-1428956919ffdaf75297fd225452abb9649e6c32.tar.xz
nova-1428956919ffdaf75297fd225452abb9649e6c32.zip
Add helper methods to nova.paths
We only ever do one of two things with the global path options: 1) Reference the option in the default of another option so that the value can be interpolated it 2) Use the value of the option to build a path Add helper methods for both these cases - e.g. basedir_def() for the former case and basedir_rel() for the latter case. This makes it much more obvious how and where these options are used. Change-Id: I7fd94a329fe911761d02d94e5381e950c6668d56
Diffstat (limited to 'nova/cloudpipe')
-rw-r--r--nova/cloudpipe/pipelib.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/nova/cloudpipe/pipelib.py b/nova/cloudpipe/pipelib.py
index 05b2aee2e..c165b44ff 100644
--- a/nova/cloudpipe/pipelib.py
+++ b/nova/cloudpipe/pipelib.py
@@ -34,6 +34,7 @@ from nova import exception
from nova.openstack.common import cfg
from nova.openstack.common import fileutils
from nova.openstack.common import log as logging
+from nova import paths
from nova import utils
@@ -42,7 +43,7 @@ cloudpipe_opts = [
default='m1.tiny',
help=_('Instance type for vpn instances')),
cfg.StrOpt('boot_script_template',
- default='$pybasedir/nova/cloudpipe/bootscript.template',
+ default=paths.basedir_def('nova/cloudpipe/bootscript.template'),
help=_('Template for cloudpipe instance boot script')),
cfg.StrOpt('dmz_net',
default='10.0.0.0',
@@ -58,7 +59,6 @@ CONF.import_opt('ec2_dmz_host', 'nova.api.ec2.cloud')
CONF.import_opt('ec2_port', 'nova.api.ec2.cloud')
CONF.import_opt('vpn_image_id', 'nova.config')
CONF.import_opt('vpn_key_suffix', 'nova.config')
-CONF.import_opt('pybasedir', 'nova.paths')
CONF.import_opt('cnt_vpn_clients', 'nova.network.manager')
LOG = logging.getLogger(__name__)