]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/dashboard: Add crush rule type definitions
authorStephan Müller <smueller@suse.com>
Fri, 23 Mar 2018 17:09:21 +0000 (18:09 +0100)
committerStephan Müller <smueller@suse.com>
Tue, 9 Oct 2018 12:51:19 +0000 (14:51 +0200)
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 <smueller@suse.com>
src/pybind/mgr/dashboard/frontend/src/app/shared/models/crush-rule.ts [new file with mode: 0644]
src/pybind/mgr/dashboard/frontend/src/app/shared/models/crush-step.ts [new file with mode: 0644]

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 (file)
index 0000000..ef05085
--- /dev/null
@@ -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 (file)
index 0000000..3c46a7c
--- /dev/null
@@ -0,0 +1,7 @@
+export class CrushStep {
+  op: string;
+  item_name?: string;
+  item?: number;
+  type?: string;
+  num?: number;
+}