コード例 #1
0
 def _POST_start_deep_check(self, ctx):
     # check this directory and everything reachable from it
     if not get_arg(ctx, "ophandle"):
         raise NeedOperationHandleError("slow operation requires ophandle=")
     verify = boolean_of_arg(get_arg(ctx, "verify", "false"))
     repair = boolean_of_arg(get_arg(ctx, "repair", "false"))
     add_lease = boolean_of_arg(get_arg(ctx, "add-lease", "false"))
     if repair:
         monitor = self.node.start_deep_check_and_repair(verify, add_lease)
         renderer = DeepCheckAndRepairResultsRenderer(self.client, monitor)
     else:
         monitor = self.node.start_deep_check(verify, add_lease)
         renderer = DeepCheckResultsRenderer(self.client, monitor)
     return self._start_operation(monitor, renderer, ctx)
コード例 #2
0
 def _POST_start_deep_stats(self, ctx):
     if not get_arg(ctx, "ophandle"):
         raise NeedOperationHandleError("slow operation requires ophandle=")
     monitor = self.node.start_deep_stats()
     renderer = DeepStatsResults(self.client, monitor)
     return self._start_operation(monitor, renderer, ctx)
コード例 #3
0
 def _POST_start_manifest(self, ctx):
     if not get_arg(ctx, "ophandle"):
         raise NeedOperationHandleError("slow operation requires ophandle=")
     monitor = self.node.build_manifest()
     renderer = ManifestResults(self.client, monitor)
     return self._start_operation(monitor, renderer, ctx)