diff --git a/gbpclient/gbp/v2_0/groupbasedpolicy.py b/gbpclient/gbp/v2_0/groupbasedpolicy.py index 37a3f90..14e5b13 100644 --- a/gbpclient/gbp/v2_0/groupbasedpolicy.py +++ b/gbpclient/gbp/v2_0/groupbasedpolicy.py @@ -15,8 +15,8 @@ import logging import string from neutronclient.common import utils +from neutronclient.i18n import _ from neutronclient.neutron import v2_0 as neutronV20 -from neutronclient.openstack.common.gettextutils import _ from oslo.serialization import jsonutils diff --git a/gbpclient/gbp/v2_0/servicechain.py b/gbpclient/gbp/v2_0/servicechain.py index d2b2869..63fca55 100644 --- a/gbpclient/gbp/v2_0/servicechain.py +++ b/gbpclient/gbp/v2_0/servicechain.py @@ -22,8 +22,8 @@ import string from heatclient.common import template_utils from neutronclient.common import exceptions as exc +from neutronclient.i18n import _ from neutronclient.neutron import v2_0 as neutronV20 -from neutronclient.openstack.common.gettextutils import _ class ListServiceChainInstance(neutronV20.ListCommand): diff --git a/gbpclient/gbpshell.py b/gbpclient/gbpshell.py index 78555e6..ba84f7c 100644 --- a/gbpclient/gbpshell.py +++ b/gbpclient/gbpshell.py @@ -27,6 +27,7 @@ from keystoneclient.auth.identity import v3 as v3_auth from keystoneclient import discover from keystoneclient.openstack.common.apiclient import exceptions as ks_exc from keystoneclient import session +from oslo.utils import encodeutils import six.moves.urllib.parse as urlparse from cliff import app @@ -34,8 +35,7 @@ from cliff import commandmanager from neutronclient.common import clientmanager from neutronclient.common import exceptions as exc from neutronclient.common import utils -from neutronclient.openstack.common.gettextutils import _ -from neutronclient.openstack.common import strutils +from neutronclient.i18n import _ from neutronclient.version import __version__ from gbpclient.gbp.v2_0 import groupbasedpolicy as gbp @@ -831,7 +831,7 @@ class GBPShell(app.App): def main(argv=sys.argv[1:]): try: - return GBPShell(NEUTRON_API_VERSION).run(map(strutils.safe_decode, + return GBPShell(NEUTRON_API_VERSION).run(map(encodeutils.safe_decode, argv)) except exc.NeutronClientException: return 1 diff --git a/gbpclient/tests/unit/test_auth.py b/gbpclient/tests/unit/test_auth.py index 6e00b62..be36c08 100644 --- a/gbpclient/tests/unit/test_auth.py +++ b/gbpclient/tests/unit/test_auth.py @@ -33,7 +33,7 @@ from keystoneclient import session from neutronclient import client from neutronclient.common import exceptions from neutronclient.common import utils -from neutronclient.openstack.common import jsonutils +from oslo_serialization import jsonutils USERNAME = 'testuser' @@ -450,7 +450,7 @@ class CLITestAuthKeystone(testtools.TestCase): self.assertRaises( ks_exceptions.EndpointNotFound, - self.client.authenticate) + getattr, self.client, 'endpoint_url') def test_strip_credentials_from_log(self): def verify_no_credentials(kwargs): diff --git a/gbpclient/v2_0/client.py b/gbpclient/v2_0/client.py index fac6797..34c68ec 100644 --- a/gbpclient/v2_0/client.py +++ b/gbpclient/v2_0/client.py @@ -16,11 +16,11 @@ import time import urllib from neutronclient import client -from neutronclient.common import _ from neutronclient.common import constants from neutronclient.common import exceptions from neutronclient.common import serializer from neutronclient.common import utils +from neutronclient.i18n import _ import requests import six.moves.urllib.parse as urlparse @@ -737,14 +737,11 @@ class Client(object): if type(params) is dict and params: params = utils.safe_encode_dict(params) action += '?' + urllib.urlencode(params, doseq=1) - # Ensure client always has correct uri - do not guesstimate anything - self.httpclient.authenticate_and_fetch_endpoint_url() - self._check_uri_length(action) if body: body = self.serialize(body) - self.httpclient.content_type = self.content_type() - resp, replybody = self.httpclient.do_request(action, method, body=body) + resp, replybody = self.httpclient.do_request( + action, method, body=body, content_type=self.content_type()) status_code = resp.status_code if status_code in (requests.codes.ok, requests.codes.created, diff --git a/requirements.txt b/requirements.txt index a5715b9..25a55fb 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,7 +1,5 @@ # 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 # process, which may cause wedges in the gate later. -oslo.serialization>=1.2.0,<1.5 # uncapped by python-heatclient-0.3.0 -oslo.i18n>=1.3.0,<1.6 # uncapped by python-heatclient-0.3.0 -python-heatclient>=0.2.9,<0.4 -python-neutronclient>=2.3.0,<2.3.10 +python-heatclient>=0.2.9,<0.3.0 +python-neutronclient==2.3.12 diff --git a/test-requirements.txt b/test-requirements.txt index 0c6adfb..545e5ae 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -3,16 +3,16 @@ # process, which may cause wedges in the gate later. hacking>=0.8.0,<0.9 -cliff-tablib>=1.0 -coverage>=3.6 -discover -fixtures>=0.3.14 +cliff-tablib<=1.1,>=1.0 +coverage<=3.7.1,>=3.6 +discover<=0.4.0 +fixtures<=1.0.0,>=0.3.14 httpretty>=0.8.0,!=0.8.1,!=0.8.2,!=0.8.3 -mox3>=0.7.0 -oslosphinx>=2.2.0.0a2 -oslotest>=1.1.0.0a2 -python-subunit>=0.0.18 -sphinx>=1.1.2,!=1.2.0,<1.3 -testrepository>=0.0.18 -testscenarios>=0.4 -testtools>=0.9.34 +mox3<=0.7.0,>=0.7.0 +oslosphinx<2.5.0,>=2.2.0 # Apache-2.0 +oslotest<1.4.0,>=1.1.0 # Apache-2.0 +python-subunit<=1.0.0,>=0.0.18 +requests-mock>=0.4.0 # Apache-2.0 +sphinx!=1.2.0,<1.3,>=1.1.2 +testrepository<=0.0.20,>=0.0.18 +testtools!=1.4.0,<=1.5.0,>=0.9.34