From 4408b6bb43353624b525ff674f5aaad46efc8438 Mon Sep 17 00:00:00 2001 From: Mark McLoughlin Date: Wed, 21 Nov 2012 23:29:35 +0000 Subject: Move ec2 config opts to nova.api.ec2.cloud Only ec2_dmz_host and ec2_port are used outside of ec2.cloud and in both cases pipelib is the other module that uses them. Move all the ec2 options to ec2.cloud and make pipelib explicitly depend on the ones it needs. blueprint: scope-config-opts Change-Id: Ib187ec3421a25bdd86b13dfeae1dc9a07873eb43 --- nova/api/ec2/cloud.py | 28 +++++++++++++++++++++++----- 1 file changed, 23 insertions(+), 5 deletions(-) (limited to 'nova/api') diff --git a/nova/api/ec2/cloud.py b/nova/api/ec2/cloud.py index ad922118e..df6f17fb0 100644 --- a/nova/api/ec2/cloud.py +++ b/nova/api/ec2/cloud.py @@ -45,13 +45,31 @@ from nova import servicegroup from nova import utils from nova import volume +ec2_opts = [ + cfg.StrOpt('ec2_host', + default='$my_ip', + help='the ip of the ec2 api server'), + cfg.StrOpt('ec2_dmz_host', + default='$my_ip', + help='the internal ip of the ec2 api server'), + cfg.IntOpt('ec2_port', + default=8773, + help='the port of the ec2 api server'), + cfg.StrOpt('ec2_scheme', + default='http', + help='the protocol to use when connecting to the ec2 api ' + 'server (http, https)'), + cfg.StrOpt('ec2_path', + default='/services/Cloud', + help='the path prefix used to call the ec2 api server'), + cfg.ListOpt('region_list', + default=[], + help='list of region=fqdn pairs separated by commas'), +] CONF = cfg.CONF -CONF.import_opt('ec2_host', 'nova.config') -CONF.import_opt('ec2_path', 'nova.config') -CONF.import_opt('ec2_port', 'nova.config') -CONF.import_opt('ec2_scheme', 'nova.config') -CONF.import_opt('region_list', 'nova.config') +CONF.register_opts(ec2_opts) +CONF.import_opt('my_ip', 'nova.config') CONF.import_opt('vpn_image_id', 'nova.config') CONF.import_opt('vpn_key_suffix', 'nova.config') -- cgit