Test Failed
Pull Request — master (#73)
by macartur
01:46
created

UsersAPI.create()   A

Complexity

Conditions 1

Size

Total Lines 5

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 5
rs 9.4285
1
"""Translate cli commands to non-cli code."""
2
import logging
3
import os
4
5
from kytos.utils.users import UsersManager
6
7
log = logging.getLogger(__name__)
8
9
10
class UsersAPI:
11
    """An API for the command-line interface.
12
13
    Use the config file only for required options. Static methods are called
14
    by the parser and they instantiate an object of this class to fulfill the
15
    request.
16
    """
17
18
    user_manager = UsersManager()
19
20
    @classmethod
21
    def create(cls, args):
22
        """Create a new User in Napps server."""
23
        result = cls.user_manager.register()
24
        print(result)
25