]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
remove binaries under bin
authorYong Sheng Gong <gongysh@unitedstack.com>
Wed, 10 Jul 2013 10:38:21 +0000 (18:38 +0800)
committerYong Sheng Gong <gongysh@unitedstack.com>
Fri, 16 Aug 2013 02:10:30 +0000 (10:10 +0800)
bp: remove-bin-directory

There are some binaries which are expected to run in branch, so
we have to keep them there now.

Change-Id: I5134d975cbd69f929a325ab80a6d19ce1f122656

19 files changed:
bin/quantum-check-nvp-config [deleted file]
bin/quantum-db-manage [deleted file]
bin/quantum-dhcp-agent [deleted file]
bin/quantum-hyperv-agent [deleted file]
bin/quantum-l3-agent [deleted file]
bin/quantum-lbaas-agent [deleted file]
bin/quantum-linuxbridge-agent [deleted file]
bin/quantum-metadata-agent [deleted file]
bin/quantum-mlnx-agent [deleted file]
bin/quantum-nec-agent [deleted file]
bin/quantum-netns-cleanup [deleted file]
bin/quantum-ns-metadata-proxy [deleted file]
bin/quantum-openvswitch-agent [deleted file]
bin/quantum-ovs-cleanup [deleted file]
bin/quantum-ryu-agent [deleted file]
bin/quantum-server [deleted file]
neutron/cmd/__init__.py [moved from bin/quantum-debug with 85% similarity, mode: 0644]
neutron/cmd/usage_audit.py [moved from bin/quantum-usage-audit with 81% similarity, mode: 0644]
setup.cfg

