Skip to content

Commit

Permalink
Pylint fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
juztas committed Oct 10, 2023
1 parent 27b8ff0 commit 6e8ee15
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/python/SiteFE/REST/Modules/PrometheusCalls.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,10 +155,10 @@ def getQoSLabels(item):
return out

netState = Enum('network_status', 'Network Status information',
labelnames=labelnames,
states=['activated', 'activate-error', 'deactivated',
'deactivate-error', 'unknown'],
registry=registry)
labelnames=labelnames,
states=['activated', 'activate-error', 'deactivated',
'deactivate-error', 'unknown'],
registry=registry)
qosGauge = Gauge('qos_status', 'QoS Requests Status', labelqos, registry=registry)

currentActive = getActiveDeltas(self)
Expand All @@ -171,7 +171,6 @@ def getQoSLabels(item):
labels['valuetype'] = key
qosGauge.labels(**labels).set(item.get(key, 0))


def __getServiceStates(self, registry, **kwargs):
"""Get all Services states."""
serviceState = Enum('service_state', 'Description of enum',
Expand Down Expand Up @@ -213,6 +212,7 @@ def prometheus(self, environ, **kwargs):
"""Return prometheus stats."""
return self.__metrics(**kwargs)


class ActiveWrapper():
"""Active State and QoS Wrapper to report in prometheus format"""
def __init__(self):
Expand All @@ -238,7 +238,6 @@ def _addStats(self, indict, **kwargs):
'priority', 'reservableCapacity', 'type', 'unit']:
tmpargs[key] = indict['hasService'].get(key, '')
self.reports.append(tmpargs)
return

def _activeLooper(self, indict, **kwargs):
"""Loop over nested dictionary of activatestates up to level 3"""
Expand Down

0 comments on commit 6e8ee15

Please sign in to comment.