Modify to use libraries compatible with python3
This commit addresses some of the issues seen with compatibility of libraries in 'congress-devstack-py35-api-mysql' gate job. Partial-Bug:#1731141 Change-Id: I2cd487a712c3f5a6b113f7446d498add32eee9ab
This commit is contained in:
parent
be294587fd
commit
42afa8729b
|
@ -13,8 +13,7 @@
|
||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
import json
|
from oslo_serialization import jsonutils as json
|
||||||
|
|
||||||
from tempest.lib.common import rest_client
|
from tempest.lib.common import rest_client
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -15,11 +15,11 @@
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import socket
|
import socket
|
||||||
from StringIO import StringIO
|
|
||||||
import subprocess
|
import subprocess
|
||||||
import tempfile
|
import tempfile
|
||||||
|
|
||||||
from oslo_log import log as logging
|
from oslo_log import log as logging
|
||||||
|
import six
|
||||||
from tempest.common import credentials_factory as credentials
|
from tempest.common import credentials_factory as credentials
|
||||||
from tempest import config
|
from tempest import config
|
||||||
from tempest.lib.common.utils import test_utils
|
from tempest.lib.common.utils import test_utils
|
||||||
|
@ -219,7 +219,7 @@ class TestHA(manager_congress.ScenarioPolicyBase):
|
||||||
LOG.debug("Replica port %s service %s logs: %s",
|
LOG.debug("Replica port %s service %s logs: %s",
|
||||||
port_num,
|
port_num,
|
||||||
service_key,
|
service_key,
|
||||||
StringIO(output).getvalue())
|
six.StringIO(output.decode()).getvalue())
|
||||||
raise exceptions.TimeoutException("Replica Server not ready")
|
raise exceptions.TimeoutException("Replica Server not ready")
|
||||||
# Relica server is up
|
# Relica server is up
|
||||||
replica_server = True
|
replica_server = True
|
||||||
|
|
|
@ -14,6 +14,10 @@
|
||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
|
import random
|
||||||
|
import string
|
||||||
|
import time
|
||||||
|
|
||||||
from tempest.common import utils
|
from tempest.common import utils
|
||||||
from tempest import config
|
from tempest import config
|
||||||
from tempest.lib.common.utils import test_utils
|
from tempest.lib.common.utils import test_utils
|
||||||
|
@ -23,11 +27,6 @@ from tempest.lib import exceptions
|
||||||
from congress_tempest_tests.tests.scenario import helper
|
from congress_tempest_tests.tests.scenario import helper
|
||||||
from congress_tempest_tests.tests.scenario import manager_congress
|
from congress_tempest_tests.tests.scenario import manager_congress
|
||||||
|
|
||||||
import random
|
|
||||||
import string
|
|
||||||
import time
|
|
||||||
|
|
||||||
|
|
||||||
CONF = config.CONF
|
CONF = config.CONF
|
||||||
|
|
||||||
|
|
||||||
|
@ -49,7 +48,7 @@ class TestPolicyBasicOps(manager_congress.ScenarioPolicyBase):
|
||||||
self.servers = []
|
self.servers = []
|
||||||
|
|
||||||
def _create_random_policy(self):
|
def _create_random_policy(self):
|
||||||
policy_name = "nova_%s" % ''.join(random.choice(string.lowercase)
|
policy_name = "nova_%s" % ''.join(random.choice(string.ascii_lowercase)
|
||||||
for x in range(10))
|
for x in range(10))
|
||||||
body = {"name": policy_name}
|
body = {"name": policy_name}
|
||||||
resp = self.os_admin.congress_client.create_policy(body)
|
resp = self.os_admin.congress_client.create_policy(body)
|
||||||
|
|
|
@ -43,6 +43,7 @@
|
||||||
# enable_plugin murano git://git.openstack.org/openstack/murano
|
# enable_plugin murano git://git.openstack.org/openstack/murano
|
||||||
# enable_plugin aodh git://git.openstack.org/openstack/aodh
|
# enable_plugin aodh git://git.openstack.org/openstack/aodh
|
||||||
# enable_plugin designate git://git.openstack.org/openstack/designate
|
# enable_plugin designate git://git.openstack.org/openstack/designate
|
||||||
|
enable_plugin neutron https://git.openstack.org/openstack/neutron
|
||||||
# To deploy congress as multi-process (api, pe, datasources)
|
# To deploy congress as multi-process (api, pe, datasources)
|
||||||
CONGRESS_MULTIPROCESS_DEPLOYMENT=True
|
CONGRESS_MULTIPROCESS_DEPLOYMENT=True
|
||||||
CONGRESS_EXPOSE_ENCRYPTION_KEY_FOR_TEST=True
|
CONGRESS_EXPOSE_ENCRYPTION_KEY_FOR_TEST=True
|
||||||
|
@ -60,7 +61,7 @@
|
||||||
# swift is not ready for python3 yet
|
# swift is not ready for python3 yet
|
||||||
# ENABLED_SERVICES=s-proxy,s-object,s-container,s-account,
|
# ENABLED_SERVICES=s-proxy,s-object,s-container,s-account,
|
||||||
# ENABLED_SERVICES+=h-eng,h-api,h-api-cfn,h-api-cw
|
# ENABLED_SERVICES+=h-eng,h-api,h-api-cfn,h-api-cw
|
||||||
|
ENABLED_SERVICES+=q-qos
|
||||||
export PYTHONUNBUFFERED=true
|
export PYTHONUNBUFFERED=true
|
||||||
export DEVSTACK_GATE_TEMPEST=1
|
export DEVSTACK_GATE_TEMPEST=1
|
||||||
export DEVSTACK_GATE_TEMPEST_ALL_PLUGINS=1
|
export DEVSTACK_GATE_TEMPEST_ALL_PLUGINS=1
|
||||||
|
|
Loading…
Reference in New Issue