Passed
Push — master ( f1939b...e2cb7a )
by P.R.
04:00
created

NagiosCommand   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 18
ccs 0
cts 6
cp 0
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A handle() 0 10 1
1
"""
2
Enarksh
3
4
Copyright 2013-2016 Set Based IT Consultancy
5
6
Licence MIT
7
"""
8
from cleo import Command
9
10
import enarksh
0 ignored issues
show
Unused Code introduced by
The import enarksh seems to be unused.
Loading history...
11
from enarksh.controller.client.NagiosClient import NagiosClient
12
from enarksh.controller.client.NodeActionClient import NodeActionClient
0 ignored issues
show
Unused Code introduced by
Unused NodeActionClient imported from enarksh.controller.client.NodeActionClient
Loading history...
13
from enarksh.style.EnarkshStyle import EnarkshStyle
14
15
16
class NagiosCommand(Command):
17
    """
18
    Test whether Enarksh is running properly.
19
20
    nagios
21
    """
22
23
    # ------------------------------------------------------------------------------------------------------------------
24
    def handle(self):
25
        """
26
        Executes the Nagios command.
27
        """
28
        self.output = EnarkshStyle(self.input, self.output)
29
30
        client = NagiosClient(self.output)
31
        ret = client.main()
32
33
        return ret
34
35
# ----------------------------------------------------------------------------------------------------------------------
36