From 2f041a0f0ba7c9c45a86bf0129fb9cfc6f97fafc Mon Sep 17 00:00:00 2001 From: =?utf8?q?Stephan=20M=C3=BCller?= Date: Fri, 23 Mar 2018 18:09:21 +0100 Subject: [PATCH] mgr/dashboard: Add crush rule type definitions MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit There are two type definitions one for the crush rule itself and one for the crush step definition which is used inside the crush rule definition. Fixes: https://tracker.ceph.com/issues/36355 Signed-off-by: Stephan Müller --- .../frontend/src/app/shared/models/crush-rule.ts | 10 ++++++++++ .../frontend/src/app/shared/models/crush-step.ts | 7 +++++++ 2 files changed, 17 insertions(+) create mode 100644 src/pybind/mgr/dashboard/frontend/src/app/shared/models/crush-rule.ts create mode 100644 src/pybind/mgr/dashboard/frontend/src/app/shared/models/crush-step.ts diff --git a/src/pybind/mgr/dashboard/frontend/src/app/shared/models/crush-rule.ts b/src/pybind/mgr/dashboard/frontend/src/app/shared/models/crush-rule.ts new file mode 100644 index 0000000000000..ef0508508ff01 --- /dev/null +++ b/src/pybind/mgr/dashboard/frontend/src/app/shared/models/crush-rule.ts @@ -0,0 +1,10 @@ +import { CrushStep } from './crush-step'; + +export class CrushRule { + max_size: number; + min_size: number; + rule_id: number; + rule_name: string; + ruleset: number; + steps: CrushStep[]; +} diff --git a/src/pybind/mgr/dashboard/frontend/src/app/shared/models/crush-step.ts b/src/pybind/mgr/dashboard/frontend/src/app/shared/models/crush-step.ts new file mode 100644 index 0000000000000..3c46a7cd648c4 --- /dev/null +++ b/src/pybind/mgr/dashboard/frontend/src/app/shared/models/crush-step.ts @@ -0,0 +1,7 @@ +export class CrushStep { + op: string; + item_name?: string; + item?: number; + type?: string; + num?: number; +} -- 2.39.5