From 7ddc6771ea63617a588a0a09d36678a3b17b04df Mon Sep 17 00:00:00 2001 From: Shu Muto Date: Tue, 16 Jan 2018 10:11:59 +0900 Subject: [PATCH] Switch to OSC module For now, we use client module of senlin command for API. But senlin command retired and we need to use client module for OSC to call API. This patch switches client module from CLI to OSC to call API. Change-Id: Ie942180e640aeda59d46b814d123dd385f82da47 --- senlin_dashboard/api/senlin.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/senlin_dashboard/api/senlin.py b/senlin_dashboard/api/senlin.py index 2e559f68..141b135c 100644 --- a/senlin_dashboard/api/senlin.py +++ b/senlin_dashboard/api/senlin.py @@ -17,7 +17,7 @@ from horizon.utils import memoized from openstack_dashboard.api import base from senlin_dashboard.api import utils as api_utils -from senlinclient import client as senlin_client +from senlinclient.v1 import client as senlin_client USER_AGENT = 'python-senlinclient' @@ -80,7 +80,6 @@ class Receiver(base.APIResourceWrapper): @memoized.memoized def senlinclient(request): - api_version = "1" kwargs = { 'auth_url': getattr(settings, 'OPENSTACK_KEYSTONE_URL'), 'token': request.user.token.id, @@ -88,7 +87,7 @@ def senlinclient(request): 'project_id': request.user.tenant_id, 'auth_plugin': 'token', } - return senlin_client.Client(api_version, {}, USER_AGENT, **kwargs) + return senlin_client.Client(**kwargs) def _populate_request_size_and_page_size(request, paginate=False):