Merge "Added constraints tox targets"
This commit is contained in:
commit
f7ed0ebd89
@ -44,40 +44,42 @@ Client CLI API
|
||||
--------------
|
||||
|
||||
The originally implemented client CLI APIs (which are still available
|
||||
for backward compatibility) for an IPsec connection are:
|
||||
| neutron vpn-service-create ROUTER SUBNET
|
||||
| neutron ipsec-site-connection-create
|
||||
| --vpnservice-id VPNSERVICE
|
||||
| --ikepolicy-id IKEPOLICY
|
||||
| --ipsecpolicy-id IPSECPOLICY
|
||||
| --peer-address PEER_ADDRESS
|
||||
| --peer-id PEER_ID
|
||||
| --peer-cidr PEER_CIDRS
|
||||
| --dpd action=ACTION,interval=INTERVAL,timeout=TIMEOUT
|
||||
| --initiator {bi-directional | response-only}
|
||||
| --mtu MTU
|
||||
| --psk PSK
|
||||
for backward compatibility) for an IPsec connection are::
|
||||
|
||||
neutron vpn-service-create ROUTER SUBNET
|
||||
neutron ipsec-site-connection-create
|
||||
--vpnservice-id VPNSERVICE
|
||||
--ikepolicy-id IKEPOLICY
|
||||
--ipsecpolicy-id IPSECPOLICY
|
||||
--peer-address PEER_ADDRESS
|
||||
--peer-id PEER_ID
|
||||
--peer-cidr PEER_CIDRS
|
||||
--dpd action=ACTION,interval=INTERVAL,timeout=TIMEOUT
|
||||
--initiator {bi-directional | response-only}
|
||||
--mtu MTU
|
||||
--psk PSK
|
||||
|
||||
Changes to the API, to support multiple local subnets, are shown in
|
||||
**bold** text:
|
||||
| neutron vpn-service-create ROUTER
|
||||
| **neutron vpn-endpoint-groups-create**
|
||||
| **--name OPTIONAL-NAME**
|
||||
| **--description OPTIONAL-DESCRIPTION**
|
||||
| **--ep-type={subnet,cidr,network,vlan,router}**
|
||||
| **--ep-value=[list-of-endpoints-of-type]**
|
||||
| neutron ipsec-site-connection-create
|
||||
| --vpnservice-id VPNSERVICE
|
||||
| --ikepolicy-id IKEPOLICY
|
||||
| --ipsecpolicy-id IPSECPOLICY
|
||||
| --peer-address PEER_ADDRESS
|
||||
| --peer-id PEER_ID
|
||||
| --dpd action=ACTION,interval=INTERVAL,timeout=TIMEOUT
|
||||
| --initiator {bi-directional | response-only}
|
||||
| --mtu MTU
|
||||
| --psk PSK
|
||||
| **--local-endpoints ENDPOINT-GROUPS-UUID**
|
||||
| **--peer-endpoints ENDPOINT-GROUPS-UUID**
|
||||
**bold** text::
|
||||
|
||||
neutron vpn-service-create ROUTER
|
||||
**neutron vpn-endpoint-groups-create**
|
||||
**--name OPTIONAL-NAME**
|
||||
**--description OPTIONAL-DESCRIPTION**
|
||||
**--ep-type={subnet,cidr,network,vlan,router}**
|
||||
**--ep-value=[list-of-endpoints-of-type]**
|
||||
neutron ipsec-site-connection-create
|
||||
--vpnservice-id VPNSERVICE
|
||||
--ikepolicy-id IKEPOLICY
|
||||
--ipsecpolicy-id IPSECPOLICY
|
||||
--peer-address PEER_ADDRESS
|
||||
--peer-id PEER_ID
|
||||
--dpd action=ACTION,interval=INTERVAL,timeout=TIMEOUT
|
||||
--initiator {bi-directional | response-only}
|
||||
--mtu MTU
|
||||
--psk PSK
|
||||
**--local-endpoints ENDPOINT-GROUPS-UUID**
|
||||
**--peer-endpoints ENDPOINT-GROUPS-UUID**
|
||||
|
||||
The SUBNET in the original service API is optional, and will be used as an
|
||||
indicator of whether or not the multiple local subnets feature is active.
|
||||
@ -110,46 +112,48 @@ Examples
|
||||
--------
|
||||
|
||||
The original APIs to create one side of an IPSec connection with
|
||||
only one local and peer subnet:
|
||||
| neutron vpn-ikepolicy-create ikepolicy
|
||||
| neutron vpn-ipsecpolicy-create ipsecpolicy
|
||||
| neutron vpn-service-create --name myvpn router1 privateA
|
||||
| neutron ipsec-site-connection-create
|
||||
| --name vpnconnection1
|
||||
| --vpnservice-id myvpn
|
||||
| --ikepolicy-id ikepolicy
|
||||
| --ipsecpolicy-id ipsecpolicy
|
||||
| --peer-address 172.24.4.13
|
||||
| --peer-id 172.24.4.13
|
||||
| --peer-cidr 10.3.0.0/24
|
||||
| --psk secret
|
||||
only one local and peer subnet::
|
||||
|
||||
neutron vpn-ikepolicy-create ikepolicy
|
||||
neutron vpn-ipsecpolicy-create ipsecpolicy
|
||||
neutron vpn-service-create --name myvpn router1 privateA
|
||||
neutron ipsec-site-connection-create
|
||||
--name vpnconnection1
|
||||
--vpnservice-id myvpn
|
||||
--ikepolicy-id ikepolicy
|
||||
--ipsecpolicy-id ipsecpolicy
|
||||
--peer-address 172.24.4.13
|
||||
--peer-id 172.24.4.13
|
||||
--peer-cidr 10.3.0.0/24
|
||||
--psk secret
|
||||
|
||||
The local CIDR is obtained from the subnet, privateA. In this example,
|
||||
that would be 10.1.0.0/24 (because that's how privateA was created).
|
||||
|
||||
Using the multiple local subnet feature, the APIs (with changes shown
|
||||
in **bold** below:
|
||||
| neutron vpn-ikepolicy-create ikepolicy
|
||||
| neutron vpn-ipsecpolicy-create ipsecpolicy
|
||||
| neutron vpn-service-create --name myvpn router1
|
||||
| **neutron vpn-endpoint-group-create**
|
||||
| **--name local-eps**
|
||||
| **--ep-type=subnet**
|
||||
| **--ep-value=privateA**
|
||||
| **--ep-value=privateB**
|
||||
| **neutron vpn-endpoint-group-create**
|
||||
| **--name peer-eps**
|
||||
| **--ep-type=cidr**
|
||||
| **--ep-vallue=10.3.0.0/24**
|
||||
| neutron ipsec-site-connection-create
|
||||
| --name vpnconnection1
|
||||
| --vpnservice-id myvpn
|
||||
| --ikepolicy-id ikepolicy
|
||||
| --ipsecpolicy-id ipsecpolicy
|
||||
| --peer-address 172.24.4.13
|
||||
| --psk secret
|
||||
| **--local-endpoints local-eps**
|
||||
| **--peer-endpoints peer-eps**
|
||||
in **bold** below::
|
||||
|
||||
neutron vpn-ikepolicy-create ikepolicy
|
||||
neutron vpn-ipsecpolicy-create ipsecpolicy
|
||||
neutron vpn-service-create --name myvpn router1
|
||||
**neutron vpn-endpoint-group-create**
|
||||
**--name local-eps**
|
||||
**--ep-type=subnet**
|
||||
**--ep-value=privateA**
|
||||
**--ep-value=privateB**
|
||||
**neutron vpn-endpoint-group-create**
|
||||
**--name peer-eps**
|
||||
**--ep-type=cidr**
|
||||
**--ep-vallue=10.3.0.0/24**
|
||||
neutron ipsec-site-connection-create
|
||||
--name vpnconnection1
|
||||
--vpnservice-id myvpn
|
||||
--ikepolicy-id ikepolicy
|
||||
--ipsecpolicy-id ipsecpolicy
|
||||
--peer-address 172.24.4.13
|
||||
--psk secret
|
||||
**--local-endpoints local-eps**
|
||||
**--peer-endpoints peer-eps**
|
||||
|
||||
The subnets privateA and privateB are used for local endpoints and the
|
||||
10.3.0.0/24 CIDR is used for the peer endpoint.
|
||||
|
@ -23,9 +23,16 @@ NEUTRON_DIR=$HOME/neutron
|
||||
|
||||
set -e
|
||||
|
||||
install_cmd="pip install"
|
||||
if [ "$1" = "constrained" ]; then
|
||||
install_cmd="$install_cmd $2"
|
||||
shift
|
||||
fi
|
||||
shift
|
||||
|
||||
if [ -d "$NEUTRON_DIR" ]; then
|
||||
echo "FOUND Neutron code at $NEUTRON_DIR - using"
|
||||
pip install -U -e $NEUTRON_DIR
|
||||
$install_cmd -U -e $NEUTRON_DIR
|
||||
elif [ $neutron_installed -eq 0 ]; then
|
||||
location=$(python -c "import neutron; print(neutron.__file__)")
|
||||
echo "ALREADY INSTALLED at $location"
|
||||
@ -39,12 +46,12 @@ elif [ -x "$ZUUL_CLONER" ]; then
|
||||
git://git.openstack.org \
|
||||
openstack/neutron
|
||||
cd openstack/neutron
|
||||
pip install -e .
|
||||
$install_cmd -e .
|
||||
cd "$cwd"
|
||||
else
|
||||
echo "LOCAL - Obtaining Neutron code from git.openstack.org"
|
||||
pip install -U -egit+https://git.openstack.org/openstack/neutron#egg=neutron
|
||||
$install_cmd -U -egit+https://git.openstack.org/openstack/neutron#egg=neutron
|
||||
fi
|
||||
|
||||
pip install -U $*
|
||||
$install_cmd -U $*
|
||||
exit $?
|
||||
|
29
tox.ini
29
tox.ini
@ -6,7 +6,9 @@ skipsdist = True
|
||||
[testenv]
|
||||
setenv = VIRTUAL_ENV={envdir}
|
||||
usedevelop = True
|
||||
install_command = {toxinidir}/tools/tox_install.sh {opts} {packages}
|
||||
install_command =
|
||||
constraints: {[testenv:common-constraints]install_command}
|
||||
{toxinidir}/tools/tox_install.sh unconstrained {opts} {packages}
|
||||
deps = -r{toxinidir}/requirements.txt
|
||||
-r{toxinidir}/test-requirements.txt
|
||||
whitelist_externals = sh
|
||||
@ -15,6 +17,9 @@ commands =
|
||||
# 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:common-constraints]
|
||||
install_command = {toxinidir}/tools/tox_install.sh constrained -c{env:UPPER_CONTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} {opts} {packages}
|
||||
|
||||
[testenv:functional]
|
||||
deps =
|
||||
{[testenv]deps}
|
||||
@ -69,6 +74,15 @@ commands =
|
||||
neutron-db-manage --subproject neutron-vpnaas --database-connection sqlite:// check_migration
|
||||
whitelist_externals = sh
|
||||
|
||||
[testenv:pep8-constraints]
|
||||
install_command = {[testenv:common-constraints]install_command}
|
||||
commands =
|
||||
flake8
|
||||
pylint --rcfile=.pylintrc --output-format=colorized {posargs:neutron_vpnaas}
|
||||
{toxinidir}/tools/check_unit_test_structure.sh
|
||||
neutron-db-manage --subproject neutron-vpnaas --database-connection sqlite:// check_migration
|
||||
whitelist_externals = {[testenv:pep8]whitelist_externals}
|
||||
|
||||
[testenv:i18n]
|
||||
commands = python ./tools/check_i18n.py ./neutron-vpnaas ./tools/i18n_cfg.py
|
||||
|
||||
@ -76,6 +90,11 @@ commands = python ./tools/check_i18n.py ./neutron-vpnaas ./tools/i18n_cfg.py
|
||||
commands =
|
||||
python setup.py test --coverage --coverage-package-name=neutron_vpnaas --testr-args='{posargs}'
|
||||
|
||||
[testenv:cover-constraints]
|
||||
install_command = {[testenv:common-constraints]install_command}
|
||||
commands =
|
||||
python setup.py test --coverage --coverage-package-name=neutron_vpnaas --testr-args='{posargs}'
|
||||
|
||||
[testenv:dsvm-functional-cover]
|
||||
setenv = {[testenv:dsvm-functional]setenv}
|
||||
commands =
|
||||
@ -89,9 +108,17 @@ commands =
|
||||
[testenv:venv]
|
||||
commands = {posargs}
|
||||
|
||||
[testenv:venv-constraints]
|
||||
install_command = {[testenv:common-constraints]install_command}
|
||||
commands = {posargs}
|
||||
|
||||
[testenv:docs]
|
||||
commands = sphinx-build -W -b html doc/source doc/build
|
||||
|
||||
[testenv:docs-constraints]
|
||||
install_command = {[testenv:common-constraints]install_command}
|
||||
commands = {[testenv:docs]commands}
|
||||
|
||||
[flake8]
|
||||
# E125 continuation line does not distinguish itself from next logical line
|
||||
# E126 continuation line over-indented for hanging indent
|
||||
|
Loading…
Reference in New Issue
Block a user