Fixed an issue with periodType for PM_DATA fetching. Documentation enhancements
authorLeonidas Poulopoulos <leopoul@noc.grnet.gr>
Fri, 20 Jul 2012 07:37:34 +0000 (10:37 +0300)
committerLeonidas Poulopoulos <leopoul@noc.grnet.gr>
Fri, 20 Jul 2012 07:37:34 +0000 (10:37 +0300)
iooclient/eos_ned.py
iooclient/eos_pmd.py

index 5b518d9..fc068a4 100644 (file)
@@ -28,7 +28,7 @@ class eosNed(eos):
         @param server: The Hostname or IPv4 address of the Alcatel NMS.
         
         @type port: Integer
-        @param port: The TCP port on the Alcatel NMS we will connect to.
+        @param port: The TCP port on the Alcatel NMS we will connect to. Default 20006
         
         @type password: String
         @param password: The password for this connection.
index 9f3eff4..0687954 100644 (file)
@@ -30,7 +30,7 @@ class eosPmd(eos):
         @param server: The Hostname or IPv4 address of the Alcatel NMS.
         
         @type port: Integer
-        @param port: The TCP port on the Alcatel NMS we will connect to.
+        @param port: The TCP port on the Alcatel NMS we will connect to. Default 20007
         
         @type password: String
         @param password: The password for this connection.
@@ -42,7 +42,7 @@ class eosPmd(eos):
             port = 20007
         return eos.__init__(self, server, port, password)
     
-    def list_pm_data(self, startPeriod=None, endPeriod=None, neName=[], periodType=None, counters=[], pmPoints=[], parse=True):
+    def list_pm_data(self, startPeriod=None, endPeriod=None, neNames=[], periodType=None, counters=[], pmPoints=[], parse=True):
         '''
         Function used to obtain a listing of of PM DATA from NMS. Depending on parse value the output is either raw data from NMS 
         or structured python data
@@ -73,17 +73,17 @@ class eosPmd(eos):
         @type endPeriod: String
         @param endPeriod: To when to collect PM data. Format: YYYYMMDDQH where QH in [00,96] representing 15min periods in a day.
         
-        @type neName: A list of strings
-        @param neName: A list of NetworkElement names with pmPoints assigned. If omitted all NEs are assumed
+        @type neNames: A list of strings
+        @param neNames: A list of NetworkElement names with pmPoints assigned. If omitted all NEs are assumed. To get different pmpoints from different network elements use the notation ['neName1{pmpoint1|pmpoint2}','neName2{pmpoint4|pmpoint5}','neName3']
                 
         @type periodType: String
         @param periodType: The period of monitoring. Values: 15, 1h, 24, RM1, RM2, RM3, RM4, RM5, FL, immediate, peak, 30-day, IM, day, month. Default 15
         
         @type counters: A list of strings
-        @param counters: The counters for the above NetworkElements to fetch. If omitted all counters
+        @param counters: The counters for the above NetworkElements to fetch. Assumes that the Network Elements have the same pmPoints. If omitted all counters are returned
         
         @type pmPoints: A list of strings
-        @param pmPoints: The counters for the above NetworkElements to fetch. If omitted all counters
+        @param pmPoints: The pmPoints for the above NetworkElements to fetch. Assumes that the Network Elements have the same pmPoints. If omitted all pmPoints are fetched.
         
         @type parse: Boolean
         @param parse: Default: True. If set to True, the output is a python list of dictionaries. Otherwise the output is the NMS response text.   
@@ -92,12 +92,12 @@ class eosPmd(eos):
         @return: Performance monitoring data (counter values) in raw text format or in structured format. False in case of errors.
         '''
         extras = []
-        extras.append('periodType=%s'%(periodType) if periodType else '')
+        extras.append('periodType=%s'%(periodType) if periodType else 'periodType=15')
         extras.append('startPeriod=%s'%(startPeriod) if startPeriod else '')
         extras.append('endPeriod=%s'%(endPeriod) if endPeriod else '')
         extras.append('counters={%s}'%(('|'.join(counters)) if counters else ''))
         pmpoints = '{%s}' %('|'.join(["pmPoint="+pmPoint for pmPoint in pmPoints])) if pmPoints else None
-        extras.append('neName=%s'%(''.join([name+(pmpoints or '{}') for name in neName])) if neName else '')
+        extras.append('neName=%s'%(''.join([name+(pmpoints or '{}') for name in neNames])) if neNames else '')
         params = "|".join(extras) or ''
         message = "LIST_PM_DATA_REQ[%s]" %params
         if self.send(message) == False:
@@ -160,7 +160,7 @@ class eosPmd(eos):
         @return: Performance monitoring points (counter names) in raw text or in structured format. False in case of errors.
         '''
         extras = []
-        extras.append('%s'%(periodType) if periodType else '')
+        extras.append('%s'%(periodType) if periodType else '15')
         extras.append('%s'%(period) if period else '')
         extras.append('{%s}'%(('|'.join(neNames)) if neNames else ''))
         params = "|".join(extras) or ''