File: resStonithCallout.py

package info (click to toggle)
opensvc 1.8~20170412-3
  • links: PTS
  • area: main
  • in suites: buster
  • size: 6,492 kB
  • ctags: 7,845
  • sloc: python: 77,169; sh: 339; xml: 39; makefile: 7
file content (14 lines) | stat: -rw-r--r-- 394 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import resStonith
import rcStatus
from rcUtilities import cmdline2list
from rcGlobalEnv import rcEnv

class Stonith(resStonith.Stonith):
    def __init__(self, rid=None, cmd="/bin/false", **kwargs):
        resStonith.Stonith.__init__(self, rid=rid, type="stonith.callout", **kwargs)
        self.cmd = cmd

    def _start(self):
        _cmd = cmdline2list(self.cmd)
        self.vcall(_cmd)