Add SOA to RECORD_TYPES in sqlalchemy.tables and remove eventlet constraint
sqlalchemy 1.1 is more strict on enum values. Because of that, the fact that the two RECORD_TYPES enums are out of sync makes things sad. This patch also pin eventlet version to 0.19.0 since eventlet >=0.20.0 in upper constraint still make UT fail. Co-Authored-By: Hieu LE <hieulq@vn.fujitsu.com> Change-Id: I4de68749e9eddbddbc7f8d8df68ce3ea71cc4fcb
This commit is contained in:
parent
8f4adefbed
commit
7f4a9a65ea
@ -11,7 +11,7 @@
|
||||
# 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 urlparse
|
||||
from six.moves import urllib
|
||||
|
||||
import requests
|
||||
from oslo_log import log as logging
|
||||
@ -37,7 +37,7 @@ class PDNS4Backend(base.Backend):
|
||||
self.api_token = self.options.get('api_token')
|
||||
|
||||
def _build_url(self, zone=''):
|
||||
r_url = urlparse.urlparse(self.api_endpoint)
|
||||
r_url = urllib.parse.urlparse(self.api_endpoint)
|
||||
return "%s://%s/api/v1/servers/localhost/zones%s%s" % (
|
||||
r_url.scheme, r_url.netloc, '/' if zone else '', zone)
|
||||
|
||||
|
@ -29,7 +29,7 @@ CONF = cfg.CONF
|
||||
|
||||
RESOURCE_STATUSES = ['ACTIVE', 'PENDING', 'DELETED', 'ERROR']
|
||||
RECORD_TYPES = ['A', 'AAAA', 'CNAME', 'MX', 'SRV', 'TXT', 'SPF', 'NS', 'PTR',
|
||||
'SSHFP']
|
||||
'SSHFP', 'SOA']
|
||||
TASK_STATUSES = ['ACTIVE', 'PENDING', 'DELETED', 'ERROR', 'COMPLETE']
|
||||
TSIG_ALGORITHMS = ['hmac-md5', 'hmac-sha1', 'hmac-sha224', 'hmac-sha256',
|
||||
'hmac-sha384', 'hmac-sha512']
|
||||
|
32
tools/tox_install.sh
Executable file
32
tools/tox_install.sh
Executable file
@ -0,0 +1,32 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Client constraint file contains this client version pin that is in conflict
|
||||
# with installing the client from source. We should remove the version pin in
|
||||
# the constraints file before applying it for from-source installation.
|
||||
|
||||
CONSTRAINTS_FILE=$1
|
||||
shift 1
|
||||
|
||||
set -e
|
||||
|
||||
# NOTE(tonyb): Place this in the tox enviroment's log dir so it will get
|
||||
# published to logs.openstack.org for easy debugging.
|
||||
localfile="$VIRTUAL_ENV/log/upper-constraints.txt"
|
||||
|
||||
if [[ $CONSTRAINTS_FILE != http* ]]; then
|
||||
CONSTRAINTS_FILE=file://$CONSTRAINTS_FILE
|
||||
fi
|
||||
# NOTE(tonyb): need to add curl to bindep.txt if the project supports bindep
|
||||
curl $CONSTRAINTS_FILE --insecure --progress-bar --output $localfile
|
||||
|
||||
pip install -c$localfile openstack-requirements
|
||||
|
||||
# This is the main purpose of the script: Allow local installation of
|
||||
# the current repo. It is listed in constraints file and thus any
|
||||
# install will be constrained and we need to unconstrain it.
|
||||
edit-constraints $localfile -- $CLIENT_NAME
|
||||
|
||||
pip install -c$localfile -U $*
|
||||
# NOTE(hieulq): eventlet workaround, remove when fixed in upper constraint
|
||||
pip install eventlet===0.19.0
|
||||
exit $?
|
7
tox.ini
7
tox.ini
@ -1,14 +1,17 @@
|
||||
[tox]
|
||||
minversion = 1.6
|
||||
minversion = 2.0
|
||||
envlist = py35,py27,flake8
|
||||
skipsdist = True
|
||||
|
||||
[testenv]
|
||||
usedevelop = True
|
||||
install_command = pip install -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt?h=master} {opts} {packages}
|
||||
install_command = {toxinidir}/tools/tox_install.sh {env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt?h=master} {opts} {packages}
|
||||
deps = -r{toxinidir}/requirements.txt
|
||||
-r{toxinidir}/test-requirements.txt
|
||||
setenv =
|
||||
VIRTUAL_ENV={envdir}
|
||||
BRANCH_NAME=master
|
||||
CLIENT_NAME=eventlet
|
||||
PYTHONDONTWRITEBYTECODE=1
|
||||
whitelist_externals = sh
|
||||
find
|
||||
|
Loading…
Reference in New Issue
Block a user