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

Changed role names hypervisor, client to hv, cli.

parent 7d86b5fb
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -20,7 +20,7 @@ The schema of the json file is described below::
Usage example:

>>> conf = CCConf('/etc/cloudcontrol/clients')
>>> conf.create_account(login='rms', password='secret', role='client')
>>> conf.create_account(login='rms', password='secret', role='cli')
>>> conf.create_account(login='server42', password='secret', role='node')
>>> print conf.authentify('server42', 'pouet')
None
@@ -29,7 +29,7 @@ u'node'
>>> conf.add_tag('rms', 'admin')
>>> conf.show('rms')
{'password': 'secret'
 'role': 'client',
 'role': 'cli',
 'tags': {},
 'perms': None}
>>> conf.remove_account('rms')
+3 −3
Original line number Diff line number Diff line
@@ -113,7 +113,7 @@ class HypervisorHandler(OnlineCCHandler):
        self._server.sub_unregister(client.login, obj_id)


class ClientHandler(OnlineCCHandler):
class CliHandler(OnlineCCHandler):
    '''
    Handler binded to 'cli' role.
    '''
@@ -417,8 +417,8 @@ class WelcomeHandler(CCHandler):
    '''
    
    ROLES = {
        'client': ClientHandler,
        'hypervisor': HypervisorHandler,
        'cli': CliHandler,
        'hv': HypervisorHandler,
    }

    @listed