]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/rbd_support: level_spec passed to some commands is not optional
authorKefu Chai <kchai@redhat.com>
Fri, 5 Feb 2021 16:54:21 +0000 (00:54 +0800)
committerKefu Chai <kchai@redhat.com>
Thu, 18 Feb 2021 14:46:51 +0000 (22:46 +0800)
we always need a valid level_spec for creating a LevelSpec instance

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/pybind/mgr/rbd_support/module.py

index 91064870c7fe3a0d10b2f5852e59f92c4c598437..c8526cd9eec78542a988b206a88c3ac698615ad5 100644 (file)
@@ -113,7 +113,7 @@ class Module(MgrModule):
     @CLIReadCommand('rbd mirror snapshot schedule list')
     @with_latest_osdmap
     def mirror_snapshot_schedule_list(self,
-                                      level_spec: Optional[str]) -> Tuple[int, str, str]:
+                                      level_spec: str) -> Tuple[int, str, str]:
         """
         List rbd mirror snapshot schedule
         """
@@ -123,7 +123,7 @@ class Module(MgrModule):
     @CLIReadCommand('rbd mirror snapshot schedule status')
     @with_latest_osdmap
     def mirror_snapshot_schedule_status(self,
-                                        level_spec: Optional[str] = None) -> Tuple[int, str, str]:
+                                        level_spec: str) -> Tuple[int, str, str]:
         """
         Show rbd mirror snapshot schedule status
         """
@@ -253,7 +253,7 @@ class Module(MgrModule):
     @CLIReadCommand('rbd trash purge schedule list')
     @with_latest_osdmap
     def trash_purge_schedule_list(self,
-                                  level_spec: Optional[str] = None) -> Tuple[int, str, str]:
+                                  level_spec: str) -> Tuple[int, str, str]:
         """
         List rbd trash purge schedule
         """
@@ -263,7 +263,7 @@ class Module(MgrModule):
     @CLIReadCommand('rbd trash purge schedule status')
     @with_latest_osdmap
     def trash_purge_schedule_status(self,
-                                    level_spec: Optional[str] = None) -> Tuple[int, str, str]:
+                                    level_spec: str) -> Tuple[int, str, str]:
         """
         Show rbd trash purge schedule status
         """