summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorYoshihiro Kaneko <ykaneko0929@gmail.com>2013-07-10 21:34:17 +0900
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2013-07-11 21:52:15 +0900
commit673b83b6d60dec1df8e4d6a860abe98bb22fd1d9 (patch)
treee01e7a750bd79824e483d39d7b88d0724d71731c
parentcfa7c91f0b84a45372cb7254bf459370f35faf1b (diff)
ryu/flags: rename config paramerters related to openstack
Signed-off-by: Yoshihiro Kaneko <ykaneko0929@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
-rw-r--r--ryu/app/quantum_adapter.py26
-rw-r--r--ryu/flags.py42
2 files changed, 38 insertions, 30 deletions
diff --git a/ryu/app/quantum_adapter.py b/ryu/app/quantum_adapter.py
index 2ead71f9..cc2fa440 100644
--- a/ryu/app/quantum_adapter.py
+++ b/ryu/app/quantum_adapter.py
@@ -50,12 +50,12 @@ CONF = cfg.CONF
def _get_auth_token(logger):
httpclient = q_client.HTTPClient(
- username=CONF.quantum_admin_username,
- tenant_name=CONF.quantum_admin_tenant_name,
- password=CONF.quantum_admin_password,
- auth_url=CONF.quantum_admin_auth_url,
- timeout=CONF.quantum_url_timeout,
- auth_strategy=CONF.quantum_auth_strategy)
+ username=CONF.neutron_admin_username,
+ tenant_name=CONF.neutron_admin_tenant_name,
+ password=CONF.neutron_admin_password,
+ auth_url=CONF.neutron_admin_auth_url,
+ timeout=CONF.neutron_url_timeout,
+ auth_strategy=CONF.neutron_auth_strategy)
try:
httpclient.authenticate()
except (q_exc.Unauthorized, q_exc.Forbidden, q_exc.EndpointNotFound) as e:
@@ -68,12 +68,12 @@ def _get_auth_token(logger):
def _get_quantum_client(token):
if token:
my_client = q_clientv2.Client(
- endpoint_url=CONF.quantum_url,
- token=token, timeout=CONF.quantum_url_timeout)
+ endpoint_url=CONF.neutron_url,
+ token=token, timeout=CONF.neutron_url_timeout)
else:
my_client = q_clientv2.Client(
- endpoint_url=CONF.quantum_url,
- auth_strategy=None, timeout=CONF.quantum_url_timeout)
+ endpoint_url=CONF.neutron_url,
+ auth_strategy=None, timeout=CONF.neutron_url_timeout)
return my_client
@@ -133,7 +133,7 @@ class OVSSwitch(object):
def __init__(self, dpid, nw, ifaces, logger):
# TODO: clean up
token = None
- if CONF.quantum_auth_strategy:
+ if CONF.neutron_auth_strategy:
token = _get_auth_token(logger)
q_api = _get_quantum_client(token)
@@ -142,9 +142,9 @@ class OVSSwitch(object):
self.ifaces = ifaces
self.logger = logger
self.q_api = q_api
- self.ctrl_addr = CONF.quantum_controller_addr
+ self.ctrl_addr = CONF.neutron_controller_addr
if not self.ctrl_addr:
- raise ValueError('option quantum_controler_addr must be speicfied')
+ raise ValueError('option neutron_controler_addr must be speicfied')
self.ovsdb_addr = None
self.tunnel_ip = None
diff --git a/ryu/flags.py b/ryu/flags.py
index 533f7de2..71a5a2ab 100644
--- a/ryu/flags.py
+++ b/ryu/flags.py
@@ -23,22 +23,30 @@ CONF = cfg.CONF
CONF.register_cli_opts([
# app/quantum_adapter
- cfg.StrOpt('quantum-url', default='http://localhost:9696',
- help='URL for connecting to quantum'),
- cfg.IntOpt('quantum-url-timeout', default=30,
- help='timeout value for connecting to quantum in seconds'),
- cfg.StrOpt('quantum-admin-username', default='quantum',
- help='username for connecting to quantum in admin context'),
- cfg.StrOpt('quantum-admin-password', default='service_password',
- help='password for connecting to quantum in admin context'),
- cfg.StrOpt('quantum-admin-tenant-name', default='service',
- help='tenant name for connecting to quantum in admin context'),
- cfg.StrOpt('quantum-admin-auth-url', default='http://localhost:5000/v2.0',
- help='auth url for connecting to quantum in admin context'),
- cfg.StrOpt('quantum-auth-strategy', default='keystone',
- help='auth strategy for connecting to quantum in admin'
- 'context'),
- cfg.StrOpt('quantum-controller-addr', default=None,
+ cfg.StrOpt('neutron-url', default='http://localhost:9696',
+ help='URL for connecting to neutron',
+ deprecated_name='quantum-url'),
+ cfg.IntOpt('neutron-url-timeout', default=30,
+ help='timeout value for connecting to neutron in seconds',
+ deprecated_name='quantum-url-timeout'),
+ cfg.StrOpt('neutron-admin-username', default='neutron',
+ help='username for connecting to neutron in admin context',
+ deprecated_name='quantum-admin-username'),
+ cfg.StrOpt('neutron-admin-password', default='service_password',
+ help='password for connecting to neutron in admin context',
+ deprecated_name='quantum-admin-password'),
+ cfg.StrOpt('neutron-admin-tenant-name', default='service',
+ help='tenant name for connecting to neutron in admin context',
+ deprecated_name='quantum-admin-tenant-name'),
+ cfg.StrOpt('neutron-admin-auth-url', default='http://localhost:5000/v2.0',
+ help='auth url for connecting to neutron in admin context',
+ deprecated_name='quantum-admin-auth-url'),
+ cfg.StrOpt('neutron-auth-strategy', default='keystone',
+ help='auth strategy for connecting to neutron in admin'
+ 'context',
+ deprecated_name='quantum-auth-strategy'),
+ cfg.StrOpt('neutron-controller-addr', default=None,
help='openflow method:address:port to set controller of'
- 'ovs bridge')
+ 'ovs bridge',
+ deprecated_name='quantum-controller-addr')
])