Skip to content

Commit

Permalink
ensure python-docker-py dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
juanvallejo committed Aug 21, 2017
1 parent ac0ec16 commit f2bf837
Showing 1 changed file with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,25 @@
"""

from openshift_checks import OpenShiftCheck
from openshift_checks.mixins import DockerHostMixin


class EtcdImageDataSize(OpenShiftCheck):
class EtcdImageDataSize(DockerHostMixin, OpenShiftCheck):
"""Check that total size of OpenShift image data does not exceed the recommended limit in an etcd cluster"""

name = "etcd_imagedata_size"
tags = ["etcd"]

dependencies = ["python-docker-py"]

def run(self):
msg, failed = self.ensure_dependencies()
if failed:
return {
"failed": True,
"msg": "Some dependencies are required in order to check Docker image availability.\n" + msg
}

etcd_mountpath = self.find_ansible_mount("/var/lib/etcd")
etcd_avail_diskspace = etcd_mountpath["size_available"]
etcd_total_diskspace = etcd_mountpath["size_total"]
Expand Down

0 comments on commit f2bf837

Please sign in to comment.