suggested by some openstack folks.
see https://review.openstack.org/#/c/71791

Signed-off-by: YAMAMOTO Takashi <[email protected]>
---
 bin/neutron-ofagent-agent                 | 19 +++++++
 bin/neutron-ofswitch-agent                | 19 -------
 doc/source/conf.py                        |  4 +-
 doc/source/man/neutron_ofagent_agent.rst  | 20 +++++++
 doc/source/man/neutron_ofswitch_agent.rst | 20 -------
 run_tests.sh                              |  2 +-
 ryu/cmd/ofa_neutron_agent.py              | 88 +++++++++++++++++++++++++++++++
 ryu/cmd/ofs_neutron_agent.py              | 88 -------------------------------
 setup.cfg                                 |  2 +-
 9 files changed, 131 insertions(+), 131 deletions(-)
 create mode 100755 bin/neutron-ofagent-agent
 delete mode 100755 bin/neutron-ofswitch-agent
 create mode 100644 doc/source/man/neutron_ofagent_agent.rst
 delete mode 100644 doc/source/man/neutron_ofswitch_agent.rst
 create mode 100755 ryu/cmd/ofa_neutron_agent.py
 delete mode 100755 ryu/cmd/ofs_neutron_agent.py

diff --git a/bin/neutron-ofagent-agent b/bin/neutron-ofagent-agent
new file mode 100755
index 0000000..badf2ea
--- /dev/null
+++ b/bin/neutron-ofagent-agent
@@ -0,0 +1,19 @@
+#!/usr/bin/env python
+
+# Copyright (C) 2011, 2012 Nippon Telegraph and Telephone Corporation.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+# implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+from ryu.cmd.ofa_neutron_agent import main
+main()
diff --git a/bin/neutron-ofswitch-agent b/bin/neutron-ofswitch-agent
deleted file mode 100755
index 2778b22..0000000
--- a/bin/neutron-ofswitch-agent
+++ /dev/null
@@ -1,19 +0,0 @@
-#!/usr/bin/env python
-
-# Copyright (C) 2011, 2012 Nippon Telegraph and Telephone Corporation.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-# implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-from ryu.cmd.ofs_neutron_agent import main
-main()
diff --git a/doc/source/conf.py b/doc/source/conf.py
index afa836c..fcec4c6 100644
--- a/doc/source/conf.py
+++ b/doc/source/conf.py
@@ -215,8 +215,8 @@ latex_documents = [
 man_pages = [
     ('index', 'ryu', u'ryu Documentation',
      [u'ryu development team'], 1),
-    ('man/neutron_ofswitch_agent', 'neutron-ofswitch-agent',
-     u'neutron ofswitch agent',
+    ('man/neutron_ofagent_agent', 'neutron-ofagent-agent',
+     u'neutron ofagent agent',
      [u'ryu development team'], 1),
     ('man/rpc_cli', 'rpc-cli', u'a simple msgpack-rpc client',
      [u'ryu development team'], 1),
diff --git a/doc/source/man/neutron_ofagent_agent.rst 
b/doc/source/man/neutron_ofagent_agent.rst
new file mode 100644
index 0000000..2b95bc1
--- /dev/null
+++ b/doc/source/man/neutron_ofagent_agent.rst
@@ -0,0 +1,20 @@
+:orphan:
+
+neutron-ofagent-agent manual page
+=================================
+
+Synoposis
+---------
+**neutron-ofagent-agent** [*options*]
+
+Description
+-----------
+:program:`neutron-ofagent-agent` is a neutron agent for ofagent ML2 driver.
+
+Options
+-------
+-h, --help
+
+Author
+------
+Ryu development team
diff --git a/doc/source/man/neutron_ofswitch_agent.rst 
b/doc/source/man/neutron_ofswitch_agent.rst
deleted file mode 100644
index d247745..0000000
--- a/doc/source/man/neutron_ofswitch_agent.rst
+++ /dev/null
@@ -1,20 +0,0 @@
-:orphan:
-
-neutron-ofswitch-agent manual page
-==================================
-
-Synoposis
----------
-**neutron-ofswitch-agent** [*options*]
-
-Description
------------
-:program:`neutron-ofswitch-agent` is a neutron agent for ofswitch ML2 driver.
-
-Options
--------
--h, --help
-
-Author
-------
-Ryu development team
diff --git a/run_tests.sh b/run_tests.sh
index a6fbbef..e47b4c3 100755
--- a/run_tests.sh
+++ b/run_tests.sh
@@ -90,7 +90,7 @@ run_tests() {
 run_pylint() {
   echo "Running pylint ..."
   PYLINT_OPTIONS="--rcfile=.pylintrc --output-format=parseable"
-  PYLINT_INCLUDE="ryu bin/rpc-cli bin/neutron-ofswitch-agent 
ryu/tests/bin/ryu-client ryu/tests/bin/of-config-cli"
+  PYLINT_INCLUDE="ryu bin/rpc-cli bin/neutron-ofagent-agent 
ryu/tests/bin/ryu-client ryu/tests/bin/of-config-cli"
   export PYTHONPATH=$PYTHONPATH:.ryu
   PYLINT_LOG=pylint.log
 
diff --git a/ryu/cmd/ofa_neutron_agent.py b/ryu/cmd/ofa_neutron_agent.py
new file mode 100755
index 0000000..42656b3
--- /dev/null
+++ b/ryu/cmd/ofa_neutron_agent.py
@@ -0,0 +1,88 @@
+#!/usr/bin/env python
+#
+# Copyright (C) 2014 Nippon Telegraph and Telephone Corporation.
+# Copyright (C) 2014 VA Linux Systems Japan K.K.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+# implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# @author: Fumihiko Kakuma, VA Linux Systems Japan K.K.
+
+from ryu.lib import hub
+hub.patch()
+
+# TODO:
+#   Right now, we have our own patched copy of ovs python bindings
+#   Once our modification is upstreamed and widely deployed,
+#   use it
+#
+# NOTE: this modifies sys.path and thus affects the following imports.
+# eg. oslo.config.cfg.
+import ryu.contrib
+
+from oslo.config import cfg
+import sys
+
+from neutron.openstack.common import log as os_logging
+from neutron.common import config as osn_config
+
+from ryu import flags
+from ryu import version
+from ryu.app import wsgi
+from ryu.base.app_manager import AppManager
+from ryu.controller import controller
+from ryu.topology import switches
+
+
+LOG = os_logging.getLogger(__name__)
+CONF = cfg.CONF
+CONF.register_cli_opts([
+    cfg.ListOpt('app-lists', default=[],
+                help='application module name to run'),
+    cfg.MultiStrOpt('app', positional=True, default=[],
+                    help='application module name to run')
+])
+
+
+def main():
+    try:
+        CONF(project='ryu', version='ofa_neutron_agent %s' % version,
+             default_config_files=['/usr/local/etc/ryu/ryu.conf'])
+    except cfg.ConfigFilesNotFoundError:
+        CONF(project='ryu', version='ofa_neutron_agent %s' % version)
+
+    osn_config.setup_logging(CONF)
+
+    app_lists = CONF.app_lists + CONF.app
+    if not app_lists:
+        app_lists = ['ryu.app.ofctl.service',
+                     'neutron.plugins.ofagent.agent.ofa_neutron_agent']
+
+    app_mgr = AppManager.get_instance()
+    app_mgr.load_apps(app_lists)
+    contexts = app_mgr.create_contexts()
+    services = []
+    services.extend(app_mgr.instantiate_apps(**contexts))
+
+    webapp = wsgi.start_service(app_mgr)
+    if webapp:
+        thr = hub.spawn(webapp)
+        services.append(thr)
+
+    try:
+        hub.joinall(services)
+    finally:
+        app_mgr.close()
+
+
+if __name__ == "__main__":
+    main()
diff --git a/ryu/cmd/ofs_neutron_agent.py b/ryu/cmd/ofs_neutron_agent.py
deleted file mode 100755
index b38fefe..0000000
--- a/ryu/cmd/ofs_neutron_agent.py
+++ /dev/null
@@ -1,88 +0,0 @@
-#!/usr/bin/env python
-#
-# Copyright (C) 2014 Nippon Telegraph and Telephone Corporation.
-# Copyright (C) 2014 VA Linux Systems Japan K.K.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-# implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-# @author: Fumihiko Kakuma, VA Linux Systems Japan K.K.
-
-from ryu.lib import hub
-hub.patch()
-
-# TODO:
-#   Right now, we have our own patched copy of ovs python bindings
-#   Once our modification is upstreamed and widely deployed,
-#   use it
-#
-# NOTE: this modifies sys.path and thus affects the following imports.
-# eg. oslo.config.cfg.
-import ryu.contrib
-
-from oslo.config import cfg
-import sys
-
-from neutron.openstack.common import log as os_logging
-from neutron.common import config as osn_config
-
-from ryu import flags
-from ryu import version
-from ryu.app import wsgi
-from ryu.base.app_manager import AppManager
-from ryu.controller import controller
-from ryu.topology import switches
-
-
-LOG = os_logging.getLogger(__name__)
-CONF = cfg.CONF
-CONF.register_cli_opts([
-    cfg.ListOpt('app-lists', default=[],
-                help='application module name to run'),
-    cfg.MultiStrOpt('app', positional=True, default=[],
-                    help='application module name to run')
-])
-
-
-def main():
-    try:
-        CONF(project='ryu', version='ofs_neutron_agent %s' % version,
-             default_config_files=['/usr/local/etc/ryu/ryu.conf'])
-    except cfg.ConfigFilesNotFoundError:
-        CONF(project='ryu', version='ofs_neutron_agent %s' % version)
-
-    osn_config.setup_logging(CONF)
-
-    app_lists = CONF.app_lists + CONF.app
-    if not app_lists:
-        app_lists = ['ryu.app.ofctl.service',
-                     'neutron.plugins.ofswitch.agent.ofs_neutron_agent']
-
-    app_mgr = AppManager.get_instance()
-    app_mgr.load_apps(app_lists)
-    contexts = app_mgr.create_contexts()
-    services = []
-    services.extend(app_mgr.instantiate_apps(**contexts))
-
-    webapp = wsgi.start_service(app_mgr)
-    if webapp:
-        thr = hub.spawn(webapp)
-        services.append(thr)
-
-    try:
-        hub.joinall(services)
-    finally:
-        app_mgr.close()
-
-
-if __name__ == "__main__":
-    main()
diff --git a/setup.cfg b/setup.cfg
index 1075ef4..b0a0d17 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -47,6 +47,6 @@ setup-hooks =
 
 [entry_points]
 console_scripts =
-    neutron-ofswitch-agent = ryu.cmd.ofs_neutron_agent:main
+    neutron-ofagent-agent = ryu.cmd.ofa_neutron_agent:main
     ryu-manager = ryu.cmd.manager:main
     rpc-cli = ryu.cmd.rpc_cli:main
-- 
1.8.3.1


------------------------------------------------------------------------------
Android apps run on BlackBerry 10
Introducing the new BlackBerry 10.2.1 Runtime for Android apps.
Now with support for Jelly Bean, Bluetooth, Mapview and more.
Get your Android app in front of a whole new audience.  Start now.
http://pubads.g.doubleclick.net/gampad/clk?id=124407151&iu=/4140/ostg.clktrk
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to