From 59b4b99d4c2380245cbd4f8889c0cd1b08b259e4 Mon Sep 17 00:00:00 2001 From: Yong Sheng Gong Date: Wed, 10 Jul 2013 18:38:21 +0800 Subject: [PATCH] remove binaries under bin 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 --- bin/quantum-check-nvp-config | 29 ------------------- bin/quantum-db-manage | 26 ----------------- bin/quantum-dhcp-agent | 20 ------------- bin/quantum-hyperv-agent | 26 ----------------- bin/quantum-l3-agent | 20 ------------- bin/quantum-lbaas-agent | 26 ----------------- bin/quantum-linuxbridge-agent | 24 --------------- bin/quantum-metadata-agent | 20 ------------- bin/quantum-mlnx-agent | 25 ---------------- bin/quantum-nec-agent | 24 --------------- bin/quantum-netns-cleanup | 20 ------------- bin/quantum-ns-metadata-proxy | 20 ------------- bin/quantum-openvswitch-agent | 24 --------------- bin/quantum-ovs-cleanup | 26 ----------------- bin/quantum-ryu-agent | 24 --------------- bin/quantum-server | 27 ----------------- bin/quantum-debug => neutron/cmd/__init__.py | 6 +--- .../cmd/usage_audit.py | 27 ++++++++--------- setup.cfg | 4 +++ 19 files changed, 19 insertions(+), 399 deletions(-) delete mode 100755 bin/quantum-check-nvp-config delete mode 100755 bin/quantum-db-manage delete mode 100755 bin/quantum-dhcp-agent delete mode 100755 bin/quantum-hyperv-agent delete mode 100755 bin/quantum-l3-agent delete mode 100755 bin/quantum-lbaas-agent delete mode 100755 bin/quantum-linuxbridge-agent delete mode 100755 bin/quantum-metadata-agent delete mode 100755 bin/quantum-mlnx-agent delete mode 100755 bin/quantum-nec-agent delete mode 100755 bin/quantum-netns-cleanup delete mode 100755 bin/quantum-ns-metadata-proxy delete mode 100755 bin/quantum-openvswitch-agent delete mode 100755 bin/quantum-ovs-cleanup delete mode 100755 bin/quantum-ryu-agent delete mode 100755 bin/quantum-server rename bin/quantum-debug => neutron/cmd/__init__.py (85%) mode change 100755 => 100644 rename bin/quantum-usage-audit => neutron/cmd/usage_audit.py (81%) mode change 100755 => 100644 diff --git a/bin/quantum-check-nvp-config b/bin/quantum-check-nvp-config deleted file mode 100755 index 57bdbc2fd1..0000000000 --- a/bin/quantum-check-nvp-config +++ /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 index 24a491ec65..0000000000 --- a/bin/quantum-db-manage +++ /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 index a160a6a565..0000000000 --- a/bin/quantum-dhcp-agent +++ /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 index 29c220838a..0000000000 --- a/bin/quantum-hyperv-agent +++ /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 index cd56f53845..0000000000 --- a/bin/quantum-l3-agent +++ /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 index dca1f932bc..0000000000 --- a/bin/quantum-lbaas-agent +++ /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 index ce7d1e081b..0000000000 --- a/bin/quantum-linuxbridge-agent +++ /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 index 8834909709..0000000000 --- a/bin/quantum-metadata-agent +++ /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 index 56d03bf033..0000000000 --- a/bin/quantum-mlnx-agent +++ /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 index 796e4ddc7f..0000000000 --- a/bin/quantum-nec-agent +++ /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 index 86fbdbe011..0000000000 --- a/bin/quantum-netns-cleanup +++ /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 index 3a8c3b0fc2..0000000000 --- a/bin/quantum-ns-metadata-proxy +++ /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 index ccba60419c..0000000000 --- a/bin/quantum-openvswitch-agent +++ /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 index b77775d6cd..0000000000 --- a/bin/quantum-ovs-cleanup +++ /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 index d6815a3c3a..0000000000 --- a/bin/quantum-ryu-agent +++ /dev/null @@ -1,24 +0,0 @@ -#!/usr/bin/env python -# vim: tabstop=4 shiftwidth=4 softtabstop=4 - -# Copyright 2012 Isaku Yamahata -# 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 index 54ee21bd72..0000000000 --- a/bin/quantum-server +++ /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() diff --git a/bin/quantum-debug b/neutron/cmd/__init__.py old mode 100755 new mode 100644 similarity index 85% rename from bin/quantum-debug rename to neutron/cmd/__init__.py index 5c4c67265a..7506a29144 --- a/bin/quantum-debug +++ b/neutron/cmd/__init__.py @@ -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() diff --git a/bin/quantum-usage-audit b/neutron/cmd/usage_audit.py old mode 100755 new mode 100644 similarity index 81% rename from bin/quantum-usage-audit rename to neutron/cmd/usage_audit.py index b1c1b1203a..01e77c77a2 --- a/bin/quantum-usage-audit +++ b/neutron/cmd/usage_audit.py @@ -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, diff --git a/setup.cfg b/setup.cfg index 4e31862865..227d17e965 100644 --- 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