diff --git a/bin/quantum-check-nvp-config b/bin/quantum-check-nvp-config
deleted file mode 100755 (executable)
index 57bdbc2..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-#!/usr/bin/env python
-# vim: tabstop=4 shiftwidth=4 softtabstop=4
-
-# Copyright 2013 Nicira, Inc.
-# All Rights Reserved
-#
-#    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 equired 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: Aaron Rosen, VMware
-
-import os
-import sys
-sys.path.insert(0, os.getcwd())
-
-from neutron.plugins.nicira.check_nvp_config import main
-
-
-main(sys.argv)
diff --git a/bin/quantum-db-manage b/bin/quantum-db-manage
deleted file mode 100755 (executable)
index 24a491e..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-#!/usr/bin/env python
-# vim: tabstop=4 shiftwidth=4 softtabstop=4
-
-# Copyright 2012 New Dream Network, LLC (DreamHost)
-# All Rights Reserved.
-#
-#    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.
-
-import os
-import sys
-sys.path.insert(0, os.getcwd())
-
-from neutron.db.migration.cli import main
-
-
-main()
diff --git a/bin/quantum-dhcp-agent b/bin/quantum-dhcp-agent
deleted file mode 100755 (executable)
index a160a6a..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/usr/bin/env python
-# vim: tabstop=4 shiftwidth=4 softtabstop=4
-
-# Copyright (c) 2012 OpenStack Foundation.
-# All Rights Reserved.
-#
-#    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 neutron.agent.dhcp_agent import main
-main()
diff --git a/bin/quantum-hyperv-agent b/bin/quantum-hyperv-agent
deleted file mode 100755 (executable)
index 29c2208..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-#!/usr/bin/env python
-# vim: tabstop=4 shiftwidth=4 softtabstop=4
-
-# Copyright 2013 Cloudbase Solutions SRL
-# All Rights Reserved.
-#
-#    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.
-
-import os
-import sys
-sys.path.insert(0, os.getcwd())
-
-from neutron.plugins.hyperv.agent.hyperv_neutron_agent import main
-
-
-main()
diff --git a/bin/quantum-l3-agent b/bin/quantum-l3-agent
deleted file mode 100755 (executable)
index cd56f53..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/usr/bin/env python
-# vim: tabstop=4 shiftwidth=4 softtabstop=4
-
-# Copyright (c) 2012 OpenStack Foundation.
-# All Rights Reserved.
-#
-#    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 neutron.agent.l3_agent import main
-main()
diff --git a/bin/quantum-lbaas-agent b/bin/quantum-lbaas-agent
deleted file mode 100755 (executable)
index dca1f93..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-#!/usr/bin/env python
-# vim: tabstop=4 shiftwidth=4 softtabstop=4
-
-# Copyright (c) 2013 OpenStack Foundation.
-# All Rights Reserved.
-#
-#    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.
-
-import os
-import sys
-sys.path.insert(0, os.getcwd())
-
-from neutron.services.loadbalancer.drivers.haproxy.agent import main
-
-
-main()
diff --git a/bin/quantum-linuxbridge-agent b/bin/quantum-linuxbridge-agent
deleted file mode 100755 (executable)
index ce7d1e0..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-#!/usr/bin/env python
-# vim: tabstop=4 shiftwidth=4 softtabstop=4
-
-# Copyright 2012 Red Hat
-# All Rights Reserved.
-#
-#    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.
-
-import os
-import sys
-sys.path.insert(0, os.getcwd())
-from neutron.plugins.linuxbridge.agent.linuxbridge_neutron_agent import main
-
-main()
diff --git a/bin/quantum-metadata-agent b/bin/quantum-metadata-agent
deleted file mode 100755 (executable)
index 8834909..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/usr/bin/env python
-# vim: tabstop=4 shiftwidth=4 softtabstop=4
-
-# Copyright (c) 2012 OpenStack Foundation.
-# All Rights Reserved.
-#
-#    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 neutron.agent.metadata.agent import main
-main()
diff --git a/bin/quantum-mlnx-agent b/bin/quantum-mlnx-agent
deleted file mode 100755 (executable)
index 56d03bf..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-# vim: tabstop=4 shiftwidth=4 softtabstop=4
-#
-# Copyright 2013 Mellanox Technologies, Ltd
-#
-# 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.
-
-import os
-import sys
-sys.path.insert(0, os.getcwd())
-
-from neutron.plugins.mlnx.agent.eswitch_neutron_agent import main
-
-
-main()
diff --git a/bin/quantum-nec-agent b/bin/quantum-nec-agent
deleted file mode 100755 (executable)
index 796e4dd..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-#!/usr/bin/env python
-# vim: tabstop=4 shiftwidth=4 softtabstop=4
-
-# Copyright 2012 NEC Corporation
-# All Rights Reserved.
-#
-#    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.
-
-import os
-import sys
-sys.path.insert(0, os.getcwd())
-from neutron.plugins.nec.agent.nec_neutron_agent import main
-
-main()
diff --git a/bin/quantum-netns-cleanup b/bin/quantum-netns-cleanup
deleted file mode 100755 (executable)
index 86fbdbe..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/usr/bin/env python
-# vim: tabstop=4 shiftwidth=4 softtabstop=4
-
-# Copyright (c) 2012 OpenStack Foundation.
-# All Rights Reserved.
-#
-#    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 neutron.agent.netns_cleanup_util import main
-main()
diff --git a/bin/quantum-ns-metadata-proxy b/bin/quantum-ns-metadata-proxy
deleted file mode 100755 (executable)
index 3a8c3b0..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/usr/bin/env python
-# vim: tabstop=4 shiftwidth=4 softtabstop=4
-
-# Copyright (c) 2012 OpenStack Foundation.
-# All Rights Reserved.
-#
-#    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 neutron.agent.metadata.namespace_proxy import main
-main()
diff --git a/bin/quantum-openvswitch-agent b/bin/quantum-openvswitch-agent
deleted file mode 100755 (executable)
index ccba604..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-#!/usr/bin/env python
-# vim: tabstop=4 shiftwidth=4 softtabstop=4
-
-# Copyright 2012 Red Hat
-# All Rights Reserved.
-#
-#    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.
-
-import os
-import sys
-sys.path.insert(0, os.getcwd())
-from neutron.plugins.openvswitch.agent.ovs_neutron_agent import main
-
-main()
diff --git a/bin/quantum-ovs-cleanup b/bin/quantum-ovs-cleanup
deleted file mode 100755 (executable)
index b77775d..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-#!/usr/bin/env python
-# vim: tabstop=4 shiftwidth=4 softtabstop=4
-
-# Copyright (c) 2012 OpenStack Foundation.
-# All Rights Reserved.
-#
-#    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.
-
-import os
-import sys
-sys.path.insert(0, os.getcwd())
-
-from neutron.agent.ovs_cleanup_util import main
-
-
-main()
diff --git a/bin/quantum-ryu-agent b/bin/quantum-ryu-agent
deleted file mode 100755 (executable)
index d6815a3..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-#!/usr/bin/env python
-# vim: tabstop=4 shiftwidth=4 softtabstop=4
-
-# Copyright 2012 Isaku Yamahata <yamahata at private email ne jp>
-# All Rights Reserved.
-#
-#    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.
-
-import os
-import sys
-sys.path.insert(0, os.getcwd())
-from neutron.plugins.ryu.agent.ryu_neutron_agent import main
-
-main()
diff --git a/bin/quantum-server b/bin/quantum-server
deleted file mode 100755 (executable)
index 54ee21b..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/usr/bin/env python
-# vim: tabstop=4 shiftwidth=4 softtabstop=4
-
-# Copyright 2011 Nicira Neworks, Inc.
-# All Rights Reserved.
-#
-#    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.
-
-import eventlet
-eventlet.monkey_patch()
-
-import os
-import sys
-sys.path.insert(0, os.getcwd())
-from neutron.server import main as server
-
-server()
old mode 100755 (executable)
new mode 100644 (file)
similarity index 85%
rename from bin/quantum-debug
rename to neutron/cmd/__init__.py
index 5c4c672..7506a29
@@ -1,7 +1,6 @@
-#!/usr/bin/env python
 # vim: tabstop=4 shiftwidth=4 softtabstop=4
 
