Merge "Fix missing auth_url when create senlinclient"

This commit is contained in:
Zuul 2018-12-20 23:55:31 +00:00 committed by Gerrit Code Review
commit ddc6f62b0e
4 changed files with 5 additions and 12 deletions

View File

@ -80,7 +80,7 @@ python-keystoneclient==3.15.0
python-mimeparse==1.6.0
python-neutronclient==6.7.0
python-novaclient==10.1.0
python-senlinclient==1.1.0
python-senlinclient==1.9.0
python-swiftclient==3.5.0
pytz==2018.3
PyYAML==3.12

View File

@ -5,6 +5,6 @@
pbr!=2.1.0,>=2.0.0 # Apache-2.0
PyYAML>=3.12 # MIT
python-senlinclient>=1.1.0 # Apache-2.0
python-senlinclient>=1.9.0 # Apache-2.0
horizon>=14.0.0.0b1 # Apache-2.0

View File

@ -16,6 +16,7 @@ from horizon.utils import functions as utils
from horizon.utils import memoized
from keystoneauth1.identity import generic
from keystoneauth1 import session as ks_session
from openstack_dashboard.api import base
from senlin_dashboard.api import utils as api_utils
from senlinclient.v1 import client as senlin_client
@ -86,7 +87,8 @@ def senlinclient(request):
token=request.user.token.id,
project_id=request.user.tenant_id
)
return senlin_client.Client(authenticator=auth,
session = ks_session.Session(auth=auth)
return senlin_client.Client(session=session,
region_name=request.user.services_region)

View File

@ -15,9 +15,6 @@ import mock
from senlin_dashboard import api
from senlin_dashboard.test import helpers as test
from openstack_dashboard.test import helpers
from senlinclient.v1 import client as senlin_client
class SenlinApiTests(test.APITestCase):
@ -117,9 +114,3 @@ class SenlinApiTests(test.APITestCase):
self.assertIsInstance(receiver, api.senlin.Receiver)
senlinclient.receivers.assert_called_once_with(**params)
class SenlinApiClientTests(test.SenlinTestsMixin, helpers.APITestCase):
def test_senlinclient(self):
senlinclient = api.senlin.senlinclient(self.request)
self.assertIsInstance(senlinclient, senlin_client.Client)