Example #1
0
 def get_bal_interface_stats(self, intf_id, interface_type):
     self.log.info('Fetching-Statistics')
     try:
         obj = bal_model_types_pb2.BalInterfaceKey()
         obj.intf_id = intf_id
         obj.intf_type = interface_type
         stats = yield self.stub.BalCfgStatGet(obj)
         self.log.info('Fetching-statistics-success', stats_data=stats.data)
         returnValue(stats)
     except Exception as e:
         self.log.info('Fetching-statistics-failed', exc=str(e))
Example #2
0
File: bal.py Project: bm2535/voltha
 def get_bal_nni_stats(self, nni_port):
     self.log.info('Fetching Statistics')
     try:
         obj = bal_model_types_pb2.BalInterfaceKey()
         obj.intf_id = nni_port
         obj.intf_type = bal_model_types_pb2.BAL_INTF_TYPE_NNI
         stats = yield self.stub.BalCfgStatGet(obj)
         self.log.info('Fetching statistics success', stats_data=stats.data)
         returnValue(stats.data)
     except Exception as e:
         self.log.info('Fetching statistics failed', exc=str(e))
Example #3
0
 def get_bal_interface_stats(self, intf_id, interface_type):
     # This happens too often and the below log is unnecessary.
     # The status are anyway available on kafka
     # self.log.debug('Fetching-Statistics')
     try:
         obj = bal_model_types_pb2.BalInterfaceKey()
         obj.intf_id = intf_id
         obj.intf_type = interface_type
         stats = yield self.stub.BalCfgStatGet(obj, timeout=GRPC_TIMEOUT)
         # This happens too often and the below log is unnecessary.
         # The status are anyway available on kafka
         # self.log.debug('Fetching-statistics-success',
         #               stats_data=stats.data)
         returnValue(stats)
     except Exception as e:
         self.log.info('Fetching-statistics-failed', exc=str(e))