Commit 91c913ad authored by Daniele Venzano's avatar Daniele Venzano

Cleanup stats module from docker-related fields

parent 1767044d
......@@ -27,35 +27,30 @@ class Stats:
self.timestamp = time.time()
class SwarmNodeStats(Stats):
"""Stats related to a single Swarm node."""
class NodeStats(Stats):
"""Stats related to a single node."""
def __init__(self, name):
super().__init__()
self.name = name
self.docker_endpoint = None
self.container_count = 0
self.cores_total = 0
self.cores_reserved = 0
self.cores_free = 0
self.memory_total = 0
self.memory_reserved = 0
self.memory_free = 0
self.labels = {}
self.status = None
self.error = ''
self.last_update = None
self.server_version = None
class SwarmStats(Stats):
"""Stats related to the whole Swarm cluster."""
class ClusterStats(Stats):
"""Stats related to the whole cluster."""
def __init__(self):
super().__init__()
self.container_count = 0
self.image_count = 0
self.memory_total = 0
self.cores_total = 0
self.placement_strategy = ''
self.active_filters = []
self.status = 'Unknown'
self.nodes = []
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment