Add a method to Installer classes to validate argument input
[cascardo/ipsilon.git] / ipsilon / info / common.py
old mode 100755 (executable)
new mode 100644 (file)
index a3a297f..dd48ae9
@@ -1,5 +1,3 @@
-#!/usr/bin/python
-#
 # Copyright (C) 2014 Ipsilon Project Contributors
 #
 # See the file named COPYING for the project license
@@ -39,27 +37,12 @@ class InfoMapping(Log):
             'language': 'Language',
             'timezone': 'Time Zone',
         }
-        self.mapping = dict()
-
-    def set_mapping(self, attrs_map):
-        self.mapping = attrs_map
 
     def display_name(self, name):
         if name in self.standard_attributes:
             return self.standard_attributes[name]
         return name
 
-    def map_attrs(self, attrs):
-        s = dict()
-        e = dict()
-        for a in attrs:
-            if a in self.mapping:
-                s[self.mapping[a]] = attrs[a]
-            else:
-                e[a] = attrs[a]
-
-        return s, e
-
 
 FACILITY = 'info_config'
 
@@ -77,7 +60,7 @@ class Info(Log):
         self.debug('Available info providers: %s' % str(available))
 
         for item in plugins.enabled:
-            self.debug('Login plugin in enabled list: %s' % item)
+            self.debug('Info plugin in enabled list: %s' % item)
             if item not in plugins.available:
                 self.debug('Info Plugin %s not found' % item)
                 continue
@@ -111,6 +94,12 @@ class InfoProviderInstaller(object):
     def install_args(self, group):
         raise NotImplementedError
 
+    def validate_args(self, args):
+        return
+
+    def unconfigure(self, opts):
+        return
+
     def configure(self, opts):
         raise NotImplementedError