mirror of
https://github.com/ceph/ceph
synced 2025-04-01 14:51:13 +00:00
- API changes: - Move `/api/orchestrator/identify_device` to `/api/host/<hostname>/identify_device`. - Move `/api/orchestartor/inventory` to `/ui-api/host/inventory`. This UI API provides a shortcut to get all inventories. - Add `/api/host/<hostname>/inventory` for getting a host's inventory. - Add inventory schema to improve OpenAPI doc. - Backend unittests: - Refactor: Remove duplicated orchestrator patch calls. - Add unittest for identify device. Fixes: https://tracker.ceph.com/issues/43165 Signed-off-by: Kiefer Chang <kiefer.chang@suse.com>
28 lines
699 B
Python
28 lines
699 B
Python
# -*- coding: utf-8 -*-
|
|
from __future__ import absolute_import
|
|
|
|
from .helper import DashboardTestCase
|
|
|
|
|
|
class OrchestratorControllerTest(DashboardTestCase):
|
|
|
|
AUTH_ROLES = ['cluster-manager']
|
|
|
|
URL_STATUS = '/api/orchestrator/status'
|
|
|
|
ORCHESTRATOR = True
|
|
|
|
@classmethod
|
|
def setUpClass(cls):
|
|
super(OrchestratorControllerTest, cls).setUpClass()
|
|
|
|
@classmethod
|
|
def tearDownClass(cls):
|
|
cmd = ['test_orchestrator', 'load_data', '-i', '-']
|
|
cls.mgr_cluster.mon_manager.raw_cluster_cmd_result(*cmd, stdin='{}')
|
|
|
|
def test_status_get(self):
|
|
data = self._get(self.URL_STATUS)
|
|
self.assertStatus(200)
|
|
self.assertTrue(data['available'])
|