#!/usr/bin/env python
# -*- coding: utf-8 -*-

class ModulesGeneric(object):
    """Module generic is the skeleton to build your own numeter module.
        If you want to write your own numeter module, you can take this
        class and build your own with it.
    """

    def  __init__(self, configParser=None):
        """When numeter load a module, the only one parameter is the config
           parser. It's allow you to add section in numeter config file for your
           own module."""
        raise NotImplementedError

    def getInfo(self):
        """Return for all datas you have collected. The output must be formated
           like that : ::

             infos=   [{    'Plugin': plugin,
                           'Base': '1000',
                           'Describ': '',
                           'Title': plugin,
                           'Vlabel': '',
                           'Order': '',
                           'Infos': {
                                 "id":{"type": "COUNTER", "id": "down", "label": "received"},
                                 "id":{"type": "COUNTER", "id": "up", "label": "upload"},
                           }
                      }]

           .. warning::

             Each DataSource (each datas) you define in getData must have at
             least an entry in getInfo return like ``"id":{"id": "up"}``
        """
        raise NotImplementedError



    def getData(self):
        """Get and return all collected datas. The output must be formated
           like that : ::

             data=   [{      'TimeStamp': 1410907894,
                             'Plugin': 'df',
                             'Values': {
                                         'dev_sda' : 40,
                                         'dev_sdb' : 15,
                                       }
                     }]

        """
        raise NotImplementedError



@@ -684,17 +684,16 @@
    %5B%7B   
- 
 'Plugin'
@@ -694,22 +694,20 @@
 lugin': 
-plugin
+'if'
 ,%0A      
@@ -825,14 +825,17 @@
 e': 
-plugin
+'if eth0'
 ,%0A  
@@ -977,34 +977,36 @@
                %22
-i
 d
+own
 %22:%7B%22type%22: %22COUN
@@ -1081,18 +1081,18 @@
        %22
-id
+up
 %22:%7B%22type
@@ -1635,17 +1635,17 @@
 ugin': '
-d
+i
 f',%0A    
@@ -1727,15 +1727,10 @@
    '
-dev_sda
+up
 ' : 
@@ -1780,14 +1780,11 @@
   'd
-ev_sdb
+own
 ' : 

improve docstring for moduleGeneric