Passed
Push — master ( d0d877...142711 )
by Beraldo
01:50
created

ControllerAPI.stop()   A

Complexity

Conditions 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
c 1
b 0
f 0
dl 0
loc 4
rs 10
1
"""Translate cli commands to non-cli code."""
2
import subprocess
3
4
5
class ControllerAPI:
6
    """Handle KytosController comamnds."""
7
8
    @staticmethod
9
    def start():
10
        """Start KytosController."""
11
        subprocess.run(["kytosd"])
12
13
    @staticmethod
14
    def status():
15
        """Display KytosController status."""
16
        subprocess.run(["kytosd", 'status'])
17
18
    @staticmethod
19
    def stop():
20
        """Start KytosController."""
21
        subprocess.run(["kytosd", 'stop'])
22