Commit fbd2c61d authored by Antoine Millet's avatar Antoine Millet
Browse files

Updated documentation.

parent bbcdbfe9
Loading
Loading
Loading
Loading
+18 −1
Original line number Diff line number Diff line
@@ -41,6 +41,7 @@ class Reporter(object):
        report = [('id', oid), ('status', 'error'), ('message', message)]
        self._reports[oid] = (output, report)


class CCHandler(RpcHandler):
    '''
    Base class for handlers of CloudControl server.
@@ -59,6 +60,12 @@ class CCHandler(RpcHandler):


    def functions(self, conn):
        '''
        Show the list of functions available to the peer.

        :return: list of dict with keys name and description.
        '''

        cmd_list = []

        for attr in dir(self):
@@ -74,6 +81,11 @@ class CCHandler(RpcHandler):
        return cmd_list

    def version(self, conn):
        '''
        Return the current server version.

        :return: the version
        '''
        return __version__


@@ -91,7 +103,7 @@ class OnlineCCHandler(CCHandler):

class HypervisorHandler(OnlineCCHandler):
    '''
    Handler binded to 'node' role.
    Handler binded to 'hv' role.
    '''

    @listed
@@ -676,6 +688,11 @@ class WelcomeHandler(CCHandler):
    def authentify(self, conn, login, password):
        '''
        Authenticate the client.

        :param login: the login of the account
        :param password: the password of the account (not hashed)
        :return: role affected to the client on success
        :thrown AuthenticationError: when authentication fail
        '''

        conf = self._server.conf