Пример #1
0
 def fixture_call_sbd_message(
     device, node, message, stderr="", return_code=0
 ):
     return [
         Call(
             ["sbd", "-d", device, "message", node, message],
             stderr=stderr,
             returncode=return_code,
         )
     ]
Пример #2
0
 def fixture_call_sbd_message(device,
                              node,
                              message,
                              stderr="",
                              return_code=0):
     return [
         Call("sbd -d {0} message {1} {2}".format(device, node, message),
              stderr=stderr,
              returncode=return_code)
     ]
Пример #3
0
    def fixture_sbd_init(
        device_list, options, stdout="", stderr="", return_code=0
    ):
        cmd = ["sbd"]
        for device in device_list:
            cmd += ["-d", device]

        for opt, val in options:
            cmd += [opt, val]

        cmd.append("create")
        return [Call(cmd, stdout, stderr, return_code)]
Пример #4
0
 def fixture_sbd_dump(device, stdout="", return_code=0):
     cmd = ["sbd", "-d", device, "dump"]
     return [Call(cmd, stdout, returncode=return_code)]
Пример #5
0
 def fixture_sbd_info(device, stdout="", return_code=0):
     cmd = ["sbd", "-d", device, "list"]
     return [Call(cmd, stdout, returncode=return_code)]
Пример #6
0
 def fixture_sbd_enabled(enabled):
     cmd = [settings.systemctl_binary, "is-enabled", "sbd.service"]
     return [Call(cmd, returncode=0 if enabled else 1)]