From 17336123bd4c2031f0277102948d8fb4ac4bf9bc Mon Sep 17 00:00:00 2001 From: chenyan Date: Wed, 15 May 2019 11:45:41 +0800 Subject: [PATCH] api, ceph: modify ceph api code to fit for the new cephclient. Closes-Bug: 1827658 Change-Id: Icb7e1e87b45c7f6c278a35ea962e9b214e7e87dd Signed-off-by: chenyan --- .zuul.yaml | 1 + .../starlingx-dashboard/starlingx_dashboard/api/ceph.py | 4 ++-- test-requirements.txt | 1 - tox.ini | 1 + 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.zuul.yaml b/.zuul.yaml index d0671f98..98fc4ed9 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -32,3 +32,4 @@ - starlingx/update - starlingx/nfv - starlingx/ha + - starlingx/integ diff --git a/starlingx-dashboard/starlingx-dashboard/starlingx_dashboard/api/ceph.py b/starlingx-dashboard/starlingx-dashboard/starlingx_dashboard/api/ceph.py index 48459d9b..b0baf606 100755 --- a/starlingx-dashboard/starlingx-dashboard/starlingx_dashboard/api/ceph.py +++ b/starlingx-dashboard/starlingx-dashboard/starlingx_dashboard/api/ceph.py @@ -109,7 +109,7 @@ def storage_get(): # # I/O info response, body = cephwrapper().osd_pool_stats(body='json', - name='cinder-volumes') + pool_name='cinder-volumes') if not response.ok: response.raise_for_status() stats = body['output'][0]['client_io_rate'] @@ -171,7 +171,7 @@ def osd_list(): osd['status'] = node['status'] # check if osd belongs to host - response, body = cephwrapper().osd_find(body='json', id=osd['id']) + response, body = cephwrapper().osd_find(body='json', _id=osd['id']) if response.ok and 'host' in body['output']['crush_location']: osd['host'] = body['output']['crush_location']['host'] # else dont set hostname diff --git a/test-requirements.txt b/test-requirements.txt index 1f4d9005..38840d6b 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -19,7 +19,6 @@ nosehtmloutput>=0.0.3 # Apache-2.0 nosexcover # BSD openstack.nose-plugin>=0.7 # Apache-2.0 oslosphinx!=3.4.0,>=2.5.0 # Apache-2.0 -python-cephclient requests>=2.10.0 # Apache-2.0 selenium>=2.50.1 # Apache-2.0 sphinx!=1.3b1,<1.3,>=1.2.1 # BSD diff --git a/tox.ini b/tox.ini index c7fc34d3..05359654 100644 --- a/tox.ini +++ b/tox.ini @@ -57,6 +57,7 @@ deps = {[testenv]deps} -e{[tox]stxdir}/update/cgcs-patch/cgcs-patch -e{[tox]stxdir}/nfv/nfv/nfv-client -e{[tox]stxdir}/ha/service-mgmt-client/sm-client + -e{[tox]stxdir}/integ/ceph/python-cephclient/python-cephclient requests-toolbelt pylint commands =