예제 #1
0
 def __init__(self, value: str, container: ContainerInterface, common_labels: dict):
     assert isinstance(value, str)
     self.cgroup = container.get_cgroup()
     self.subcgroups = container.get_subcgroups()
     self.value = value
     self.common_labels = common_labels
     self.labels_updater = LabelsUpdater(common_labels or {})
     self.min_value = 0
     self.max_value = None  # TO BE UPDATED by subclass
예제 #2
0
 def __init__(self, normalized_quota: float, container: ContainerInterface,
              common_labels: dict):
     self.normalized_quota = normalized_quota
     self.cgroup = container.get_cgroup()
     self.subcgroups = container.get_subcgroups()
     super().__init__(value=normalized_quota,
                      common_labels=common_labels,
                      min_value=0,
                      max_value=1.0)