changed nm controller type.
[nodemanager.git] / controller.py
index da5da1b..264b3bb 100644 (file)
@@ -1,4 +1,4 @@
-"""NM-Controller accounts are used to provide secure access to the XMLRPC API.  They are normal Unix accounts with a shell that tunnels XMLRPC requests to the API server."""
+"""Delegate accounts are used to provide secure access to the XMLRPC API.  They are normal Unix accounts with a shell that tunnels XMLRPC requests to the API server."""
 
 import accounts
 import logger
@@ -7,12 +7,12 @@ import tools
 
 class Controller(accounts.Account):
     SHELL = '/usr/bin/forward_api_calls'  # tunneling shell
-    TYPE = 'controller'
+    TYPE = 'controller.Controller'
 
     @staticmethod
     def create(name, vref = None):
-        add_shell(Delegate.SHELL)
-        logger.log_call('/usr/sbin/useradd', '-p', '*', '-s', Delegate.SHELL, name)
+        add_shell(Controller.SHELL)
+        logger.log_call('/usr/sbin/useradd', '-p', '*', '-s', Controller.SHELL, name)
 
     @staticmethod
     def destroy(name): logger.log_call('/usr/sbin/userdel', '-r', name)