]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/pybind/mgr/snap_schedule/fs/schedule.py
import quincy 17.2.0
[ceph.git] / ceph / src / pybind / mgr / snap_schedule / fs / schedule.py
index eb347367a64d36827da56a5bcb3419b695c28cfa..d0c9f1098b470a27fe10521b5207ef98b3f6b5c0 100644 (file)
@@ -241,6 +241,14 @@ class Schedule(object):
                                (f'{path}',))
             return [cls._from_db_row(row, fs) for row in c.fetchall()]
 
+    @classmethod
+    def list_all_schedules(cls,
+                           db: sqlite3.Connection,
+                           fs: str) -> List['Schedule']:
+        with db:
+            c = db.execute(cls.PROTO_GET_SCHEDULES + " path LIKE '%'")
+            return [cls._from_db_row(row, fs) for row in c.fetchall()]
+
     INSERT_SCHEDULE = '''INSERT INTO
         schedules(path, subvol, retention, rel_path)
         Values(?, ?, ?, ?);'''