Rename Quantum to Neutron
This change renames everything to Neutron while providing backwards compatible adjustments for Grizzly configuration files. implements blueprint: remove-use-of-quantum Change-Id: Ie7d07ba7c89857e13d4ddc8f0e9b68de020a3d19
This commit is contained in:
parent
bb6a5f88b1
commit
380b0e7db6
@ -3,10 +3,15 @@ quantum.egg-info
|
||||
quantum_tests.sqlite
|
||||
quantum.sqlite
|
||||
*.quantum-venv
|
||||
neutron.egg-info
|
||||
neutron_tests.sqlite
|
||||
neutron.sqlite
|
||||
*.neutron-venv
|
||||
.venv
|
||||
dist/
|
||||
ChangeLog
|
||||
*.pid
|
||||
*.log
|
||||
neutron/vcsversion.py
|
||||
quantum/vcsversion.py
|
||||
.ropeproject
|
||||
|
3
.gitignore
vendored
3
.gitignore
vendored
@ -8,6 +8,9 @@ dist/
|
||||
doc/build
|
||||
*.DS_Store
|
||||
*.pyc
|
||||
neutron.egg-info/
|
||||
neutron/vcsversion.py
|
||||
neutron/versioninfo
|
||||
quantum.egg-info/
|
||||
quantum/vcsversion.py
|
||||
quantum/versioninfo
|
||||
|
@ -23,7 +23,8 @@ argument-rgx=[a-z_][a-z0-9_]{1,30}$
|
||||
# and be lowecased with underscores
|
||||
method-rgx=([a-z_][a-z0-9_]{2,50}|setUp|tearDown)$
|
||||
|
||||
# Module names matching quantum-* are ok (files in bin/)
|
||||
# Module names matching neutron-* are ok (files in bin/)
|
||||
module-rgx=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+)|(neutron-[a-z0-9_-]+))$
|
||||
module-rgx=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+)|(quantum-[a-z0-9_-]+))$
|
||||
|
||||
# Don't require docstrings on tests.
|
||||
|
@ -1,4 +1,4 @@
|
||||
[DEFAULT]
|
||||
test_command=OS_STDOUT_CAPTURE=1 OS_STDERR_CAPTURE=1 ${PYTHON:-python} -m subunit.run discover -t ./ quantum/tests/unit $LISTOPT $IDOPTION
|
||||
test_command=OS_STDOUT_CAPTURE=1 OS_STDERR_CAPTURE=1 ${PYTHON:-python} -m subunit.run discover -t ./ neutron/tests/unit $LISTOPT $IDOPTION
|
||||
test_id_option=--load-list $IDFILE
|
||||
test_list_option=--list
|
||||
|
30
HACKING.rst
30
HACKING.rst
@ -1,4 +1,4 @@
|
||||
Quantum Style Commandments
|
||||
Neutron Style Commandments
|
||||
==========================
|
||||
|
||||
- Step 1: Read http://www.python.org/dev/peps/pep-0008/
|
||||
@ -35,13 +35,13 @@ Example::
|
||||
|
||||
The following imports,
|
||||
|
||||
from quantum.api import networks
|
||||
from quantum import wsgi
|
||||
from neutron.api import networks
|
||||
from neutron import wsgi
|
||||
|
||||
are considered equivalent for ordering purposes to
|
||||
|
||||
import quantum.api.networks
|
||||
import quantum.wsgi
|
||||
import neutron.api.networks
|
||||
import neutron.wsgi
|
||||
|
||||
- Organize your imports according to the following template
|
||||
|
||||
@ -52,7 +52,7 @@ Example::
|
||||
\n
|
||||
{{third-party lib imports in human alphabetical order}}
|
||||
\n
|
||||
{{quantum imports in human alphabetical order}}
|
||||
{{neutron imports in human alphabetical order}}
|
||||
\n
|
||||
\n
|
||||
{{begin your code}}
|
||||
@ -71,13 +71,13 @@ Example::
|
||||
import testtools
|
||||
import webob.exc
|
||||
|
||||
import quantum.api.networks
|
||||
from quantum.api import ports
|
||||
from quantum.db import models
|
||||
from quantum.extensions import multiport
|
||||
from quantum.openstack.common import log as logging
|
||||
import quantum.manager
|
||||
from quantum import service
|
||||
import neutron.api.networks
|
||||
from neutron.api import ports
|
||||
from neutron.db import models
|
||||
from neutron.extensions import multiport
|
||||
from neutron.openstack.common import log as logging
|
||||
import neutron.manager
|
||||
from neutron import service
|
||||
|
||||
|
||||
Docstrings
|
||||
@ -202,8 +202,8 @@ submitted bug fix does have a unit test, be sure to add a new one that fails
|
||||
without the patch and passes with the patch.
|
||||
|
||||
All unittest classes must ultimately inherit from testtools.TestCase. In the
|
||||
Quantum test suite, this should be done by inheriting from
|
||||
quantum.tests.base.BaseTestCase.
|
||||
Neutron test suite, this should be done by inheriting from
|
||||
neutron.tests.base.BaseTestCase.
|
||||
|
||||
All setUp and tearDown methods must upcall using the super() method.
|
||||
tearDown methods should be avoided and addCleanup calls should be preferred.
|
||||
|
10
MANIFEST.in
10
MANIFEST.in
@ -2,11 +2,11 @@ include AUTHORS
|
||||
include README.rst
|
||||
include ChangeLog
|
||||
include LICENSE
|
||||
include quantum/db/migration/README
|
||||
include quantum/db/migration/alembic.ini
|
||||
include quantum/db/migration/alembic_migrations/script.py.mako
|
||||
include quantum/db/migration/alembic_migrations/versions/README
|
||||
recursive-include quantum/locale *
|
||||
include neutron/db/migration/README
|
||||
include neutron/db/migration/alembic.ini
|
||||
include neutron/db/migration/alembic_migrations/script.py.mako
|
||||
include neutron/db/migration/alembic_migrations/versions/README
|
||||
recursive-include neutron/locale *
|
||||
|
||||
exclude .gitignore
|
||||
exclude .gitreview
|
||||
|
16
README.rst
16
README.rst
@ -1,25 +1,25 @@
|
||||
# -- Welcome!
|
||||
|
||||
You have come across a cloud computing network fabric controller. It has
|
||||
identified itself as "Quantum." It aims to tame your (cloud) networking!
|
||||
identified itself as "Neutron." It aims to tame your (cloud) networking!
|
||||
|
||||
# -- External Resources:
|
||||
|
||||
The homepage for Quantum is: http://launchpad.net/quantum . Use this
|
||||
The homepage for Neutron is: http://launchpad.net/neutron . Use this
|
||||
site for asking for help, and filing bugs. Code is available on github at
|
||||
<http://github.com/openstack/quantum>.
|
||||
<http://github.com/openstack/neutron>.
|
||||
|
||||
The latest and most in-depth documentation on how to use Quantum is
|
||||
The latest and most in-depth documentation on how to use Neutron is
|
||||
available at: <http://docs.openstack.org>. This includes:
|
||||
|
||||
Quantum Administrator Guide
|
||||
Neutron Administrator Guide
|
||||
http://docs.openstack.org/trunk/openstack-network/admin/content/
|
||||
|
||||
Quantum API Reference:
|
||||
Neutron API Reference:
|
||||
http://docs.openstack.org/api/openstack-network/2.0/content/
|
||||
|
||||
The start of some developer documentation is available at:
|
||||
http://wiki.openstack.org/QuantumDevelopment
|
||||
http://wiki.openstack.org/NeutronDevelopment
|
||||
|
||||
For help using or hacking on Quantum, you can send mail to
|
||||
For help using or hacking on Neutron, you can send mail to
|
||||
<mailto:openstack-dev@lists.openstack.org>.
|
||||
|
12
TESTING
12
TESTING
@ -1,11 +1,11 @@
|
||||
Testing Quantum
|
||||
Testing Neutron
|
||||
=============================================================
|
||||
|
||||
Overview
|
||||
|
||||
The unit tests are meant to cover as much code as possible and should
|
||||
be executed without the service running. They are designed to test
|
||||
the various pieces of the quantum tree to make sure any new changes
|
||||
the various pieces of the neutron tree to make sure any new changes
|
||||
don't break existing functionality.
|
||||
|
||||
Running tests
|
||||
@ -30,17 +30,17 @@ Running individual tests
|
||||
class separating it from the module path with a colon.
|
||||
|
||||
For example, the following would run only the JSONV2TestCase tests from
|
||||
quantum/tests/unit/test_api_v2.py:
|
||||
neutron/tests/unit/test_api_v2.py:
|
||||
|
||||
$ ./run_tests.sh quantum.tests.unit.test_api_v2:JSONV2TestCase
|
||||
$ ./run_tests.sh neutron.tests.unit.test_api_v2:JSONV2TestCase
|
||||
|
||||
or
|
||||
|
||||
$ ./tox quantum.tests.unit.test_api_v2:JSONV2TestCase
|
||||
$ ./tox neutron.tests.unit.test_api_v2:JSONV2TestCase
|
||||
|
||||
Adding more tests
|
||||
|
||||
Quantum has a fast growing code base and there is plenty of areas that
|
||||
Neutron has a fast growing code base and there is plenty of areas that
|
||||
need to be covered by unit tests.
|
||||
|
||||
To get a grasp of the areas where unit tests are needed, you can check
|
||||
|
20
bin/neutron-dhcp-agent-dnsmasq-lease-update
Executable file
20
bin/neutron-dhcp-agent-dnsmasq-lease-update
Executable file
@ -0,0 +1,20 @@
|
||||
#!/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.linux import dhcp
|
||||
dhcp.Dnsmasq.lease_update()
|
133
bin/neutron-rootwrap
Executable file
133
bin/neutron-rootwrap
Executable file
@ -0,0 +1,133 @@
|
||||
#!/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.
|
||||
|
||||
"""Root wrapper for Neutron
|
||||
|
||||
Filters which commands neutron is allowed to run as another user.
|
||||
|
||||
To use this, you should set the following in neutron.conf and the
|
||||
various .ini files for the agent plugins:
|
||||
root_helper=sudo neutron-rootwrap /etc/neutron/rootwrap.conf
|
||||
|
||||
You also need to let the neutron user run neutron-rootwrap as root in
|
||||
/etc/sudoers:
|
||||
neutron ALL = (root) NOPASSWD: /usr/bin/neutron-rootwrap
|
||||
/etc/neutron/rootwrap.conf *
|
||||
|
||||
Filter specs live in /etc/neutron/rootwrap.d/*.filters, or
|
||||
other locations pointed to by /etc/neutron/rootwrap.conf.
|
||||
To make allowed commands node-specific, your packaging should only
|
||||
install apropriate .filters for commands which are needed on each
|
||||
node.
|
||||
"""
|
||||
|
||||
from __future__ import print_function
|
||||
|
||||
import ConfigParser
|
||||
import logging
|
||||
import os
|
||||
import pwd
|
||||
import signal
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
|
||||
RC_UNAUTHORIZED = 99
|
||||
RC_NOCOMMAND = 98
|
||||
RC_BADCONFIG = 97
|
||||
RC_NOEXECFOUND = 96
|
||||
|
||||
|
||||
def _subprocess_setup():
|
||||
# Python installs a SIGPIPE handler by default. This is usually not what
|
||||
# non-Python subprocesses expect.
|
||||
signal.signal(signal.SIGPIPE, signal.SIG_DFL)
|
||||
|
||||
|
||||
def _exit_error(execname, message, errorcode, log=True):
|
||||
print("%s: %s" % (execname, message))
|
||||
if log:
|
||||
logging.error(message)
|
||||
sys.exit(errorcode)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
# Split arguments, require at least a command
|
||||
execname = sys.argv.pop(0)
|
||||
if len(sys.argv) < 2:
|
||||
_exit_error(execname, "No command specified", RC_NOCOMMAND, log=False)
|
||||
|
||||
configfile = sys.argv.pop(0)
|
||||
userargs = sys.argv[:]
|
||||
|
||||
# Add ../ to sys.path to allow running from branch
|
||||
possible_topdir = os.path.normpath(os.path.join(os.path.abspath(execname),
|
||||
os.pardir, os.pardir))
|
||||
if os.path.exists(os.path.join(possible_topdir, "neutron", "__init__.py")):
|
||||
sys.path.insert(0, possible_topdir)
|
||||
|
||||
from neutron.rootwrap import wrapper
|
||||
|
||||
# Load configuration
|
||||
try:
|
||||
rawconfig = ConfigParser.RawConfigParser()
|
||||
rawconfig.read(configfile)
|
||||
config = wrapper.RootwrapConfig(rawconfig)
|
||||
except ValueError as exc:
|
||||
msg = "Incorrect value in %s: %s" % (configfile, exc.message)
|
||||
_exit_error(execname, msg, RC_BADCONFIG, log=False)
|
||||
except ConfigParser.Error:
|
||||
_exit_error(execname, "Incorrect configuration file: %s" % configfile,
|
||||
RC_BADCONFIG, log=False)
|
||||
|
||||
if config.use_syslog:
|
||||
wrapper.setup_syslog(execname,
|
||||
config.syslog_log_facility,
|
||||
config.syslog_log_level)
|
||||
|
||||
# Execute command if it matches any of the loaded filters
|
||||
filters = wrapper.load_filters(config.filters_path)
|
||||
try:
|
||||
filtermatch = wrapper.match_filter(filters, userargs,
|
||||
exec_dirs=config.exec_dirs)
|
||||
if filtermatch:
|
||||
command = filtermatch.get_command(userargs,
|
||||
exec_dirs=config.exec_dirs)
|
||||
if config.use_syslog:
|
||||
logging.info("(%s > %s) Executing %s (filter match = %s)" % (
|
||||
os.getlogin(), pwd.getpwuid(os.getuid())[0],
|
||||
command, filtermatch.name))
|
||||
|
||||
obj = subprocess.Popen(command,
|
||||
stdin=sys.stdin,
|
||||
stdout=sys.stdout,
|
||||
stderr=sys.stderr,
|
||||
preexec_fn=_subprocess_setup,
|
||||
env=filtermatch.get_environment(userargs))
|
||||
obj.wait()
|
||||
sys.exit(obj.returncode)
|
||||
|
||||
except wrapper.FilterMatchNotExecutable as exc:
|
||||
msg = ("Executable not found: %s (filter match = %s)"
|
||||
% (exc.match.exec_path, exc.match.name))
|
||||
_exit_error(execname, msg, RC_NOEXECFOUND, log=config.use_syslog)
|
||||
|
||||
except wrapper.NoFilterMatched:
|
||||
msg = ("Unauthorized command: %s (no filter matched)"
|
||||
% ' '.join(userargs))
|
||||
_exit_error(execname, msg, RC_UNAUTHORIZED, log=config.use_syslog)
|
@ -23,7 +23,7 @@ import os
|
||||
import sys
|
||||
sys.path.insert(0, os.getcwd())
|
||||
|
||||
from quantum.plugins.nicira.check_nvp_config import main
|
||||
from neutron.plugins.nicira.check_nvp_config import main
|
||||
|
||||
|
||||
main(sys.argv)
|
||||
|
@ -20,7 +20,7 @@ import os
|
||||
import sys
|
||||
sys.path.insert(0, os.getcwd())
|
||||
|
||||
from quantum.db.migration.cli import main
|
||||
from neutron.db.migration.cli import main
|
||||
|
||||
|
||||
main()
|
||||
|
@ -16,5 +16,5 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from quantum.debug.shell import main
|
||||
from neutron.debug.shell import main
|
||||
main()
|
||||
|
@ -16,5 +16,5 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from quantum.agent.dhcp_agent import main
|
||||
from neutron.agent.dhcp_agent import main
|
||||
main()
|
||||
|
@ -16,5 +16,5 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from quantum.agent.linux import dhcp
|
||||
from neutron.agent.linux import dhcp
|
||||
dhcp.Dnsmasq.lease_update()
|
||||
|
@ -20,7 +20,7 @@ import os
|
||||
import sys
|
||||
sys.path.insert(0, os.getcwd())
|
||||
|
||||
from quantum.plugins.hyperv.agent.hyperv_quantum_agent import main
|
||||
from neutron.plugins.hyperv.agent.hyperv_neutron_agent import main
|
||||
|
||||
|
||||
main()
|
||||
|
@ -16,5 +16,5 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from quantum.agent.l3_agent import main
|
||||
from neutron.agent.l3_agent import main
|
||||
main()
|
||||
|
@ -20,7 +20,7 @@ import os
|
||||
import sys
|
||||
sys.path.insert(0, os.getcwd())
|
||||
|
||||
from quantum.services.loadbalancer.drivers.haproxy.agent import main
|
||||
from neutron.services.loadbalancer.drivers.haproxy.agent import main
|
||||
|
||||
|
||||
main()
|
||||
|
@ -19,6 +19,6 @@
|
||||
import os
|
||||
import sys
|
||||
sys.path.insert(0, os.getcwd())
|
||||
from quantum.plugins.linuxbridge.agent.linuxbridge_quantum_agent import main
|
||||
from neutron.plugins.linuxbridge.agent.linuxbridge_neutron_agent import main
|
||||
|
||||
main()
|
||||
|
@ -16,5 +16,5 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from quantum.agent.metadata.agent import main
|
||||
from neutron.agent.metadata.agent import main
|
||||
main()
|
||||
|
@ -19,7 +19,7 @@ import os
|
||||
import sys
|
||||
sys.path.insert(0, os.getcwd())
|
||||
|
||||
from quantum.plugins.mlnx.agent.eswitch_quantum_agent import main
|
||||
from neutron.plugins.mlnx.agent.eswitch_neutron_agent import main
|
||||
|
||||
|
||||
main()
|
||||
|
@ -19,6 +19,6 @@
|
||||
import os
|
||||
import sys
|
||||
sys.path.insert(0, os.getcwd())
|
||||
from quantum.plugins.nec.agent.nec_quantum_agent import main
|
||||
from neutron.plugins.nec.agent.nec_neutron_agent import main
|
||||
|
||||
main()
|
||||
|
@ -16,5 +16,5 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from quantum.agent.netns_cleanup_util import main
|
||||
from neutron.agent.netns_cleanup_util import main
|
||||
main()
|
||||
|
@ -16,5 +16,5 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from quantum.agent.metadata.namespace_proxy import main
|
||||
from neutron.agent.metadata.namespace_proxy import main
|
||||
main()
|
||||
|
@ -19,6 +19,6 @@
|
||||
import os
|
||||
import sys
|
||||
sys.path.insert(0, os.getcwd())
|
||||
from quantum.plugins.openvswitch.agent.ovs_quantum_agent import main
|
||||
from neutron.plugins.openvswitch.agent.ovs_neutron_agent import main
|
||||
|
||||
main()
|
||||
|
@ -20,7 +20,7 @@ import os
|
||||
import sys
|
||||
sys.path.insert(0, os.getcwd())
|
||||
|
||||
from quantum.agent.ovs_cleanup_util import main
|
||||
from neutron.agent.ovs_cleanup_util import main
|
||||
|
||||
|
||||
main()
|
||||
|
@ -16,21 +16,21 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
"""Root wrapper for Quantum
|
||||
"""Root wrapper for Neutron
|
||||
|
||||
Filters which commands quantum is allowed to run as another user.
|
||||
Filters which commands neutron is allowed to run as another user.
|
||||
|
||||
To use this, you should set the following in quantum.conf and the
|
||||
To use this, you should set the following in neutron.conf and the
|
||||
various .ini files for the agent plugins:
|
||||
root_helper=sudo quantum-rootwrap /etc/quantum/rootwrap.conf
|
||||
root_helper=sudo neutron-rootwrap /etc/neutron/rootwrap.conf
|
||||
|
||||
You also need to let the quantum user run quantum-rootwrap as root in
|
||||
You also need to let the neutron user run neutron-rootwrap as root in
|
||||
/etc/sudoers:
|
||||
quantum ALL = (root) NOPASSWD: /usr/bin/quantum-rootwrap
|
||||
/etc/quantum/rootwrap.conf *
|
||||
neutron ALL = (root) NOPASSWD: /usr/bin/neutron-rootwrap
|
||||
/etc/neutron/rootwrap.conf *
|
||||
|
||||
Filter specs live in /etc/quantum/rootwrap.d/*.filters, or
|
||||
other locations pointed to by /etc/quantum/rootwrap.conf.
|
||||
Filter specs live in /etc/neutron/rootwrap.d/*.filters, or
|
||||
other locations pointed to by /etc/neutron/rootwrap.conf.
|
||||
To make allowed commands node-specific, your packaging should only
|
||||
install apropriate .filters for commands which are needed on each
|
||||
node.
|
||||
@ -78,10 +78,10 @@ if __name__ == '__main__':
|
||||
# Add ../ to sys.path to allow running from branch
|
||||
possible_topdir = os.path.normpath(os.path.join(os.path.abspath(execname),
|
||||
os.pardir, os.pardir))
|
||||
if os.path.exists(os.path.join(possible_topdir, "quantum", "__init__.py")):
|
||||
if os.path.exists(os.path.join(possible_topdir, "neutron", "__init__.py")):
|
||||
sys.path.insert(0, possible_topdir)
|
||||
|
||||
from quantum.rootwrap import wrapper
|
||||
from neutron.rootwrap import wrapper
|
||||
|
||||
# Load configuration
|
||||
try:
|
||||
|
@ -22,19 +22,19 @@ import contextlib
|
||||
import os
|
||||
import sys
|
||||
|
||||
# If ../quantum/__init__.py exists, add ../ to Python search path, so that
|
||||
# If ../neutron/__init__.py exists, add ../ to Python search path, so that
|
||||
# it will override what happens to be installed in /usr/(local/)lib/python...
|
||||
POSSIBLE_TOPDIR = os.path.normpath(os.path.join(os.path.abspath(sys.argv[0]),
|
||||
os.pardir,
|
||||
os.pardir))
|
||||
if os.path.exists(os.path.join(POSSIBLE_TOPDIR, 'quantum', '__init__.py')):
|
||||
if os.path.exists(os.path.join(POSSIBLE_TOPDIR, 'neutron', '__init__.py')):
|
||||
sys.path.insert(0, POSSIBLE_TOPDIR)
|
||||
|
||||
from oslo.config import cfg
|
||||
|
||||
from quantum.openstack.common import log as logging
|
||||
from quantum.openstack.common import rpc
|
||||
from quantum.openstack.common.rpc import impl_zmq
|
||||
from neutron.openstack.common import log as logging
|
||||
from neutron.openstack.common import rpc
|
||||
from neutron.openstack.common.rpc import impl_zmq
|
||||
|
||||
CONF = cfg.CONF
|
||||
CONF.register_opts(rpc.rpc_opts)
|
||||
@ -42,8 +42,8 @@ CONF.register_opts(impl_zmq.zmq_opts)
|
||||
|
||||
|
||||
def main():
|
||||
CONF(sys.argv[1:], project='quantum')
|
||||
logging.setup("quantum")
|
||||
CONF(sys.argv[1:], project='neutron')
|
||||
logging.setup("neutron")
|
||||
|
||||
with contextlib.closing(impl_zmq.ZmqProxy(CONF)) as reactor:
|
||||
reactor.consume_in_thread()
|
||||
|
@ -19,6 +19,6 @@
|
||||
import os
|
||||
import sys
|
||||
sys.path.insert(0, os.getcwd())
|
||||
from quantum.plugins.ryu.agent.ryu_quantum_agent import main
|
||||
from neutron.plugins.ryu.agent.ryu_neutron_agent import main
|
||||
|
||||
main()
|
||||
|
@ -22,6 +22,6 @@ eventlet.monkey_patch()
|
||||
import os
|
||||
import sys
|
||||
sys.path.insert(0, os.getcwd())
|
||||
from quantum.server import main as server
|
||||
from neutron.server import main as server
|
||||
|
||||
server()
|
||||
|
@ -23,17 +23,17 @@ subnets.
|
||||
|
||||
from oslo.config import cfg
|
||||
|
||||
from quantum import context
|
||||
from quantum import manager
|
||||
from quantum.common import config
|
||||
from quantum.openstack.common.notifier import api as notifier_api
|
||||
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__':
|
||||
cfg.CONF(project='quantum')
|
||||
cfg.CONF(project='neutron')
|
||||
config.setup_logging(cfg.CONF)
|
||||
|
||||
context = context.get_admin_context()
|
||||
plugin = manager.QuantumManager.get_plugin()
|
||||
plugin = manager.NeutronManager.get_plugin()
|
||||
for network in plugin.get_networks(context):
|
||||
notifier_api.notify(context,
|
||||
notifier_api.publisher_id('network'),
|
||||
|
16
doc/pom.xml
16
doc/pom.xml
@ -92,28 +92,28 @@
|
||||
<sectionLabelIncludesComponentLabel>0</sectionLabelIncludesComponentLabel>
|
||||
<postProcess>
|
||||
<!-- Copies the figures to the correct location for webhelp -->
|
||||
<copy todir="${basedir}/target/docbkx/webhelp/quantum-api-1.0/figures">
|
||||
<fileset dir="${basedir}/source/docbkx/quantum-api-1.0/figures">
|
||||
<copy todir="${basedir}/target/docbkx/webhelp/neutron-api-1.0/figures">
|
||||
<fileset dir="${basedir}/source/docbkx/neutron-api-1.0/figures">
|
||||
<include name="**/*.png" />
|
||||
</fileset>
|
||||
</copy>
|
||||
|
||||
<!-- New stuff -->
|
||||
<copy
|
||||
todir="${basedir}/target/docbkx/webhelp/trunk/developer/quantum-api-1.0">
|
||||
todir="${basedir}/target/docbkx/webhelp/trunk/developer/neutron-api-1.0">
|
||||
<fileset
|
||||
dir="${basedir}/target/docbkx/webhelp/quantum-api-1.0/quantum-api-guide/">
|
||||
dir="${basedir}/target/docbkx/webhelp/neutron-api-1.0/neutron-api-guide/">
|
||||
<include name="**/*" />
|
||||
</fileset>
|
||||
</copy>
|
||||
<!--Moves PDFs to the needed placement -->
|
||||
<move failonerror="false"
|
||||
file="${basedir}/target/docbkx/pdf/quantum-api-1.0/quantum-api-guide.pdf"
|
||||
tofile="${basedir}/target/docbkx/webhelp/trunk/developer/quantum-api-1.0/quantum-api-guide-trunk.pdf"/>
|
||||
file="${basedir}/target/docbkx/pdf/neutron-api-1.0/neutron-api-guide.pdf"
|
||||
tofile="${basedir}/target/docbkx/webhelp/trunk/developer/neutron-api-1.0/neutron-api-guide-trunk.pdf"/>
|
||||
|
||||
<!--Deletes leftover uneeded directories -->
|
||||
<delete
|
||||
dir="${basedir}/target/docbkx/webhelp/quantum-api-1.0"/>
|
||||
dir="${basedir}/target/docbkx/webhelp/neutron-api-1.0"/>
|
||||
</postProcess>
|
||||
</configuration>
|
||||
</execution>
|
||||
@ -123,7 +123,7 @@
|
||||
<xincludeSupported>true</xincludeSupported>
|
||||
<sourceDirectory>source/docbkx</sourceDirectory>
|
||||
<includes>
|
||||
quantum-api-1.0/quantum-api-guide.xml
|
||||
neutron-api-1.0/neutron-api-guide.xml
|
||||
</includes>
|
||||
<profileSecurity>reviewer</profileSecurity>
|
||||
<branding>openstack</branding>
|
||||
|
@ -34,8 +34,8 @@ import sys
|
||||
# add these directories to sys.path here. If the directory is relative to the
|
||||
# documentation root, use os.path.abspath to make it absolute, like shown here.
|
||||
BASE_DIR = os.path.dirname(os.path.abspath(__file__))
|
||||
QUANTUM_DIR = os.path.abspath(os.path.join(BASE_DIR, "..", ".."))
|
||||
sys.path.insert(0, QUANTUM_DIR)
|
||||
NEUTRON_DIR = os.path.abspath(os.path.join(BASE_DIR, "..", ".."))
|
||||
sys.path.insert(0, NEUTRON_DIR)
|
||||
|
||||
# -- General configuration ---------------------------------------------------
|
||||
|
||||
@ -68,7 +68,7 @@ source_suffix = '.rst'
|
||||
master_doc = 'index'
|
||||
|
||||
# General information about the project.
|
||||
project = u'Quantum'
|
||||
project = u'Neutron'
|
||||
copyright = u'2011-present, OpenStack Foundation.'
|
||||
|
||||
# The version info for the project you're documenting, acts as replacement for
|
||||
@ -76,10 +76,10 @@ copyright = u'2011-present, OpenStack Foundation.'
|
||||
# built documents.
|
||||
#
|
||||
# Version info
|
||||
from quantum.version import version_info as quantum_version
|
||||
release = quantum_version.release_string()
|
||||
from neutron.version import version_info as neutron_version
|
||||
release = neutron_version.release_string()
|
||||
# The short X.Y version.
|
||||
version = quantum_version.version_string()
|
||||
version = neutron_version.version_string()
|
||||
|
||||
# The language for content autogenerated by Sphinx. Refer to documentation
|
||||
# for a list of supported languages.
|
||||
@ -116,7 +116,7 @@ show_authors = True
|
||||
pygments_style = 'sphinx'
|
||||
|
||||
# A list of ignored prefixes for module index sorting.
|
||||
modindex_common_prefix = ['quantum.']
|
||||
modindex_common_prefix = ['neutron.']
|
||||
|
||||
# -- Options for man page output --------------------------------------------
|
||||
|
||||
@ -124,7 +124,7 @@ modindex_common_prefix = ['quantum.']
|
||||
# List of tuples 'sourcefile', 'target', u'title', u'Authors name', 'manual'
|
||||
|
||||
man_pages = [
|
||||
('man/quantum-server', 'quantum-server', u'Quantum Server',
|
||||
('man/neutron-server', 'neutron-server', u'Neutron Server',
|
||||
[u'OpenStack'], 1)
|
||||
]
|
||||
|
||||
@ -203,7 +203,7 @@ html_last_updated_fmt = os.popen(git_cmd).read()
|
||||
#html_file_suffix = ''
|
||||
|
||||
# Output file base name for HTML help builder.
|
||||
htmlhelp_basename = 'quantumdoc'
|
||||
htmlhelp_basename = 'neutrondoc'
|
||||
|
||||
|
||||
# -- Options for LaTeX output ------------------------------------------------
|
||||
@ -218,8 +218,8 @@ htmlhelp_basename = 'quantumdoc'
|
||||
# (source start file, target name, title, author,
|
||||
# documentclass [howto/manual]).
|
||||
latex_documents = [
|
||||
('index', 'Quantum.tex', u'Quantum Documentation',
|
||||
u'Quantum development team', 'manual'),
|
||||
('index', 'Neutron.tex', u'Neutron Documentation',
|
||||
u'Neutron development team', 'manual'),
|
||||
]
|
||||
|
||||
# The name of an image file (relative to this directory) to place at the top of
|
||||
|
@ -19,7 +19,7 @@ Open Stack Common
|
||||
=================
|
||||
|
||||
A number of modules used are from the openstack-common project.
|
||||
The imported files are in 'quantum/openstack-common.conf'.
|
||||
The imported files are in 'neutron/openstack-common.conf'.
|
||||
More information can be found at `OpenStack Common`_.
|
||||
|
||||
.. _`OpenStack Common`: https://launchpad.net/openstack-common
|
||||
|
@ -18,6 +18,6 @@
|
||||
Developer Guide
|
||||
===============
|
||||
|
||||
The `Quantum Wiki`_ is a very good place to start.
|
||||
The `Neutron Wiki`_ is a very good place to start.
|
||||
|
||||
.. _`Quantum wiki`: http://wiki.openstack.org/Quantum
|
||||
.. _`Neutron wiki`: http://wiki.openstack.org/Neutron
|
||||
|
@ -1,7 +1,7 @@
|
||||
Plugin API
|
||||
==========
|
||||
|
||||
.. automodule:: quantum.quantum_plugin_base_v2
|
||||
.. automodule:: neutron.neutron_plugin_base_v2
|
||||
|
||||
.. autoclass:: QuantumPluginBaseV2
|
||||
.. autoclass:: NeutronPluginBaseV2
|
||||
:members:
|
||||
|
@ -14,27 +14,27 @@
|
||||
License for the specific language governing permissions and limitations
|
||||
under the License.
|
||||
|
||||
Welcome to Quantum's developer documentation!
|
||||
Welcome to Neutron's developer documentation!
|
||||
=============================================
|
||||
|
||||
Quantum is an OpenStack project to provide "network connectivity as a service"
|
||||
Neutron is an OpenStack project to provide "network connectivity as a service"
|
||||
between interface devices (e.g., vNICs) managed by other Openstack services
|
||||
(e.g., nova). It implements the `Quantum API Guide`_.
|
||||
(e.g., nova). It implements the `Neutron API Guide`_.
|
||||
|
||||
.. _`Quantum API Guide`: http://docs.openstack.org/incubation/openstack-network/developer/quantum-api-1.0/content/
|
||||
.. _`Neutron API Guide`: http://docs.openstack.org/incubation/openstack-network/developer/quantum-api-1.0/content/
|
||||
|
||||
This document describes Quantum for contributors of the project, and assumes
|
||||
that you are already familiar with Quantum from an `end-user perspective`_.
|
||||
This document describes Neutron for contributors of the project, and assumes
|
||||
that you are already familiar with Neutron from an `end-user perspective`_.
|
||||
|
||||
.. _`end-user perspective`: http://docs.openstack.org/trunk/openstack-network/admin/content/index.html
|
||||
|
||||
This documentation is generated by the Sphinx toolkit and lives in the source
|
||||
tree. Additional documentation on Quantum and other components of OpenStack
|
||||
can be found on the `OpenStack wiki`_. The `Quantum Development wiki`_ is a very good
|
||||
tree. Additional documentation on Neutron and other components of OpenStack
|
||||
can be found on the `OpenStack wiki`_. The `Neutron Development wiki`_ is a very good
|
||||
place to start.
|
||||
|
||||
.. _`OpenStack wiki`: http://wiki.openstack.org
|
||||
.. _`Quantum Development wiki`: http://wiki.openstack.org/QuantumDevelopment
|
||||
.. _`Neutron Development wiki`: http://wiki.openstack.org/NeutronDevelopment
|
||||
|
||||
Enjoy!
|
||||
|
||||
@ -53,4 +53,4 @@ Man Pages
|
||||
|
||||
.. toctree::
|
||||
|
||||
man/quantum-server
|
||||
man/neutron-server
|
||||
|
@ -1,9 +1,9 @@
|
||||
==============
|
||||
quantum-server
|
||||
neutron-server
|
||||
==============
|
||||
|
||||
--------------
|
||||
Quantum Server
|
||||
Neutron Server
|
||||
--------------
|
||||
|
||||
:Author: openstack@lists.launchpad.net
|
||||
@ -16,13 +16,13 @@ Quantum Server
|
||||
SYNOPSIS
|
||||
========
|
||||
|
||||
quantum-server [options]
|
||||
neutron-server [options]
|
||||
|
||||
DESCRIPTION
|
||||
===========
|
||||
|
||||
quantum-server provides a webserver that exposes the Quantum API, and
|
||||
passes all webservice calls to the Quantum plugin for processing.
|
||||
neutron-server provides a webserver that exposes the Neutron API, and
|
||||
passes all webservice calls to the Neutron plugin for processing.
|
||||
|
||||
OPTIONS
|
||||
=======
|
||||
@ -32,12 +32,12 @@ OPTIONS
|
||||
-v, --verbose Print more verbose output
|
||||
-d, --debug Print debugging output
|
||||
--config-file=PATH Path to the config file to use, for example,
|
||||
/etc/quantum/quantum.conf. When not specified
|
||||
/etc/neutron/neutron.conf. When not specified
|
||||
(the default), we generally look at the first argument
|
||||
specified to be a config file, and if that is also
|
||||
missing, we search standard directories for a config
|
||||
file. (/etc/quantum/,
|
||||
/usr/lib/pythonX/site-packages/quantum/)
|
||||
file. (/etc/neutron/,
|
||||
/usr/lib/pythonX/site-packages/neutron/)
|
||||
|
||||
Logging Options:
|
||||
The following configuration options are specific to logging
|
||||
@ -61,15 +61,15 @@ FILES
|
||||
========
|
||||
|
||||
plugins.ini file contains the plugin information
|
||||
quantum.conf file contains configuration information in the form of python-gflags.
|
||||
neutron.conf file contains configuration information in the form of python-gflags.
|
||||
|
||||
SEE ALSO
|
||||
========
|
||||
|
||||
* `OpenStack Quantum <http://quantum.openstack.org>`__
|
||||
* `OpenStack Neutron <http://neutron.openstack.org>`__
|
||||
|
||||
BUGS
|
||||
====
|
||||
|
||||
* Quantum is sourced in Launchpad so you can view current bugs at `OpenStack Bugs <https://bugs.launchpad.net/quantum>`__
|
||||
* Neutron is sourced in Launchpad so you can view current bugs at `OpenStack Bugs <https://bugs.launchpad.net/neutron>`__
|
||||
|
@ -1,24 +1,24 @@
|
||||
[composite:quantum]
|
||||
[composite:neutron]
|
||||
use = egg:Paste#urlmap
|
||||
/: quantumversions
|
||||
/v2.0: quantumapi_v2_0
|
||||
/: neutronversions
|
||||
/v2.0: neutronapi_v2_0
|
||||
|
||||
[composite:quantumapi_v2_0]
|
||||
use = call:quantum.auth:pipeline_factory
|
||||
noauth = extensions quantumapiapp_v2_0
|
||||
keystone = authtoken keystonecontext extensions quantumapiapp_v2_0
|
||||
[composite:neutronapi_v2_0]
|
||||
use = call:neutron.auth:pipeline_factory
|
||||
noauth = extensions neutronapiapp_v2_0
|
||||
keystone = authtoken keystonecontext extensions neutronapiapp_v2_0
|
||||
|
||||
[filter:keystonecontext]
|
||||
paste.filter_factory = quantum.auth:QuantumKeystoneContext.factory
|
||||
paste.filter_factory = neutron.auth:NeutronKeystoneContext.factory
|
||||
|
||||
[filter:authtoken]
|
||||
paste.filter_factory = keystoneclient.middleware.auth_token:filter_factory
|
||||
|
||||
[filter:extensions]
|
||||
paste.filter_factory = quantum.api.extensions:plugin_aware_extension_middleware_factory
|
||||
paste.filter_factory = neutron.api.extensions:plugin_aware_extension_middleware_factory
|
||||
|
||||
[app:quantumversions]
|
||||
paste.app_factory = quantum.api.versions:Versions.factory
|
||||
[app:neutronversions]
|
||||
paste.app_factory = neutron.api.versions:Versions.factory
|
||||
|
||||
[app:quantumapiapp_v2_0]
|
||||
paste.app_factory = quantum.api.v2.router:APIRouter.factory
|
||||
[app:neutronapiapp_v2_0]
|
||||
paste.app_factory = neutron.api.v2.router:APIRouter.factory
|
||||
|
@ -2,7 +2,7 @@
|
||||
# Show debugging output in log (sets DEBUG log level output)
|
||||
# debug = true
|
||||
|
||||
# The DHCP agent will resync its state with Quantum to recover from any
|
||||
# The DHCP agent will resync its state with Neutron to recover from any
|
||||
# transient notification or rpc errors. The interval is number of
|
||||
# seconds between attempts.
|
||||
# resync_interval = 5
|
||||
@ -11,16 +11,16 @@
|
||||
# matches you plugin.
|
||||
|
||||
# OVS based plugins(OVS, Ryu, NEC, NVP, BigSwitch/Floodlight)
|
||||
interface_driver = quantum.agent.linux.interface.OVSInterfaceDriver
|
||||
interface_driver = neutron.agent.linux.interface.OVSInterfaceDriver
|
||||
# OVS based plugins(Ryu, NEC, NVP, BigSwitch/Floodlight) that use OVS
|
||||
# as OpenFlow switch and check port status
|
||||
#ovs_use_veth = True
|
||||
# LinuxBridge
|
||||
#interface_driver = quantum.agent.linux.interface.BridgeInterfaceDriver
|
||||
#interface_driver = neutron.agent.linux.interface.BridgeInterfaceDriver
|
||||
|
||||
# The agent can use other DHCP drivers. Dnsmasq is the simplest and requires
|
||||
# no additional setup of the DHCP server.
|
||||
dhcp_driver = quantum.agent.linux.dhcp.Dnsmasq
|
||||
dhcp_driver = neutron.agent.linux.dhcp.Dnsmasq
|
||||
|
||||
# Allow overlapping IP (Must have kernel build with CONFIG_NET_NS=y and
|
||||
# iproute2 package that supports namespaces).
|
||||
@ -35,7 +35,7 @@ dhcp_driver = quantum.agent.linux.dhcp.Dnsmasq
|
||||
|
||||
# Allows for serving metadata requests coming from a dedicated metadata
|
||||
# access network whose cidr is 169.254.169.254/16 (or larger prefix), and
|
||||
# is connected to a Quantum router from which the VMs send metadata
|
||||
# is connected to a Neutron router from which the VMs send metadata
|
||||
# request. In this case DHCP Option 121 will not be injected in VMs, as
|
||||
# they will be able to reach 169.254.169.254 through a router.
|
||||
# This option requires enable_isolated_metadata = True
|
||||
|
@ -6,12 +6,12 @@
|
||||
# matches your plugin.
|
||||
|
||||
# OVS based plugins (OVS, Ryu, NEC) that supports L3 agent
|
||||
interface_driver = quantum.agent.linux.interface.OVSInterfaceDriver
|
||||
interface_driver = neutron.agent.linux.interface.OVSInterfaceDriver
|
||||
# OVS based plugins(Ryu, NEC) that use OVS
|
||||
# as OpenFlow switch and check port status
|
||||
#ovs_use_veth = True
|
||||
# LinuxBridge
|
||||
#interface_driver = quantum.agent.linux.interface.BridgeInterfaceDriver
|
||||
#interface_driver = neutron.agent.linux.interface.BridgeInterfaceDriver
|
||||
|
||||
# Allow overlapping IP (Must have kernel build with CONFIG_NET_NS=y and
|
||||
# iproute2 package that supports namespaces).
|
||||
@ -30,7 +30,7 @@ interface_driver = quantum.agent.linux.interface.OVSInterfaceDriver
|
||||
|
||||
# Indicates that this L3 agent should also handle routers that do not have
|
||||
# an external network gateway configured. This option should be True only
|
||||
# for a single agent in a Quantum deployment, and may be False for all agents
|
||||
# for a single agent in a Neutron deployment, and may be False for all agents
|
||||
# if all routers must have an external network gateway
|
||||
# handle_internal_only_routers = True
|
||||
|
||||
@ -38,7 +38,7 @@ interface_driver = quantum.agent.linux.interface.OVSInterfaceDriver
|
||||
# empty value for the linux bridge
|
||||
# external_network_bridge = br-ex
|
||||
|
||||
# TCP Port used by Quantum metadata server
|
||||
# TCP Port used by Neutron metadata server
|
||||
# metadata_port = 9697
|
||||
|
||||
# Send this many gratuitous ARPs for HA setup. Set it below or equal to 0
|
||||
@ -54,4 +54,4 @@ interface_driver = quantum.agent.linux.interface.OVSInterfaceDriver
|
||||
|
||||
# enable_metadata_proxy, which is true by default, can be set to False
|
||||
# if the Nova metadata server is not available
|
||||
# enable_metadata_proxy = True
|
||||
# enable_metadata_proxy = True
|
||||
|
@ -2,22 +2,22 @@
|
||||
# Show debugging output in log (sets DEBUG log level output)
|
||||
# debug = true
|
||||
|
||||
# The LBaaS agent will resync its state with Quantum to recover from any
|
||||
# The LBaaS agent will resync its state with Neutron to recover from any
|
||||
# transient notification or rpc errors. The interval is number of
|
||||
# seconds between attempts.
|
||||
# periodic_interval = 10
|
||||
|
||||
# OVS based plugins(OVS, Ryu, NEC, NVP, BigSwitch/Floodlight)
|
||||
interface_driver = quantum.agent.linux.interface.OVSInterfaceDriver
|
||||
interface_driver = neutron.agent.linux.interface.OVSInterfaceDriver
|
||||
# OVS based plugins(Ryu, NEC, NVP, BigSwitch/Floodlight) that use OVS
|
||||
# as OpenFlow switch and check port status
|
||||
# ovs_use_veth = True
|
||||
# LinuxBridge
|
||||
# interface_driver = quantum.agent.linux.interface.BridgeInterfaceDriver
|
||||
# interface_driver = neutron.agent.linux.interface.BridgeInterfaceDriver
|
||||
|
||||
# The agent requires a driver to manage the loadbalancer. HAProxy is the
|
||||
# opensource version.
|
||||
#device_driver = quantum.services.loadbalancer.drivers.haproxy.namespace_driver.HaproxyNSDriver
|
||||
#device_driver = neutron.services.loadbalancer.drivers.haproxy.namespace_driver.HaproxyNSDriver
|
||||
|
||||
# Allow overlapping IP (Must have kernel build with CONFIG_NET_NS=y and
|
||||
# iproute2 package that supports namespaces).
|
||||
|
@ -2,7 +2,7 @@
|
||||
# Show debugging output in log (sets DEBUG log level output)
|
||||
# debug = True
|
||||
|
||||
# The Quantum user information for accessing the Quantum API.
|
||||
# The Neutron user information for accessing the Neutron API.
|
||||
auth_url = http://localhost:35357/v2.0
|
||||
auth_region = RegionOne
|
||||
admin_tenant_name = %SERVICE_TENANT_NAME%
|
||||
@ -18,8 +18,8 @@ admin_password = %SERVICE_PASSWORD%
|
||||
# TCP Port used by Nova metadata server
|
||||
# nova_metadata_port = 8775
|
||||
|
||||
# When proxying metadata requests, Quantum signs the Instance-ID header with a
|
||||
# When proxying metadata requests, Neutron signs the Instance-ID header with a
|
||||
# shared secret to prevent spoofing. You may select any string for a secret,
|
||||
# but it must match here and in the configuration used by the Nova Metadata
|
||||
# Server. NOTE: Nova uses a different key: quantum_metadata_proxy_shared_secret
|
||||
# Server. NOTE: Nova uses a different key: neutron_metadata_proxy_shared_secret
|
||||
# metadata_proxy_shared_secret =
|
||||
|
@ -1,4 +1,4 @@
|
||||
# quantum-rootwrap command filters for nodes on which quantum is
|
||||
# neutron-rootwrap command filters for nodes on which neutron is
|
||||
# expected to control network
|
||||
#
|
||||
# This file should be owned by (and only-writeable by) the root user
|
@ -1,4 +1,4 @@
|
||||
# quantum-rootwrap command filters for nodes on which quantum is
|
||||
# neutron-rootwrap command filters for nodes on which neutron is
|
||||
# expected to control network
|
||||
#
|
||||
# This file should be owned by (and only-writeable by) the root user
|
||||
@ -14,7 +14,7 @@ dnsmasq: DnsmasqFilter, /sbin/dnsmasq, root
|
||||
dnsmasq_usr: DnsmasqFilter, /usr/sbin/dnsmasq, root
|
||||
# dhcp-agent uses kill as well, that's handled by the generic KillFilter
|
||||
# it looks like these are the only signals needed, per
|
||||
# quantum/agent/linux/dhcp.py
|
||||
# neutron/agent/linux/dhcp.py
|
||||
kill_dnsmasq: KillFilter, root, /sbin/dnsmasq, -9, -HUP
|
||||
kill_dnsmasq_usr: KillFilter, root, /usr/sbin/dnsmasq, -9, -HUP
|
||||
|
||||
@ -24,10 +24,12 @@ ovs-vsctl: CommandFilter, ovs-vsctl, root
|
||||
ivs-ctl: CommandFilter, ivs-ctl, root
|
||||
|
||||
# metadata proxy
|
||||
metadata_proxy: CommandFilter, quantum-ns-metadata-proxy, root
|
||||
metadata_proxy: CommandFilter, neutron-ns-metadata-proxy, root
|
||||
metadata_proxy_quantum: CommandFilter, quantum-ns-metadata-proxy, root
|
||||
# If installed from source (say, by devstack), the prefix will be
|
||||
# /usr/local instead of /usr/bin.
|
||||
metadata_proxy_local: CommandFilter, /usr/local/bin/quantum-ns-metadata-proxy, root
|
||||
metadata_proxy_local: CommandFilter, /usr/local/bin/neutron-ns-metadata-proxy, root
|
||||
metadata_proxy_local_quantum: CommandFilter, /usr/local/bin/quantum-ns-metadata-proxy, root
|
||||
# RHEL invocation of the metadata proxy will report /usr/bin/python
|
||||
kill_metadata: KillFilter, root, /usr/bin/python, -9
|
||||
kill_metadata7: KillFilter, root, /usr/bin/python2.7, -9
|
@ -1,4 +1,4 @@
|
||||
# quantum-rootwrap command filters for nodes on which quantum is
|
||||
# neutron-rootwrap command filters for nodes on which neutron is
|
||||
# expected to control network
|
||||
#
|
||||
# This file should be owned by (and only-writeable by) the root user
|
||||
@ -8,14 +8,14 @@
|
||||
|
||||
[Filters]
|
||||
|
||||
# quantum/agent/linux/iptables_manager.py
|
||||
# neutron/agent/linux/iptables_manager.py
|
||||
# "iptables-save", ...
|
||||
iptables-save: CommandFilter, iptables-save, root
|
||||
iptables-restore: CommandFilter, iptables-restore, root
|
||||
ip6tables-save: CommandFilter, ip6tables-save, root
|
||||
ip6tables-restore: CommandFilter, ip6tables-restore, root
|
||||
|
||||
# quantum/agent/linux/iptables_manager.py
|
||||
# neutron/agent/linux/iptables_manager.py
|
||||
# "iptables", "-A", ...
|
||||
iptables: CommandFilter, iptables, root
|
||||
ip6tables: CommandFilter, ip6tables, root
|
@ -1,4 +1,4 @@
|
||||
# quantum-rootwrap command filters for nodes on which quantum is
|
||||
# neutron-rootwrap command filters for nodes on which neutron is
|
||||
# expected to control network
|
||||
#
|
||||
# This file should be owned by (and only-writeable by) the root user
|
||||
@ -16,10 +16,12 @@ sysctl: CommandFilter, sysctl, root
|
||||
route: CommandFilter, route, root
|
||||
|
||||
# metadata proxy
|
||||
metadata_proxy: CommandFilter, quantum-ns-metadata-proxy, root
|
||||
metadata_proxy: CommandFilter, neutron-ns-metadata-proxy, root
|
||||
metadata_proxy_quantum: CommandFilter, quantum-ns-metadata-proxy, root
|
||||
# If installed from source (say, by devstack), the prefix will be
|
||||
# /usr/local instead of /usr/bin.
|
||||
metadata_proxy_local: CommandFilter, /usr/local/bin/quantum-ns-metadata-proxy, root
|
||||
metadata_proxy_local: CommandFilter, /usr/local/bin/neuton-ns-metadata-proxy, root
|
||||
metadata_proxy_local_quantum: CommandFilter, /usr/local/bin/quantum-ns-metadata-proxy, root
|
||||
# RHEL invocation of the metadata proxy will report /usr/bin/python
|
||||
kill_metadata: KillFilter, root, /usr/bin/python, -9
|
||||
kill_metadata7: KillFilter, root, /usr/bin/python2.7, -9
|
@ -1,4 +1,4 @@
|
||||
# quantum-rootwrap command filters for nodes on which quantum is
|
||||
# neuton-rootwrap command filters for nodes on which neuton is
|
||||
# expected to control network
|
||||
#
|
||||
# This file should be owned by (and only-writeable by) the root user
|
@ -1,4 +1,4 @@
|
||||
# quantum-rootwrap command filters for nodes on which quantum is
|
||||
# neuton-rootwrap command filters for nodes on which neuton is
|
||||
# expected to control network
|
||||
#
|
||||
# This file should be owned by (and only-writeable by) the root user
|
@ -1,4 +1,4 @@
|
||||
# quantum-rootwrap command filters for nodes on which quantum is
|
||||
# neuton-rootwrap command filters for nodes on which neuton is
|
||||
# expected to control network
|
||||
#
|
||||
# This file should be owned by (and only-writeable by) the root user
|
||||
@ -8,5 +8,5 @@
|
||||
|
||||
[Filters]
|
||||
|
||||
# nec_quantum_agent
|
||||
# nec_neutron_agent
|
||||
ovs-vsctl: CommandFilter, ovs-vsctl, root
|
@ -1,4 +1,4 @@
|
||||
# quantum-rootwrap command filters for nodes on which quantum is
|
||||
# neutron-rootwrap command filters for nodes on which neutron is
|
||||
# expected to control network
|
||||
#
|
||||
# This file should be owned by (and only-writeable by) the root user
|
@ -1,4 +1,4 @@
|
||||
# quantum-rootwrap command filters for nodes on which quantum is
|
||||
# neutron-rootwrap command filters for nodes on which neutron is
|
||||
# expected to control network
|
||||
#
|
||||
# This file should be owned by (and only-writeable by) the root user
|
||||
@ -12,10 +12,10 @@
|
||||
# unclear whether both variants are necessary, but I'm transliterating
|
||||
# from the old mechanism
|
||||
|
||||
# quantum/plugins/ryu/agent/ryu_quantum_agent.py:
|
||||
# neutron/plugins/ryu/agent/ryu_neutron_agent.py:
|
||||
# "ovs-vsctl", "--timeout=2", ...
|
||||
ovs-vsctl: CommandFilter, ovs-vsctl, root
|
||||
|
||||
# quantum/plugins/ryu/agent/ryu_quantum_agent.py:
|
||||
# neutron/plugins/ryu/agent/ryu_neutron_agent.py:
|
||||
# "xe", "vif-param-get", ...
|
||||
xe: CommandFilter, xe, root
|
1
etc/quantum
Symbolic link
1
etc/quantum
Symbolic link
@ -0,0 +1 @@
|
||||
neutron
|
21
neutron/__init__.py
Normal file
21
neutron/__init__.py
Normal file
@ -0,0 +1,21 @@
|
||||
# vim: tabstop=4 shiftwidth=4 softtabstop=4
|
||||
|
||||
# Copyright 2011 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 gettext
|
||||
|
||||
|
||||
gettext.install('neutron', unicode=1)
|
@ -19,8 +19,8 @@ import os
|
||||
|
||||
from oslo.config import cfg
|
||||
|
||||
from quantum.common import config
|
||||
from quantum.openstack.common import log as logging
|
||||
from neutron.common import config
|
||||
from neutron.openstack.common import log as logging
|
||||
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
@ -87,7 +87,7 @@ def get_root_helper(conf):
|
||||
def setup_conf():
|
||||
bind_opts = [
|
||||
cfg.StrOpt('state_path',
|
||||
default='/var/lib/quantum',
|
||||
default='/var/lib/neutron',
|
||||
help=_('Top-level directory for maintaining dhcp state')),
|
||||
]
|
||||
|
@ -23,26 +23,27 @@ import eventlet
|
||||
import netaddr
|
||||
from oslo.config import cfg
|
||||
|
||||
from quantum.agent.common import config
|
||||
from quantum.agent.linux import dhcp
|
||||
from quantum.agent.linux import external_process
|
||||
from quantum.agent.linux import interface
|
||||
from quantum.agent.linux import ip_lib
|
||||
from quantum.agent import rpc as agent_rpc
|
||||
from quantum.common import constants
|
||||
from quantum.common import exceptions
|
||||
from quantum.common import topics
|
||||
from quantum.common import utils
|
||||
from quantum import context
|
||||
from quantum import manager
|
||||
from quantum.openstack.common import importutils
|
||||
from quantum.openstack.common import jsonutils
|
||||
from quantum.openstack.common import log as logging
|
||||
from quantum.openstack.common import loopingcall
|
||||
from quantum.openstack.common.rpc import proxy
|
||||
from quantum.openstack.common import service
|
||||
from quantum.openstack.common import uuidutils
|
||||
from quantum import service as quantum_service
|
||||
from neutron.agent.common import config
|
||||
from neutron.agent.linux import dhcp
|
||||
from neutron.agent.linux import external_process
|
||||
from neutron.agent.linux import interface
|
||||
from neutron.agent.linux import ip_lib
|
||||
from neutron.agent import rpc as agent_rpc
|
||||
from neutron.common import constants
|
||||
from neutron.common import exceptions
|
||||
from neutron.common import legacy
|
||||
from neutron.common import topics
|
||||
from neutron.common import utils
|
||||
from neutron import context
|
||||
from neutron import manager
|
||||
from neutron.openstack.common import importutils
|
||||
from neutron.openstack.common import jsonutils
|
||||
from neutron.openstack.common import log as logging
|
||||
from neutron.openstack.common import loopingcall
|
||||
from neutron.openstack.common.rpc import proxy
|
||||
from neutron.openstack.common import service
|
||||
from neutron.openstack.common import uuidutils
|
||||
from neutron import service as neutron_service
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
NS_PREFIX = 'qdhcp-'
|
||||
@ -56,7 +57,7 @@ class DhcpAgent(manager.Manager):
|
||||
cfg.IntOpt('resync_interval', default=5,
|
||||
help=_("Interval to resync.")),
|
||||
cfg.StrOpt('dhcp_driver',
|
||||
default='quantum.agent.linux.dhcp.Dnsmasq',
|
||||
default='neutron.agent.linux.dhcp.Dnsmasq',
|
||||
help=_("The driver used to manage the DHCP server.")),
|
||||
cfg.BoolOpt('use_namespaces', default=True,
|
||||
help=_("Allow overlapping IP.")),
|
||||
@ -144,7 +145,7 @@ class DhcpAgent(manager.Manager):
|
||||
LOG.exception(_('Unable to update lease'))
|
||||
|
||||
def sync_state(self):
|
||||
"""Sync the local DHCP state with Quantum."""
|
||||
"""Sync the local DHCP state with Neutron."""
|
||||
LOG.info(_('Synchronizing state'))
|
||||
known_networks = set(self.cache.get_network_ids())
|
||||
|
||||
@ -296,7 +297,7 @@ class DhcpAgent(manager.Manager):
|
||||
# The proxy might work for either a single network
|
||||
# or all the networks connected via a router
|
||||
# to the one passed as a parameter
|
||||
quantum_lookup_param = '--network_id=%s' % network.id
|
||||
neutron_lookup_param = '--network_id=%s' % network.id
|
||||
meta_cidr = netaddr.IPNetwork(METADATA_DEFAULT_IP)
|
||||
has_metadata_subnet = any(netaddr.IPNetwork(s.cidr) in meta_cidr
|
||||
for s in network.subnets)
|
||||
@ -314,17 +315,17 @@ class DhcpAgent(manager.Manager):
|
||||
{'port_num': len(router_ports),
|
||||
'port_id': router_ports[0].id,
|
||||
'router_id': router_ports[0].device_id})
|
||||
quantum_lookup_param = ('--router_id=%s' %
|
||||
neutron_lookup_param = ('--router_id=%s' %
|
||||
router_ports[0].device_id)
|
||||
|
||||
def callback(pid_file):
|
||||
proxy_cmd = ['quantum-ns-metadata-proxy',
|
||||
proxy_cmd = ['neutron-ns-metadata-proxy',
|
||||
'--pid_file=%s' % pid_file,
|
||||
quantum_lookup_param,
|
||||
neutron_lookup_param,
|
||||
'--state_path=%s' % self.conf.state_path,
|
||||
'--metadata_port=%d' % METADATA_PORT]
|
||||
proxy_cmd.extend(config.get_log_args(
|
||||
cfg.CONF, 'quantum-ns-metadata-proxy-%s.log' % network.id))
|
||||
cfg.CONF, 'neutron-ns-metadata-proxy-%s.log' % network.id))
|
||||
return proxy_cmd
|
||||
|
||||
pm = external_process.ProcessManager(
|
||||
@ -506,8 +507,9 @@ class DeviceManager(object):
|
||||
if not conf.interface_driver:
|
||||
raise SystemExit(_('You must specify an interface driver'))
|
||||
try:
|
||||
self.driver = importutils.import_object(conf.interface_driver,
|
||||
conf)
|
||||
self.driver = importutils.import_object(
|
||||
conf.interface_driver, conf
|
||||
)
|
||||
except Exception:
|
||||
msg = _("Error importing interface driver "
|
||||
"'%s'") % conf.interface_driver
|
||||
@ -673,7 +675,7 @@ class DhcpLeaseRelay(object):
|
||||
"""UNIX domain socket server for processing lease updates.
|
||||
|
||||
Network namespace isolation prevents the DHCP process from notifying
|
||||
Quantum directly. This class works around the limitation by using the
|
||||
Neutron directly. This class works around the limitation by using the
|
||||
domain socket to pass the information. This class handles message.
|
||||
receiving and then calls the callback method.
|
||||
"""
|
||||
@ -735,7 +737,7 @@ class DhcpAgentWithStateReport(DhcpAgent):
|
||||
super(DhcpAgentWithStateReport, self).__init__(host=host)
|
||||
self.state_rpc = agent_rpc.PluginReportStateAPI(topics.PLUGIN)
|
||||
self.agent_state = {
|
||||
'binary': 'quantum-dhcp-agent',
|
||||
'binary': 'neutron-dhcp-agent',
|
||||
'host': host,
|
||||
'topic': topics.DHCP_AGENT,
|
||||
'configurations': {
|
||||
@ -760,7 +762,7 @@ class DhcpAgentWithStateReport(DhcpAgent):
|
||||
self.use_call = False
|
||||
except AttributeError:
|
||||
# This means the server does not support report_state
|
||||
LOG.warn(_("Quantum server does not support state report."
|
||||
LOG.warn(_("Neutron server does not support state report."
|
||||
" State report for this agent will be disabled."))
|
||||
self.heartbeat.stop()
|
||||
self.run()
|
||||
@ -793,11 +795,12 @@ def register_options():
|
||||
def main():
|
||||
eventlet.monkey_patch()
|
||||
register_options()
|
||||
cfg.CONF(project='quantum')
|
||||
cfg.CONF(project='neutron')
|
||||
config.setup_logging(cfg.CONF)
|
||||
server = quantum_service.Service.create(
|
||||
binary='quantum-dhcp-agent',
|
||||
legacy.modernize_quantum_config(cfg.CONF)
|
||||
server = neutron_service.Service.create(
|
||||
binary='neutron-dhcp-agent',
|
||||
topic=topics.DHCP_AGENT,
|
||||
report_interval=cfg.CONF.AGENT.report_interval,
|
||||
manager='quantum.agent.dhcp_agent.DhcpAgentWithStateReport')
|
||||
manager='neutron.agent.dhcp_agent.DhcpAgentWithStateReport')
|
||||
service.launch(server).wait()
|
@ -22,26 +22,27 @@ from eventlet import semaphore
|
||||
import netaddr
|
||||
from oslo.config import cfg
|
||||
|
||||
from quantum.agent.common import config
|
||||
from quantum.agent.linux import external_process
|
||||
from quantum.agent.linux import interface
|
||||
from quantum.agent.linux import ip_lib
|
||||
from quantum.agent.linux import iptables_manager
|
||||
from quantum.agent.linux import utils
|
||||
from quantum.agent import rpc as agent_rpc
|
||||
from quantum.common import constants as l3_constants
|
||||
from quantum.common import topics
|
||||
from quantum.common import utils as common_utils
|
||||
from quantum import context
|
||||
from quantum import manager
|
||||
from quantum.openstack.common import importutils
|
||||
from quantum.openstack.common import log as logging
|
||||
from quantum.openstack.common import loopingcall
|
||||
from quantum.openstack.common import periodic_task
|
||||
from quantum.openstack.common.rpc import common as rpc_common
|
||||
from quantum.openstack.common.rpc import proxy
|
||||
from quantum.openstack.common import service
|
||||
from quantum import service as quantum_service
|
||||
from neutron.agent.common import config
|
||||
from neutron.agent.linux import external_process
|
||||
from neutron.agent.linux import interface
|
||||
from neutron.agent.linux import ip_lib
|
||||
from neutron.agent.linux import iptables_manager
|
||||
from neutron.agent.linux import utils
|
||||
from neutron.agent import rpc as agent_rpc
|
||||
from neutron.common import constants as l3_constants
|
||||
from neutron.common import legacy
|
||||
from neutron.common import topics
|
||||
from neutron.common import utils as common_utils
|
||||
from neutron import context
|
||||
from neutron import manager
|
||||
from neutron.openstack.common import importutils
|
||||
from neutron.openstack.common import log as logging
|
||||
from neutron.openstack.common import loopingcall
|
||||
from neutron.openstack.common import periodic_task
|
||||
from neutron.openstack.common.rpc import common as rpc_common
|
||||
from neutron.openstack.common.rpc import proxy
|
||||
from neutron.openstack.common import service
|
||||
from neutron import service as neutron_service
|
||||
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
@ -149,7 +150,7 @@ class L3NATAgent(manager.Manager):
|
||||
"interface.")),
|
||||
cfg.IntOpt('metadata_port',
|
||||
default=9697,
|
||||
help=_("TCP Port used by Quantum metadata namespace "
|
||||
help=_("TCP Port used by Neutron metadata namespace "
|
||||
"proxy.")),
|
||||
cfg.IntOpt('send_arp_for_ha',
|
||||
default=3,
|
||||
@ -183,8 +184,10 @@ class L3NATAgent(manager.Manager):
|
||||
if not self.conf.interface_driver:
|
||||
raise SystemExit(_('An interface driver must be specified'))
|
||||
try:
|
||||
self.driver = importutils.import_object(self.conf.interface_driver,
|
||||
self.conf)
|
||||
self.driver = importutils.import_object(
|
||||
self.conf.interface_driver,
|
||||
self.conf
|
||||
)
|
||||
except Exception:
|
||||
msg = _("Error importing interface driver "
|
||||
"'%s'") % self.conf.interface_driver
|
||||
@ -246,7 +249,7 @@ class L3NATAgent(manager.Manager):
|
||||
if e.exc_type == 'TooManyExternalNetworks':
|
||||
msg = _(
|
||||
"The 'gateway_external_network_id' option must be "
|
||||
"configured for this agent as Quantum has more than "
|
||||
"configured for this agent as Neutron has more than "
|
||||
"one external network.")
|
||||
raise Exception(msg)
|
||||
else:
|
||||
@ -284,13 +287,13 @@ class L3NATAgent(manager.Manager):
|
||||
|
||||
def _spawn_metadata_proxy(self, router_info):
|
||||
def callback(pid_file):
|
||||
proxy_cmd = ['quantum-ns-metadata-proxy',
|
||||
proxy_cmd = ['neutron-ns-metadata-proxy',
|
||||
'--pid_file=%s' % pid_file,
|
||||
'--router_id=%s' % router_info.router_id,
|
||||
'--state_path=%s' % self.conf.state_path,
|
||||
'--metadata_port=%s' % self.conf.metadata_port]
|
||||
proxy_cmd.extend(config.get_log_args(
|
||||
cfg.CONF, 'quantum-ns-metadata-proxy-%s.log' %
|
||||
cfg.CONF, 'neutron-ns-metadata-proxy-%s.log' %
|
||||
router_info.router_id))
|
||||
return proxy_cmd
|
||||
|
||||
@ -712,7 +715,7 @@ class L3NATAgentWithStateReport(L3NATAgent):
|
||||
super(L3NATAgentWithStateReport, self).__init__(host=host, conf=conf)
|
||||
self.state_rpc = agent_rpc.PluginReportStateAPI(topics.PLUGIN)
|
||||
self.agent_state = {
|
||||
'binary': 'quantum-l3-agent',
|
||||
'binary': 'neutron-l3-agent',
|
||||
'host': host,
|
||||
'topic': topics.L3_AGENT,
|
||||
'configurations': {
|
||||
@ -758,7 +761,7 @@ class L3NATAgentWithStateReport(L3NATAgent):
|
||||
self.use_call = False
|
||||
except AttributeError:
|
||||
# This means the server does not support report_state
|
||||
LOG.warn(_("Quantum server does not support state report."
|
||||
LOG.warn(_("Neutron server does not support state report."
|
||||
" State report for this agent will be disabled."))
|
||||
self.heartbeat.stop()
|
||||
return
|
||||
@ -779,11 +782,12 @@ def main():
|
||||
config.register_root_helper(conf)
|
||||
conf.register_opts(interface.OPTS)
|
||||
conf.register_opts(external_process.OPTS)
|
||||
conf(project='quantum')
|
||||
conf(project='neutron')
|
||||
config.setup_logging(conf)
|
||||
server = quantum_service.Service.create(
|
||||
binary='quantum-l3-agent',
|
||||
legacy.modernize_quantum_config(conf)
|
||||
server = neutron_service.Service.create(
|
||||
binary='neutron-l3-agent',
|
||||
topic=topics.L3_AGENT,
|
||||
report_interval=cfg.CONF.AGENT.report_interval,
|
||||
manager='quantum.agent.l3_agent.L3NATAgentWithStateReport')
|
||||
manager='neutron.agent.l3_agent.L3NATAgentWithStateReport')
|
||||
service.launch(server).wait()
|
@ -21,8 +21,8 @@ import fcntl
|
||||
import os
|
||||
import sys
|
||||
|
||||
from quantum.agent.linux import utils
|
||||
from quantum.openstack.common import log as logging
|
||||
from neutron.agent.linux import utils
|
||||
from neutron.openstack.common import log as logging
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
@ -26,11 +26,11 @@ import sys
|
||||
import netaddr
|
||||
from oslo.config import cfg
|
||||
|
||||
from quantum.agent.linux import ip_lib
|
||||
from quantum.agent.linux import utils
|
||||
from quantum.openstack.common import jsonutils
|
||||
from quantum.openstack.common import log as logging
|
||||
from quantum.openstack.common import uuidutils
|
||||
from neutron.agent.linux import ip_lib
|
||||
from neutron.agent.linux import utils
|
||||
from neutron.openstack.common import jsonutils
|
||||
from neutron.openstack.common import log as logging
|
||||
from neutron.openstack.common import uuidutils
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
@ -209,7 +209,7 @@ class DhcpLocalProcess(DhcpBase):
|
||||
|
||||
class Dnsmasq(DhcpLocalProcess):
|
||||
# The ports that need to be opened when security policies are active
|
||||
# on the Quantum port used for DHCP. These are provided as a convenience
|
||||
# on the Neutron port used for DHCP. These are provided as a convenience
|
||||
# for users of this class.
|
||||
PORTS = {IPV4: [(UDP, DNS_PORT), (TCP, DNS_PORT), (UDP, DHCPV4_PORT)],
|
||||
IPV6: [(UDP, DNS_PORT), (TCP, DNS_PORT), (UDP, DHCPV6_PORT)],
|
||||
@ -217,8 +217,8 @@ class Dnsmasq(DhcpLocalProcess):
|
||||
|
||||
_TAG_PREFIX = 'tag%d'
|
||||
|
||||
QUANTUM_NETWORK_ID_KEY = 'QUANTUM_NETWORK_ID'
|
||||
QUANTUM_RELAY_SOCKET_PATH_KEY = 'QUANTUM_RELAY_SOCKET_PATH'
|
||||
NEUTRON_NETWORK_ID_KEY = 'NEUTRON_NETWORK_ID'
|
||||
NEUTRON_RELAY_SOCKET_PATH_KEY = 'NEUTRON_RELAY_SOCKET_PATH'
|
||||
MINIMUM_VERSION = 2.59
|
||||
|
||||
@classmethod
|
||||
@ -259,8 +259,8 @@ class Dnsmasq(DhcpLocalProcess):
|
||||
def spawn_process(self):
|
||||
"""Spawns a Dnsmasq process for the network."""
|
||||
env = {
|
||||
self.QUANTUM_NETWORK_ID_KEY: self.network.id,
|
||||
self.QUANTUM_RELAY_SOCKET_PATH_KEY:
|
||||
self.NEUTRON_NETWORK_ID_KEY: self.network.id,
|
||||
self.NEUTRON_RELAY_SOCKET_PATH_KEY:
|
||||
self.conf.dhcp_lease_relay_socket
|
||||
}
|
||||
|
||||
@ -426,7 +426,7 @@ class Dnsmasq(DhcpLocalProcess):
|
||||
|
||||
def _lease_relay_script_path(self):
|
||||
return os.path.join(os.path.dirname(sys.argv[0]),
|
||||
'quantum-dhcp-agent-dnsmasq-lease-update')
|
||||
'neutron-dhcp-agent-dnsmasq-lease-update')
|
||||
|
||||
def _format_option(self, index, option_name, *args):
|
||||
if self.version >= self.MINIMUM_VERSION:
|
||||
@ -438,8 +438,8 @@ class Dnsmasq(DhcpLocalProcess):
|
||||
|
||||
@classmethod
|
||||
def lease_update(cls):
|
||||
network_id = os.environ.get(cls.QUANTUM_NETWORK_ID_KEY)
|
||||
dhcp_relay_socket = os.environ.get(cls.QUANTUM_RELAY_SOCKET_PATH_KEY)
|
||||
network_id = os.environ.get(cls.NEUTRON_NETWORK_ID_KEY)
|
||||
dhcp_relay_socket = os.environ.get(cls.NEUTRON_RELAY_SOCKET_PATH_KEY)
|
||||
|
||||
action = sys.argv[1]
|
||||
if action not in ('add', 'del', 'old'):
|
@ -20,9 +20,9 @@ import os
|
||||
|
||||
from oslo.config import cfg
|
||||
|
||||
from quantum.agent.linux import ip_lib
|
||||
from quantum.agent.linux import utils
|
||||
from quantum.openstack.common import log as logging
|
||||
from neutron.agent.linux import ip_lib
|
||||
from neutron.agent.linux import utils
|
||||
from neutron.openstack.common import log as logging
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
@ -36,7 +36,7 @@ cfg.CONF.register_opts(OPTS)
|
||||
|
||||
|
||||
class ProcessManager(object):
|
||||
"""An external process manager for Quantum spawned processes.
|
||||
"""An external process manager for Neutron spawned processes.
|
||||
|
||||
Note: The manager expects uuid to be in cmdline.
|
||||
"""
|
@ -20,14 +20,14 @@ import abc
|
||||
import netaddr
|
||||
from oslo.config import cfg
|
||||
|
||||
from quantum.agent.common import config
|
||||
from quantum.agent.linux import ip_lib
|
||||
from quantum.agent.linux import ovs_lib
|
||||
from quantum.agent.linux import utils
|
||||
from quantum.common import exceptions
|
||||
from quantum.extensions.flavor import (FLAVOR_NETWORK)
|
||||
from quantum.openstack.common import importutils
|
||||
from quantum.openstack.common import log as logging
|
||||
from neutron.agent.common import config
|
||||
from neutron.agent.linux import ip_lib
|
||||
from neutron.agent.linux import ovs_lib
|
||||
from neutron.agent.linux import utils
|
||||
from neutron.common import exceptions
|
||||
from neutron.extensions.flavor import (FLAVOR_NETWORK)
|
||||
from neutron.openstack.common import importutils
|
||||
from neutron.openstack.common import log as logging
|
||||
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
@ -329,8 +329,8 @@ class BridgeInterfaceDriver(LinuxInterfaceDriver):
|
||||
class MetaInterfaceDriver(LinuxInterfaceDriver):
|
||||
def __init__(self, conf):
|
||||
super(MetaInterfaceDriver, self).__init__(conf)
|
||||
from quantumclient.v2_0 import client
|
||||
self.quantum = client.Client(
|
||||
from neutronclient.v2_0 import client
|
||||
self.neutron = client.Client(
|
||||
username=self.conf.admin_user,
|
||||
password=self.conf.admin_password,
|
||||
tenant_name=self.conf.admin_tenant_name,
|
||||
@ -346,7 +346,7 @@ class MetaInterfaceDriver(LinuxInterfaceDriver):
|
||||
self.flavor_driver_map[flavor] = self._load_driver(driver_name)
|
||||
|
||||
def _get_flavor_by_network_id(self, network_id):
|
||||
network = self.quantum.show_network(network_id)
|
||||
network = self.neutron.show_network(network_id)
|
||||
return network['network'][FLAVOR_NETWORK]
|
||||
|
||||
def _get_driver_by_network_id(self, network_id):
|
@ -17,8 +17,8 @@
|
||||
import netaddr
|
||||
from oslo.config import cfg
|
||||
|
||||
from quantum.agent.linux import utils
|
||||
from quantum.common import exceptions
|
||||
from neutron.agent.linux import utils
|
||||
from neutron.common import exceptions
|
||||
|
||||
|
||||
OPTS = [
|
@ -18,10 +18,10 @@
|
||||
import netaddr
|
||||
from oslo.config import cfg
|
||||
|
||||
from quantum.agent import firewall
|
||||
from quantum.agent.linux import iptables_manager
|
||||
from quantum.common import constants
|
||||
from quantum.openstack.common import log as logging
|
||||
from neutron.agent import firewall
|
||||
from neutron.agent.linux import iptables_manager
|
||||
from neutron.common import constants
|
||||
from neutron.openstack.common import log as logging
|
||||
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
@ -24,9 +24,9 @@
|
||||
import inspect
|
||||
import os
|
||||
|
||||
from quantum.agent.linux import utils as linux_utils
|
||||
from quantum.common import utils
|
||||
from quantum.openstack.common import log as logging
|
||||
from neutron.agent.linux import utils as linux_utils
|
||||
from neutron.common import utils
|
||||
from neutron.openstack.common import log as logging
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
# NOTE(vish): Iptables supports chain names of up to 28 characters, and we
|
||||
@ -207,7 +207,7 @@ class IptablesManager(object):
|
||||
|
||||
A number of chains are set up to begin with.
|
||||
|
||||
First, quantum-filter-top. It's added at the top of FORWARD and OUTPUT. Its
|
||||
First, neutron-filter-top. It's added at the top of FORWARD and OUTPUT. Its
|
||||
name is not wrapped, so it's shared between the various nova workers. It's
|
||||
intended for rules that need to live at the top of the FORWARD and OUTPUT
|
||||
chains. It's in both the ipv4 and ipv6 set of tables.
|
||||
@ -215,7 +215,7 @@ class IptablesManager(object):
|
||||
For ipv4 and ipv6, the built-in INPUT, OUTPUT, and FORWARD filter chains
|
||||
are wrapped, meaning that the "real" INPUT chain has a rule that jumps to
|
||||
the wrapped INPUT chain, etc. Additionally, there's a wrapped chain named
|
||||
"local" which is jumped to from quantum-filter-top.
|
||||
"local" which is jumped to from neutron-filter-top.
|
||||
|
||||
For ipv4, the built-in PREROUTING, OUTPUT, and POSTROUTING nat chains are
|
||||
wrapped in the same was as the built-in filter chains. Additionally,
|
||||
@ -238,18 +238,18 @@ class IptablesManager(object):
|
||||
self.ipv4 = {'filter': IptablesTable()}
|
||||
self.ipv6 = {'filter': IptablesTable()}
|
||||
|
||||
# Add a quantum-filter-top chain. It's intended to be shared
|
||||
# Add a neutron-filter-top chain. It's intended to be shared
|
||||
# among the various nova components. It sits at the very top
|
||||
# of FORWARD and OUTPUT.
|
||||
for tables in [self.ipv4, self.ipv6]:
|
||||
tables['filter'].add_chain('quantum-filter-top', wrap=False)
|
||||
tables['filter'].add_rule('FORWARD', '-j quantum-filter-top',
|
||||
tables['filter'].add_chain('neutron-filter-top', wrap=False)
|
||||
tables['filter'].add_rule('FORWARD', '-j neutron-filter-top',
|
||||
wrap=False, top=True)
|
||||
tables['filter'].add_rule('OUTPUT', '-j quantum-filter-top',
|
||||
tables['filter'].add_rule('OUTPUT', '-j neutron-filter-top',
|
||||
wrap=False, top=True)
|
||||
|
||||
tables['filter'].add_chain('local')
|
||||
tables['filter'].add_rule('quantum-filter-top', '-j $local',
|
||||
tables['filter'].add_rule('neutron-filter-top', '-j $local',
|
||||
wrap=False)
|
||||
|
||||
# Wrap the built-in chains
|
||||
@ -274,19 +274,19 @@ class IptablesManager(object):
|
||||
(chain), wrap=False)
|
||||
|
||||
if not state_less:
|
||||
# Add a quantum-postrouting-bottom chain. It's intended to be
|
||||
# Add a neutron-postrouting-bottom chain. It's intended to be
|
||||
# shared among the various nova components. We set it as the last
|
||||
# chain of POSTROUTING chain.
|
||||
self.ipv4['nat'].add_chain('quantum-postrouting-bottom',
|
||||
self.ipv4['nat'].add_chain('neutron-postrouting-bottom',
|
||||
wrap=False)
|
||||
self.ipv4['nat'].add_rule('POSTROUTING',
|
||||
'-j quantum-postrouting-bottom',
|
||||
'-j neutron-postrouting-bottom',
|
||||
wrap=False)
|
||||
|
||||
# We add a snat chain to the shared quantum-postrouting-bottom
|
||||
# We add a snat chain to the shared neutron-postrouting-bottom
|
||||
# chain so that it's applied last.
|
||||
self.ipv4['nat'].add_chain('snat')
|
||||
self.ipv4['nat'].add_rule('quantum-postrouting-bottom',
|
||||
self.ipv4['nat'].add_rule('neutron-postrouting-bottom',
|
||||
'-j $snat', wrap=False)
|
||||
|
||||
# And then we add a float-snat chain and jump to first thing in
|
@ -20,11 +20,11 @@
|
||||
|
||||
import re
|
||||
|
||||
from quantum.agent.linux import ip_lib
|
||||
from quantum.agent.linux import utils
|
||||
from quantum.openstack.common import jsonutils
|
||||
from quantum.openstack.common import log as logging
|
||||
from quantum.plugins.openvswitch.common import constants
|
||||
from neutron.agent.linux import ip_lib
|
||||
from neutron.agent.linux import utils
|
||||
from neutron.openstack.common import jsonutils
|
||||
from neutron.openstack.common import log as logging
|
||||
from neutron.plugins.openvswitch.common import constants
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
@ -26,8 +26,8 @@ import tempfile
|
||||
|
||||
from eventlet.green import subprocess
|
||||
|
||||
from quantum.common import utils
|
||||
from quantum.openstack.common import log as logging
|
||||
from neutron.common import utils
|
||||
from neutron.openstack.common import log as logging
|
||||
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
@ -24,14 +24,14 @@ import urlparse
|
||||
|
||||
import eventlet
|
||||
import httplib2
|
||||
from neutronclient.v2_0 import client
|
||||
from oslo.config import cfg
|
||||
from quantumclient.v2_0 import client
|
||||
import webob
|
||||
|
||||
from quantum.common import config
|
||||
from quantum.common import utils
|
||||
from quantum.openstack.common import log as logging
|
||||
from quantum import wsgi
|
||||
from neutron.common import config
|
||||
from neutron.common import utils
|
||||
from neutron.openstack.common import log as logging
|
||||
from neutron import wsgi
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
@ -72,7 +72,7 @@ class MetadataProxyHandler(object):
|
||||
self.conf = conf
|
||||
self.auth_info = {}
|
||||
|
||||
def _get_quantum_client(self):
|
||||
def _get_neutron_client(self):
|
||||
qclient = client.Client(
|
||||
username=self.conf.admin_user,
|
||||
password=self.conf.admin_password,
|
||||
@ -104,11 +104,11 @@ class MetadataProxyHandler(object):
|
||||
return webob.exc.HTTPInternalServerError(explanation=unicode(msg))
|
||||
|
||||
def _get_instance_id(self, req):
|
||||
qclient = self._get_quantum_client()
|
||||
qclient = self._get_neutron_client()
|
||||
|
||||
remote_address = req.headers.get('X-Forwarded-For')
|
||||
network_id = req.headers.get('X-Quantum-Network-ID')
|
||||
router_id = req.headers.get('X-Quantum-Router-ID')
|
||||
network_id = req.headers.get('X-Neutron-Network-ID')
|
||||
router_id = req.headers.get('X-Neutron-Router-ID')
|
||||
|
||||
if network_id:
|
||||
networks = [network_id]
|
||||
@ -223,7 +223,7 @@ class UnixDomainMetadataProxy(object):
|
||||
os.makedirs(dirname, 0o755)
|
||||
|
||||
def run(self):
|
||||
server = UnixDomainWSGIServer('quantum-metadata-agent')
|
||||
server = UnixDomainWSGIServer('neutron-metadata-agent')
|
||||
server.start(MetadataProxyHandler(self.conf),
|
||||
self.conf.metadata_proxy_socket)
|
||||
server.wait()
|
||||
@ -233,7 +233,7 @@ def main():
|
||||
eventlet.monkey_patch()
|
||||
cfg.CONF.register_opts(UnixDomainMetadataProxy.OPTS)
|
||||
cfg.CONF.register_opts(MetadataProxyHandler.OPTS)
|
||||
cfg.CONF(project='quantum')
|
||||
cfg.CONF(project='neutron')
|
||||
config.setup_logging(cfg.CONF)
|
||||
utils.log_opt_values(LOG)
|
||||
proxy = UnixDomainMetadataProxy(cfg.CONF)
|
@ -25,11 +25,11 @@ import httplib2
|
||||
from oslo.config import cfg
|
||||
import webob
|
||||
|
||||
from quantum.agent.linux import daemon
|
||||
from quantum.common import config
|
||||
from quantum.common import utils
|
||||
from quantum.openstack.common import log as logging
|
||||
from quantum import wsgi
|
||||
from neutron.agent.linux import daemon
|
||||
from neutron.common import config
|
||||
from neutron.common import utils
|
||||
from neutron.openstack.common import log as logging
|
||||
from neutron import wsgi
|
||||
|
||||
proxy_socket = cfg.StrOpt('metadata_proxy_socket',
|
||||
default='$state_path/metadata_proxy',
|
||||
@ -92,9 +92,9 @@ class NetworkMetadataProxyHandler(object):
|
||||
}
|
||||
|
||||
if self.router_id:
|
||||
headers['X-Quantum-Router-ID'] = self.router_id
|
||||
headers['X-Neutron-Router-ID'] = self.router_id
|
||||
else:
|
||||
headers['X-Quantum-Network-ID'] = self.network_id
|
||||
headers['X-Neutron-Network-ID'] = self.network_id
|
||||
|
||||
url = urlparse.urlunsplit((
|
||||
'http',
|
||||
@ -141,7 +141,7 @@ class ProxyDaemon(daemon.Daemon):
|
||||
handler = NetworkMetadataProxyHandler(
|
||||
self.network_id,
|
||||
self.router_id)
|
||||
proxy = wsgi.Server('quantum-network-metadata-proxy')
|
||||
proxy = wsgi.Server('neutron-network-metadata-proxy')
|
||||
proxy.start(handler, self.port)
|
||||
proxy.wait()
|
||||
|
||||
@ -161,7 +161,7 @@ def main():
|
||||
|
||||
cfg.CONF.register_cli_opts(opts)
|
||||
# Don't get the default configuration file
|
||||
cfg.CONF(project='quantum', default_config_files=[])
|
||||
cfg.CONF(project='neutron', default_config_files=[])
|
||||
config.setup_logging(cfg.CONF)
|
||||
utils.log_opt_values(LOG)
|
||||
proxy = ProxyDaemon(cfg.CONF.pid_file,
|
@ -20,16 +20,16 @@ import re
|
||||
import eventlet
|
||||
from oslo.config import cfg
|
||||
|
||||
from quantum.agent.common import config as agent_config
|
||||
from quantum.agent import dhcp_agent
|
||||
from quantum.agent import l3_agent
|
||||
from quantum.agent.linux import dhcp
|
||||
from quantum.agent.linux import ip_lib
|
||||
from quantum.agent.linux import ovs_lib
|
||||
from quantum.api.v2 import attributes
|
||||
from quantum.common import config
|
||||
from quantum.openstack.common import importutils
|
||||
from quantum.openstack.common import log as logging
|
||||
from neutron.agent.common import config as agent_config
|
||||
from neutron.agent import dhcp_agent
|
||||
from neutron.agent import l3_agent
|
||||
from neutron.agent.linux import dhcp
|
||||
from neutron.agent.linux import ip_lib
|
||||
from neutron.agent.linux import ovs_lib
|
||||
from neutron.api.v2 import attributes
|
||||
from neutron.common import config
|
||||
from neutron.openstack.common import importutils
|
||||
from neutron.openstack.common import log as logging
|
||||
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
@ -64,7 +64,7 @@ def setup_conf():
|
||||
|
||||
opts = [
|
||||
cfg.StrOpt('dhcp_driver',
|
||||
default='quantum.agent.linux.dhcp.Dnsmasq',
|
||||
default='neutron.agent.linux.dhcp.Dnsmasq',
|
||||
help=_("The driver used to manage the DHCP server.")),
|
||||
]
|
||||
|
||||
@ -158,7 +158,7 @@ def main():
|
||||
will re-confirm the namespace is empty.
|
||||
|
||||
The utility is designed to clean-up after the forced or unexpected
|
||||
termination of Quantum agents.
|
||||
termination of Neutron agents.
|
||||
|
||||
The --force flag should only be used as part of the cleanup of a devstack
|
||||
installation as it will blindly purge namespaces and their devices. This
|
@ -17,13 +17,13 @@
|
||||
|
||||
from oslo.config import cfg
|
||||
|
||||
from quantum.agent.common import config as agent_config
|
||||
from quantum.agent import l3_agent
|
||||
from quantum.agent.linux import interface
|
||||
from quantum.agent.linux import ip_lib
|
||||
from quantum.agent.linux import ovs_lib
|
||||
from quantum.common import config
|
||||
from quantum.openstack.common import log as logging
|
||||
from neutron.agent.common import config as agent_config
|
||||
from neutron.agent import l3_agent
|
||||
from neutron.agent.linux import interface
|
||||
from neutron.agent.linux import ip_lib
|
||||
from neutron.agent.linux import ovs_lib
|
||||
from neutron.common import config
|
||||
from neutron.openstack.common import log as logging
|
||||
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
@ -40,7 +40,7 @@ def setup_conf():
|
||||
default=False,
|
||||
help=_('True to delete all ports on all the OpenvSwitch '
|
||||
'bridges. False to delete ports created by '
|
||||
'Quantum on integration and external network '
|
||||
'Neutron on integration and external network '
|
||||
'bridges.'))
|
||||
]
|
||||
|
||||
@ -52,8 +52,8 @@ def setup_conf():
|
||||
return conf
|
||||
|
||||
|
||||
def collect_quantum_ports(bridges, root_helper):
|
||||
"""Collect ports created by Quantum from OVS."""
|
||||
def collect_neutron_ports(bridges, root_helper):
|
||||
"""Collect ports created by Neutron from OVS."""
|
||||
ports = []
|
||||
for bridge in bridges:
|
||||
ovs = ovs_lib.OVSBridge(bridge, root_helper)
|
||||
@ -61,8 +61,8 @@ def collect_quantum_ports(bridges, root_helper):
|
||||
return ports
|
||||
|
||||
|
||||
def delete_quantum_ports(ports, root_helper):
|
||||
"""Delete non-internal ports created by Quantum
|
||||
def delete_neutron_ports(ports, root_helper):
|
||||
"""Delete non-internal ports created by Neutron
|
||||
|
||||
Non-internal OVS ports need to be removed manually.
|
||||
"""
|
||||
@ -76,7 +76,7 @@ def delete_quantum_ports(ports, root_helper):
|
||||
def main():
|
||||
"""Main method for cleaning up OVS bridges.
|
||||
|
||||
The utility cleans up the integration bridges used by Quantum.
|
||||
The utility cleans up the integration bridges used by Neutron.
|
||||
"""
|
||||
|
||||
conf = setup_conf()
|
||||
@ -93,10 +93,10 @@ def main():
|
||||
else:
|
||||
bridges = available_configuration_bridges
|
||||
|
||||
# Collect existing ports created by Quantum on configuration bridges.
|
||||
# Collect existing ports created by Neutron on configuration bridges.
|
||||
# After deleting ports from OVS bridges, we cannot determine which
|
||||
# ports were created by Quantum, so port information is collected now.
|
||||
ports = collect_quantum_ports(available_configuration_bridges,
|
||||
# ports were created by Neutron, so port information is collected now.
|
||||
ports = collect_neutron_ports(available_configuration_bridges,
|
||||
conf.AGENT.root_helper)
|
||||
|
||||
for bridge in bridges:
|
||||
@ -104,7 +104,7 @@ def main():
|
||||
ovs = ovs_lib.OVSBridge(bridge, conf.AGENT.root_helper)
|
||||
ovs.delete_ports(all_ports=conf.ovs_all_ports)
|
||||
|
||||
# Remove remaining ports created by Quantum (usually veth pair)
|
||||
delete_quantum_ports(ports, conf.AGENT.root_helper)
|
||||
# Remove remaining ports created by Neutron (usually veth pair)
|
||||
delete_neutron_ports(ports, conf.AGENT.root_helper)
|
||||
|
||||
LOG.info(_("OVS cleanup completed successfully"))
|
@ -15,12 +15,12 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from quantum.common import topics
|
||||
from neutron.common import topics
|
||||
|
||||
from quantum.openstack.common import log as logging
|
||||
from quantum.openstack.common import rpc
|
||||
from quantum.openstack.common.rpc import proxy
|
||||
from quantum.openstack.common import timeutils
|
||||
from neutron.openstack.common import log as logging
|
||||
from neutron.openstack.common import rpc
|
||||
from neutron.openstack.common.rpc import proxy
|
||||
from neutron.openstack.common import timeutils
|
||||
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
@ -18,9 +18,9 @@
|
||||
|
||||
from oslo.config import cfg
|
||||
|
||||
from quantum.common import topics
|
||||
from quantum.openstack.common import importutils
|
||||
from quantum.openstack.common import log as logging
|
||||
from neutron.common import topics
|
||||
from neutron.openstack.common import importutils
|
||||
from neutron.openstack.common import log as logging
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
SG_RPC_VERSION = "1.1"
|
||||
@ -28,14 +28,14 @@ SG_RPC_VERSION = "1.1"
|
||||
security_group_opts = [
|
||||
cfg.StrOpt(
|
||||
'firewall_driver',
|
||||
default='quantum.agent.firewall.NoopFirewallDriver')
|
||||
default='neutron.agent.firewall.NoopFirewallDriver')
|
||||
]
|
||||
cfg.CONF.register_opts(security_group_opts, 'SECURITYGROUP')
|
||||
|
||||
|
||||
def is_firewall_enabled():
|
||||
return (cfg.CONF.SECURITYGROUP.firewall_driver !=
|
||||
'quantum.agent.firewall.NoopFirewallDriver')
|
||||
'neutron.agent.firewall.NoopFirewallDriver')
|
||||
|
||||
|
||||
def disable_security_group_extension_if_noop_driver(
|
@ -20,9 +20,9 @@ import urllib
|
||||
from oslo.config import cfg
|
||||
from webob import exc
|
||||
|
||||
from quantum.common import constants
|
||||
from quantum.common import exceptions
|
||||
from quantum.openstack.common import log as logging
|
||||
from neutron.common import constants
|
||||
from neutron.common import exceptions
|
||||
from neutron.openstack.common import log as logging
|
||||
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
@ -292,14 +292,14 @@ class NoSortingHelper(SortingHelper):
|
||||
pass
|
||||
|
||||
|
||||
class QuantumController(object):
|
||||
"""Base controller class for Quantum API."""
|
||||
class NeutronController(object):
|
||||
"""Base controller class for Neutron API."""
|
||||
# _resource_name will be redefined in sub concrete controller
|
||||
_resource_name = None
|
||||
|
||||
def __init__(self, plugin):
|
||||
self._plugin = plugin
|
||||
super(QuantumController, self).__init__()
|
||||
super(NeutronController, self).__init__()
|
||||
|
||||
def _prepare_request_body(self, body, params):
|
||||
"""Verifies required parameters are in request body.
|
@ -26,15 +26,15 @@ import routes
|
||||
import webob.dec
|
||||
import webob.exc
|
||||
|
||||
from quantum.api.v2 import attributes
|
||||
from quantum.common import exceptions
|
||||
import quantum.extensions
|
||||
from quantum.manager import QuantumManager
|
||||
from quantum.openstack.common import log as logging
|
||||
from quantum import wsgi
|
||||
from neutron.api.v2 import attributes
|
||||
from neutron.common import exceptions
|
||||
import neutron.extensions
|
||||
from neutron.manager import NeutronManager
|
||||
from neutron.openstack.common import log as logging
|
||||
from neutron import wsgi
|
||||
|
||||
|
||||
LOG = logging.getLogger('quantum.api.extensions')
|
||||
LOG = logging.getLogger('neutron.api.extensions')
|
||||
|
||||
|
||||
class PluginInterface(object):
|
||||
@ -611,15 +611,15 @@ class PluginAwareExtensionManager(ExtensionManager):
|
||||
def get_instance(cls):
|
||||
if cls._instance is None:
|
||||
cls._instance = cls(get_extensions_path(),
|
||||
QuantumManager.get_service_plugins())
|
||||
NeutronManager.get_service_plugins())
|
||||
return cls._instance
|
||||
|
||||
|
||||
class RequestExtension(object):
|
||||
"""Extend requests and responses of core Quantum OpenStack API controllers.
|
||||
"""Extend requests and responses of core Neutron OpenStack API controllers.
|
||||
|
||||
Provide a way to add data to responses and handle custom request data
|
||||
that is sent to core Quantum OpenStack API controllers.
|
||||
that is sent to core Neutron OpenStack API controllers.
|
||||
|
||||
"""
|
||||
def __init__(self, method, url_route, handler):
|
||||
@ -630,7 +630,7 @@ class RequestExtension(object):
|
||||
|
||||
|
||||
class ActionExtension(object):
|
||||
"""Add custom actions to core Quantum OpenStack API controllers."""
|
||||
"""Add custom actions to core Neutron OpenStack API controllers."""
|
||||
|
||||
def __init__(self, collection, action_name, handler):
|
||||
self.collection = collection
|
||||
@ -639,7 +639,7 @@ class ActionExtension(object):
|
||||
|
||||
|
||||
class ResourceExtension(object):
|
||||
"""Add top level resources to the OpenStack API in Quantum."""
|
||||
"""Add top level resources to the OpenStack API in Neutron."""
|
||||
|
||||
def __init__(self, collection, controller, parent=None, path_prefix="",
|
||||
collection_actions={}, member_actions={}, attr_map={}):
|
||||
@ -653,9 +653,9 @@ class ResourceExtension(object):
|
||||
|
||||
|
||||
# Returns the extention paths from a config entry and the __path__
|
||||
# of quantum.extensions
|
||||
# of neutron.extensions
|
||||
def get_extensions_path():
|
||||
paths = ':'.join(quantum.extensions.__path__)
|
||||
paths = ':'.join(neutron.extensions.__path__)
|
||||
if cfg.CONF.api_extensions_path:
|
||||
paths = ':'.join([cfg.CONF.api_extensions_path, paths])
|
||||
|
@ -13,12 +13,12 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
from quantum.common import constants
|
||||
from quantum.common import topics
|
||||
from quantum.common import utils
|
||||
from quantum import manager
|
||||
from quantum.openstack.common import log as logging
|
||||
from quantum.openstack.common.rpc import proxy
|
||||
from neutron.common import constants
|
||||
from neutron.common import topics
|
||||
from neutron.common import utils
|
||||
from neutron import manager
|
||||
from neutron.openstack.common import log as logging
|
||||
from neutron.openstack.common.rpc import proxy
|
||||
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
@ -44,7 +44,7 @@ class DhcpAgentNotifyAPI(proxy.RpcProxy):
|
||||
topic=topic, default_version=self.BASE_RPC_API_VERSION)
|
||||
|
||||
def _get_dhcp_agents(self, context, network_id):
|
||||
plugin = manager.QuantumManager.get_plugin()
|
||||
plugin = manager.NeutronManager.get_plugin()
|
||||
dhcp_agents = plugin.get_dhcp_agents_hosting_networks(
|
||||
context, [network_id], active=True)
|
||||
return [(dhcp_agent.host, dhcp_agent.topic) for
|
||||
@ -59,7 +59,7 @@ class DhcpAgentNotifyAPI(proxy.RpcProxy):
|
||||
|
||||
def _notification(self, context, method, payload, network_id):
|
||||
"""Notify all the agents that are hosting the network."""
|
||||
plugin = manager.QuantumManager.get_plugin()
|
||||
plugin = manager.NeutronManager.get_plugin()
|
||||
if (method != 'network_delete_end' and utils.is_extension_supported(
|
||||
plugin, constants.AGENT_SCHEDULER_EXT_ALIAS)):
|
||||
if method == 'port_create_end':
|
@ -13,12 +13,12 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
from quantum.common import constants
|
||||
from quantum.common import topics
|
||||
from quantum.common import utils
|
||||
from quantum import manager
|
||||
from quantum.openstack.common import log as logging
|
||||
from quantum.openstack.common.rpc import proxy
|
||||
from neutron.common import constants
|
||||
from neutron.common import topics
|
||||
from neutron.common import utils
|
||||
from neutron import manager
|
||||
from neutron.openstack.common import log as logging
|
||||
from neutron.openstack.common.rpc import proxy
|
||||
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
@ -46,7 +46,7 @@ class L3AgentNotifyAPI(proxy.RpcProxy):
|
||||
operation, data):
|
||||
"""Notify changed routers to hosting l3 agents."""
|
||||
adminContext = context.is_admin and context or context.elevated()
|
||||
plugin = manager.QuantumManager.get_plugin()
|
||||
plugin = manager.NeutronManager.get_plugin()
|
||||
for router in routers:
|
||||
l3_agents = plugin.get_l3_agents_hosting_routers(
|
||||
adminContext, [router['id']],
|
||||
@ -65,7 +65,7 @@ class L3AgentNotifyAPI(proxy.RpcProxy):
|
||||
|
||||
def _notification(self, context, method, routers, operation, data):
|
||||
"""Notify all the agents that are hosting the routers."""
|
||||
plugin = manager.QuantumManager.get_plugin()
|
||||
plugin = manager.NeutronManager.get_plugin()
|
||||
if utils.is_extension_supported(
|
||||
plugin, constants.AGENT_SCHEDULER_EXT_ALIAS):
|
||||
adminContext = (context.is_admin and
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user