Completed
Pull Request — master (#499)
by Anthony
03:02
created

WinExeCmdAction.run()   A

Complexity

Conditions 1

Size

Total Lines 11

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 1 Features 0
Metric Value
cc 1
dl 0
loc 11
rs 9.4285
c 1
b 1
f 0
1
from pywinexe.api import cmd as run_cmd
2
3
from st2actions.runners.pythonrunner import Action
4
5
__all__ = [
6
    'WinExeCmdAction'
7
]
8
9
10
class WinExeCmdAction(Action):
11
    def run(self, host, command, password, username='Administrator'):
12
        """
13
        Run command on a remote node
14
        """
15
        out = run_cmd(
16
            command,
17
            args=[],
18
            user=username,
19
            password=password,
20
            host=host)
21
        return out
22