Establish a successful baseline for CI jobs
Tweaks involved renaming the odl module to avoid dashes. Also, a copy of the policy.json file was needed to get existing tests to pass. Something smarter will have to be devised to avoid holding a copy of a file that ultimately belongs to Neutron core. Missing doc files were also added. Lastly, prune the requirements to use only the ones that are stricly required. Change-Id: I8addb54d519ce1ab4398d32eee1bebf87c5e37b6
This commit is contained in:
4
.gitignore
vendored
4
.gitignore
vendored
@@ -9,8 +9,8 @@ doc/build
|
|||||||
*.DS_Store
|
*.DS_Store
|
||||||
*.pyc
|
*.pyc
|
||||||
networking_odl.egg-info/
|
networking_odl.egg-info/
|
||||||
networking-odl/vcsversion.py
|
networking_odl/vcsversion.py
|
||||||
networking-odl/versioninfo
|
networking_odl/versioninfo
|
||||||
pbr*.egg/
|
pbr*.egg/
|
||||||
quantum.egg-info/
|
quantum.egg-info/
|
||||||
quantum/vcsversion.py
|
quantum/vcsversion.py
|
||||||
|
|||||||
@@ -1,4 +1,7 @@
|
|||||||
[DEFAULT]
|
[DEFAULT]
|
||||||
test_command=OS_STDOUT_CAPTURE=1 OS_STDERR_CAPTURE=1 OS_LOG_CAPTURE=1 ${PYTHON:-python} -m subunit.run discover -t ./ ${OS_TEST_PATH:-./networking-odl/tests/unit} $LISTOPT $IDOPTION
|
test_command=OS_STDOUT_CAPTURE=${OS_STDOUT_CAPTURE:-1} \
|
||||||
|
OS_STDERR_CAPTURE=${OS_STDERR_CAPTURE:-1} \
|
||||||
|
OS_TEST_TIMEOUT=${OS_TEST_TIMEOUT:-60} \
|
||||||
|
${PYTHON:-python} -m subunit.run discover -t ./ . $LISTOPT $IDOPTION
|
||||||
test_id_option=--load-list $IDFILE
|
test_id_option=--load-list $IDFILE
|
||||||
test_list_option=--list
|
test_list_option=--list
|
||||||
|
|||||||
@@ -13,4 +13,4 @@ Pull requests submitted through GitHub will be ignored.
|
|||||||
|
|
||||||
Bugs should be filed on Launchpad, not GitHub:
|
Bugs should be filed on Launchpad, not GitHub:
|
||||||
|
|
||||||
https://bugs.launchpad.net/neutron
|
https://bugs.launchpad.net/neutron-odl
|
||||||
|
|||||||
75
doc/source/conf.py
Executable file
75
doc/source/conf.py
Executable file
@@ -0,0 +1,75 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
# you may not use this file except in compliance with the License.
|
||||||
|
# You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||||
|
# implied.
|
||||||
|
# See the License for the specific language governing permissions and
|
||||||
|
# limitations under the License.
|
||||||
|
|
||||||
|
import os
|
||||||
|
import sys
|
||||||
|
|
||||||
|
sys.path.insert(0, os.path.abspath('../..'))
|
||||||
|
# -- General configuration ----------------------------------------------------
|
||||||
|
|
||||||
|
# Add any Sphinx extension module names here, as strings. They can be
|
||||||
|
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
|
||||||
|
extensions = [
|
||||||
|
'sphinx.ext.autodoc',
|
||||||
|
#'sphinx.ext.intersphinx',
|
||||||
|
'oslosphinx'
|
||||||
|
]
|
||||||
|
|
||||||
|
# autodoc generation is a bit aggressive and a nuisance when doing heavy
|
||||||
|
# text edit cycles.
|
||||||
|
# execute "export SPHINX_DEBUG=1" in your terminal to disable
|
||||||
|
|
||||||
|
# The suffix of source filenames.
|
||||||
|
source_suffix = '.rst'
|
||||||
|
|
||||||
|
# The master toctree document.
|
||||||
|
master_doc = 'index'
|
||||||
|
|
||||||
|
# General information about the project.
|
||||||
|
project = u'networking-odl'
|
||||||
|
copyright = u'2013, OpenStack Foundation'
|
||||||
|
|
||||||
|
# If true, '()' will be appended to :func: etc. cross-reference text.
|
||||||
|
add_function_parentheses = True
|
||||||
|
|
||||||
|
# If true, the current module name will be prepended to all description
|
||||||
|
# unit titles (such as .. function::).
|
||||||
|
add_module_names = True
|
||||||
|
|
||||||
|
# The name of the Pygments (syntax highlighting) style to use.
|
||||||
|
pygments_style = 'sphinx'
|
||||||
|
|
||||||
|
# -- Options for HTML output --------------------------------------------------
|
||||||
|
|
||||||
|
# The theme to use for HTML and HTML Help pages. Major themes that come with
|
||||||
|
# Sphinx are currently 'default' and 'sphinxdoc'.
|
||||||
|
# html_theme_path = ["."]
|
||||||
|
# html_theme = '_theme'
|
||||||
|
# html_static_path = ['static']
|
||||||
|
|
||||||
|
# Output file base name for HTML help builder.
|
||||||
|
htmlhelp_basename = '%sdoc' % project
|
||||||
|
|
||||||
|
# Grouping the document tree into LaTeX files. List of tuples
|
||||||
|
# (source start file, target name, title, author, documentclass
|
||||||
|
# [howto/manual]).
|
||||||
|
latex_documents = [
|
||||||
|
('index',
|
||||||
|
'%s.tex' % project,
|
||||||
|
u'%s Documentation' % project,
|
||||||
|
u'OpenStack Foundation', 'manual'),
|
||||||
|
]
|
||||||
|
|
||||||
|
# Example configuration for intersphinx: refer to the Python standard library.
|
||||||
|
#intersphinx_mapping = {'http://docs.python.org/': None}
|
||||||
4
doc/source/contributing.rst
Normal file
4
doc/source/contributing.rst
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
============
|
||||||
|
Contributing
|
||||||
|
============
|
||||||
|
.. include:: ../../CONTRIBUTING.rst
|
||||||
25
doc/source/index.rst
Normal file
25
doc/source/index.rst
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
.. networking-odl documentation master file, created by
|
||||||
|
sphinx-quickstart on Tue Jul 9 22:26:36 2013.
|
||||||
|
You can adapt this file completely to your liking, but it should at least
|
||||||
|
contain the root `toctree` directive.
|
||||||
|
|
||||||
|
Welcome to networking-odl's documentation!
|
||||||
|
========================================================
|
||||||
|
|
||||||
|
Contents:
|
||||||
|
|
||||||
|
.. toctree::
|
||||||
|
:maxdepth: 2
|
||||||
|
|
||||||
|
readme
|
||||||
|
installation
|
||||||
|
usage
|
||||||
|
contributing
|
||||||
|
|
||||||
|
Indices and tables
|
||||||
|
==================
|
||||||
|
|
||||||
|
* :ref:`genindex`
|
||||||
|
* :ref:`modindex`
|
||||||
|
* :ref:`search`
|
||||||
|
|
||||||
12
doc/source/installation.rst
Normal file
12
doc/source/installation.rst
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
============
|
||||||
|
Installation
|
||||||
|
============
|
||||||
|
|
||||||
|
At the command line::
|
||||||
|
|
||||||
|
$ pip install networking-odl
|
||||||
|
|
||||||
|
Or, if you have virtualenvwrapper installed::
|
||||||
|
|
||||||
|
$ mkvirtualenv networking-odl
|
||||||
|
$ pip install networking-odl
|
||||||
1
doc/source/readme.rst
Normal file
1
doc/source/readme.rst
Normal file
@@ -0,0 +1 @@
|
|||||||
|
.. include:: ../../README.rst
|
||||||
7
doc/source/usage.rst
Normal file
7
doc/source/usage.rst
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
========
|
||||||
|
Usage
|
||||||
|
========
|
||||||
|
|
||||||
|
To use networking-odl in a project::
|
||||||
|
|
||||||
|
import networking_odl
|
||||||
143
etc/policy.json
Normal file
143
etc/policy.json
Normal file
@@ -0,0 +1,143 @@
|
|||||||
|
{
|
||||||
|
"context_is_admin": "role:admin",
|
||||||
|
"admin_or_owner": "rule:context_is_admin or tenant_id:%(tenant_id)s",
|
||||||
|
"context_is_advsvc": "role:advsvc",
|
||||||
|
"admin_or_network_owner": "rule:context_is_admin or tenant_id:%(network:tenant_id)s",
|
||||||
|
"admin_only": "rule:context_is_admin",
|
||||||
|
"regular_user": "",
|
||||||
|
"shared": "field:networks:shared=True",
|
||||||
|
"shared_firewalls": "field:firewalls:shared=True",
|
||||||
|
"external": "field:networks:router:external=True",
|
||||||
|
"default": "rule:admin_or_owner",
|
||||||
|
|
||||||
|
"create_subnet": "rule:admin_or_network_owner",
|
||||||
|
"get_subnet": "rule:admin_or_owner or rule:shared",
|
||||||
|
"update_subnet": "rule:admin_or_network_owner",
|
||||||
|
"delete_subnet": "rule:admin_or_network_owner",
|
||||||
|
|
||||||
|
"create_network": "",
|
||||||
|
"get_network": "rule:admin_or_owner or rule:shared or rule:external or rule:context_is_advsvc",
|
||||||
|
"get_network:router:external": "rule:regular_user",
|
||||||
|
"get_network:segments": "rule:admin_only",
|
||||||
|
"get_network:provider:network_type": "rule:admin_only",
|
||||||
|
"get_network:provider:physical_network": "rule:admin_only",
|
||||||
|
"get_network:provider:segmentation_id": "rule:admin_only",
|
||||||
|
"get_network:queue_id": "rule:admin_only",
|
||||||
|
"create_network:shared": "rule:admin_only",
|
||||||
|
"create_network:router:external": "rule:admin_only",
|
||||||
|
"create_network:segments": "rule:admin_only",
|
||||||
|
"create_network:provider:network_type": "rule:admin_only",
|
||||||
|
"create_network:provider:physical_network": "rule:admin_only",
|
||||||
|
"create_network:provider:segmentation_id": "rule:admin_only",
|
||||||
|
"update_network": "rule:admin_or_owner",
|
||||||
|
"update_network:segments": "rule:admin_only",
|
||||||
|
"update_network:shared": "rule:admin_only",
|
||||||
|
"update_network:provider:network_type": "rule:admin_only",
|
||||||
|
"update_network:provider:physical_network": "rule:admin_only",
|
||||||
|
"update_network:provider:segmentation_id": "rule:admin_only",
|
||||||
|
"update_network:router:external": "rule:admin_only",
|
||||||
|
"delete_network": "rule:admin_or_owner",
|
||||||
|
|
||||||
|
"create_port": "",
|
||||||
|
"create_port:mac_address": "rule:admin_or_network_owner or rule:context_is_advsvc",
|
||||||
|
"create_port:fixed_ips": "rule:admin_or_network_owner or rule:context_is_advsvc",
|
||||||
|
"create_port:port_security_enabled": "rule:admin_or_network_owner or rule:context_is_advsvc",
|
||||||
|
"create_port:binding:host_id": "rule:admin_only",
|
||||||
|
"create_port:binding:profile": "rule:admin_only",
|
||||||
|
"create_port:mac_learning_enabled": "rule:admin_or_network_owner or rule:context_is_advsvc",
|
||||||
|
"get_port": "rule:admin_or_owner or rule:context_is_advsvc",
|
||||||
|
"get_port:queue_id": "rule:admin_only",
|
||||||
|
"get_port:binding:vif_type": "rule:admin_only",
|
||||||
|
"get_port:binding:vif_details": "rule:admin_only",
|
||||||
|
"get_port:binding:host_id": "rule:admin_only",
|
||||||
|
"get_port:binding:profile": "rule:admin_only",
|
||||||
|
"update_port": "rule:admin_or_owner or rule:context_is_advsvc",
|
||||||
|
"update_port:fixed_ips": "rule:admin_or_network_owner or rule:context_is_advsvc",
|
||||||
|
"update_port:port_security_enabled": "rule:admin_or_network_owner or rule:context_is_advsvc",
|
||||||
|
"update_port:binding:host_id": "rule:admin_only",
|
||||||
|
"update_port:binding:profile": "rule:admin_only",
|
||||||
|
"update_port:mac_learning_enabled": "rule:admin_or_network_owner or rule:context_is_advsvc",
|
||||||
|
"delete_port": "rule:admin_or_owner or rule:context_is_advsvc",
|
||||||
|
|
||||||
|
"get_router:ha": "rule:admin_only",
|
||||||
|
"create_router": "rule:regular_user",
|
||||||
|
"create_router:external_gateway_info:enable_snat": "rule:admin_only",
|
||||||
|
"create_router:distributed": "rule:admin_only",
|
||||||
|
"create_router:ha": "rule:admin_only",
|
||||||
|
"get_router": "rule:admin_or_owner",
|
||||||
|
"get_router:distributed": "rule:admin_only",
|
||||||
|
"update_router:external_gateway_info:enable_snat": "rule:admin_only",
|
||||||
|
"update_router:distributed": "rule:admin_only",
|
||||||
|
"update_router:ha": "rule:admin_only",
|
||||||
|
"delete_router": "rule:admin_or_owner",
|
||||||
|
|
||||||
|
"add_router_interface": "rule:admin_or_owner",
|
||||||
|
"remove_router_interface": "rule:admin_or_owner",
|
||||||
|
|
||||||
|
"create_router:external_gateway_info:external_fixed_ips": "rule:admin_only",
|
||||||
|
"update_router:external_gateway_info:external_fixed_ips": "rule:admin_only",
|
||||||
|
|
||||||
|
"create_firewall": "",
|
||||||
|
"get_firewall": "rule:admin_or_owner",
|
||||||
|
"create_firewall:shared": "rule:admin_only",
|
||||||
|
"get_firewall:shared": "rule:admin_only",
|
||||||
|
"update_firewall": "rule:admin_or_owner",
|
||||||
|
"update_firewall:shared": "rule:admin_only",
|
||||||
|
"delete_firewall": "rule:admin_or_owner",
|
||||||
|
|
||||||
|
"create_firewall_policy": "",
|
||||||
|
"get_firewall_policy": "rule:admin_or_owner or rule:shared_firewalls",
|
||||||
|
"create_firewall_policy:shared": "rule:admin_or_owner",
|
||||||
|
"update_firewall_policy": "rule:admin_or_owner",
|
||||||
|
"delete_firewall_policy": "rule:admin_or_owner",
|
||||||
|
|
||||||
|
"create_firewall_rule": "",
|
||||||
|
"get_firewall_rule": "rule:admin_or_owner or rule:shared_firewalls",
|
||||||
|
"update_firewall_rule": "rule:admin_or_owner",
|
||||||
|
"delete_firewall_rule": "rule:admin_or_owner",
|
||||||
|
|
||||||
|
"create_qos_queue": "rule:admin_only",
|
||||||
|
"get_qos_queue": "rule:admin_only",
|
||||||
|
|
||||||
|
"update_agent": "rule:admin_only",
|
||||||
|
"delete_agent": "rule:admin_only",
|
||||||
|
"get_agent": "rule:admin_only",
|
||||||
|
|
||||||
|
"create_dhcp-network": "rule:admin_only",
|
||||||
|
"delete_dhcp-network": "rule:admin_only",
|
||||||
|
"get_dhcp-networks": "rule:admin_only",
|
||||||
|
"create_l3-router": "rule:admin_only",
|
||||||
|
"delete_l3-router": "rule:admin_only",
|
||||||
|
"get_l3-routers": "rule:admin_only",
|
||||||
|
"get_dhcp-agents": "rule:admin_only",
|
||||||
|
"get_l3-agents": "rule:admin_only",
|
||||||
|
"get_loadbalancer-agent": "rule:admin_only",
|
||||||
|
"get_loadbalancer-pools": "rule:admin_only",
|
||||||
|
|
||||||
|
"create_floatingip": "rule:regular_user",
|
||||||
|
"create_floatingip:floating_ip_address": "rule:admin_only",
|
||||||
|
"update_floatingip": "rule:admin_or_owner",
|
||||||
|
"delete_floatingip": "rule:admin_or_owner",
|
||||||
|
"get_floatingip": "rule:admin_or_owner",
|
||||||
|
|
||||||
|
"create_network_profile": "rule:admin_only",
|
||||||
|
"update_network_profile": "rule:admin_only",
|
||||||
|
"delete_network_profile": "rule:admin_only",
|
||||||
|
"get_network_profiles": "",
|
||||||
|
"get_network_profile": "",
|
||||||
|
"update_policy_profiles": "rule:admin_only",
|
||||||
|
"get_policy_profiles": "",
|
||||||
|
"get_policy_profile": "",
|
||||||
|
|
||||||
|
"create_metering_label": "rule:admin_only",
|
||||||
|
"delete_metering_label": "rule:admin_only",
|
||||||
|
"get_metering_label": "rule:admin_only",
|
||||||
|
|
||||||
|
"create_metering_label_rule": "rule:admin_only",
|
||||||
|
"delete_metering_label_rule": "rule:admin_only",
|
||||||
|
"get_metering_label_rule": "rule:admin_only",
|
||||||
|
|
||||||
|
"get_service_provider": "rule:regular_user",
|
||||||
|
"get_lsn": "rule:admin_only",
|
||||||
|
"create_lsn": "rule:admin_only"
|
||||||
|
}
|
||||||
@@ -16,4 +16,4 @@
|
|||||||
import gettext
|
import gettext
|
||||||
|
|
||||||
|
|
||||||
gettext.install('networking-odl', unicode=1)
|
gettext.install('networking_odl', unicode=1)
|
||||||
@@ -24,7 +24,7 @@ try:
|
|||||||
# repository. It is OK to have more than one translation function
|
# repository. It is OK to have more than one translation function
|
||||||
# using the same domain, since there will still only be one message
|
# using the same domain, since there will still only be one message
|
||||||
# catalog.
|
# catalog.
|
||||||
_translators = oslo.i18n.TranslatorFactory(domain='networking-odl')
|
_translators = oslo.i18n.TranslatorFactory(domain='networking_odl')
|
||||||
|
|
||||||
# The primary translation function using the well-known name "_"
|
# The primary translation function using the well-known name "_"
|
||||||
_ = _translators.primary
|
_ = _translators.primary
|
||||||
@@ -40,6 +40,6 @@ try:
|
|||||||
_LC = _translators.log_critical
|
_LC = _translators.log_critical
|
||||||
except ImportError:
|
except ImportError:
|
||||||
# NOTE(dims): Support for cases where a project wants to use
|
# NOTE(dims): Support for cases where a project wants to use
|
||||||
# code from networking-odl-incubator, but is not ready to be internationalized
|
# code from networking_odl-incubator, but is not ready to be internationalized
|
||||||
# (like tempest)
|
# (like tempest)
|
||||||
_ = _LI = _LW = _LE = _LC = lambda x: x
|
_ = _LI = _LW = _LE = _LC = lambda x: x
|
||||||
@@ -25,10 +25,10 @@ Supported configuration options:
|
|||||||
# THIS MODULE IS DEPRECATED
|
# THIS MODULE IS DEPRECATED
|
||||||
#
|
#
|
||||||
# Please refer to
|
# Please refer to
|
||||||
# https://etherpad.openstack.org/p/kilo-networking-odl-library-proposals for
|
# https://etherpad.openstack.org/p/kilo-networking_odl-library-proposals for
|
||||||
# the discussion leading to this deprecation.
|
# the discussion leading to this deprecation.
|
||||||
#
|
#
|
||||||
# We recommend helping with the new networking-odl.cache library being created
|
# We recommend helping with the new networking_odl.cache library being created
|
||||||
# as a wrapper for dogpile.
|
# as a wrapper for dogpile.
|
||||||
#
|
#
|
||||||
########################################################################
|
########################################################################
|
||||||
@@ -85,7 +85,7 @@ def get_cache(url='memory://'):
|
|||||||
parameters = parse.parse_qsl(query)
|
parameters = parse.parse_qsl(query)
|
||||||
kwargs = {'options': dict(parameters)}
|
kwargs = {'options': dict(parameters)}
|
||||||
|
|
||||||
mgr = driver.DriverManager('networking-odl.openstack.common.cache.backends', backend,
|
mgr = driver.DriverManager('networking_odl.openstack.common.cache.backends', backend,
|
||||||
invoke_on_load=True,
|
invoke_on_load=True,
|
||||||
invoke_args=[parsed],
|
invoke_args=[parsed],
|
||||||
invoke_kwds=kwargs)
|
invoke_kwds=kwargs)
|
||||||
@@ -30,8 +30,8 @@ import eventlet.backdoor
|
|||||||
import greenlet
|
import greenlet
|
||||||
from oslo.config import cfg
|
from oslo.config import cfg
|
||||||
|
|
||||||
from networking-odl.openstack.common._i18n import _LI
|
from networking_odl.openstack.common._i18n import _LI
|
||||||
from networking-odl.openstack.common import log as logging
|
from networking_odl.openstack.common import log as logging
|
||||||
|
|
||||||
help_for_backdoor_port = (
|
help_for_backdoor_port = (
|
||||||
"Acceptable values are 0, <port>, and <start>:<end>, where 0 results "
|
"Acceptable values are 0, <port>, and <start>:<end>, where 0 results "
|
||||||
@@ -46,8 +46,8 @@ from six import moves
|
|||||||
|
|
||||||
_PY26 = sys.version_info[0:2] == (2, 6)
|
_PY26 = sys.version_info[0:2] == (2, 6)
|
||||||
|
|
||||||
from networking-odl.openstack.common._i18n import _
|
from networking_odl.openstack.common._i18n import _
|
||||||
from networking-odl.openstack.common import local
|
from networking_odl.openstack.common import local
|
||||||
|
|
||||||
|
|
||||||
_DEFAULT_LOG_DATE_FORMAT = "%Y-%m-%d %H:%M:%S"
|
_DEFAULT_LOG_DATE_FORMAT = "%Y-%m-%d %H:%M:%S"
|
||||||
@@ -21,8 +21,8 @@ import time
|
|||||||
from eventlet import event
|
from eventlet import event
|
||||||
from eventlet import greenthread
|
from eventlet import greenthread
|
||||||
|
|
||||||
from networking-odl.openstack.common._i18n import _LE, _LW
|
from networking_odl.openstack.common._i18n import _LE, _LW
|
||||||
from networking-odl.openstack.common import log as logging
|
from networking_odl.openstack.common import log as logging
|
||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
|
|
||||||
@@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
from oslo.middleware import catch_errors
|
from oslo.middleware import catch_errors
|
||||||
|
|
||||||
from networking-odl.openstack.common import versionutils
|
from networking_odl.openstack.common import versionutils
|
||||||
|
|
||||||
|
|
||||||
@versionutils.deprecated(as_of=versionutils.deprecated.KILO,
|
@versionutils.deprecated(as_of=versionutils.deprecated.KILO,
|
||||||
@@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
from oslo.middleware import request_id
|
from oslo.middleware import request_id
|
||||||
|
|
||||||
from networking-odl.openstack.common import versionutils
|
from networking_odl.openstack.common import versionutils
|
||||||
|
|
||||||
|
|
||||||
ENV_REQUEST_ID = 'openstack.request_id'
|
ENV_REQUEST_ID = 'openstack.request_id'
|
||||||
@@ -18,8 +18,8 @@ import time
|
|||||||
from oslo.config import cfg
|
from oslo.config import cfg
|
||||||
import six
|
import six
|
||||||
|
|
||||||
from networking-odl.openstack.common._i18n import _, _LE, _LI
|
from networking_odl.openstack.common._i18n import _, _LE, _LI
|
||||||
from networking-odl.openstack.common import log as logging
|
from networking_odl.openstack.common import log as logging
|
||||||
|
|
||||||
|
|
||||||
periodic_opts = [
|
periodic_opts = [
|
||||||
@@ -100,9 +100,9 @@ import six
|
|||||||
import six.moves.urllib.parse as urlparse
|
import six.moves.urllib.parse as urlparse
|
||||||
import six.moves.urllib.request as urlrequest
|
import six.moves.urllib.request as urlrequest
|
||||||
|
|
||||||
from networking-odl.openstack.common import fileutils
|
from networking_odl.openstack.common import fileutils
|
||||||
from networking-odl.openstack.common._i18n import _, _LE, _LI
|
from networking_odl.openstack.common._i18n import _, _LE, _LI
|
||||||
from networking-odl.openstack.common import log as logging
|
from networking_odl.openstack.common import log as logging
|
||||||
|
|
||||||
|
|
||||||
policy_opts = [
|
policy_opts = [
|
||||||
@@ -37,11 +37,11 @@ import eventlet
|
|||||||
from eventlet import event
|
from eventlet import event
|
||||||
from oslo.config import cfg
|
from oslo.config import cfg
|
||||||
|
|
||||||
from networking-odl.openstack.common import eventlet_backdoor
|
from networking_odl.openstack.common import eventlet_backdoor
|
||||||
from networking-odl.openstack.common._i18n import _LE, _LI, _LW
|
from networking_odl.openstack.common._i18n import _LE, _LI, _LW
|
||||||
from networking-odl.openstack.common import log as logging
|
from networking_odl.openstack.common import log as logging
|
||||||
from networking-odl.openstack.common import systemd
|
from networking_odl.openstack.common import systemd
|
||||||
from networking-odl.openstack.common import threadgroup
|
from networking_odl.openstack.common import threadgroup
|
||||||
|
|
||||||
|
|
||||||
CONF = cfg.CONF
|
CONF = cfg.CONF
|
||||||
@@ -20,7 +20,7 @@ import os
|
|||||||
import socket
|
import socket
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
from networking-odl.openstack.common import log as logging
|
from networking_odl.openstack.common import log as logging
|
||||||
|
|
||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
@@ -16,8 +16,8 @@ import threading
|
|||||||
import eventlet
|
import eventlet
|
||||||
from eventlet import greenpool
|
from eventlet import greenpool
|
||||||
|
|
||||||
from networking-odl.openstack.common import log as logging
|
from networking_odl.openstack.common import log as logging
|
||||||
from networking-odl.openstack.common import loopingcall
|
from networking_odl.openstack.common import loopingcall
|
||||||
|
|
||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
@@ -23,8 +23,8 @@ import inspect
|
|||||||
import pkg_resources
|
import pkg_resources
|
||||||
import six
|
import six
|
||||||
|
|
||||||
from networking-odl.openstack.common._i18n import _
|
from networking_odl.openstack.common._i18n import _
|
||||||
from networking-odl.openstack.common import log as logging
|
from networking_odl.openstack.common import log as logging
|
||||||
|
|
||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
@@ -136,7 +136,7 @@ class deprecated(object):
|
|||||||
# TODO(tsufiev): change `functools` module to `six` as
|
# TODO(tsufiev): change `functools` module to `six` as
|
||||||
# soon as six 1.7.4 (with fix for passing `assigned`
|
# soon as six 1.7.4 (with fix for passing `assigned`
|
||||||
# argument to underlying `functools.wraps`) is released
|
# argument to underlying `functools.wraps`) is released
|
||||||
# and added to the networking-odl-incubator requrements
|
# and added to the networking_odl-incubator requrements
|
||||||
@functools.wraps(orig_init, assigned=('__name__', '__doc__'))
|
@functools.wraps(orig_init, assigned=('__name__', '__doc__'))
|
||||||
def new_init(self, *args, **kwargs):
|
def new_init(self, *args, **kwargs):
|
||||||
LOG.deprecated(msg, details)
|
LOG.deprecated(msg, details)
|
||||||
@@ -20,4 +20,4 @@ module=threadgroup
|
|||||||
module=uuidutils
|
module=uuidutils
|
||||||
|
|
||||||
# The base module to hold the copy of openstack.common
|
# The base module to hold the copy of openstack.common
|
||||||
base=networking-odl
|
base=networking_odl
|
||||||
|
|||||||
@@ -1,37 +1,7 @@
|
|||||||
# The order of packages is significant, because pip processes them in the order
|
# The order of packages is significant, because pip processes them in the order
|
||||||
# of appearance. Changing the order has an impact on the overall integration
|
# of appearance. Changing the order has an impact on the overall integration
|
||||||
# process, which may cause wedges in the gate later.
|
# process, which may cause wedges in the gate later.
|
||||||
|
|
||||||
pbr>=0.6,!=0.7,<1.0
|
pbr>=0.6,!=0.7,<1.0
|
||||||
|
Babel>=1.3
|
||||||
Paste
|
|
||||||
PasteDeploy>=1.5.0
|
|
||||||
Routes>=1.12.3,!=2.0
|
|
||||||
anyjson>=0.3.3
|
|
||||||
argparse
|
|
||||||
eventlet>=0.15.2
|
|
||||||
greenlet>=0.3.2
|
|
||||||
httplib2>=0.7.5
|
|
||||||
requests>=2.2.0,!=2.4.0
|
|
||||||
iso8601>=0.1.9
|
|
||||||
jsonrpclib
|
|
||||||
Jinja2>=2.6 # BSD License (3 clause)
|
|
||||||
keystonemiddleware>=1.0.0
|
|
||||||
netaddr>=0.7.12
|
|
||||||
python-neutronclient>=2.3.6,<3
|
|
||||||
SQLAlchemy>=0.9.7,<=0.9.99
|
|
||||||
WebOb>=1.2.3
|
|
||||||
python-keystoneclient>=0.11.1
|
|
||||||
alembic>=0.6.4
|
|
||||||
six>=1.7.0
|
|
||||||
stevedore>=1.1.0 # Apache-2.0
|
|
||||||
oslo.config>=1.4.0 # Apache-2.0
|
|
||||||
oslo.db>=1.1.0 # Apache-2.0
|
|
||||||
oslo.i18n>=1.0.0 # Apache-2.0
|
|
||||||
oslo.messaging>=1.4.0,!=1.5.0
|
|
||||||
oslo.middleware>=0.1.0 # Apache-2.0
|
|
||||||
oslo.rootwrap>=1.3.0
|
|
||||||
oslo.serialization>=1.0.0 # Apache-2.0
|
|
||||||
oslo.utils>=1.1.0 # Apache-2.0
|
|
||||||
|
|
||||||
python-novaclient>=2.18.0
|
|
||||||
-e git://git.openstack.org/openstack/neutron.git#egg=neutron
|
-e git://git.openstack.org/openstack/neutron.git#egg=neutron
|
||||||
|
|||||||
10
setup.cfg
10
setup.cfg
@@ -19,7 +19,7 @@ classifier =
|
|||||||
|
|
||||||
[files]
|
[files]
|
||||||
packages =
|
packages =
|
||||||
networking-odl
|
networking_odl
|
||||||
data_files =
|
data_files =
|
||||||
etc/neutron =
|
etc/neutron =
|
||||||
etc/neutron/plugins/ml2/ml2_conf_odl.ini
|
etc/neutron/plugins/ml2/ml2_conf_odl.ini
|
||||||
@@ -40,16 +40,16 @@ source-dir = doc/source
|
|||||||
[extract_messages]
|
[extract_messages]
|
||||||
keywords = _ gettext ngettext l_ lazy_gettext
|
keywords = _ gettext ngettext l_ lazy_gettext
|
||||||
mapping_file = babel.cfg
|
mapping_file = babel.cfg
|
||||||
output_file = networking-odl/locale/networking-odl.pot
|
output_file = networking_odl/locale/networking-odl.pot
|
||||||
|
|
||||||
[compile_catalog]
|
[compile_catalog]
|
||||||
directory = networking-odl/locale
|
directory = networking_odl/locale
|
||||||
domain = networking-odl
|
domain = networking-odl
|
||||||
|
|
||||||
[update_catalog]
|
[update_catalog]
|
||||||
domain = networking-odl
|
domain = networking-odl
|
||||||
output_dir = networking-odl/locale
|
output_dir = networking_odl/locale
|
||||||
input_file = networking-odl/locale/networking-odl.pot
|
input_file = networking_odl/locale/networking-odl.pot
|
||||||
|
|
||||||
[wheel]
|
[wheel]
|
||||||
universal = 1
|
universal = 1
|
||||||
|
|||||||
@@ -1,21 +1,16 @@
|
|||||||
# The order of packages is significant, because pip processes them in the order
|
# The order of packages is significant, because pip processes them in the order
|
||||||
# of appearance. Changing the order has an impact on the overall integration
|
# of appearance. Changing the order has an impact on the overall integration
|
||||||
# process, which may cause wedges in the gate later.
|
# process, which may cause wedges in the gate later.
|
||||||
|
|
||||||
hacking>=0.9.2,<0.10
|
hacking>=0.9.2,<0.10
|
||||||
|
|
||||||
cliff>=1.7.0 # Apache-2.0
|
|
||||||
coverage>=3.6
|
coverage>=3.6
|
||||||
discover
|
discover
|
||||||
fixtures>=0.3.14
|
python-subunit
|
||||||
mock>=1.0
|
sphinx>=1.1.2
|
||||||
python-subunit>=0.0.18
|
oslosphinx
|
||||||
requests-mock>=0.5.1 # Apache-2.0
|
oslotest>=1.1.0.0a1
|
||||||
sphinx>=1.1.2,!=1.2.0,!=1.3b1,<1.3
|
|
||||||
oslosphinx>=2.2.0 # Apache-2.0
|
|
||||||
testrepository>=0.0.18
|
testrepository>=0.0.18
|
||||||
testtools>=0.9.36,!=1.2.0
|
|
||||||
testscenarios>=0.4
|
testscenarios>=0.4
|
||||||
WebTest>=2.0
|
WebTest>=2.0
|
||||||
oslotest>=1.2.0 # Apache-2.0
|
testtools>=0.9.34
|
||||||
psycopg2
|
|
||||||
MySQL-python
|
|
||||||
|
|||||||
77
tox.ini
77
tox.ini
@@ -1,86 +1,41 @@
|
|||||||
[tox]
|
[tox]
|
||||||
envlist = py27,py33,py34,pep8
|
envlist = py27,pep8
|
||||||
minversion = 1.6
|
minversion = 1.6
|
||||||
skipsdist = True
|
skipsdist = True
|
||||||
|
|
||||||
[testenv]
|
[testenv]
|
||||||
# Note the hash seed is set to 0 until neutron can be tested with a
|
|
||||||
# random hash seed successfully.
|
|
||||||
setenv = VIRTUAL_ENV={envdir}
|
setenv = VIRTUAL_ENV={envdir}
|
||||||
PYTHONHASHSEED=0
|
|
||||||
usedevelop = True
|
usedevelop = True
|
||||||
install_command = pip install -r requirements.txt -U {opts} {packages}
|
install_command = pip install -r requirements.txt -U {opts} {packages}
|
||||||
deps = -r{toxinidir}/test-requirements.txt
|
deps = -r{toxinidir}/test-requirements.txt
|
||||||
whitelist_externals = sh
|
whitelist_externals = sh
|
||||||
commands =
|
commands = python setup.py testr --slowest --testr-args='{posargs}'
|
||||||
sh tools/pretty_tox.sh '{posargs}'
|
|
||||||
# there is also secret magic in pretty_tox.sh which lets you run in a fail only
|
|
||||||
# mode. To do this define the TRACE_FAILONLY environmental variable.
|
|
||||||
|
|
||||||
[testenv:hashtest]
|
|
||||||
# This is the same as default environment, but with a random PYTHONHASHSEED.
|
|
||||||
# You can also specify a specific hashseed (for test repeatability) as follows:
|
|
||||||
# tox --hashseed 1235130571 -e hashtest
|
|
||||||
setenv = VIRTUAL_ENV={envdir}
|
|
||||||
|
|
||||||
[testenv:functional]
|
|
||||||
setenv = OS_TEST_PATH=./networking-odl/tests/functional
|
|
||||||
|
|
||||||
[testenv:dsvm-functional]
|
|
||||||
setenv = OS_TEST_PATH=./networking-odl/tests/functional
|
|
||||||
OS_SUDO_TESTING=1
|
|
||||||
OS_ROOTWRAP_CMD=sudo /usr/local/bin/neutron-rootwrap /etc/neutron/rootwrap.conf
|
|
||||||
OS_FAIL_ON_MISSING_DEPS=1
|
|
||||||
sitepackages=True
|
|
||||||
|
|
||||||
[tox:jenkins]
|
|
||||||
sitepackages = True
|
|
||||||
downloadcache = ~/cache/pip
|
|
||||||
|
|
||||||
[testenv:pep8]
|
[testenv:pep8]
|
||||||
commands =
|
commands = flake8
|
||||||
sh ./tools/check_bash.sh
|
|
||||||
flake8
|
|
||||||
neutron-db-manage check_migration
|
|
||||||
whitelist_externals = sh
|
|
||||||
|
|
||||||
[testenv:i18n]
|
[testenv:i18n]
|
||||||
commands = python ./tools/check_i18n.py ./networking-odl ./tools/i18n_cfg.py
|
commands = python ./tools/check_i18n.py ./networking-odl ./tools/i18n_cfg.py
|
||||||
|
|
||||||
[testenv:cover]
|
|
||||||
commands =
|
|
||||||
python -m neutron.openstack.common.lockutils python setup.py testr --coverage --testr-args='{posargs}'
|
|
||||||
|
|
||||||
[testenv:venv]
|
[testenv:venv]
|
||||||
commands = {posargs}
|
commands = {posargs}
|
||||||
|
|
||||||
|
[testenv:cover]
|
||||||
|
commands = python setup.py testr --coverage --testr-args='{posargs}'
|
||||||
|
|
||||||
[testenv:docs]
|
[testenv:docs]
|
||||||
commands = python setup.py build_sphinx
|
commands = python setup.py build_sphinx
|
||||||
|
|
||||||
[flake8]
|
|
||||||
# E125 continuation line does not distinguish itself from next logical line
|
|
||||||
# E126 continuation line over-indented for hanging indent
|
|
||||||
# E128 continuation line under-indented for visual indent
|
|
||||||
# E129 visually indented line with same indent as next logical line
|
|
||||||
# E265 block comment should start with ‘# ‘
|
|
||||||
# H305 imports not grouped correctly
|
|
||||||
# H307 like imports should be grouped together
|
|
||||||
# H402 one line docstring needs punctuation
|
|
||||||
# H404 multi line docstring should start with a summary
|
|
||||||
# H405 multi line docstring summary not separated with an empty line
|
|
||||||
# H904 Wrap long lines in parentheses instead of a backslash
|
|
||||||
ignore = E125,E126,E128,E129,E265,H305,H307,H402,H404,H405,H904
|
|
||||||
show-source = true
|
|
||||||
builtins = _
|
|
||||||
exclude = .venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,build,tools,.ropeproject,rally-scenarios
|
|
||||||
|
|
||||||
[testenv:pylint]
|
|
||||||
deps =
|
|
||||||
{[testenv]deps}
|
|
||||||
pylint
|
|
||||||
commands =
|
|
||||||
pylint --rcfile=.pylintrc --output-format=colorized {posargs:networking-odl}
|
|
||||||
|
|
||||||
[hacking]
|
[hacking]
|
||||||
import_exceptions = neutron.i18n
|
import_exceptions = neutron.i18n
|
||||||
local-check-factory = neutron.hacking.checks.factory
|
local-check-factory = neutron.hacking.checks.factory
|
||||||
|
show-source = True
|
||||||
|
ignore = E123,E124,E125,H803
|
||||||
|
|
||||||
|
[flake8]
|
||||||
|
# H803 skipped on purpose per list discussion.
|
||||||
|
# E123, E125 skipped as they are invalid PEP-8.
|
||||||
|
show-source = True
|
||||||
|
ignore = E123,E125,H803
|
||||||
|
builtins = _
|
||||||
|
exclude=.venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,build,tools
|
||||||
|
|||||||
Reference in New Issue
Block a user