summaryrefslogtreecommitdiffstats
path: root/src/pybind/mgr/feedback/model.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-21 11:54:28 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-21 11:54:28 +0000
commite6918187568dbd01842d8d1d2c808ce16a894239 (patch)
tree64f88b554b444a49f656b6c656111a145cbbaa28 /src/pybind/mgr/feedback/model.py
parentInitial commit. (diff)
downloadceph-b26c4052f3542036551aa9dec9caa4226e456195.tar.xz
ceph-b26c4052f3542036551aa9dec9caa4226e456195.zip
Adding upstream version 18.2.2.upstream/18.2.2
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/pybind/mgr/feedback/model.py')
-rw-r--r--src/pybind/mgr/feedback/model.py47
1 files changed, 47 insertions, 0 deletions
diff --git a/src/pybind/mgr/feedback/model.py b/src/pybind/mgr/feedback/model.py
new file mode 100644
index 000000000..902f18256
--- /dev/null
+++ b/src/pybind/mgr/feedback/model.py
@@ -0,0 +1,47 @@
+# # -*- coding: utf-8 -*-
+from enum import Enum
+
+
+class Feedback:
+ project_id: int
+ tracker_id: int
+ subject: str
+ description: str
+ status: int
+
+ class Project(Enum):
+ dashboard = 46
+ block = 9 # rbd
+ object = 10 # rgw
+ file_system = 13 # cephfs
+ ceph_manager = 46
+ orchestrator = 42
+ ceph_volume = 39
+ core_ceph = 36 # rados
+
+ class TrackerType(Enum):
+ bug = 1
+ feature = 2
+
+ class Status(Enum):
+ new = 1
+
+ def __init__(self, project_id, tracker_id, subject, description):
+ self.project_id = int(project_id)
+ self.tracker_id = int(tracker_id)
+ self.subject = subject
+ self.description = description
+ self.status = Feedback.Status.new.value
+
+ def as_dict(self):
+ return {
+ "issue": {
+ "project": {
+ "id": self.project_id
+ },
+ "tracker_id": self.tracker_id,
+ "Status": self.status,
+ "subject": self.subject,
+ "description": self.description
+ }
+ }