]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
mgr/dashboard: refactor /api/orchestrator/* endpoints 38298/head
authorKiefer Chang <kiefer.chang@suse.com>
Tue, 24 Nov 2020 04:41:13 +0000 (12:41 +0800)
committerKiefer Chang <kiefer.chang@suse.com>
Thu, 26 Nov 2020 07:44:11 +0000 (15:44 +0800)
commit812c105a4336cad56a768add5be2d697edc3b6f9
tree3240452215cbbb8550e503087e7b7e855033686e
parent7f533f5ecd0d682ded617717eac6a1ccd868311c
mgr/dashboard: refactor /api/orchestrator/* endpoints

- 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>
17 files changed:
qa/tasks/mgr/dashboard/test_host.py
qa/tasks/mgr/dashboard/test_orchestrator.py
src/pybind/mgr/dashboard/controllers/host.py
src/pybind/mgr/dashboard/controllers/orchestrator.py
src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/inventory/inventory-devices/inventory-devices.component.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/inventory/inventory.component.spec.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/inventory/inventory.component.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-form/osd-form.component.spec.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-form/osd-form.component.ts
src/pybind/mgr/dashboard/frontend/src/app/shared/api/host.service.spec.ts
src/pybind/mgr/dashboard/frontend/src/app/shared/api/host.service.ts
src/pybind/mgr/dashboard/frontend/src/app/shared/api/orchestrator.service.spec.ts
src/pybind/mgr/dashboard/frontend/src/app/shared/api/orchestrator.service.ts
src/pybind/mgr/dashboard/frontend/src/app/shared/services/task-message.service.ts
src/pybind/mgr/dashboard/openapi.yaml
src/pybind/mgr/dashboard/tests/test_host.py
src/pybind/mgr/dashboard/tests/test_orchestrator.py