Signed-off-by: Yoshihiro Kaneko <[email protected]>
---
 ryu/app/quantum_adapter.py |   26 +++++++++++++-------------
 ryu/flags.py               |   42 +++++++++++++++++++++++++-----------------
 2 files changed, 38 insertions(+), 30 deletions(-)

diff --git a/ryu/app/quantum_adapter.py b/ryu/app/quantum_adapter.py
index 2ead71f..cc2fa44 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 533f7de..71a5a2a 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')
 ])
-- 
1.7.9.5


------------------------------------------------------------------------------
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to