-# Copyright (c) 2012 OpenStack Foundation.
+# Copyright (c) 2013 OpenStack Foundation.
 # All Rights Reserved.
 #
 #    Licensed under the Apache License, Version 2.0 (the "License"); you may
@@ -15,6 +14,3 @@
 #    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 neutron.debug.shell import main
-main()
old mode 100755 (executable)
new mode 100644 (file)
similarity index 81%
rename from bin/quantum-usage-audit
rename to neutron/cmd/usage_audit.py
index b1c1b12..01e77c7
@@ -23,43 +23,44 @@ subnets.
 
 from oslo.config import cfg
 
+from neutron.common import config
 from neutron import context
 from neutron import manager
-from neutron.common import config
 from neutron.openstack.common.notifier import api as notifier_api
 
-if __name__ == '__main__':
+
+def main():
     cfg.CONF(project='neutron')
     config.setup_logging(cfg.CONF)
 
-    context = context.get_admin_context()
+    cxt = context.get_admin_context()
     plugin = manager.NeutronManager.get_plugin()
-    for network in plugin.get_networks(context):
-        notifier_api.notify(context,
+    for network in plugin.get_networks(cxt):
+        notifier_api.notify(cxt,
                             notifier_api.publisher_id('network'),
                             'network.exists',
                             notifier_api.INFO,
                             {'network': network})
-    for subnet in plugin.get_subnets(context):
-        notifier_api.notify(context,
+    for subnet in plugin.get_subnets(cxt):
+        notifier_api.notify(cxt,
                             notifier_api.publisher_id('network'),
                             'subnet.exists',
                             notifier_api.INFO,
                             {'subnet': subnet})
-    for port in plugin.get_ports(context):
-        notifier_api.notify(context,
+    for port in plugin.get_ports(cxt):
+        notifier_api.notify(cxt,
                             notifier_api.publisher_id('network'),
                             'port.exists',
                             notifier_api.INFO,
                             {'port': port})
-    for router in plugin.get_routers(context):
-        notifier_api.notify(context,
+    for router in plugin.get_routers(cxt):
+        notifier_api.notify(cxt,
                             notifier_api.publisher_id('network'),
                             'router.exists',
                             notifier_api.INFO,
                             {'router': router})
-    for floatingip in plugin.get_floatingips(context):
-        notifier_api.notify(context,
+    for floatingip in plugin.get_floatingips(cxt):
+        notifier_api.notify(cxt,
                             notifier_api.publisher_id('network'),
                             'floatingip.exists',
                             notifier_api.INFO,
index 4e31862865dc467968ac3dc7319af304a922add9..227d17e965883abbccad5c9124853c97f90c4948 100644 (file)
--- a/setup.cfg
+++ b/setup.cfg
@@ -86,6 +86,8 @@ console_scripts =
     neutron-ovs-cleanup = neutron.agent.ovs_cleanup_util:main
     neutron-ryu-agent = neutron.plugins.ryu.agent.ryu_neutron_agent:main
     neutron-server = neutron.server:main
+    neutron-rootwrap = neutron.openstack.common.rootwrap.cmd:main
+    neutron-usage-audit = neutron.cmd.usage_audit:main
     quantum-check-nvp-config = neutron.plugins.nicira.check_nvp_config:main
     quantum-db-manage = neutron.db.migration.cli:main
     quantum-debug = neutron.debug.shell:main
@@ -103,6 +105,8 @@ console_scripts =
     quantum-ovs-cleanup = neutron.agent.ovs_cleanup_util:main
     quantum-ryu-agent = neutron.plugins.ryu.agent.ryu_neutron_agent:main
     quantum-server = neutron.server:main
+    quantum-rootwrap = neutron.openstack.common.rootwrap.cmd:main
+    quantum-usage-audit = neutron.cmd.usage_audit:main
 neutron.ml2.type_drivers =
     flat = neutron.plugins.ml2.drivers.type_flat:FlatTypeDriver
     local = neutron.plugins.ml2.drivers.type_local:LocalTypeDriver